From 5cc851e17538be1446ace4415cb26bbe6ba9345f Mon Sep 17 00:00:00 2001 From: refractionpcsx2 Date: Wed, 26 Jul 2023 23:00:05 +0100 Subject: [PATCH] GS/TC: On LocalMemInvalidate, check for RT's if Z mismatches --- pcsx2/GS/Renderers/HW/GSTextureCache.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pcsx2/GS/Renderers/HW/GSTextureCache.cpp b/pcsx2/GS/Renderers/HW/GSTextureCache.cpp index 4dc0189f85..6522ad3830 100644 --- a/pcsx2/GS/Renderers/HW/GSTextureCache.cpp +++ b/pcsx2/GS/Renderers/HW/GSTextureCache.cpp @@ -2837,7 +2837,9 @@ void GSTextureCache::InvalidateLocalMem(const GSOffset& off, const GSVector4i& r Read(t, draw_rect); - z_found = read_start >= t->m_TEX0.TBP0 && read_end <= t->m_end_block; + // Getaway (J) stores a Z texture at 0x2800 which it uses and the next frame it stores the reflection map in + // 0x2800, so this will misdetect. So if it's not expecting a Z, check for RT's too. + z_found = read_start >= t->m_TEX0.TBP0 && read_end <= t->m_end_block && GSLocalMemory::m_psm[psm].depth == GSLocalMemory::m_psm[t->m_TEX0.PSM].depth; if (draw_rect.rintersect(t->m_drawn_since_read).eq(t->m_drawn_since_read)) t->m_drawn_since_read = GSVector4i::zero();