-
Notifications
You must be signed in to change notification settings - Fork 60
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
If two shaders / permutations produce the same code, do we compile them twice? #1435
Comments
If not, we may do an index of cached shader text checksum, not just an index of shader+permutation id so we can automatically deduplicate both compile time and storage. |
The glsl caching code is a mess. It should be changed to be a straightforward "do all of the shader code processing, including adding macros, then check if we can load it based on that". |
Is there an example of such permutations or shaders? If two permutations exist for the same shader that are created by setting different macros, yet produce the same results, then some macros should just be nuked. |
I wonder if that happens with generic2D. |
You mean permutations of it? |
Yes. |
I mean I wonder if some permutations of generic2D and some permutations of generic may produce the same binary. |
There's only one: deph fade. |
Well, technically generic2D shader always has:
|
(the other one doesn't) |
The above is no longer true, now that the generic2D shader no longer uses that and is basically the same as generic one now. |
This is probably the best option, especially considering some of the post-processing our shader sources go through, which is not cached properly I think. |
If two shaders / permutations produce the same code, do we compile them twice?
The text was updated successfully, but these errors were encountered: