GS: Improve clut testing, add test for local->local transfers.

Fixes Sagashi ni Ikouyo which does local->local transfers in to the CLUT so it needs flushing.
This commit is contained in:
refractionpcsx2 2022-07-08 01:17:16 +01:00
parent e48e810005
commit a206187802
1 changed files with 4 additions and 3 deletions

View File

@ -710,8 +710,7 @@ __inline void GSState::CheckFlushes()
Flush();
}
}
if ((m_context->FRAME.FBMSK & GSLocalMemory::m_psm[m_context->FRAME.PSM].fmsk) != GSLocalMemory::m_psm[m_context->FRAME.PSM].fmsk)
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)
m_mem.m_clut.Invalidate(m_context->FRAME.Block());
}
@ -1952,7 +1951,7 @@ void GSState::Write(const u8* mem, int len)
FlushWrite();
}
m_mem.m_clut.Invalidate();
m_mem.m_clut.Invalidate(blit.DBP);
}
void GSState::InitReadFIFO(u8* mem, int len)
@ -2196,6 +2195,8 @@ void GSState::Move()
(m_mem.*dpsm.wpa)(doff, (m_mem.*spsm.rpa)(soff));
});
}
m_mem.m_clut.Invalidate(m_env.BITBLTBUF.DBP);
}
void GSState::SoftReset(u32 mask)