mirror of
https://github.com/KhronosGroup/glslang
synced 2024-11-15 06:10:05 +00:00
26 lines
649 B
GLSL
26 lines
649 B
GLSL
|
|
||
|
RWByteAddressBuffer sbuf;
|
||
|
|
||
|
float4 main(uint pos : FOO) : SV_Target0
|
||
|
{
|
||
|
uint u;
|
||
|
|
||
|
sbuf.InterlockedAdd(8, 1);
|
||
|
sbuf.InterlockedAdd(8, 1, u);
|
||
|
sbuf.InterlockedAnd(8, 1);
|
||
|
sbuf.InterlockedAnd(8, 1, u);
|
||
|
sbuf.InterlockedCompareExchange(8, 1, 2, u);
|
||
|
// sbuf.InterlockedCompareStore(8, 1, 2); // TODO: ...
|
||
|
sbuf.InterlockedExchange(8, 1, u);
|
||
|
sbuf.InterlockedMax(8, 1);
|
||
|
sbuf.InterlockedMax(8, 1, u);
|
||
|
sbuf.InterlockedMin(8, 1);
|
||
|
sbuf.InterlockedMin(8, 1, u);
|
||
|
sbuf.InterlockedOr(8, 1);
|
||
|
sbuf.InterlockedOr(8, 1, u);
|
||
|
sbuf.InterlockedXor(8, 1);
|
||
|
sbuf.InterlockedXor(8, 1, u);
|
||
|
|
||
|
return sbuf.Load(pos);
|
||
|
}
|