blob: f5b2821ec5fcc0bd27b4d3c84685d0f569f1bd72 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
//TEST:SIMPLE(filecheck=CHECK): -profile ps_5_0 -entry main -target spirv-assembly
//TEST:SIMPLE(filecheck=CHECK): -profile ps_5_0 -entry main -target spirv-assembly -emit-spirv-via-glsl
// Ensure that we can lower to `imageAtomicAdd` correctly.
// CHECK: OpImageTexelPointer
// CHECK: OpAtomicIAdd
RWTexture2D<uint> t;
float4 main() : SV_Target
{
uint u;
InterlockedAdd(t[uint2(0)], 1, u);
return u;
}
|