glslang icon indicating copy to clipboard operation
glslang copied to clipboard

glslangValidator compiles a uniform interface block with multiple unsized arrays without errors

Open ravi688 opened this issue 2 years ago • 0 comments

#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.

ravi688 avatar Jul 13 '23 21:07 ravi688