KhronosGroup / KhronosGroup/glslang
NonReadable and NonWriteable decorations not applied to image types from HLSL
- Dominant language
- C++
- Stars
- 3.6k
- Forks
- 989
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 31
Description
The Vulkan spec has the following requirement:
> - If shaderStorageImageReadWithoutFormat is not enabled and an OpTypeImage has “Image Format” operand of Unknown, any variables created with the given type must be decorated with NonReadable.
> - If shaderStorageImageWriteWithoutFormat is not enabled and an OpTypeImage has “Image Format” operand of Unknown, any variables created with the given type must be decorated with NonWritable.
Unfortunately, GLSLang doesn't apply these decorations when shaders come in from HLSL. It does from GLSL if the image is decorated `read_only` or `write_only`.
Contributor guide
Research direction
Start by tracing how HLSL image types are lowered to SPIR-V and compare that path with the existing GLSL handling for read_only and write_only images. Verify the generated SPIR-V against the Vulkan requirements for NonReadable and NonWritable when the image format is Unknown; the work is done when HLSL input produces the required decorations in the relevant cases.
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