GS: Avoid some unnecessary flushes

CLUT only updates if valid index type used in PSM
This commit is contained in:
refractionpcsx2 2021-12-14 10:23:22 +00:00
parent 42dad4ade8
commit 37ccd81985
1 changed files with 3 additions and 2 deletions

View File

@ -148,7 +148,8 @@ bool GSClut::WriteTest(const GIFRegTEX0& TEX0, const GIFRegTEXCLUT& TEXCLUT)
__assume(0);
}
return m_write.IsDirty(TEX0, TEXCLUT);
// CLUT only reloads if PSM is a valid index type, avoid unnecessary flushes
return ((TEX0.PSM & 0x7) >= 3) && m_write.IsDirty(TEX0, TEXCLUT);
}
void GSClut::Write(const GIFRegTEX0& TEX0, const GIFRegTEXCLUT& TEXCLUT)
@ -157,7 +158,7 @@ void GSClut::Write(const GIFRegTEX0& TEX0, const GIFRegTEXCLUT& TEXCLUT)
m_write.TEXCLUT = TEXCLUT;
m_read.dirty = true;
m_write.dirty = false;
(this->*m_wc[TEX0.CSM][TEX0.CPSM][TEX0.PSM])(TEX0, TEXCLUT);
}