steve-lunarg | 05f7514 | 2016-12-06 15:50:11 -0700 | [diff] [blame] | 1 | |
2 | RWBuffer<uint> s_uintbuff; // UINT RWBuffer ... | ||||
3 | |||||
4 | float4 main() : SV_Target | ||||
5 | { | ||||
6 | int Loc; // ... with INT variables | ||||
7 | int Inc; | ||||
8 | int Orig; | ||||
9 | |||||
10 | // This must select the uint flavor of SPIR-V atomic op, and promote | ||||
11 | // the other arguments as required. The output value from the | ||||
12 | // imageAtomicAdd AST will be converted to an int for 'Orig'. | ||||
13 | InterlockedAdd(s_uintbuff[Loc], Inc, Orig); | ||||
14 | |||||
15 | return float4(0,0,0,0); | ||||
16 | } | ||||
17 |