From 9706045656a108e476c45205250f8a4b24e1dc77 Mon Sep 17 00:00:00 2001 From: refractionpcsx2 Date: Sun, 11 Jun 2023 08:11:52 +0100 Subject: [PATCH] GS: Fix reg used to get frame mask on autoflush --- pcsx2/GS/GSState.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcsx2/GS/GSState.cpp b/pcsx2/GS/GSState.cpp index 2dd911b83a..2bb3af1da8 100644 --- a/pcsx2/GS/GSState.cpp +++ b/pcsx2/GS/GSState.cpp @@ -2830,7 +2830,7 @@ __forceinline bool GSState::IsAutoFlushDraw(u32 prim) if (!PRIM->TME || (GSConfig.UserHacks_AutoFlush == GSHWAutoFlushLevel::SpritesOnly && prim != GS_SPRITE)) return false; - const u32 frame_mask = GSLocalMemory::m_psm[m_context->TEX0.PSM].fmsk; + const u32 frame_mask = GSLocalMemory::m_psm[m_context->FRAME.PSM].fmsk; const bool frame_hit = m_context->FRAME.Block() == m_context->TEX0.TBP0 && !(m_context->TEST.ATE && m_context->TEST.ATST == 0 && m_context->TEST.AFAIL == 2) && ((m_context->FRAME.FBMSK & frame_mask) != frame_mask); // There's a strange behaviour we need to test on a PS2 here, if the FRAME is a Z format, like Powerdrome something swaps over, and it seems Alpha Fail of "FB Only" writes to the Z.. it's odd. const bool zbuf_hit = (m_context->ZBUF.Block() == m_context->TEX0.TBP0) && !(m_context->TEST.ATE && m_context->TEST.ATST == 0 && m_context->TEST.AFAIL != 2) && !m_context->ZBUF.ZMSK;