[require] GLSL >= 1.40 [vertex shader] /* Looking at the IR dump, the compiler frontend generates * * (expression bvec2 ubo_load (constant uint (0)) (constant uint (8))) * * to load s2.bv.x. However, the GL API (correctly) believes that * s2.bv is at offset 16. Deleting any field from S1 or S2 (or * putting the contents of S2 directly in the UBO) masks the problem. * It seems that some part of the compiler stack is not putting * padding after s1 to align bv to a vec4 boundary. */ struct S1 { int i; }; struct S2 { S1 s1; bvec2 bv; }; layout(std140) uniform UB1 { S2 s2; }; flat out int vertex_pass; in vec4 piglit_vertex; void main() { vertex_pass = int(s2.bv.x); gl_Position = piglit_vertex; } [fragment shader] out vec4 piglit_fragcolor; flat in int vertex_pass; void main() { piglit_fragcolor = bool(vertex_pass) ? vec4(0, 1, 0, 1) : vec4(1, 0, 0, 1); } [test] link success active uniform s2.bv GL_UNIFORM_TYPE GL_BOOL_VEC2 #active uniform s2.bv GL_UNIFORM_OFFSET 16 uniform int s2.bv 1 1 draw rect -1 -1 2 2 probe all rgba 0.0 1.0 0.0 1.0