third_party/spirv-cross/shaders-msl/comp/packing-test-2.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 | float x = buf0[0].b; |
| 15 | buf1[gl_GlobalInvocationID.x] = x; |
| 16 | } |