yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

Yong He[SPIRV]: Emit missing storage class in atomic insts. (#6456)6e862bb37

master
450 B16 linesraw
1//TEST:SIMPLE(filecheck=CHECK): -target spirv
2
3uniform Atomic<int>* pInt;
4RWStructuredBuffer<Atomic<int>> bInt;
5static groupshared Atomic<int> sInt;
6
7[numthreads(4,1,1)]
8void computeMain()
9{
10    // CHECK: OpAtomicLoad {{.*}} %uint_258
11    // CHECK: OpAtomicStore {{.*}} %uint_68
12    // CHECK: OpAtomicStore {{.*}} %uint_260
13    let v = sInt.load(MemoryOrder.Acquire);
14    pInt->store(v, MemoryOrder.Release);
15    sInt.store(v, MemoryOrder.Release);
16}