Debian Codegraph @

third_party/spirv-cross/reference/shaders-hlsl/asm/comp/atomic-decrement.asm.comp

raw
1 RWByteAddressBuffer u0_counter : register(u1);
2 RWBuffer<uint> u0 : register(u0);
3
4 static uint3 gl_GlobalInvocationID;
5 struct SPIRV_Cross_Input
6 {
7 uint3 gl_GlobalInvocationID : SV_DispatchThreadID;
8 };
9
10 void comp_main()
11 {
12 uint _29;
13 u0_counter.InterlockedAdd(0, -1, _29);
14 float4 r0;
15 r0.x = asfloat(_29);
16 u0[(uint(asint(r0.x)) * 1u) + (uint(0) >> 2u)] = uint(int(gl_GlobalInvocationID.x)).x;
17 }
18
19 [numthreads(4, 1, 1)]
20 void main(SPIRV_Cross_Input stage_input)
21 {
22 gl_GlobalInvocationID = stage_input.gl_GlobalInvocationID;
23 comp_main();
24 }