GS/HW: Fix some asserts tripping in debug builds

This commit is contained in:
Stenzek 2023-03-31 20:16:24 +10:00 committed by refractionpcsx2
parent fcbc027abc
commit c441d76b7b
2 changed files with 4 additions and 6 deletions

View File

@ -1882,9 +1882,6 @@ void GSRendererHW::Draw()
return;
}
// Texture shuffle is not yet supported with strange clamp mode
ASSERT(!m_texture_shuffle || (context->CLAMP.WMS < 3 && context->CLAMP.WMT < 3));
if (src->m_target && IsPossibleChannelShuffle())
{
GL_INS("Channel shuffle effect detected (2nd shot)");

View File

@ -2804,6 +2804,7 @@ GSTextureCache::Source* GSTextureCache::CreateSource(const GIFRegTEX0& TEX0, con
}
bool hack = false;
bool channel_shuffle = false;
if (dst && (x_offset != 0 || y_offset != 0))
{
@ -2866,9 +2867,9 @@ GSTextureCache::Source* GSTextureCache::CreateSource(const GIFRegTEX0& TEX0, con
// TODO: clean up this mess
ShaderConvert shader = dst->m_type != RenderTarget ? ShaderConvert::FLOAT32_TO_RGBA8 : ShaderConvert::COPY;
const bool channel_shuffle = GSRendererHW::GetInstance()->TestChannelShuffle(dst);
const bool is_8bits = TEX0.PSM == PSM_PSMT8 && !channel_shuffle;
channel_shuffle = GSRendererHW::GetInstance()->TestChannelShuffle(dst);
const bool is_8bits = TEX0.PSM == PSM_PSMT8 && !channel_shuffle;
if (is_8bits)
{
GL_INS("Reading RT as a packed-indexed 8 bits format");
@ -3132,7 +3133,7 @@ GSTextureCache::Source* GSTextureCache::CreateSource(const GIFRegTEX0& TEX0, con
ASSERT(src->m_texture);
ASSERT(src->m_target == (dst != nullptr));
ASSERT(src->m_from_target == dst);
ASSERT(src->m_scale == ((!dst || TEX0.PSM == PSM_PSMT8) ? 1.0f : dst->m_scale));
ASSERT(src->m_scale == ((!dst || (TEX0.PSM == PSM_PSMT8 && !channel_shuffle)) ? 1.0f : dst->m_scale));
if (src != m_temporary_source)
{