summaryrefslogtreecommitdiffstats
path: root/tests/spirv/vector-member-atomic.slang
blob: 439cfce9cf152c77b9da9c3ffac2277c3384e390 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//TEST:SIMPLE(filecheck=CHECK): -target spirv

// CHECK: %[[PTR:[0-9a-zA-Z_]+]] = OpAccessChain %_ptr_PhysicalStorageBuffer_uint %16 %int_0
// CHECK: %{{.*}} = OpAtomicIAdd %uint %[[PTR]] %uint_1 %uint_0 %uint_1


struct Push2
{
    uint4 * value;
};

[[vk::push_constant]] Push2 push2;

[shader("compute")]
[numthreads(1, 1, 1)]
void main()
{
    InterlockedAdd(push2.value[0].x, 1);
}