glslang icon indicating copy to clipboard operation
glslang copied to clipboard

Block arrays in arrayed interfaces incorrectly disallowed in 'es' profile

Open gnl21 opened this issue 3 years ago • 0 comments

GLSL ES disallows multidimensional arrays of interface blocks but, for the arrayed interfaces in tessellation and geometry[*] shaders, this is supposed to apply after the per-vertex dimension has been discounted. So, for example, the following tess-control shader should compile:

#version 320 es
layout(vertices = 3) out;

in B {
	vec4 ivar;
} b[ /* per-vertex dimension doesn't count */ ][ /* Single array dimension */ 10];

void main() { }

but glslang currently produces the error:

ERROR: 0:4: 'array-of-array of block' : not supported with this profile: es

[*] The spec currently says "tessellation" only but this is a mistake. A new version of the spec is in review which corrects the omission of "geometry".

gnl21 avatar Aug 17 '22 11:08 gnl21