From 0eb963d491b8755afb1c9d2a039ed5ddebea93b5 Mon Sep 17 00:00:00 2001 From: refractionpcsx2 Date: Sun, 10 Jul 2022 07:30:11 +0100 Subject: [PATCH] GS: Remove needless flush check on Host->Local write. --- pcsx2/GS/GSState.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pcsx2/GS/GSState.cpp b/pcsx2/GS/GSState.cpp index d301a233f8..6a03d920a9 100644 --- a/pcsx2/GS/GSState.cpp +++ b/pcsx2/GS/GSState.cpp @@ -1923,8 +1923,10 @@ void GSState::Write(const u8* mem, int len) m_env.TRXPOS.DIRX, m_env.TRXPOS.DIRY, m_env.TRXPOS.DSAX, m_env.TRXPOS.DSAY, w, h); - if ((PRIM->TME && (blit.DBP == m_context->TEX0.TBP0 || blit.DBP == m_context->TEX0.CBP)) || - (m_prev_env.PRIM.TME && (blit.DBP == m_prev_env.CTXT[m_prev_env.PRIM.CTXT].TEX0.TBP0 || blit.DBP == m_prev_env.CTXT[m_prev_env.PRIM.CTXT].TEX0.CBP))) // TODO: hmmmm + // TODO: Not really sufficient if a partial texture update is done outside the block. + // No need to check CLUT here, we can invalidate it below, no need to flush it since TEX0 needs to update, then we can flush. + if ((PRIM->TME && (blit.DBP == m_context->TEX0.TBP0)) || + (m_prev_env.PRIM.TME && (blit.DBP == m_prev_env.CTXT[m_prev_env.PRIM.CTXT].TEX0.TBP0))) Flush(); if (m_tr.end == 0 && len >= m_tr.total)