KhronosGroup / KhronosGroup/SPIRV-Tools
spirv-val doesn't validate presence of StoragePushConstant16 capability
- Dominant language
- C++
- Stars
- 1.4k
- Forks
- 709
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 28
Description
Here's an example that definitely needs 16 bit push constant capability, but passes validation with the capability missing.
https://godbolt.org/z/r9W54YEPP
One thing I'm not clear on, if I use `OpTypeVector %half N` with `N%2 == 0` so the size is 32bit and place it at a 32bit aligned offset.
https://godbolt.org/z/d39a7Y5T3
And assuming I do a full `OpLoad %v2half` without forming an access chain to a component of said vector.
Would I still need the `StoragePushConstant16` capability as per the SPIR-V spec?
Contributor guide
Research direction
Start with the two Godbolt reproductions linked in the issue and the SPIR-V rules for 16-bit push-constant types and vectors. Trace the spirv-val validation path for these modules, resolve whether the vector case requires StoragePushConstant16, and add regression coverage showing the expected validation result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100