GS/HW: Check for format combinations that make sense for CSBW

True Crime: New York City strikes again...
This commit is contained in:
Stenzek 2024-04-23 17:32:34 +10:00 committed by Connor McLaughlin
parent ece89051bd
commit 9f1483f01b
1 changed files with 8 additions and 0 deletions

View File

@ -6222,6 +6222,14 @@ bool GSRendererHW::CanUseSwPrimRender(bool no_rt, bool no_ds, bool draw_sprite_t
if (!rc.GetDirtyRect(m_cached_ctx.TEX0, false).rintersect(tr).rempty())
return true;
}
// Make sure it actually makes sense to use this target as a source, given the formats, and it wouldn't just sample as garbage.
// We can't rely exclusively on the dirty rect check above, because sometimes the targets are from older frames and too large.
if (!GSUtil::HasSameSwizzleBits(m_cached_ctx.TEX0.PSM, src_target->m_TEX0.PSM) &&
(!src_target->m_32_bits_fmt || GSLocalMemory::m_psm[m_cached_ctx.TEX0.PSM].bpp != 16))
{
return true;
}
}
return false;