mirror of
https://github.com/stenzek/duckstation.git
synced 2025-06-08 12:35:48 +00:00
GPU/HW: Fix assert triggering in debug mode
This commit is contained in:
parent
9050098e3e
commit
43ed92415d
@ -55,13 +55,15 @@ static constexpr const std::array s_transparency_modes = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static constexpr const std::array s_batch_texture_modes = {
|
static constexpr const std::array s_batch_texture_modes = {
|
||||||
"Palette4Bit", "Palette8Bit", "Direct16Bit", "Disabled",
|
"Palette4Bit", "Palette8Bit", "Direct16Bit", "PageTexture",
|
||||||
"SpritePalette4Bit", "SpritePalette8Bit", "SpriteDirect16Bit",
|
"Disabled", "SpritePalette4Bit", "SpritePalette8Bit", "SpriteDirect16Bit",
|
||||||
};
|
};
|
||||||
|
static_assert(s_batch_texture_modes.size() == static_cast<size_t>(GPU_HW::BatchTextureMode::MaxCount));
|
||||||
|
|
||||||
static constexpr const std::array s_batch_render_modes = {
|
static constexpr const std::array s_batch_render_modes = {
|
||||||
"TransparencyDisabled", "TransparentAndOpaque", "OnlyOpaque", "OnlyTransparent", "ShaderBlend",
|
"TransparencyDisabled", "TransparentAndOpaque", "OnlyOpaque", "OnlyTransparent", "ShaderBlend",
|
||||||
};
|
};
|
||||||
|
static_assert(s_batch_render_modes.size() == static_cast<size_t>(GPU_HW::BatchRenderMode::MaxCount));
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -3616,7 +3618,10 @@ void GPU_HW::DispatchRenderCommand()
|
|||||||
|
|
||||||
DebugAssert((rc.IsTexturingEnabled() && (texture_mode == BatchTextureMode::PageTexture &&
|
DebugAssert((rc.IsTexturingEnabled() && (texture_mode == BatchTextureMode::PageTexture &&
|
||||||
texture_cache_key.mode == m_draw_mode.mode_reg.texture_mode) ||
|
texture_cache_key.mode == m_draw_mode.mode_reg.texture_mode) ||
|
||||||
texture_mode == static_cast<BatchTextureMode>(m_draw_mode.mode_reg.texture_mode.GetValue())) ||
|
texture_mode == static_cast<BatchTextureMode>(
|
||||||
|
(m_draw_mode.mode_reg.texture_mode == GPUTextureMode::Reserved_Direct16Bit) ?
|
||||||
|
GPUTextureMode::Direct16Bit :
|
||||||
|
m_draw_mode.mode_reg.texture_mode)) ||
|
||||||
(!rc.IsTexturingEnabled() && texture_mode == BatchTextureMode::Disabled));
|
(!rc.IsTexturingEnabled() && texture_mode == BatchTextureMode::Disabled));
|
||||||
DebugAssert(!(m_texpage_dirty & TEXPAGE_DIRTY_PAGE_RECT) || texture_mode == BatchTextureMode::PageTexture ||
|
DebugAssert(!(m_texpage_dirty & TEXPAGE_DIRTY_PAGE_RECT) || texture_mode == BatchTextureMode::PageTexture ||
|
||||||
!rc.IsTexturingEnabled());
|
!rc.IsTexturingEnabled());
|
||||||
|
@ -30,7 +30,9 @@ public:
|
|||||||
TransparentAndOpaque,
|
TransparentAndOpaque,
|
||||||
OnlyOpaque,
|
OnlyOpaque,
|
||||||
OnlyTransparent,
|
OnlyTransparent,
|
||||||
ShaderBlend
|
ShaderBlend,
|
||||||
|
|
||||||
|
MaxCount,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class BatchTextureMode : u8
|
enum class BatchTextureMode : u8
|
||||||
|
Loading…
x
Reference in New Issue
Block a user