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

Idea: Content-addressed texture cache #19559

Open
hrydgard opened this issue Oct 28, 2024 · 0 comments
Open

Idea: Content-addressed texture cache #19559

hrydgard opened this issue Oct 28, 2024 · 0 comments
Labels
GE emulation Backend-independent GPU issues
Milestone

Comments

@hrydgard
Copy link
Owner

hrydgard commented Oct 28, 2024

These days, by default we always hash textures (although we do mark them as stable, keeping the textures around). But we still use the texture address as the main key in the hashmap, and the hash as an additional check that can force us to throw out the texture and re-hash. This means that for cases like #11929 where the game keeps overwriting the same texture, our texture cache is entirely ineffective.

So, it would probably make more sense to have the content hash be the key in the hashtable, but also to maintain a quick address->hash lookup table with some metadata, so we can still be avoid re-hashing textures that we have built up some confidence about if "lazy texture caching" is enabled.

This would fix the performance problem in Gran Turismo menus, and likely a few other things. I don't really see what could get slower.

This would be similar to the compat setting "Retain changed textures" (secondary texture cache) but a cleaner implementation.

(In fact, could also experiment with enabling that for GT...)

@hrydgard hrydgard added the GE emulation Backend-independent GPU issues label Oct 28, 2024
@hrydgard hrydgard added this to the Future-Prio milestone Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GE emulation Backend-independent GPU issues
Projects
None yet
Development

No branches or pull requests

1 participant