From ec1a89679534160663e652d736509426afc7ede7 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Sun, 9 Oct 2022 16:44:31 +1000 Subject: [PATCH] GS/TextureCache: Partially invalidate overlapping targets with tex-in-rt --- pcsx2/GS/Renderers/HW/GSTextureCache.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pcsx2/GS/Renderers/HW/GSTextureCache.cpp b/pcsx2/GS/Renderers/HW/GSTextureCache.cpp index 23b87153d9..8a3d559ab9 100644 --- a/pcsx2/GS/Renderers/HW/GSTextureCache.cpp +++ b/pcsx2/GS/Renderers/HW/GSTextureCache.cpp @@ -1000,6 +1000,12 @@ void GSTextureCache::InvalidateVideoMem(const GSOffset& off, const GSVector4i& r continue; } } + else if (GSConfig.UserHacks_TextureInsideRt && t->Overlaps(bp, bw, psm, rect) && GSUtil::HasCompatibleBits(psm, t->m_TEX0.PSM)) + { + const SurfaceOffset so = ComputeSurfaceOffset(off, r, t); + if (so.is_valid) + t->m_dirty.push_back(GSDirtyRect(so.b2a_offset, psm, bw)); + } #endif } }