Debian Codegraph @

third_party/spirv-cross/shaders-msl/comp/packing-test-1.comp

raw
1 #version 450
2 struct T1
3 {
4 vec3 a;
5 float b;
6 };
7
8 layout(std430, binding = 1) buffer Buffer0 { T1 buf0[]; };
9 layout(std430, binding = 2) buffer Buffer1 { float buf1[]; };
10
11 layout(local_size_x = 32, local_size_y = 1, local_size_z = 1) in;
12 void main()
13 {
14 // broken case in Metal!
15 T1 v = buf0[0];
16 float x = v.b;
17 buf1[gl_GlobalInvocationID.x] = x;
18 }