1#version 450 2 3#extension GL_EXT_buffer_reference : enable 4#extension GL_EXT_scalar_block_layout : enable 5 6layout(buffer_reference, scalar) buffer T1 { 7 vec3 x[]; 8}; 9 10layout(buffer_reference, scalar) buffer T2 { 11 vec3 x[][4][2]; 12}; 13 14struct S 15{ 16 highp ivec3 a; 17 mediump mat3 b[4]; 18 highp vec4 c; 19}; 20 21layout(buffer_reference, scalar) buffer T3 { 22 S s; 23}; 24layout(std430) buffer T4 { 25 T1 t1; 26 T2 t2; 27 T3 t3; 28} t4; 29 30layout(location = 0) flat in int i; 31 32void main() 33{ 34 vec3 y; 35 y = t4.t1.x[i]; 36 y = t4.t2.x[i][i][i]; 37 mat3 z = t4.t3.s.b[0]; 38} 39