Debian Codegraph @

third_party/spirv-cross/reference/shaders-msl-no-opt/packing/struct-packing-recursive.comp

raw
1 #include <metal_stdlib>
2 #include <simd/simd.h>
3
4 using namespace metal;
5
6 struct Foo
7 {
8 packed_float4 a;
9 };
10
11 struct Bar
12 {
13 Foo a;
14 };
15
16 struct Baz
17 {
18 Bar a;
19 };
20
21 struct SSBOScalar
22 {
23 float v;
24 Baz baz;
25 };
26
27 constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u);
28
29 kernel void main0(device SSBOScalar& buffer_scalar [[buffer(0)]])
30 {
31 buffer_scalar.baz.a.a.a[3u] = 10.0;
32 }
33