From ecb86b01c88758cd77e0925b2b15771864aaa625 Mon Sep 17 00:00:00 2001 From: refractionpcsx2 Date: Thu, 28 Dec 2023 06:33:46 +0000 Subject: [PATCH] GS/TC: Fix invalidation when start page is negative --- pcsx2/GS/Renderers/HW/GSTextureCache.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pcsx2/GS/Renderers/HW/GSTextureCache.cpp b/pcsx2/GS/Renderers/HW/GSTextureCache.cpp index fe717cc329..9751b3b971 100644 --- a/pcsx2/GS/Renderers/HW/GSTextureCache.cpp +++ b/pcsx2/GS/Renderers/HW/GSTextureCache.cpp @@ -509,6 +509,9 @@ void GSTextureCache::DirtyRectByPage(u32 sbp, u32 spsm, u32 sbw, Target* t, GSVe const int vertical_offset = (inc_vertical_offset / src_info->pgs.y) * src_pg_width; page_offset -= vertical_offset; + if (start_page < 0 && in_rect.x == 0 && in_rect.y == 0) + start_page -= vertical_offset; + sbp -= vertical_offset << 5; // Update the block offset. block_offset = static_cast(sbp) - static_cast(target_bp);