diff options
| author | Yong He <yonghe@outlook.com> | 2025-02-26 18:17:58 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-26 18:17:58 -0800 |
| commit | 6e862bb370c1f64abf0e7f9efa73dec38a76555e (patch) | |
| tree | 3f20f00fff9a28583eec0410b0ba4313cb844ca3 /tests | |
| parent | 86669cbb781840f8de180b1f793275f4511d3b65 (diff) | |
[SPIRV]: Emit missing storage class in atomic insts. (#6456)
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 |
