SPV OpAtomicCompareSwap: Generate correct operand order and number of operands.
[platform/upstream/glslang.git] / Test / baseResults / spv.atomic.comp.out
1 spv.atomic.comp\r
2 Warning, version 310 is not yet complete; most version-specific features are present, but some are missing.\r
3 \r
4 \r
5 Linked compute stage:\r
6 \r
7 \r
8 TBD functionality: Is atomic_uint an opaque handle in the uniform storage class, or an addresses in the atomic storage class?\r
9 // Module Version 99\r
10 // Generated by (magic number): 51a00bb\r
11 // Id's are bound by 74\r
12 \r
13                               Source ESSL 310\r
14                               Capability Shader\r
15                1:             ExtInstImport  "GLSL.std.450"\r
16                               MemoryModel Logical GLSL450\r
17                               EntryPoint GLCompute 4  "main"\r
18                               Name 4  "main"\r
19                               Name 10  "func(au1;"\r
20                               Name 9  "c"\r
21                               Name 12  "atoms("\r
22                               Name 21  "counter"\r
23                               Name 22  "param"\r
24                               Name 25  "val"\r
25                               Name 29  "countArr"\r
26                               Name 38  "origi"\r
27                               Name 40  "atomi"\r
28                               Name 44  "origu"\r
29                               Name 46  "atomu"\r
30                               Name 48  "value"\r
31                               Name 71  "arrX"\r
32                               Name 72  "arrY"\r
33                               Name 73  "arrZ"\r
34                               Decorate 21(counter) Binding 0\r
35                               Decorate 29(countArr) Binding 0\r
36                               Decorate 71(arrX) NoStaticUse\r
37                               Decorate 72(arrY) NoStaticUse\r
38                               Decorate 73(arrZ) NoStaticUse\r
39                2:             TypeVoid\r
40                3:             TypeFunction 2\r
41                6:             TypeInt 32 0\r
42                7:             TypePointer Function 6(int)\r
43                8:             TypeFunction 6(int) 7(ptr)\r
44               15:      6(int) Constant 1\r
45               16:      6(int) Constant 0\r
46               19:      6(int) Constant 256\r
47               20:             TypePointer UniformConstant 6(int)\r
48      21(counter):     20(ptr) Variable UniformConstant\r
49               26:      6(int) Constant 4\r
50               27:             TypeArray 6(int) 26\r
51               28:             TypePointer UniformConstant 27\r
52     29(countArr):     28(ptr) Variable UniformConstant\r
53               30:             TypeInt 32 1\r
54               31:     30(int) Constant 2\r
55               37:             TypePointer Function 30(int)\r
56               39:             TypePointer WorkgroupLocal 30(int)\r
57        40(atomi):     39(ptr) Variable WorkgroupLocal\r
58               42:     30(int) Constant 3\r
59               45:             TypePointer WorkgroupLocal 6(int)\r
60        46(atomu):     45(ptr) Variable WorkgroupLocal\r
61        48(value):     20(ptr) Variable UniformConstant\r
62               52:      6(int) Constant 7\r
63               60:     30(int) Constant 7\r
64               66:      6(int) Constant 10\r
65               69:             TypeArray 30(int) 15\r
66               70:             TypePointer PrivateGlobal 69\r
67         71(arrX):     70(ptr) Variable PrivateGlobal\r
68         72(arrY):     70(ptr) Variable PrivateGlobal\r
69         73(arrZ):     70(ptr) Variable PrivateGlobal\r
70          4(main):           2 Function None 3\r
71                5:             Label\r
72        22(param):      7(ptr) Variable Function\r
73          25(val):      7(ptr) Variable Function\r
74                               MemoryBarrier 15 19\r
75               23:      6(int) Load 21(counter)\r
76                               Store 22(param) 23\r
77               24:      6(int) FunctionCall 10(func(au1;) 22(param)\r
78               32:     20(ptr) AccessChain 29(countArr) 31\r
79               33:      6(int) Load 32\r
80               34:      6(int) AtomicLoad 33 15 16\r
81                               Store 25(val) 34\r
82               35:      6(int) Load 21(counter)\r
83               36:      6(int) AtomicIDecrement 35 15 16\r
84                               Return\r
85                               FunctionEnd\r
86    10(func(au1;):      6(int) Function None 8\r
87             9(c):      7(ptr) FunctionParameter\r
88               11:             Label\r
89               14:      6(int) Load 9(c)\r
90               17:      6(int) AtomicIIncrement 14 15 16\r
91                               ReturnValue 17\r
92                               FunctionEnd\r
93       12(atoms():           2 Function None 3\r
94               13:             Label\r
95        38(origi):     37(ptr) Variable Function\r
96        44(origu):      7(ptr) Variable Function\r
97               41:     30(int) Load 40(atomi)\r
98               43:     30(int) AtomicIAdd 41 15 16 42\r
99                               Store 38(origi) 43\r
100               47:      6(int) Load 46(atomu)\r
101               49:      6(int) Load 48(value)\r
102               50:      6(int) AtomicAnd 47 15 16 49\r
103                               Store 44(origu) 50\r
104               51:      6(int) Load 46(atomu)\r
105               53:      6(int) AtomicOr 51 15 16 52\r
106                               Store 44(origu) 53\r
107               54:      6(int) Load 46(atomu)\r
108               55:      6(int) AtomicXor 54 15 16 52\r
109                               Store 44(origu) 55\r
110               56:      6(int) Load 46(atomu)\r
111               57:      6(int) Load 48(value)\r
112               58:      6(int) AtomicSMin 56 15 16 57\r
113                               Store 44(origu) 58\r
114               59:     30(int) Load 40(atomi)\r
115               61:     30(int) AtomicSMax 59 15 16 60\r
116                               Store 38(origi) 61\r
117               62:     30(int) Load 40(atomi)\r
118               63:     30(int) Load 38(origi)\r
119               64:     30(int) AtomicExchange 62 15 16 63\r
120                               Store 38(origi) 64\r
121               65:      6(int) Load 46(atomu)\r
122               67:      6(int) Load 48(value)\r
123               68:      6(int) AtomicCompareExchange 65 15 16 16 67 66\r
124                               Store 44(origu) 68\r
125                               Return\r
126                               FunctionEnd\r