Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GS: Faster texture preloading #5291

Merged
merged 1 commit into from Jan 16, 2022
Merged

GS: Faster texture preloading #5291

merged 1 commit into from Jan 16, 2022

Conversation

stenzek
Copy link
Member

@stenzek stenzek commented Jan 9, 2022

Description of Changes

Currently, we expand the texture, then hash the RGBA8 texture (when paltex is off). This is a lot of extra work when the texture data potentially hasn't changed.

So, instead, let's hash the GS blocks which back the texture.

There is the potential to have a few false positives here, since for tiny textures, the padding bytes in the block may be different. But worst case scenario, this just means an extra upload, which for tiny textures isn't a huge deal. The CPU savings from not expanding are more than worth it.

Based on #5290 for ease of testing.

Suggested Testing Steps

Test with preloading enabled, make sure performance is not worse (should be better in texture streaming heavy games, assuming no other bottlenecks).

@refractionpcsx2 refractionpcsx2 merged commit 3641999 into PCSX2:master Jan 16, 2022
@stenzek stenzek deleted the faster-texture-preloading branch January 16, 2022 16:31
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.

None yet

3 participants