Debian Codegraph @

third_party/spirv-cross/reference/shaders-hlsl/asm/comp/block-name-alias-global.asm.comp

raw
1 struct A
2 {
3 int a;
4 int b;
5 };
6
7 RWByteAddressBuffer C1 : register(u1);
8 cbuffer C2 : register(b2)
9 {
10 A C2_1_Data[1024] : packoffset(c0);
11 };
12
13 RWByteAddressBuffer C3 : register(u0);
14 cbuffer B : register(b3)
15 {
16 A C4_Data[1024] : packoffset(c0);
17 };
18
19
20 static uint3 gl_GlobalInvocationID;
21 struct SPIRV_Cross_Input
22 {
23 uint3 gl_GlobalInvocationID : SV_DispatchThreadID;
24 };
25
26 void comp_main()
27 {
28 C1.Store(gl_GlobalInvocationID.x * 8 + 0, uint(C2_1_Data[gl_GlobalInvocationID.x].a));
29 C1.Store(gl_GlobalInvocationID.x * 8 + 4, uint(C2_1_Data[gl_GlobalInvocationID.x].b));
30 C3.Store(gl_GlobalInvocationID.x * 8 + 0, uint(C4_Data[gl_GlobalInvocationID.x].a));
31 C3.Store(gl_GlobalInvocationID.x * 8 + 4, uint(C4_Data[gl_GlobalInvocationID.x].b));
32 }
33
34 [numthreads(1, 1, 1)]
35 void main(SPIRV_Cross_Input stage_input)
36 {
37 gl_GlobalInvocationID = stage_input.gl_GlobalInvocationID;
38 comp_main();
39 }