-
Notifications
You must be signed in to change notification settings - Fork 836
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
SPIR-V dynamic indexing capabilities not generated in all cases #2056
Comments
Yes, I see these are not generated, apparently since the beginning. They are supposed to be needed for devices that can't support them, but if everything is supporting them, that may call into question their necessity. For background, I see this in the 3.2 ES GLSL spec:
So, it seems like some device should have trouble. |
I'd guess devices supporting non constant indices will "handle the situation" no matter if the capability is requested by the shader or not, so checking for the feature being available from Vulkan is enough to make sure that type of constructions can be used (i.e. devices not supporting non constant indices will have those feature bits set to false). But, from the point of view of SPIR-V and GLSL, which may be used without Vulkan, requesting that capability could be important for devices not supporting these features so they can error out at some point. |
This might be an issue for ANGLE on Android when we support devices that don't have this feature enabled. |
What is the current status on this issue? |
I see priority for this as medium since it is not preventing valid Vulkan code from running. Does anyone disagree? As such, I don't anticipate working on this in the very near term. I am not aware of anyone actively working on this People are invited to contribute a fix. Please put a comment on this issue if you start work to prevent duplicate effort. |
We unfortunately can't rely on glslang to set the required capability, see KhronosGroup/glslang#2056 - therefore we have no choice but to just check for it ourselves
We unfortunately can't rely on glslang to set the required capability, see KhronosGroup/glslang#2056 - therefore we have no choice but to just check for it ourselves
We unfortunately can't rely on glslang to set the required capability, see KhronosGroup/glslang#2056 - therefore we have no choice but to just check for it ourselves
There is a set of tests in VK-GL-CTS that use dynamically uniform indexes when accessing arrays of descriptors of different types, like uniform buffers, storage buffers, storage texel buffers, etc.
These tests check for the corresponding feature to be available and enabled in the device, as you can see here:
https://github.com/KhronosGroup/VK-GL-CTS/blob/d99a765d38d35deeb3f27cf30d9d6fe4f183510e/external/vulkancts/modules/vulkan/binding_model/vktBindingDescriptorSetRandomTests.cpp#L218
If dynamic indexing is supported and the index type is "DEPENDENT", for example, these tests generate code like the following one:
However, when this specific GLSL shader is compiled to SPIR-V, the output does not declare the UniformBufferArrayDynamicIndexing capability, which I believe needs to be declared for the generated code to work (NB: vendors are still passing these tests, so it's probably not critical). The same problem is also happening with other DynamicIndexing capabilities.
The text was updated successfully, but these errors were encountered: