1static const uint3 gl_WorkGroupSize = uint3(1u, 1u, 1u); 2 3RWByteAddressBuffer ssbo : register(u2); 4RWTexture2D<uint> uImage : register(u0); 5RWTexture2D<int> iImage : register(u1); 6 7groupshared int int_atomic; 8groupshared uint uint_atomic; 9groupshared int int_atomic_array[1]; 10groupshared uint uint_atomic_array[1]; 11 12void comp_main() 13{ 14 uint _19; 15 InterlockedAdd(uImage[int2(1, 5)], 1u, _19); 16 uint _27; 17 InterlockedAdd(uImage[int2(1, 5)], 1u, _27); 18 iImage[int2(1, 6)] = int(_27).x; 19 uint _32; 20 InterlockedOr(uImage[int2(1, 5)], 1u, _32); 21 uint _34; 22 InterlockedXor(uImage[int2(1, 5)], 1u, _34); 23 uint _36; 24 InterlockedAnd(uImage[int2(1, 5)], 1u, _36); 25 uint _38; 26 InterlockedMin(uImage[int2(1, 5)], 1u, _38); 27 uint _40; 28 InterlockedMax(uImage[int2(1, 5)], 1u, _40); 29 uint _44; 30 InterlockedCompareExchange(uImage[int2(1, 5)], 10u, 2u, _44); 31 int _47; 32 InterlockedAdd(iImage[int2(1, 6)], 1, _47); 33 int _49; 34 InterlockedOr(iImage[int2(1, 6)], 1, _49); 35 int _51; 36 InterlockedXor(iImage[int2(1, 6)], 1, _51); 37 int _53; 38 InterlockedAnd(iImage[int2(1, 6)], 1, _53); 39 int _55; 40 InterlockedMin(iImage[int2(1, 6)], 1, _55); 41 int _57; 42 InterlockedMax(iImage[int2(1, 6)], 1, _57); 43 int _61; 44 InterlockedCompareExchange(iImage[int2(1, 5)], 10, 2, _61); 45 uint _68; 46 ssbo.InterlockedAdd(0, 1u, _68); 47 uint _70; 48 ssbo.InterlockedOr(0, 1u, _70); 49 uint _72; 50 ssbo.InterlockedXor(0, 1u, _72); 51 uint _74; 52 ssbo.InterlockedAnd(0, 1u, _74); 53 uint _76; 54 ssbo.InterlockedMin(0, 1u, _76); 55 uint _78; 56 ssbo.InterlockedMax(0, 1u, _78); 57 uint _80; 58 ssbo.InterlockedExchange(0, 1u, _80); 59 uint _82; 60 ssbo.InterlockedCompareExchange(0, 10u, 2u, _82); 61 int _85; 62 ssbo.InterlockedAdd(4, 1, _85); 63 int _87; 64 ssbo.InterlockedOr(4, 1, _87); 65 int _89; 66 ssbo.InterlockedXor(4, 1, _89); 67 int _91; 68 ssbo.InterlockedAnd(4, 1, _91); 69 int _93; 70 ssbo.InterlockedMin(4, 1, _93); 71 int _95; 72 ssbo.InterlockedMax(4, 1, _95); 73 int _97; 74 ssbo.InterlockedExchange(4, 1, _97); 75 int _99; 76 ssbo.InterlockedCompareExchange(4, 10, 2, _99); 77 int _102; 78 InterlockedAdd(int_atomic, 10, _102); 79 uint _105; 80 InterlockedAdd(uint_atomic, 10u, _105); 81 int _110; 82 InterlockedAdd(int_atomic_array[0], 10, _110); 83 uint _115; 84 InterlockedAdd(uint_atomic_array[0], 10u, _115); 85} 86 87[numthreads(1, 1, 1)] 88void main() 89{ 90 comp_main(); 91} 92