From 83ebbe95c53a180b5e7761890dd8c7097166dfa4 Mon Sep 17 00:00:00 2001 From: lightningterror <18107717+lightningterror@users.noreply.github.com> Date: Tue, 15 Jul 2025 18:49:36 +0200 Subject: [PATCH] GS/TC: Don't split/resize buffer when texture buffer width is 0. Textures wrap within a single page. --- pcsx2/GS/Renderers/HW/GSTextureCache.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pcsx2/GS/Renderers/HW/GSTextureCache.cpp b/pcsx2/GS/Renderers/HW/GSTextureCache.cpp index df42438be6..c5e8d7de42 100644 --- a/pcsx2/GS/Renderers/HW/GSTextureCache.cpp +++ b/pcsx2/GS/Renderers/HW/GSTextureCache.cpp @@ -3452,8 +3452,9 @@ bool GSTextureCache::PreloadTarget(GIFRegTEX0 TEX0, const GSVector2i& size, cons continue; } - // could be overwriting a double buffer, so if it's the second half of it, just reduce the size down to half. - if (((((t->UnwrappedEndBlock() + 1) - t->m_TEX0.TBP0) >> 1) + t->m_TEX0.TBP0) == dst->m_TEX0.TBP0 && dst->m_TEX0.TBW == t->m_TEX0.TBW) + // Could be overwriting a double buffer, so if it's the second half of it, just reduce the size down to half. + // Don't split/resize buffer when TBW is 0, textures wrap within a single page. + if (((((t->UnwrappedEndBlock() + 1) - t->m_TEX0.TBP0) >> 1) + t->m_TEX0.TBP0) == dst->m_TEX0.TBP0 && dst->m_TEX0.TBW == t->m_TEX0.TBW && dst->m_TEX0.TBW != 0) { GSVector4i new_valid = t->m_valid; new_valid.w /= 2;