1#version 450 2 3#extension GL_EXT_buffer_reference : enable 4 5layout(buffer_reference, std430) buffer blockType { 6 layout(offset = 0) int a; 7 layout(offset = 4) int b; 8 layout(offset = 8) int c; 9 layout(offset = 12) int d; 10 layout(offset = 16) int e; 11}; 12 13layout(std430) buffer t2 { 14 blockType f; 15 blockType g; 16} t; 17 18void main() { 19 20 blockType b1[2] = blockType[2](t.f, t.g); 21 b1[0].a = b1[1].b; 22 blockType b2 = t.f; 23 blockType b3 = t.g; 24 b2.a = b3.b; 25} 26