diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/spirv/atomic-memory-class.slang | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/spirv/atomic-memory-class.slang b/tests/spirv/atomic-memory-class.slang new file mode 100644 index 000000000..8b46f74a6 --- /dev/null +++ b/tests/spirv/atomic-memory-class.slang @@ -0,0 +1,16 @@ +//TEST:SIMPLE(filecheck=CHECK): -target spirv + +uniform Atomic<int>* pInt; +RWStructuredBuffer<Atomic<int>> bInt; +static groupshared Atomic<int> sInt; + +[numthreads(4,1,1)] +void computeMain() +{ + // CHECK: OpAtomicLoad {{.*}} %uint_258 + // CHECK: OpAtomicStore {{.*}} %uint_68 + // CHECK: OpAtomicStore {{.*}} %uint_260 + let v = sInt.load(MemoryOrder.Acquire); + pInt->store(v, MemoryOrder.Release); + sInt.store(v, MemoryOrder.Release); +}
\ No newline at end of file |
