third_party/spirv-cross/reference/shaders-msl-no-opt/packing/struct-packing-array-of-scalar.comp
raw| 1 | #include <metal_stdlib> |
| 2 | #include <simd/simd.h> |
| 3 | |
| 4 | using namespace metal; |
| 5 | |
| 6 | struct Foo |
| 7 | { |
| 8 | packed_float3 a; |
| 9 | }; |
| 10 | |
| 11 | struct SSBOScalar |
| 12 | { |
| 13 | Foo v[1]; |
| 14 | }; |
| 15 | |
| 16 | constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u); |
| 17 | |
| 18 | kernel void main0(device SSBOScalar& buffer_scalar [[buffer(0)]]) |
| 19 | { |
| 20 | buffer_scalar.v[1].a[1u] = 1.0; |
| 21 | } |
| 22 |