summaryrefslogtreecommitdiffstats
path: root/tests/spirv/image-atomic-array-2.slang
blob: f5dc2b1010da429f498a4540ee010b5e37892088 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
//TEST:SIMPLE(filecheck=CHECK): -target spirv

// CHECK: %{{.*}} = OpImageTexelPointer %{{.*}} %{{.*}} %{{.*}} %int_0
// CHECK: %{{.*}} = OpAtomicIAdd %ulong %{{.*}} %uint_1 %uint_0 %ulong_0

[[vk::binding(0,0)]] RWTexture2D<uint64_t> tex;

[shader("compute")]
[numthreads(1, 1, 1)]
void main()
{
    InterlockedAdd(tex[uint2(0,0)], uint64_t(0));
}