Repository navigation
TexCache: Optimize DXT3/DXT5 decode to single pass - #11350
Merged
Merged
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? |
Collaborator
Author
|
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] |
Owner
|
Wow, good catch! Just goes to show how important it is to never read from our pushbuffers.... |
|
Not helped! Same status!!! |
|
OpenGL |
Owner
|
Yeah it fixed Vulkan but not OGL |
Owner
|
You mean OGL still crashes, or OGL is still slow? |
|
I have tested on Xiaomi redmi note 5. OPENGL no crashes. Vulkan No crashes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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]