third_party/spirv-cross/reference/shaders-msl-no-opt/comp/std140-array-load-composite-construct.comp
raw| 1 | #include <metal_stdlib> |
| 2 | #include <simd/simd.h> |
| 3 | |
| 4 | using namespace metal; |
| 5 | |
| 6 | struct SSBO |
| 7 | { |
| 8 | float4 a[16]; |
| 9 | float4 b[16]; |
| 10 | }; |
| 11 | |
| 12 | constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u); |
| 13 | |
| 14 | kernel void main0(device SSBO& _14 [[buffer(0)]], uint3 gl_GlobalInvocationID [[thread_position_in_grid]]) |
| 15 | { |
| 16 | _14.b[gl_GlobalInvocationID.x] = float4(_14.a[gl_GlobalInvocationID.x].x); |
| 17 | } |
| 18 |