From 6e862bb370c1f64abf0e7f9efa73dec38a76555e Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 26 Feb 2025 18:17:58 -0800 Subject: [SPIRV]: Emit missing storage class in atomic insts. (#6456) --- tests/spirv/atomic-memory-class.slang | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 tests/spirv/atomic-memory-class.slang (limited to 'tests') 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* pInt; +RWStructuredBuffer> bInt; +static groupshared Atomic 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 -- cgit v1.2.3