SPIRV-Cross/reference/shaders-hlsl-no-opt/asm/comp/atomic-load-store.asm.comp
Hans-Kristian Arntzen 9b7140e2ba Implement OpAtomicLoad/OpAtomicStore.
Need some emulation on GLSL/HLSL, fix bug with atomic store on MSL.
2020-04-27 12:11:46 +02:00

19 lines
294 B
Plaintext

static const uint3 gl_WorkGroupSize = uint3(1u, 1u, 1u);
RWByteAddressBuffer _5 : register(u0);
void comp_main()
{
uint _20;
_5.InterlockedAdd(4, 0, _20);
uint c = _20;
uint _23;
_5.InterlockedExchange(0, c, _23);
}
[numthreads(1, 1, 1)]
void main()
{
comp_main();
}