Skip to content

Conversation

@refractionpcsx2
Copy link
Member

Description of Changes

Optimizes the GPU CLUT updating so it only does so when necessary.
Also changed the GS draw count (s_n) to finally be u64 instead of int (max 2,147,483,647, not as hard as you think to reach).

Rationale behind Changes

The GPU CLUT was copying from the target every single draw, even if it was used in the previous draw, which was causing a lot of unnecessary work on games which are quite heavy on the GPU CLUT. This makes sure it only updates if the target changes or the target has been drawn to since the last time it was used.

Updating the GS draw counter to u64 makes it not a reason to fall over after ~3 hours of play time on a heavy game and go massively negative draw counts, screwing everything up, instead you'll have to play for many years, and even then it will just loop back to zero instead of going negative, like it can do right now.

Suggested Testing Steps

Test games that use GPU CLUT and note any performance differences. For the draw count.. idk, not really testable, just smoke test dumps, games, resetting etc.

Did you use AI to help find, test, or implement this issue or feature?

No.

Should improve GPU CLUT speed and stop the GS potentially falling over after 3-4 hours. This makes it so GPU CLUT (inside target) can be used for Dragon Ball Z BT games instead of a CRC hack without any performance loss.

I have no idea why this was ever signed int.

This doesn't update the draw settings from the UI, honestly there's no real need for it to get that high when dumping.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants