From a95492f7a0769a165597706b36d6b3450a646128 Mon Sep 17 00:00:00 2001 From: refractionpcsx2 Date: Sun, 20 Nov 2022 17:54:33 +0000 Subject: [PATCH] GS-TC: Only reset age on new Tex in RT targets. Caused huge GS usage on Urban Reign due to old target. --- pcsx2/GS/Renderers/HW/GSTextureCache.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pcsx2/GS/Renderers/HW/GSTextureCache.cpp b/pcsx2/GS/Renderers/HW/GSTextureCache.cpp index 1ee67ed64c..3cfc76052c 100644 --- a/pcsx2/GS/Renderers/HW/GSTextureCache.cpp +++ b/pcsx2/GS/Renderers/HW/GSTextureCache.cpp @@ -1021,7 +1021,10 @@ void GSTextureCache::InvalidateVideoMem(const GSOffset& off, const GSVector4i& r const SurfaceOffset so = ComputeSurfaceOffset(off, r, t); if (so.is_valid) { - t->m_age = 0; + // Don't reset the age on old targets, possibly misdetection, it upsets Urban Reign. + if (t->m_age < 30) + t->m_age = 0; + t->m_dirty.push_back(GSDirtyRect(so.b2a_offset, psm, bw)); } }