SPIRV-Cross/reference/opt/shaders-hlsl/asm/comp/atomic-decrement.asm.comp
Hans-Kristian Arntzen af75ef005f Update glslang and SPIRV-Tools.
A lot of changes in spirv-opt output.
Some new invalid SPIR-V was found but most of them were not significant
for SPIRV-Cross, so just marked them as invalid.
2018-09-27 11:10:22 +02:00

23 lines
498 B
Plaintext

RWByteAddressBuffer u0_counter : register(u1);
RWBuffer<uint> u0 : register(u0);
static uint3 gl_GlobalInvocationID;
struct SPIRV_Cross_Input
{
uint3 gl_GlobalInvocationID : SV_DispatchThreadID;
};
void comp_main()
{
uint _29;
u0_counter.InterlockedAdd(0, -1, _29);
u0[asint(asfloat(_29))] = uint(int(gl_GlobalInvocationID.x)).x;
}
[numthreads(4, 1, 1)]
void main(SPIRV_Cross_Input stage_input)
{
gl_GlobalInvocationID = stage_input.gl_GlobalInvocationID;
comp_main();
}