Debian Codegraph @

third_party/spirv-cross/reference/shaders-msl/comp/struct-nested.comp

raw
1 #include <metal_stdlib>
2 #include <simd/simd.h>
3
4 using namespace metal;
5
6 struct s1
7 {
8 int a;
9 };
10
11 struct s2
12 {
13 s1 b;
14 };
15
16 struct s1_1
17 {
18 int a;
19 };
20
21 struct s2_1
22 {
23 s1_1 b;
24 };
25
26 struct dstbuffer
27 {
28 s2_1 test[1];
29 };
30
31 constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u);
32
33 kernel void main0(device dstbuffer& _19 [[buffer(0)]])
34 {
35 s2 testVal;
36 testVal.b.a = 0;
37 _19.test[0].b.a = testVal.b.a;
38 }
39