KhronosGroup / KhronosGroup/glslang
glslangValidator compiles a uniform interface block with multiple unsized arrays without errors
- Dominant language
- C++
- Stars
- 3.6k
- Forks
- 989
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 31
Description
```
#version 450
struct GTC
{
vec2 tltc;
vec2 trtc;
vec2 brtc;
vec2 bltc;
};
layout(set = 0, binding = 1) uniform _GTCBuffer
{
GTC texcoords[];
GTC gtcs[];
} _gtcBuffer;
void main()
{
}
```
The above code compiles successfully with glslangValidator while it must throw some errors as _GTCBuffer uniform interface block has multiple unsized arrays.
As per the spec, uniform interface blocks can only support sized arrays while SSBO can support unsized arrays but still not multiple unsized arrays I guess.
Contributor guide
Research direction
Start by running the provided shader with glslangValidator and compare its accepted uniform interface block against the specification rules described in the issue. Trace the compiler's validation of uniform blocks and unsized arrays, then add coverage for this shader and confirm that invalid multiple unsized arrays produce errors while valid cases remain accepted.
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
- 42/100