Update CHANGES for release 11.12.0
[platform/upstream/glslang.git] / Test / baseResults / spv.debugInfo.1.1.frag.out
1 spv.debugInfo.frag
2 // Module Version 10300
3 // Generated by (magic number): 8000b
4 // Id's are bound by 124
5
6                               Capability Shader
7                2:             ExtInstImport  "GLSL.std.450"
8                               MemoryModel Logical GLSL450
9                               EntryPoint Fragment 5  "main" 24 52
10                               ExecutionMode 5 OriginUpperLeft
11                1:             String  "spv.debugInfo.frag"
12                               Source GLSL 450 1  "#version 450
13
14 struct S {
15     int a;
16 };
17
18 uniform ubuf {
19     S s;
20 };
21
22 uniform sampler2D s2d;
23
24 layout(location = 0) in vec4 inv;
25 layout(location = 0) out vec4 outv;
26
27 vec4 foo(S s)
28 {
29     vec4 r = s.a * inv;
30     ++r;
31     if (r.x > 3.0)
32         --r;
33     else
34         r *= 2;
35
36     return r;
37 }
38
39 void main()
40 {
41     outv = foo(s);
42     outv += texture(s2d, vec2(0.5));
43
44     switch (s.a) {
45     case 10:
46         ++outv;
47         break;
48     case 20:
49         outv = 2 * outv;
50         ++outv;
51         break;
52     default:
53         --outv;
54         break;
55     }
56
57     for (int i = 0; i < 10; ++i)
58         outv *= 3.0;
59
60     outv.x < 10.0 ?
61         outv = sin(outv) :
62         outv = cos(outv);
63 }"
64                               Name 5  "main"
65                               Name 8  "S"
66                               MemberName 8(S) 0  "a"
67                               Name 14  "foo(struct-S-i11;"
68                               Name 13  "s"
69                               Name 17  "r"
70                               Name 24  "inv"
71                               Name 52  "outv"
72                               Name 53  "S"
73                               MemberName 53(S) 0  "a"
74                               Name 54  "ubuf"
75                               MemberName 54(ubuf) 0  "s"
76                               Name 56  ""
77                               Name 57  "param"
78                               Name 67  "s2d"
79                               Name 97  "i"
80                               ModuleProcessed  "no-storage-format"
81                               ModuleProcessed  "resource-set-binding 3"
82                               ModuleProcessed  "auto-map-bindings"
83                               ModuleProcessed  "auto-map-locations"
84                               ModuleProcessed  "client vulkan100"
85                               ModuleProcessed  "target-env spirv1.3"
86                               ModuleProcessed  "target-env vulkan1.1"
87                               ModuleProcessed  "relaxed-errors"
88                               ModuleProcessed  "suppress-warnings"
89                               ModuleProcessed  "hlsl-offsets"
90                               ModuleProcessed  "entry-point main"
91                               Decorate 24(inv) Location 0
92                               Decorate 52(outv) Location 0
93                               MemberDecorate 53(S) 0 Offset 0
94                               MemberDecorate 54(ubuf) 0 Offset 0
95                               Decorate 54(ubuf) Block
96                               Decorate 56 DescriptorSet 3
97                               Decorate 56 Binding 0
98                               Decorate 67(s2d) DescriptorSet 3
99                               Decorate 67(s2d) Binding 1
100                3:             TypeVoid
101                4:             TypeFunction 3
102                7:             TypeInt 32 1
103             8(S):             TypeStruct 7(int)
104                9:             TypePointer Function 8(S)
105               10:             TypeFloat 32
106               11:             TypeVector 10(float) 4
107               12:             TypeFunction 11(fvec4) 9(ptr)
108               16:             TypePointer Function 11(fvec4)
109               18:      7(int) Constant 0
110               19:             TypePointer Function 7(int)
111               23:             TypePointer Input 11(fvec4)
112          24(inv):     23(ptr) Variable Input
113               28:   10(float) Constant 1065353216
114               31:             TypeInt 32 0
115               32:     31(int) Constant 0
116               33:             TypePointer Function 10(float)
117               36:   10(float) Constant 1077936128
118               37:             TypeBool
119               45:   10(float) Constant 1073741824
120               51:             TypePointer Output 11(fvec4)
121         52(outv):     51(ptr) Variable Output
122            53(S):             TypeStruct 7(int)
123         54(ubuf):             TypeStruct 53(S)
124               55:             TypePointer Uniform 54(ubuf)
125               56:     55(ptr) Variable Uniform
126               58:             TypePointer Uniform 53(S)
127               64:             TypeImage 10(float) 2D sampled format:Unknown
128               65:             TypeSampledImage 64
129               66:             TypePointer UniformConstant 65
130          67(s2d):     66(ptr) Variable UniformConstant
131               69:             TypeVector 10(float) 2
132               70:   10(float) Constant 1056964608
133               71:   69(fvec2) ConstantComposite 70 70
134               75:             TypePointer Uniform 7(int)
135              104:      7(int) Constant 10
136              109:      7(int) Constant 1
137              111:             TypePointer Output 10(float)
138              114:   10(float) Constant 1092616192
139                               Line 1 28 11
140          5(main):           3 Function None 4
141                6:             Label
142        57(param):      9(ptr) Variable Function
143            97(i):     19(ptr) Variable Function
144              116:     16(ptr) Variable Function
145                               Line 1 30 0
146               59:     58(ptr) AccessChain 56 18
147               60:       53(S) Load 59
148               61:      7(int) CompositeExtract 60 0
149               62:     19(ptr) AccessChain 57(param) 18
150                               Store 62 61
151               63:   11(fvec4) FunctionCall 14(foo(struct-S-i11;) 57(param)
152                               Store 52(outv) 63
153                               Line 1 31 0
154               68:          65 Load 67(s2d)
155               72:   11(fvec4) ImageSampleImplicitLod 68 71
156               73:   11(fvec4) Load 52(outv)
157               74:   11(fvec4) FAdd 73 72
158                               Store 52(outv) 74
159                               Line 1 33 0
160               76:     75(ptr) AccessChain 56 18 18
161               77:      7(int) Load 76
162                               SelectionMerge 81 None
163                               Switch 77 80 
164                                      case 10: 78
165                                      case 20: 79
166               80:               Label
167                                 Line 1 42 0
168               92:   11(fvec4)   Load 52(outv)
169               93:   11(fvec4)   CompositeConstruct 28 28 28 28
170               94:   11(fvec4)   FSub 92 93
171                                 Store 52(outv) 94
172                                 Line 1 43 0
173                                 Branch 81
174               78:               Label
175                                 Line 1 35 0
176               82:   11(fvec4)   Load 52(outv)
177               83:   11(fvec4)   CompositeConstruct 28 28 28 28
178               84:   11(fvec4)   FAdd 82 83
179                                 Store 52(outv) 84
180                                 Line 1 36 0
181                                 Branch 81
182               79:               Label
183                                 Line 1 38 0
184               86:   11(fvec4)   Load 52(outv)
185               87:   11(fvec4)   VectorTimesScalar 86 45
186                                 Store 52(outv) 87
187                                 Line 1 39 0
188               88:   11(fvec4)   Load 52(outv)
189               89:   11(fvec4)   CompositeConstruct 28 28 28 28
190               90:   11(fvec4)   FAdd 88 89
191                                 Store 52(outv) 90
192                                 Line 1 40 0
193                                 Branch 81
194               81:             Label
195                               Line 1 46 0
196                               Store 97(i) 18
197                               Branch 98
198               98:             Label
199                               Line 1 46 0
200                               LoopMerge 100 101 None
201                               Branch 102
202              102:             Label
203                               Line 1 46 0
204              103:      7(int) Load 97(i)
205              105:    37(bool) SLessThan 103 104
206                               BranchConditional 105 99 100
207               99:               Label
208                                 Line 1 47 0
209              106:   11(fvec4)   Load 52(outv)
210              107:   11(fvec4)   VectorTimesScalar 106 36
211                                 Store 52(outv) 107
212                                 Branch 101
213              101:               Label
214                                 Line 1 46 0
215              108:      7(int)   Load 97(i)
216              110:      7(int)   IAdd 108 109
217                                 Store 97(i) 110
218                                 Branch 98
219              100:             Label
220                               Line 1 49 0
221              112:    111(ptr) AccessChain 52(outv) 32
222              113:   10(float) Load 112
223              115:    37(bool) FOrdLessThan 113 114
224                               SelectionMerge 118 None
225                               BranchConditional 115 117 121
226              117:               Label
227                                 Line 1 50 0
228              119:   11(fvec4)   Load 52(outv)
229              120:   11(fvec4)   ExtInst 2(GLSL.std.450) 13(Sin) 119
230                                 Store 52(outv) 120
231                                 Store 116 120
232                                 Branch 118
233              121:               Label
234                                 Line 1 51 0
235              122:   11(fvec4)   Load 52(outv)
236              123:   11(fvec4)   ExtInst 2(GLSL.std.450) 14(Cos) 122
237                                 Store 52(outv) 123
238                                 Store 116 123
239                                 Branch 118
240              118:             Label
241                               Return
242                               FunctionEnd
243                               Line 1 16 13
244 14(foo(struct-S-i11;):   11(fvec4) Function None 12
245            13(s):      9(ptr) FunctionParameter
246               15:             Label
247            17(r):     16(ptr) Variable Function
248                               Line 1 18 0
249               20:     19(ptr) AccessChain 13(s) 18
250               21:      7(int) Load 20
251               22:   10(float) ConvertSToF 21
252               25:   11(fvec4) Load 24(inv)
253               26:   11(fvec4) VectorTimesScalar 25 22
254                               Store 17(r) 26
255                               Line 1 19 0
256               27:   11(fvec4) Load 17(r)
257               29:   11(fvec4) CompositeConstruct 28 28 28 28
258               30:   11(fvec4) FAdd 27 29
259                               Store 17(r) 30
260                               Line 1 20 0
261               34:     33(ptr) AccessChain 17(r) 32
262               35:   10(float) Load 34
263               38:    37(bool) FOrdGreaterThan 35 36
264                               SelectionMerge 40 None
265                               BranchConditional 38 39 44
266               39:               Label
267                                 Line 1 21 0
268               41:   11(fvec4)   Load 17(r)
269               42:   11(fvec4)   CompositeConstruct 28 28 28 28
270               43:   11(fvec4)   FSub 41 42
271                                 Store 17(r) 43
272                                 Branch 40
273               44:               Label
274                                 Line 1 23 0
275               46:   11(fvec4)   Load 17(r)
276               47:   11(fvec4)   VectorTimesScalar 46 45
277                                 Store 17(r) 47
278                                 Branch 40
279               40:             Label
280                               Line 1 25 0
281               48:   11(fvec4) Load 17(r)
282                               ReturnValue 48
283                               FunctionEnd