-
Notifications
You must be signed in to change notification settings - Fork 809
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
nonuniformEXT not working correctly in conditionals #3561
Comments
There's a bug in how you're applying nonuniformEXT, see https://github.com/KhronosGroup/Vulkan-Samples/blob/main/shaders/descriptor_indexing/nonuniform-quads.frag#L33-L39 |
Thanks. Would it be possible for the tools to warn about this? |
I'm the wrong person to ask that but I also wouldn't hold my breath |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Spirv generated is not valid when nonuniformEXT is used in ternary condition or even if/else condition.
Issue happens when nonuniformEXT is used for the texture index. If nonuniformEXT is used for the sampler, then the spirv is generated correctly.
But according to Vulkan spec https://github.com/KhronosGroup/GLSL/blob/main/extensions/ext/GL_EXT_nonuniform_qualifier.txt nonuniformEXT can be used for local variables as well.
GLSL
Command line
Decompile spirv using spirv-cross
Resulting GLSL has no nonuniformEXT instructions
The text was updated successfully, but these errors were encountered: