diff --git a/pcsx2/GS/GSClut.cpp b/pcsx2/GS/GSClut.cpp index 981e564f5a..10d2f6ff4c 100644 --- a/pcsx2/GS/GSClut.cpp +++ b/pcsx2/GS/GSClut.cpp @@ -108,9 +108,11 @@ void GSClut::Invalidate() m_write.dirty = true; } +// This checks the whole page! Some games (like We Love Katamari) have the CLUT 1 block ahead of the DBP during a transfer. +// Safer to check if the whole page is being written anyway since it could modify only part of the CLUT. void GSClut::Invalidate(u32 block) { - if (block == m_write.TEX0.CBP) + if (!((block ^ m_write.TEX0.CBP) & ~0x1F)) { m_write.dirty = true; } diff --git a/pcsx2/GS/GSState.cpp b/pcsx2/GS/GSState.cpp index 7b1b90a9ca..d301a233f8 100644 --- a/pcsx2/GS/GSState.cpp +++ b/pcsx2/GS/GSState.cpp @@ -710,8 +710,12 @@ __inline void GSState::CheckFlushes() Flush(); } } - if (m_index.tail > 0 && (m_context->FRAME.FBMSK & GSLocalMemory::m_psm[m_context->FRAME.PSM].fmsk) != GSLocalMemory::m_psm[m_context->FRAME.PSM].fmsk) + if ((m_context->FRAME.FBMSK & GSLocalMemory::m_psm[m_context->FRAME.PSM].fmsk) != GSLocalMemory::m_psm[m_context->FRAME.PSM].fmsk) m_mem.m_clut.Invalidate(m_context->FRAME.Block()); + + // Hey, why not check? I mean devs have done crazier things.. + if(!m_context->ZBUF.ZMSK) + m_mem.m_clut.Invalidate(m_context->ZBUF.Block()); } void GSState::GIFPackedRegHandlerNull(const GIFPackedReg* RESTRICT r)