From c2ee5a0234f09e47dbead8aaabc8493d14c702d3 Mon Sep 17 00:00:00 2001 From: lightningterror <18107717+lightningterror@users.noreply.github.com> Date: Sun, 15 Dec 2024 19:39:30 +0100 Subject: [PATCH] GS/HW: Get the proper context for the next draw if it's a split texture shuffle. Draw might switch the context so make sure we get the correct one. --- pcsx2/GS/Renderers/HW/GSRendererHW.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pcsx2/GS/Renderers/HW/GSRendererHW.cpp b/pcsx2/GS/Renderers/HW/GSRendererHW.cpp index e593c3be43f3f..3cb54177f14b7 100644 --- a/pcsx2/GS/Renderers/HW/GSRendererHW.cpp +++ b/pcsx2/GS/Renderers/HW/GSRendererHW.cpp @@ -1012,7 +1012,8 @@ bool GSRendererHW::NextDrawMatchesShuffle() const { // Make sure nothing unexpected has changed. // Twinsanity seems to screw with ZBUF here despite it being irrelevant. - const GSDrawingContext& next_ctx = m_env.CTXT[m_backed_up_ctx]; + const int get_next_ctx = (m_state_flush_reason == CONTEXTCHANGE) ? m_env.PRIM.CTXT : m_backed_up_ctx; + const GSDrawingContext& next_ctx = m_env.CTXT[get_next_ctx]; if (((m_context->TEX0.U64 ^ next_ctx.TEX0.U64) & (~0x3FFF)) != 0 || m_context->TEX1.U64 != next_ctx.TEX1.U64 || m_context->CLAMP.U64 != next_ctx.CLAMP.U64 ||