Debian Codegraph @

third_party/spirv-cross/reference/shaders-hlsl/comp/spec-constant-op-member-array.comp

raw
1 #ifndef SPIRV_CROSS_CONSTANT_ID_0
2 #define SPIRV_CROSS_CONSTANT_ID_0 100
3 #endif
4 static const int a = SPIRV_CROSS_CONSTANT_ID_0;
5 #ifndef SPIRV_CROSS_CONSTANT_ID_1
6 #define SPIRV_CROSS_CONSTANT_ID_1 200
7 #endif
8 static const int b = SPIRV_CROSS_CONSTANT_ID_1;
9
10 struct A
11 {
12 int member0[a];
13 int member1[b];
14 };
15
16 struct B
17 {
18 int member0[b];
19 int member1[a];
20 };
21
22 #ifndef SPIRV_CROSS_CONSTANT_ID_2
23 #define SPIRV_CROSS_CONSTANT_ID_2 300
24 #endif
25 static const int c = SPIRV_CROSS_CONSTANT_ID_2;
26 static const int d = (c + 50);
27 #ifndef SPIRV_CROSS_CONSTANT_ID_3
28 #define SPIRV_CROSS_CONSTANT_ID_3 400
29 #endif
30 static const int e = SPIRV_CROSS_CONSTANT_ID_3;
31 static const uint3 gl_WorkGroupSize = uint3(1u, 1u, 1u);
32
33 RWByteAddressBuffer _22 : register(u0);
34
35 static uint3 gl_GlobalInvocationID;
36 struct SPIRV_Cross_Input
37 {
38 uint3 gl_GlobalInvocationID : SV_DispatchThreadID;
39 };
40
41 void comp_main()
42 {
43 _22.Store(gl_GlobalInvocationID.x * 4 + 2800, uint(int(_22.Load(gl_GlobalInvocationID.x * 4 + 2800)) + (int(_22.Load(gl_GlobalInvocationID.x * 4 + 2400)) + e)));
44 }
45
46 [numthreads(1, 1, 1)]
47 void main(SPIRV_Cross_Input stage_input)
48 {
49 gl_GlobalInvocationID = stage_input.gl_GlobalInvocationID;
50 comp_main();
51 }