From 13880354cf11b829bfd859c64ae2dbb463a33bcb Mon Sep 17 00:00:00 2001 From: refractionpcsx2 Date: Fri, 25 Aug 2023 00:14:53 +0100 Subject: [PATCH] GS/TC: Don't expand block offsets to page size when small --- 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 441518c16d..3bd7974d49 100644 --- a/pcsx2/GS/Renderers/HW/GSTextureCache.cpp +++ b/pcsx2/GS/Renderers/HW/GSTextureCache.cpp @@ -516,7 +516,9 @@ void GSTextureCache::DirtyRectByPage(u32 sbp, u32 spsm, u32 sbw, Target* t, GSVe { const int xblocks = in_rect.width() / src_info->bs.x; const int yblocks = in_rect.height() / src_info->bs.y; - if ((!(block_offset & 0x7) && xblocks <= 4 && yblocks <= 2) || req_depth_offset) + // if !(block_offset & 0x7) is false, this is technically incorrect, but FFX hates it and starts making a mess, so it's better this way without adding complexity. + // TODO maybe: Add per block invalidation? ugh, would have to keep that to small blocks. 2 blocks in the case of FFX. + if ((xblocks <= 4 && yblocks <= 2) || req_depth_offset) { GSVector4i b2a_offset = GSVector4i::zero(); const GSVector4i target_rect = GSVector4i(0, 0, src_width, 2048);