Move to revision 31 of SPIR-V.
[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 77\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 11  "func(au1;"\r
20                               Name 10  "c"\r
21                               Name 13  "atoms("\r
22                               Name 23  "counter"\r
23                               Name 24  "param"\r
24                               Name 27  "val"\r
25                               Name 31  "countArr"\r
26                               Name 41  "origi"\r
27                               Name 43  "atomi"\r
28                               Name 47  "origu"\r
29                               Name 49  "atomu"\r
30                               Name 51  "value"\r
31                               Name 74  "arrX"\r
32                               Name 75  "arrY"\r
33                               Name 76  "arrZ"\r
34                               Decorate 23(counter) Binding 0\r
35                               Decorate 31(countArr) Binding 0\r
36                               Decorate 74(arrX) NoStaticUse\r
37                               Decorate 75(arrY) NoStaticUse\r
38                               Decorate 76(arrZ) NoStaticUse\r
39                2:             TypeVoid\r
40                3:             TypeFunction 2\r
41                7:             TypeInt 32 0\r
42                8:             TypePointer Function 7(int)\r
43                9:             TypeFunction 7(int) 8(ptr)\r
44               16:      7(int) Constant 1\r
45               17:      7(int) Constant 0\r
46               21:      7(int) Constant 256\r
47               22:             TypePointer UniformConstant 7(int)\r
48      23(counter):     22(ptr) Variable UniformConstant\r
49               28:      7(int) Constant 4\r
50               29:             TypeArray 7(int) 28\r
51               30:             TypePointer UniformConstant 29\r
52     31(countArr):     30(ptr) Variable UniformConstant\r
53               32:             TypeInt 32 1\r
54               33:     32(int) Constant 2\r
55               40:             TypePointer Function 32(int)\r
56               42:             TypePointer WorkgroupLocal 32(int)\r
57        43(atomi):     42(ptr) Variable WorkgroupLocal\r
58               45:     32(int) Constant 3\r
59               48:             TypePointer WorkgroupLocal 7(int)\r
60        49(atomu):     48(ptr) Variable WorkgroupLocal\r
61        51(value):     22(ptr) Variable UniformConstant\r
62               55:      7(int) Constant 7\r
63               63:     32(int) Constant 7\r
64               69:      7(int) Constant 10\r
65               72:             TypeArray 32(int) 16\r
66               73:             TypePointer PrivateGlobal 72\r
67         74(arrX):     73(ptr) Variable PrivateGlobal\r
68         75(arrY):     73(ptr) Variable PrivateGlobal\r
69         76(arrZ):     73(ptr) Variable PrivateGlobal\r
70          4(main):           2 Function None 3\r
71                5:             Label\r
72        24(param):      8(ptr) Variable Function\r
73          27(val):      8(ptr) Variable Function\r
74                               MemoryBarrier 16 21\r
75               25:      7(int) Load 23(counter)\r
76                               Store 24(param) 25\r
77               26:      7(int) FunctionCall 11(func(au1;) 24(param)\r
78               34:     22(ptr) AccessChain 31(countArr) 33\r
79               35:      7(int) Load 34\r
80               36:      7(int) AtomicLoad 35 16 17\r
81               37:      7(int) Load 34\r
82                               Store 27(val) 37\r
83               38:      7(int) Load 23(counter)\r
84               39:      7(int) AtomicIDecrement 38 16 17\r
85                               Branch 6\r
86                6:             Label\r
87                               Return\r
88                               FunctionEnd\r
89    11(func(au1;):      7(int) Function None 9\r
90            10(c):      8(ptr) FunctionParameter\r
91               12:             Label\r
92               15:      7(int) Load 10(c)\r
93               18:      7(int) AtomicIIncrement 15 16 17\r
94               19:      7(int) Load 10(c)\r
95                               ReturnValue 19\r
96                               FunctionEnd\r
97       13(atoms():           2 Function None 3\r
98               14:             Label\r
99        41(origi):     40(ptr) Variable Function\r
100        47(origu):      8(ptr) Variable Function\r
101               44:     32(int) Load 43(atomi)\r
102               46:     32(int) AtomicIAdd 44 16 17 45\r
103                               Store 41(origi) 46\r
104               50:      7(int) Load 49(atomu)\r
105               52:      7(int) Load 51(value)\r
106               53:      7(int) AtomicAnd 50 16 17 52\r
107                               Store 47(origu) 53\r
108               54:      7(int) Load 49(atomu)\r
109               56:      7(int) AtomicOr 54 16 17 55\r
110                               Store 47(origu) 56\r
111               57:      7(int) Load 49(atomu)\r
112               58:      7(int) AtomicXor 57 16 17 55\r
113                               Store 47(origu) 58\r
114               59:      7(int) Load 49(atomu)\r
115               60:      7(int) Load 51(value)\r
116               61:      7(int) AtomicSMin 59 16 17 60\r
117                               Store 47(origu) 61\r
118               62:     32(int) Load 43(atomi)\r
119               64:     32(int) AtomicSMax 62 16 17 63\r
120                               Store 41(origi) 64\r
121               65:     32(int) Load 43(atomi)\r
122               66:     32(int) Load 41(origi)\r
123               67:     32(int) AtomicExchange 65 16 17 66\r
124                               Store 41(origi) 67\r
125               68:      7(int) Load 49(atomu)\r
126               70:      7(int) Load 51(value)\r
127               71:      7(int) AtomicCompareExchange 68 16 17 69 70\r
128                               Store 47(origu) 71\r
129                               Return\r
130                               FunctionEnd\r