From fa953d7bb38e2f26734d7420e56f9bdf0b8c9623 Mon Sep 17 00:00:00 2001 From: refractionpcsx2 Date: Fri, 23 Jan 2026 12:25:28 +0000 Subject: [PATCH] GS/TC: Allow creation of target during GS->GS transfer with offset --- pcsx2/GS/Renderers/HW/GSTextureCache.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pcsx2/GS/Renderers/HW/GSTextureCache.cpp b/pcsx2/GS/Renderers/HW/GSTextureCache.cpp index 0580f3c8b2..7a05f5ea62 100644 --- a/pcsx2/GS/Renderers/HW/GSTextureCache.cpp +++ b/pcsx2/GS/Renderers/HW/GSTextureCache.cpp @@ -5091,14 +5091,14 @@ bool GSTextureCache::Move(u32 SBP, u32 SBW, u32 SPSM, int sx, int sy, u32 DBP, u // We use dx/dy == 0 and the TBW check as a safeguard to make sure these go through to local memory. // We can also recreate the target if it's previously been created in the height cache with a valid size. // Good test case for this is the Xenosaga I cutscene transitions, or Gradius V. - if (src && !dst && ((dx == 0 && dy == 0 && ((static_cast(w) + 63) / 64) <= DBW) || HasTargetInHeightCache(DBP, DBW, DPSM, 10))) + if (src && !dst && ((((dx == 0 && dy == 0) || (dx == sx && dy == sy && DBW == src->m_TEX0.TBW)) && ((static_cast(w) + 63) / 64) <= DBW) || HasTargetInHeightCache(DBP, DBW, DPSM, 10))) { GIFRegTEX0 new_TEX0 = {}; new_TEX0.TBP0 = DBP; new_TEX0.TBW = DBW; new_TEX0.PSM = DPSM; - const GSVector2i target_size = GetTargetSize(DBP, DBW, DPSM, Common::AlignUpPow2(w, 64), h); + const GSVector2i target_size = (dx == 0 && dy == 0) ? GetTargetSize(DBP, DBW, DPSM, Common::AlignUpPow2(w, 64), h) : GSVector2i(src->m_valid.z, src->m_valid.w); dst = LookupTarget(new_TEX0, target_size, src->m_scale, src->m_type); if (!dst) {