KhronosGroup / KhronosGroup/glslang
taskPayloadSharedEXT qualifier misplaced leads to silent issue
- Dominant language
- C++
- Stars
- 3.6k
- Forks
- 989
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 31
Description
The following (https://godbolt.org/z/oEGWT9Mh1)
```glsl
#version 460
#extension GL_EXT_mesh_shader : require
struct MyPayload {
float x;
};
taskPayloadSharedEXT MyPayload myPayloadData;
void main() {
myPayloadData.x = 0.0;
EmitMeshTasksEXT(1, 1, 1);
}
```
will produce `OpEmitMeshTasksEXT %uint_1 %uint_1 %uint_1 %myPayloadData` but if you go (https://godbolt.org/z/xTjWGv8rW)
```glsl
taskPayloadSharedEXT struct MyPayload {
float x;
};
MyPayload myPayloadData;
```
it will be missing the last operand in `OpEmitMeshTasksEXT`
... basically it should be invalid to use `taskPayloadSharedEXT` on a struct definition and an error should have been raised
Contributor guide
Research direction
Reproduce both GLSL snippets using the linked Compiler Explorer examples and compare the generated OpEmitMeshTasksEXT operands. Trace mesh-shader qualifier parsing, validation, and SPIR-V emission in glslang, then add coverage showing that the struct-definition form is rejected rather than emitting an incomplete instruction.
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
- Clearly specified
- Newbie friendliness
- 35/100