-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
TexCache: Optimize DXT3/DXT5 decode to single pass #11350
Conversation
This is significantly faster on Vulkan, and in other situations where we're decoding directly to uncached memory.
A little faster. Also refactor colors a bit to be more readable.
This makes the overall DXT5 decode about 8% faster.
Cool!! Iam So happy when i see fixed issues. You write here how DXT1? Killing performance? So this can improve it in this game? |
This won't help OpenGL much - maybe just a tiny bit. It mostly helps Vulkan. Most games do not use DXT3/DXT5, so most games will not change at all because of this pull. But that particular game should get a lot faster in Vulkan, yes. -[Unknown] |
Wow, good catch! Just goes to show how important it is to never read from our pushbuffers.... |
Not helped! Same status!!! |
OpenGL |
Yeah it fixed Vulkan but not OGL |
You mean OGL still crashes, or OGL is still slow? |
I have tested on Xiaomi redmi note 5. OPENGL no crashes. Vulkan No crashes. |
I expect this to fix #10795, although I haven't tested that particular game.
Basically, because we previously decoded DXT1 first, then read that back and applied alpha data to it. On Vulkan we should only write to memory, and the read was killing performance.
This refactors and writes out colors with alpha data just once. To test, I made it rebuild the texture each frame, and decode 10 times in a loop - this made that take 1% as long.
Most games don't use DXT, but those that do should get better load times.
-[Unknown]