Skip to content

Commit

Permalink
GS/HW: Get the proper context for the next draw if it's a split textu…
Browse files Browse the repository at this point in the history
…re shuffle.

Draw might switch the context so make sure we get the correct one.
  • Loading branch information
lightningterror committed Dec 16, 2024
1 parent 3cafd2d commit c2ee5a0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pcsx2/GS/Renderers/HW/GSRendererHW.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 ||
Expand Down

0 comments on commit c2ee5a0

Please sign in to comment.