Test case 'dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.18'.. : GLSL source for compute shader 2: : #version 310 es layout(local_size_x = 1) in; struct sA { mediump vec3 mA; }; layout(packed, row_major, binding = 0) buffer BlockB { highp mat2 a; lowp mat4 b[][2]; } blockB[2]; layout(std140, column_major, binding = 2) buffer BlockC { mediump mat4x3 c; sA d; bvec3 e; mediump int f; }; layout(packed, binding = 3) buffer BlockD { highp ivec4 g[]; } blockD; layout(binding = 0) uniform atomic_uint ac_numPassed; bool compare_float (highp float a, highp float b) { return abs(a - b) < 0.05; } bool compare_vec2 (highp vec2 a, highp vec2 b) { return compare_float(a.x, b.x)&&compare_float(a.y, b.y); } bool compare_vec3 (highp vec3 a, highp vec3 b) { return compare_float(a.x, b.x)&&compare_float(a.y, b.y)&&compare_float(a.z, b.z); } bool compare_vec4 (highp vec4 a, highp vec4 b) { return compare_float(a.x, b.x)&&compare_float(a.y, b.y)&&compare_float(a.z, b.z)&&compare_float(a.w, b.w); } bool compare_mat2 (highp mat2 a, highp mat2 b) { return compare_vec2(a[0], b[0])&&compare_vec2(a[1], b[1]); } bool compare_mat4x3 (highp mat4x3 a, highp mat4x3 b){ return compare_vec3(a[0], b[0])&&compare_vec3(a[1], b[1])&&compare_vec3(a[2], b[2])&&compare_vec3(a[3], b[3]); } bool compare_mat4 (highp mat4 a, highp mat4 b) { return compare_vec4(a[0], b[0])&&compare_vec4(a[1], b[1])&&compare_vec4(a[2], b[2])&&compare_vec4(a[3], b[3]); } bool compare_int (highp int a, highp int b) { return a == b; } bool compare_ivec4 (highp ivec4 a, highp ivec4 b) { return a == b; } bool compare_bvec3 (bvec3 a, bvec3 b) { return a == b; } void main (void) { bool allOk = true; allOk = allOk && compare_mat4(blockB[1].b[0][0], mat4(-8.0, -2.0, -1.0, 3.0, 2.0, 4.0, 1.0, -7.0, 8.0, -7.0, -1.0, 4.0, -2.0, -2.0, -6.0, 1.0)); allOk = allOk && compare_mat4(blockB[1].b[0][1], mat4(-6.0, -2.0, 2.0, 7.0, -7.0, 8.0, -2.0, -7.0, 2.0, 0.0, 3.0, 9.0, 8.0, 2.0, -6.0, -2.0)); allOk = allOk && compare_int(f, 9); allOk = allOk && compare_ivec4(blockD.g[0], ivec4(8, 4, -3, 0)); allOk = allOk && compare_ivec4(blockD.g[1], ivec4(-9, 7, -9, 8)); if (allOk) atomicCounterIncrement(ac_numPassed); blockB[1].b[0][0] = mat4(-6.0, -7.0, -9.0, 8.0, 3.0, -8.0, 9.0, -1.0, 5.0, 3.0, -9.0, -4.0, -8.0, -6.0, 9.0, 0.0); blockB[1].b[0][1] = mat4(-4.0, 9.0, -2.0, 0.0, 2.0, -3.0, 5.0, 0.0, 1.0, -2.0, -3.0, 2.0, 2.0, -6.0, 2.0, -8.0); c = mat4x3(-5.0, -3.0, -3.0, 0.0, 8.0, -9.0, 2.0, -4.0, 1.0, 8.0, 7.0, -4.0); blockD.g[0] = ivec4(-4, -3, -8, 8); blockD.g[1] = ivec4(-8, 3, -1, 4); } : GLSL IR for shader 2: ( (declare (binding=3 shader_storage ) BlockD blockD) (declare (binding=2 shader_storage ) int f) (declare (binding=2 shader_storage ) bvec3 e) (declare (binding=2 shader_storage ) sA@0x5555567f3470 d) (declare (binding=2 shader_storage ) mat4x3 c) (declare (shader_storage ) (array BlockB 2) blockB) (declare (uniform ) atomic_uint ac_numPassed) ( function compare_float (signature bool (parameters (declare (in ) float a) (declare (in ) float b) ) ( (return (expression bool < (expression float abs (expression float + (var_ref a) (expression float neg (var_ref b) ) ) ) (constant float (0.050000)) ) ) )) ) ( function compare_vec2 (signature bool (parameters (declare (in ) vec2 a) (declare (in ) vec2 b) ) ( (declare (temporary ) bool compare_float_retval) (call compare_float (var_ref compare_float_retval) ((swiz x (var_ref a) )(swiz x (var_ref b) ))) (declare (temporary ) bool and_tmp) (if (var_ref compare_float_retval) ( (declare (temporary ) bool compare_float_retval@2) (call compare_float (var_ref compare_float_retval@2) ((swiz y (var_ref a) )(swiz y (var_ref b) ))) (assign (x) (var_ref and_tmp) (var_ref compare_float_retval@2) ) ) ( (assign (x) (var_ref and_tmp) (constant bool (0)) ) )) (return (var_ref and_tmp) ) )) ) ( function compare_vec3 (signature bool (parameters (declare (in ) vec3 a) (declare (in ) vec3 b) ) ( (declare (temporary ) bool compare_float_retval) (call compare_float (var_ref compare_float_retval) ((swiz x (var_ref a) )(swiz x (var_ref b) ))) (declare (temporary ) bool and_tmp) (if (var_ref compare_float_retval) ( (declare (temporary ) bool compare_float_retval@3) (call compare_float (var_ref compare_float_retval@3) ((swiz y (var_ref a) )(swiz y (var_ref b) ))) (assign (x) (var_ref and_tmp) (var_ref compare_float_retval@3) ) ) ( (assign (x) (var_ref and_tmp) (constant bool (0)) ) )) (declare (temporary ) bool and_tmp@4) (if (var_ref and_tmp) ( (declare (temporary ) bool compare_float_retval@5) (call compare_float (var_ref compare_float_retval@5) ((swiz z (var_ref a) )(swiz z (var_ref b) ))) (assign (x) (var_ref and_tmp@4) (var_ref compare_float_retval@5) ) ) ( (assign (x) (var_ref and_tmp@4) (constant bool (0)) ) )) (return (var_ref and_tmp@4) ) )) ) ( function compare_vec4 (signature bool (parameters (declare (in ) vec4 a) (declare (in ) vec4 b) ) ( (declare (temporary ) bool compare_float_retval) (call compare_float (var_ref compare_float_retval) ((swiz x (var_ref a) )(swiz x (var_ref b) ))) (declare (temporary ) bool and_tmp) (if (var_ref compare_float_retval) ( (declare (temporary ) bool compare_float_retval@6) (call compare_float (var_ref compare_float_retval@6) ((swiz y (var_ref a) )(swiz y (var_ref b) ))) (assign (x) (var_ref and_tmp) (var_ref compare_float_retval@6) ) ) ( (assign (x) (var_ref and_tmp) (constant bool (0)) ) )) (declare (temporary ) bool and_tmp@7) (if (var_ref and_tmp) ( (declare (temporary ) bool compare_float_retval@8) (call compare_float (var_ref compare_float_retval@8) ((swiz z (var_ref a) )(swiz z (var_ref b) ))) (assign (x) (var_ref and_tmp@7) (var_ref compare_float_retval@8) ) ) ( (assign (x) (var_ref and_tmp@7) (constant bool (0)) ) )) (declare (temporary ) bool and_tmp@9) (if (var_ref and_tmp@7) ( (declare (temporary ) bool compare_float_retval@10) (call compare_float (var_ref compare_float_retval@10) ((swiz w (var_ref a) )(swiz w (var_ref b) ))) (assign (x) (var_ref and_tmp@9) (var_ref compare_float_retval@10) ) ) ( (assign (x) (var_ref and_tmp@9) (constant bool (0)) ) )) (return (var_ref and_tmp@9) ) )) ) ( function compare_mat2 (signature bool (parameters (declare (in ) mat2 a) (declare (in ) mat2 b) ) ( (declare (temporary ) bool compare_vec2_retval) (call compare_vec2 (var_ref compare_vec2_retval) ((array_ref (var_ref a) (constant int (0)) ) (array_ref (var_ref b) (constant int (0)) ) )) (declare (temporary ) bool and_tmp) (if (var_ref compare_vec2_retval) ( (declare (temporary ) bool compare_vec2_retval@11) (call compare_vec2 (var_ref compare_vec2_retval@11) ((array_ref (var_ref a) (constant int (1)) ) (array_ref (var_ref b) (constant int (1)) ) )) (assign (x) (var_ref and_tmp) (var_ref compare_vec2_retval@11) ) ) ( (assign (x) (var_ref and_tmp) (constant bool (0)) ) )) (return (var_ref and_tmp) ) )) ) ( function compare_mat4x3 (signature bool (parameters (declare (in ) mat4x3 a) (declare (in ) mat4x3 b) ) ( (declare (temporary ) bool compare_vec3_retval) (call compare_vec3 (var_ref compare_vec3_retval) ((array_ref (var_ref a) (constant int (0)) ) (array_ref (var_ref b) (constant int (0)) ) )) (declare (temporary ) bool and_tmp) (if (var_ref compare_vec3_retval) ( (declare (temporary ) bool compare_vec3_retval@12) (call compare_vec3 (var_ref compare_vec3_retval@12) ((array_ref (var_ref a) (constant int (1)) ) (array_ref (var_ref b) (constant int (1)) ) )) (assign (x) (var_ref and_tmp) (var_ref compare_vec3_retval@12) ) ) ( (assign (x) (var_ref and_tmp) (constant bool (0)) ) )) (declare (temporary ) bool and_tmp@13) (if (var_ref and_tmp) ( (declare (temporary ) bool compare_vec3_retval@14) (call compare_vec3 (var_ref compare_vec3_retval@14) ((array_ref (var_ref a) (constant int (2)) ) (array_ref (var_ref b) (constant int (2)) ) )) (assign (x) (var_ref and_tmp@13) (var_ref compare_vec3_retval@14) ) ) ( (assign (x) (var_ref and_tmp@13) (constant bool (0)) ) )) (declare (temporary ) bool and_tmp@15) (if (var_ref and_tmp@13) ( (declare (temporary ) bool compare_vec3_retval@16) (call compare_vec3 (var_ref compare_vec3_retval@16) ((array_ref (var_ref a) (constant int (3)) ) (array_ref (var_ref b) (constant int (3)) ) )) (assign (x) (var_ref and_tmp@15) (var_ref compare_vec3_retval@16) ) ) ( (assign (x) (var_ref and_tmp@15) (constant bool (0)) ) )) (return (var_ref and_tmp@15) ) )) ) ( function compare_mat4 (signature bool (parameters (declare (in ) mat4 a) (declare (in ) mat4 b) ) ( (declare (temporary ) bool compare_vec4_retval) (call compare_vec4 (var_ref compare_vec4_retval) ((array_ref (var_ref a) (constant int (0)) ) (array_ref (var_ref b) (constant int (0)) ) )) (declare (temporary ) bool and_tmp) (if (var_ref compare_vec4_retval) ( (declare (temporary ) bool compare_vec4_retval@17) (call compare_vec4 (var_ref compare_vec4_retval@17) ((array_ref (var_ref a) (constant int (1)) ) (array_ref (var_ref b) (constant int (1)) ) )) (assign (x) (var_ref and_tmp) (var_ref compare_vec4_retval@17) ) ) ( (assign (x) (var_ref and_tmp) (constant bool (0)) ) )) (declare (temporary ) bool and_tmp@18) (if (var_ref and_tmp) ( (declare (temporary ) bool compare_vec4_retval@19) (call compare_vec4 (var_ref compare_vec4_retval@19) ((array_ref (var_ref a) (constant int (2)) ) (array_ref (var_ref b) (constant int (2)) ) )) (assign (x) (var_ref and_tmp@18) (var_ref compare_vec4_retval@19) ) ) ( (assign (x) (var_ref and_tmp@18) (constant bool (0)) ) )) (declare (temporary ) bool and_tmp@20) (if (var_ref and_tmp@18) ( (declare (temporary ) bool compare_vec4_retval@21) (call compare_vec4 (var_ref compare_vec4_retval@21) ((array_ref (var_ref a) (constant int (3)) ) (array_ref (var_ref b) (constant int (3)) ) )) (assign (x) (var_ref and_tmp@20) (var_ref compare_vec4_retval@21) ) ) ( (assign (x) (var_ref and_tmp@20) (constant bool (0)) ) )) (return (var_ref and_tmp@20) ) )) ) ( function compare_int (signature bool (parameters (declare (in ) int a) (declare (in ) int b) ) ( (return (expression bool == (var_ref a) (var_ref b) ) ) )) ) ( function compare_ivec4 (signature bool (parameters (declare (in ) ivec4 a) (declare (in ) ivec4 b) ) ( (return (expression bool all_equal (var_ref a) (var_ref b) ) ) )) ) ( function compare_bvec3 (signature bool (parameters (declare (in ) bvec3 a) (declare (in ) bvec3 b) ) ( (return (expression bool all_equal (var_ref a) (var_ref b) ) ) )) ) ( function main (signature void (parameters ) ( (declare (temporary ) bool compare_mat4_retval) (call compare_mat4 (var_ref compare_mat4_retval) ((array_ref (array_ref (record_ref (array_ref (var_ref blockB) (constant int (1)) ) b) (constant int (0)) ) (constant int (0)) ) (constant mat4 (-8.000000 -2.000000 -1.000000 3.000000 2.000000 4.000000 1.000000 -7.000000 8.000000 -7.000000 -1.000000 4.000000 -2.000000 -2.000000 -6.000000 1.000000)) )) (declare (temporary ) bool and_tmp) (if (var_ref compare_mat4_retval) ( (declare (temporary ) bool compare_mat4_retval@22) (call compare_mat4 (var_ref compare_mat4_retval@22) ((array_ref (array_ref (record_ref (array_ref (var_ref blockB) (constant int (1)) ) b) (constant int (0)) ) (constant int (1)) ) (constant mat4 (-6.000000 -2.000000 2.000000 7.000000 -7.000000 8.000000 -2.000000 -7.000000 2.000000 0.000000 3.000000 9.000000 8.000000 2.000000 -6.000000 -2.000000)) )) (assign (x) (var_ref and_tmp) (var_ref compare_mat4_retval@22) ) ) ( (assign (x) (var_ref and_tmp) (constant bool (0)) ) )) (declare (temporary ) bool and_tmp@23) (if (var_ref and_tmp) ( (declare (temporary ) bool compare_int_retval) (call compare_int (var_ref compare_int_retval) ((var_ref f) (constant int (9)) )) (assign (x) (var_ref and_tmp@23) (var_ref compare_int_retval) ) ) ( (assign (x) (var_ref and_tmp@23) (constant bool (0)) ) )) (declare (temporary ) bool and_tmp@24) (if (var_ref and_tmp@23) ( (declare (temporary ) bool compare_ivec4_retval) (call compare_ivec4 (var_ref compare_ivec4_retval) ((array_ref (record_ref (var_ref blockD) g) (constant int (0)) ) (constant ivec4 (8 4 -3 0)) )) (assign (x) (var_ref and_tmp@24) (var_ref compare_ivec4_retval) ) ) ( (assign (x) (var_ref and_tmp@24) (constant bool (0)) ) )) (declare (temporary ) bool and_tmp@25) (if (var_ref and_tmp@24) ( (declare (temporary ) bool compare_ivec4_retval@26) (call compare_ivec4 (var_ref compare_ivec4_retval@26) ((array_ref (record_ref (var_ref blockD) g) (constant int (1)) ) (constant ivec4 (-9 7 -9 8)) )) (assign (x) (var_ref and_tmp@25) (var_ref compare_ivec4_retval@26) ) ) ( (assign (x) (var_ref and_tmp@25) (constant bool (0)) ) )) (if (var_ref and_tmp@25) ( (declare (temporary ) uint atomic_retval) (call __intrinsic_atomic_increment (var_ref atomic_retval) ((var_ref ac_numPassed) )) ) ()) (assign () (array_ref (array_ref (record_ref (array_ref (var_ref blockB) (constant int (1)) ) b) (constant int (0)) ) (constant int (0)) ) (constant mat4 (-6.000000 -7.000000 -9.000000 8.000000 3.000000 -8.000000 9.000000 -1.000000 5.000000 3.000000 -9.000000 -4.000000 -8.000000 -6.000000 9.000000 0.000000)) ) (assign () (array_ref (array_ref (record_ref (array_ref (var_ref blockB) (constant int (1)) ) b) (constant int (0)) ) (constant int (1)) ) (constant mat4 (-4.000000 9.000000 -2.000000 0.000000 2.000000 -3.000000 5.000000 0.000000 1.000000 -2.000000 -3.000000 2.000000 2.000000 -6.000000 2.000000 -8.000000)) ) (assign () (var_ref c) (constant mat4x3 (-5.000000 -3.000000 -3.000000 0.000000 8.000000 -9.000000 2.000000 -4.000000 1.000000 8.000000 7.000000 -4.000000)) ) (assign (xyzw) (array_ref (record_ref (var_ref blockD) g) (constant int (0)) ) (constant ivec4 (-4 -3 -8 8)) ) (assign (xyzw) (array_ref (record_ref (var_ref blockD) g) (constant int (1)) ) (constant ivec4 (-8 3 -1 4)) ) )) ) ) : ir_variable has maximum access out of bounds (1 vs 0) Program received signal SIGABRT, Aborted. 0x00007ffff4b6b74b in raise () from /lib64/libc.so.6 (gdb) up #1 0x00007ffff4b6cf71 in abort () from /lib64/libc.so.6 (gdb) #2 0x00007ffff15de911 in (anonymous namespace)::ir_validate::visit (this=0x7fffffffce40, ir=0x5555567f2740) at glsl/ir_validate.cpp:889 889 abort(); (gdb) #3 0x00007ffff15d508c in ir_variable::accept (this=0x5555567f2740, v=0x7fffffffce40) at glsl/ir_hv_accept.cpp:77 77 return v->visit(this); (gdb) down #2 0x00007ffff15de911 in (anonymous namespace)::ir_validate::visit (this=0x7fffffffce40, ir=0x5555567f2740) at glsl/ir_validate.cpp:889 889 abort(); (gdb) p ir $1 = (ir_variable *) 0x5555567f2740 (gdb) p *ir $2 = { = { = {next = 0x555556c3e7d8, prev = 0x5555567f2478}, _vptr.ir_instruction = 0x7ffff200b468 , ir_type = ir_type_variable}, type = 0x5555567f4af0, name = 0x5555567f2770 "blockB", name_storage = "blockB\000\000\000\000\000\000\000\000\000", data = {read_only = 0, centroid = 0, sample = 0, patch = 0, invariant = 0, precise = 0, used = 1, assigned = 1, always_active_io = 0, how_declared = 0, mode = 2, interpolation = 0, origin_upper_left = 0, pixel_center_integer = 0, explicit_location = 0, explicit_index = 0, explicit_binding = 1, explicit_component = 0, has_initializer = 0, is_unmatched_generic_inout = 0, is_xfb_only = 0, explicit_xfb_buffer = 0, explicit_xfb_offset = 0, explicit_xfb_stride = 0, location_frac = 0, matrix_layout = 2, from_named_ifc_block = 0, must_be_shader_input = 0, index = 0, precision = 0, depth_layout = ir_depth_layout_none, memory_read_only = 0, memory_write_only = 0, memory_coherent = 0, memory_volatile = 0, memory_restrict = 0, from_ssbo_unsized_array = 0, implicit_sized_array = 0, fb_fetch_output = 0, bindless = 0, bound = 0, warn_extension_index = 0 '\000', image_format = 0, _num_state_slots = 0, binding = 0, location = -1, param_index = 0, stream = 0, offset = 0, max_array_access = 1, xfb_buffer = 0, xfb_stride = 0}, constant_value = 0x0, constant_initializer = 0x0, static warn_extension_table = 0x7ffff1fc7780 , u = {max_ifc_array_access = 0x555556c5f940, state_slots = 0x555556c5f940}, interface_type = 0x5555567f3a70, static tmp_name = 0x0, static temporaries_allocate_names = true} (gdb) p ir->type $3 = (const glsl_type *) 0x5555567f4af0 (gdb) p *ir->type $4 = {gl_type = 0, base_type = GLSL_TYPE_ARRAY, sampled_type = GLSL_TYPE_VOID, sampler_dimensionality = 0, sampler_shadow = 0, sampler_array = 0, interface_packing = 0, interface_row_major = 0, vector_elements = 0 '\000', matrix_columns = 0 '\000', length = 1, name = 0x5555567d5c60 "BlockB[1]", explicit_stride = 0, fields = { array = 0x5555567f3a70, parameters = 0x5555567f3a70, structure = 0x5555567f3a70}, (gdb) p ir->type->array There is no member or method named array. (gdb) p ir->type->fields.array $5 = (const glsl_type *) 0x5555567f3a70 (gdb) p *ir->type->fields.array $6 = {gl_type = 0, base_type = GLSL_TYPE_INTERFACE, sampled_type = GLSL_TYPE_VOID, sampler_dimensionality = 0, sampler_shadow = 0, sampler_array = 0, interface_packing = 2, interface_row_major = 1, vector_elements = 0 '\000', matrix_columns = 0 '\000', length = 2, name = 0x5555567f3b20 "BlockB", explicit_stride = 0, fields = { array = 0x5555567f3b60, parameters = 0x5555567f3b60, structure = 0x5555567f3b60}, (gdb) p ir->name $7 = 0x5555567f2770 "blockB"