MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / WriteTest

Method WriteTest

pcsx2/GS/GSClut.cpp:205–217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

203}
204
205bool GSClut::WriteTest(const GIFRegTEX0& TEX0, const GIFRegTEXCLUT& TEXCLUT)
206{
207 // Check if PSM is an indexed format BEFORE the load condition, updating CBP0/1 on an invalid format is not allowed
208 // and can break games. Corvette (NTSC) is a good example of this.
209 if ((TEX0.PSM & 0x7) < 3)
210 return false;
211
212 if (!CanLoadCLUT(TEX0, true))
213 return false;
214
215 // CLUT only reloads if PSM is a valid index type, avoid unnecessary flushes.
216 return m_write.IsDirty(TEX0, TEXCLUT);
217}
218
219void GSClut::Write(const GIFRegTEX0& TEX0, const GIFRegTEXCLUT& TEXCLUT)
220{

Callers 1

ApplyTEX0Method · 0.80

Calls 1

IsDirtyMethod · 0.45

Tested by

no test coverage detected