GS/HW: Update 32-bit flag for depth buffers too

Jackie Chan Adventures re-uses a previous C32 target pointer as a Z16S
depth buffer, but it does clear it inbetween. So we need to remove the
32-bit flag on the clear.
This commit is contained in:
Connor McLaughlin 2023-04-08 23:45:48 +10:00 committed by refractionpcsx2
parent f569ad0970
commit 6c4152a7e0
1 changed files with 4 additions and 0 deletions

View File

@ -2057,6 +2057,10 @@ void GSRendererHW::Draw()
rt->m_32_bits_fmt = m_texture_shuffle || (GSLocalMemory::m_psm[m_cached_ctx.FRAME.PSM].bpp != 16);
}
// Do the same for the depth target. Jackie Chan Adventures swaps from C32 to Z16 after a clear.
if (ds)
ds->m_32_bits_fmt = (GSLocalMemory::m_psm[m_cached_ctx.ZBUF.PSM].bpp != 16);
// Deferred update of TEX0. We don't want to change it when we're doing a shuffle/clear, because it
// may increase the buffer width, or change PSM, which breaks P8 conversion amongst other things.
const bool is_mem_clear = IsConstantDirectWriteMemClear(false);