KhronosGroup / KhronosGroup/SPIRV-Tools
spirv-val: Vulkan DynamicIndexing constant integral expressions checks
- Dominant language
- C++
- Stars
- 1.4k
- Forks
- 709
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 28
Description
When VK_EXT_descriptor_heap was created, these VUs were added (because we need other similar ones and these likely were forgotten)
- VUID-StandaloneSpirv-UniformBufferArrayDynamicIndexing-10127
- VUID-StandaloneSpirv-SampledImageArrayDynamicIndexing-10128
- VUID-StandaloneSpirv-StorageBufferArrayDynamicIndexing-10129
- VUID-StandaloneSpirv-StorageImageArrayDynamicIndexing-10130
- VUID-StandaloneSpirv-InputAttachmentArrayDynamicIndexing-10131
- VUID-StandaloneSpirv-UniformTexelBufferArrayDynamicIndexing-10132
- VUID-StandaloneSpirv-StorageTexelBufferArrayDynamicIndexing-10133
-----
This means some [basic GLSL](https://godbolt.org/z/Whd666h3a) should be validated that it is not allowed without `UniformBufferArrayDynamicIndexing` added
```glsl
#version 450
layout(set = 0, binding = 0) uniform MyBuffer {
float data;
} buffers[4];
layout(location = 0) in int vIndex;
void main() {
float val = buffers[vIndex].data;
}
```
Contributor guide
Research direction
Start at the spirv-val validation for the seven listed DynamicIndexing VUIDs, using the linked basic GLSL example as the behavioral reference. Trace how the validator handles the array access and determine how the relevant VUIDs are checked; done means the example is rejected when UniformBufferArrayDynamicIndexing is not enabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100