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

Method InvalidateRange

pcsx2/GS/GSClut.cpp:140–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138}
139
140bool GSClut::InvalidateRange(u32 start_block, u32 end_block, bool is_draw)
141{
142 if (m_write.dirty & 2)
143 return m_write.dirty;
144
145 GIFRegTEX0 next_cbp;
146 next_cbp.U64 = m_write.next_tex0;
147
148 // Handle wrapping writes. Star Wars Battlefront 2 does this.
149 if ((end_block & 0xFFE0) < (start_block & 0xFFE0))
150 {
151 if ((next_cbp.CBP + 3U) <= end_block)
152 next_cbp.CBP += 0x4000;
153
154 end_block += 0x4000;
155 }
156
157 if ((next_cbp.CBP + 3U) >= start_block && end_block >= next_cbp.CBP)
158 {
159 m_write.dirty |= is_draw ? 2 : 1;
160 }
161
162 return m_write.dirty;
163}
164
165bool GSClut::CanLoadCLUT(const GIFRegTEX0& TEX0, const bool update_CBP)
166{

Callers 2

CheckWriteOverlapMethod · 0.80
CheckCLUTValidityMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected