33714aa486a8426c3d0cd80d611e583237cb3347
[platform/upstream/glslang.git] / Test / baseResults / hlsl.init2.frag.out
1 hlsl.init2.frag
2 Shader version: 450
3 gl_FragCoord origin is upper left
4 0:? Sequence
5 0:3  Function Definition: Test1( ( temp void)
6 0:3    Function Parameters: 
7 0:?     Sequence
8 0:5      Sequence
9 0:5        move second child to first child ( temp structure{ temp 2-component vector of float a})
10 0:5          'test1' ( temp structure{ temp 2-component vector of float a})
11 0:5          Constant:
12 0:5            1.000000
13 0:5            2.000000
14 0:9      Sequence
15 0:9        move second child to first child ( temp structure{ temp 2-component vector of float a})
16 0:9          'test2' ( temp structure{ temp 2-component vector of float a})
17 0:9          Constant:
18 0:9            3.000000
19 0:9            4.000000
20 0:17      Sequence
21 0:17        move second child to first child ( temp float)
22 0:17          'test4' ( temp float)
23 0:17          Constant:
24 0:17            7.000000
25 0:20      Sequence
26 0:20        move second child to first child ( temp structure{ temp float a,  temp float b,  temp float c})
27 0:20          'test5' ( temp structure{ temp float a,  temp float b,  temp float c})
28 0:20          Constant:
29 0:20            8.000000
30 0:20            9.000000
31 0:20            10.000000
32 0:22      Constant:
33 0:22        10.000000
34 0:25      Sequence
35 0:25        move second child to first child ( temp float)
36 0:25          'n' ( temp float)
37 0:25          Constant:
38 0:25            0.000000
39 0:26      Sequence
40 0:26        move second child to first child ( temp 8-element array of 3-component vector of float)
41 0:26          'a' ( const (read only) 8-element array of 3-component vector of float)
42 0:26          Construct vec3 ( temp 8-element array of 3-component vector of float)
43 0:27            vector-scale ( temp 3-component vector of float)
44 0:?               Constant:
45 0:?                 0.577350
46 0:?                 0.577350
47 0:?                 0.577350
48 0:27              add second child into first child ( temp float)
49 0:27                'n' ( temp float)
50 0:27                Constant:
51 0:27                  1.000000
52 0:28            vector-scale ( temp 3-component vector of float)
53 0:?               Constant:
54 0:?                 -0.577350
55 0:?                 -0.577350
56 0:?                 -0.577350
57 0:28              add second child into first child ( temp float)
58 0:28                'n' ( temp float)
59 0:28                Constant:
60 0:28                  1.000000
61 0:29            vector-scale ( temp 3-component vector of float)
62 0:?               Constant:
63 0:?                 -0.577350
64 0:?                 -0.577350
65 0:?                 0.577350
66 0:29              add second child into first child ( temp float)
67 0:29                'n' ( temp float)
68 0:29                Constant:
69 0:29                  1.000000
70 0:30            vector-scale ( temp 3-component vector of float)
71 0:?               Constant:
72 0:?                 -0.577350
73 0:?                 0.577350
74 0:?                 -0.577350
75 0:30              add second child into first child ( temp float)
76 0:30                'n' ( temp float)
77 0:30                Constant:
78 0:30                  1.000000
79 0:31            vector-scale ( temp 3-component vector of float)
80 0:?               Constant:
81 0:?                 -0.577350
82 0:?                 0.577350
83 0:?                 0.577350
84 0:31              add second child into first child ( temp float)
85 0:31                'n' ( temp float)
86 0:31                Constant:
87 0:31                  1.000000
88 0:32            vector-scale ( temp 3-component vector of float)
89 0:?               Constant:
90 0:?                 0.577350
91 0:?                 -0.577350
92 0:?                 -0.577350
93 0:32              add second child into first child ( temp float)
94 0:32                'n' ( temp float)
95 0:32                Constant:
96 0:32                  1.000000
97 0:33            vector-scale ( temp 3-component vector of float)
98 0:?               Constant:
99 0:?                 0.577350
100 0:?                 -0.577350
101 0:?                 0.577350
102 0:33              add second child into first child ( temp float)
103 0:33                'n' ( temp float)
104 0:33                Constant:
105 0:33                  1.000000
106 0:34            vector-scale ( temp 3-component vector of float)
107 0:?               Constant:
108 0:?                 0.577350
109 0:?                 0.577350
110 0:?                 -0.577350
111 0:34              add second child into first child ( temp float)
112 0:34                'n' ( temp float)
113 0:34                Constant:
114 0:34                  1.000000
115 0:36      Sequence
116 0:36        move second child to first child ( temp structure{ temp 3-component vector of float a})
117 0:36          'oneNonConst' ( const (read only) structure{ temp 3-component vector of float a})
118 0:36          Construct structure ( temp structure{ temp 3-component vector of float a})
119 0:36            vector-scale ( temp 3-component vector of float)
120 0:?               Constant:
121 0:?                 -0.577350
122 0:?                 0.577350
123 0:?                 0.577350
124 0:36              add second child into first child ( temp float)
125 0:36                'n' ( temp float)
126 0:36                Constant:
127 0:36                  1.000000
128 0:38      Sequence
129 0:38        move second child to first child ( temp structure{ temp 3-component vector of float a,  temp 3-component vector of float b})
130 0:38          'twoNonConst' ( const (read only) structure{ temp 3-component vector of float a,  temp 3-component vector of float b})
131 0:38          Construct structure ( temp structure{ temp 3-component vector of float a,  temp 3-component vector of float b})
132 0:38            vector-scale ( temp 3-component vector of float)
133 0:?               Constant:
134 0:?                 -0.577350
135 0:?                 0.577350
136 0:?                 0.577350
137 0:38              add second child into first child ( temp float)
138 0:38                'n' ( temp float)
139 0:38                Constant:
140 0:38                  1.000000
141 0:39            vector-scale ( temp 3-component vector of float)
142 0:?               Constant:
143 0:?                 -0.577350
144 0:?                 0.577350
145 0:?                 0.577350
146 0:39              add second child into first child ( temp float)
147 0:39                'n' ( temp float)
148 0:39                Constant:
149 0:39                  1.000000
150 0:45  Function Definition: @main( ( temp structure{ temp 4-component vector of float color})
151 0:45    Function Parameters: 
152 0:?     Sequence
153 0:46      Function Call: Test1( ( temp void)
154 0:49      move second child to first child ( temp 4-component vector of float)
155 0:49        color: direct index for structure ( temp 4-component vector of float)
156 0:49          'ps_output' ( temp structure{ temp 4-component vector of float color})
157 0:49          Constant:
158 0:49            0 (const int)
159 0:49        Constant:
160 0:49          1.000000
161 0:49          1.000000
162 0:49          1.000000
163 0:49          1.000000
164 0:50      Branch: Return with expression
165 0:50        'ps_output' ( temp structure{ temp 4-component vector of float color})
166 0:45  Function Definition: main( ( temp void)
167 0:45    Function Parameters: 
168 0:?     Sequence
169 0:45      Sequence
170 0:45        move second child to first child ( temp 4-component vector of float)
171 0:?           'color' (layout( location=0) out 4-component vector of float)
172 0:45          color: direct index for structure ( temp 4-component vector of float)
173 0:45            Function Call: @main( ( temp structure{ temp 4-component vector of float color})
174 0:45            Constant:
175 0:45              0 (const int)
176 0:?   Linker Objects
177 0:?     'color' (layout( location=0) out 4-component vector of float)
178
179
180 Linked fragment stage:
181
182
183 Shader version: 450
184 gl_FragCoord origin is upper left
185 0:? Sequence
186 0:3  Function Definition: Test1( ( temp void)
187 0:3    Function Parameters: 
188 0:?     Sequence
189 0:5      Sequence
190 0:5        move second child to first child ( temp structure{ temp 2-component vector of float a})
191 0:5          'test1' ( temp structure{ temp 2-component vector of float a})
192 0:5          Constant:
193 0:5            1.000000
194 0:5            2.000000
195 0:9      Sequence
196 0:9        move second child to first child ( temp structure{ temp 2-component vector of float a})
197 0:9          'test2' ( temp structure{ temp 2-component vector of float a})
198 0:9          Constant:
199 0:9            3.000000
200 0:9            4.000000
201 0:17      Sequence
202 0:17        move second child to first child ( temp float)
203 0:17          'test4' ( temp float)
204 0:17          Constant:
205 0:17            7.000000
206 0:20      Sequence
207 0:20        move second child to first child ( temp structure{ temp float a,  temp float b,  temp float c})
208 0:20          'test5' ( temp structure{ temp float a,  temp float b,  temp float c})
209 0:20          Constant:
210 0:20            8.000000
211 0:20            9.000000
212 0:20            10.000000
213 0:22      Constant:
214 0:22        10.000000
215 0:25      Sequence
216 0:25        move second child to first child ( temp float)
217 0:25          'n' ( temp float)
218 0:25          Constant:
219 0:25            0.000000
220 0:26      Sequence
221 0:26        move second child to first child ( temp 8-element array of 3-component vector of float)
222 0:26          'a' ( const (read only) 8-element array of 3-component vector of float)
223 0:26          Construct vec3 ( temp 8-element array of 3-component vector of float)
224 0:27            vector-scale ( temp 3-component vector of float)
225 0:?               Constant:
226 0:?                 0.577350
227 0:?                 0.577350
228 0:?                 0.577350
229 0:27              add second child into first child ( temp float)
230 0:27                'n' ( temp float)
231 0:27                Constant:
232 0:27                  1.000000
233 0:28            vector-scale ( temp 3-component vector of float)
234 0:?               Constant:
235 0:?                 -0.577350
236 0:?                 -0.577350
237 0:?                 -0.577350
238 0:28              add second child into first child ( temp float)
239 0:28                'n' ( temp float)
240 0:28                Constant:
241 0:28                  1.000000
242 0:29            vector-scale ( temp 3-component vector of float)
243 0:?               Constant:
244 0:?                 -0.577350
245 0:?                 -0.577350
246 0:?                 0.577350
247 0:29              add second child into first child ( temp float)
248 0:29                'n' ( temp float)
249 0:29                Constant:
250 0:29                  1.000000
251 0:30            vector-scale ( temp 3-component vector of float)
252 0:?               Constant:
253 0:?                 -0.577350
254 0:?                 0.577350
255 0:?                 -0.577350
256 0:30              add second child into first child ( temp float)
257 0:30                'n' ( temp float)
258 0:30                Constant:
259 0:30                  1.000000
260 0:31            vector-scale ( temp 3-component vector of float)
261 0:?               Constant:
262 0:?                 -0.577350
263 0:?                 0.577350
264 0:?                 0.577350
265 0:31              add second child into first child ( temp float)
266 0:31                'n' ( temp float)
267 0:31                Constant:
268 0:31                  1.000000
269 0:32            vector-scale ( temp 3-component vector of float)
270 0:?               Constant:
271 0:?                 0.577350
272 0:?                 -0.577350
273 0:?                 -0.577350
274 0:32              add second child into first child ( temp float)
275 0:32                'n' ( temp float)
276 0:32                Constant:
277 0:32                  1.000000
278 0:33            vector-scale ( temp 3-component vector of float)
279 0:?               Constant:
280 0:?                 0.577350
281 0:?                 -0.577350
282 0:?                 0.577350
283 0:33              add second child into first child ( temp float)
284 0:33                'n' ( temp float)
285 0:33                Constant:
286 0:33                  1.000000
287 0:34            vector-scale ( temp 3-component vector of float)
288 0:?               Constant:
289 0:?                 0.577350
290 0:?                 0.577350
291 0:?                 -0.577350
292 0:34              add second child into first child ( temp float)
293 0:34                'n' ( temp float)
294 0:34                Constant:
295 0:34                  1.000000
296 0:36      Sequence
297 0:36        move second child to first child ( temp structure{ temp 3-component vector of float a})
298 0:36          'oneNonConst' ( const (read only) structure{ temp 3-component vector of float a})
299 0:36          Construct structure ( temp structure{ temp 3-component vector of float a})
300 0:36            vector-scale ( temp 3-component vector of float)
301 0:?               Constant:
302 0:?                 -0.577350
303 0:?                 0.577350
304 0:?                 0.577350
305 0:36              add second child into first child ( temp float)
306 0:36                'n' ( temp float)
307 0:36                Constant:
308 0:36                  1.000000
309 0:38      Sequence
310 0:38        move second child to first child ( temp structure{ temp 3-component vector of float a,  temp 3-component vector of float b})
311 0:38          'twoNonConst' ( const (read only) structure{ temp 3-component vector of float a,  temp 3-component vector of float b})
312 0:38          Construct structure ( temp structure{ temp 3-component vector of float a,  temp 3-component vector of float b})
313 0:38            vector-scale ( temp 3-component vector of float)
314 0:?               Constant:
315 0:?                 -0.577350
316 0:?                 0.577350
317 0:?                 0.577350
318 0:38              add second child into first child ( temp float)
319 0:38                'n' ( temp float)
320 0:38                Constant:
321 0:38                  1.000000
322 0:39            vector-scale ( temp 3-component vector of float)
323 0:?               Constant:
324 0:?                 -0.577350
325 0:?                 0.577350
326 0:?                 0.577350
327 0:39              add second child into first child ( temp float)
328 0:39                'n' ( temp float)
329 0:39                Constant:
330 0:39                  1.000000
331 0:45  Function Definition: @main( ( temp structure{ temp 4-component vector of float color})
332 0:45    Function Parameters: 
333 0:?     Sequence
334 0:46      Function Call: Test1( ( temp void)
335 0:49      move second child to first child ( temp 4-component vector of float)
336 0:49        color: direct index for structure ( temp 4-component vector of float)
337 0:49          'ps_output' ( temp structure{ temp 4-component vector of float color})
338 0:49          Constant:
339 0:49            0 (const int)
340 0:49        Constant:
341 0:49          1.000000
342 0:49          1.000000
343 0:49          1.000000
344 0:49          1.000000
345 0:50      Branch: Return with expression
346 0:50        'ps_output' ( temp structure{ temp 4-component vector of float color})
347 0:45  Function Definition: main( ( temp void)
348 0:45    Function Parameters: 
349 0:?     Sequence
350 0:45      Sequence
351 0:45        move second child to first child ( temp 4-component vector of float)
352 0:?           'color' (layout( location=0) out 4-component vector of float)
353 0:45          color: direct index for structure ( temp 4-component vector of float)
354 0:45            Function Call: @main( ( temp structure{ temp 4-component vector of float color})
355 0:45            Constant:
356 0:45              0 (const int)
357 0:?   Linker Objects
358 0:?     'color' (layout( location=0) out 4-component vector of float)
359
360 // Module Version 10000
361 // Generated by (magic number): 80001
362 // Id's are bound by 112
363
364                               Capability Shader
365                1:             ExtInstImport  "GLSL.std.450"
366                               MemoryModel Logical GLSL450
367                               EntryPoint Fragment 4  "main" 109
368                               ExecutionMode 4 OriginUpperLeft
369                               Name 4  "main"
370                               Name 6  "Test1("
371                               Name 10  "PS_OUTPUT"
372                               MemberName 10(PS_OUTPUT) 0  "color"
373                               Name 12  "@main("
374                               Name 15  "mystruct"
375                               MemberName 15(mystruct) 0  "a"
376                               Name 17  "test1"
377                               Name 22  "test2"
378                               Name 28  "test4"
379                               Name 30  "mystruct2"
380                               MemberName 30(mystruct2) 0  "a"
381                               MemberName 30(mystruct2) 1  "b"
382                               MemberName 30(mystruct2) 2  "c"
383                               Name 32  "test5"
384                               Name 37  "n"
385                               Name 44  "a"
386                               Name 80  "one"
387                               MemberName 80(one) 0  "a"
388                               Name 82  "oneNonConst"
389                               Name 87  "two"
390                               MemberName 87(two) 0  "a"
391                               MemberName 87(two) 1  "b"
392                               Name 89  "twoNonConst"
393                               Name 99  "ps_output"
394                               Name 109  "color"
395                               Decorate 109(color) Location 0
396                2:             TypeVoid
397                3:             TypeFunction 2
398                8:             TypeFloat 32
399                9:             TypeVector 8(float) 4
400    10(PS_OUTPUT):             TypeStruct 9(fvec4)
401               11:             TypeFunction 10(PS_OUTPUT)
402               14:             TypeVector 8(float) 2
403     15(mystruct):             TypeStruct 14(fvec2)
404               16:             TypePointer Function 15(mystruct)
405               18:    8(float) Constant 1065353216
406               19:    8(float) Constant 1073741824
407               20:   14(fvec2) ConstantComposite 18 19
408               21:15(mystruct) ConstantComposite 20
409               23:    8(float) Constant 1077936128
410               24:    8(float) Constant 1082130432
411               25:   14(fvec2) ConstantComposite 23 24
412               26:15(mystruct) ConstantComposite 25
413               27:             TypePointer Function 8(float)
414               29:    8(float) Constant 1088421888
415    30(mystruct2):             TypeStruct 8(float) 8(float) 8(float)
416               31:             TypePointer Function 30(mystruct2)
417               33:    8(float) Constant 1090519040
418               34:    8(float) Constant 1091567616
419               35:    8(float) Constant 1092616192
420               36:30(mystruct2) ConstantComposite 33 34 35
421               38:    8(float) Constant 0
422               39:             TypeVector 8(float) 3
423               40:             TypeInt 32 0
424               41:     40(int) Constant 8
425               42:             TypeArray 39(fvec3) 41
426               43:             TypePointer Function 42
427               45:    8(float) Constant 1058262330
428               46:   39(fvec3) ConstantComposite 45 45 45
429               50:    8(float) Constant 3205745978
430               51:   39(fvec3) ConstantComposite 50 50 50
431               55:   39(fvec3) ConstantComposite 50 50 45
432               59:   39(fvec3) ConstantComposite 50 45 50
433               63:   39(fvec3) ConstantComposite 50 45 45
434               67:   39(fvec3) ConstantComposite 45 50 50
435               71:   39(fvec3) ConstantComposite 45 50 45
436               75:   39(fvec3) ConstantComposite 45 45 50
437          80(one):             TypeStruct 39(fvec3)
438               81:             TypePointer Function 80(one)
439          87(two):             TypeStruct 39(fvec3) 39(fvec3)
440               88:             TypePointer Function 87(two)
441               98:             TypePointer Function 10(PS_OUTPUT)
442              100:             TypeInt 32 1
443              101:    100(int) Constant 0
444              102:    9(fvec4) ConstantComposite 18 18 18 18
445              103:             TypePointer Function 9(fvec4)
446              108:             TypePointer Output 9(fvec4)
447       109(color):    108(ptr) Variable Output
448          4(main):           2 Function None 3
449                5:             Label
450              110:10(PS_OUTPUT) FunctionCall 12(@main()
451              111:    9(fvec4) CompositeExtract 110 0
452                               Store 109(color) 111
453                               Return
454                               FunctionEnd
455        6(Test1():           2 Function None 3
456                7:             Label
457        17(test1):     16(ptr) Variable Function
458        22(test2):     16(ptr) Variable Function
459        28(test4):     27(ptr) Variable Function
460        32(test5):     31(ptr) Variable Function
461            37(n):     27(ptr) Variable Function
462            44(a):     43(ptr) Variable Function
463  82(oneNonConst):     81(ptr) Variable Function
464  89(twoNonConst):     88(ptr) Variable Function
465                               Store 17(test1) 21
466                               Store 22(test2) 26
467                               Store 28(test4) 29
468                               Store 32(test5) 36
469                               Store 37(n) 38
470               47:    8(float) Load 37(n)
471               48:    8(float) FAdd 47 18
472                               Store 37(n) 48
473               49:   39(fvec3) VectorTimesScalar 46 48
474               52:    8(float) Load 37(n)
475               53:    8(float) FAdd 52 18
476                               Store 37(n) 53
477               54:   39(fvec3) VectorTimesScalar 51 53
478               56:    8(float) Load 37(n)
479               57:    8(float) FAdd 56 18
480                               Store 37(n) 57
481               58:   39(fvec3) VectorTimesScalar 55 57
482               60:    8(float) Load 37(n)
483               61:    8(float) FAdd 60 18
484                               Store 37(n) 61
485               62:   39(fvec3) VectorTimesScalar 59 61
486               64:    8(float) Load 37(n)
487               65:    8(float) FAdd 64 18
488                               Store 37(n) 65
489               66:   39(fvec3) VectorTimesScalar 63 65
490               68:    8(float) Load 37(n)
491               69:    8(float) FAdd 68 18
492                               Store 37(n) 69
493               70:   39(fvec3) VectorTimesScalar 67 69
494               72:    8(float) Load 37(n)
495               73:    8(float) FAdd 72 18
496                               Store 37(n) 73
497               74:   39(fvec3) VectorTimesScalar 71 73
498               76:    8(float) Load 37(n)
499               77:    8(float) FAdd 76 18
500                               Store 37(n) 77
501               78:   39(fvec3) VectorTimesScalar 75 77
502               79:          42 CompositeConstruct 49 54 58 62 66 70 74 78
503                               Store 44(a) 79
504               83:    8(float) Load 37(n)
505               84:    8(float) FAdd 83 18
506                               Store 37(n) 84
507               85:   39(fvec3) VectorTimesScalar 63 84
508               86:     80(one) CompositeConstruct 85
509                               Store 82(oneNonConst) 86
510               90:    8(float) Load 37(n)
511               91:    8(float) FAdd 90 18
512                               Store 37(n) 91
513               92:   39(fvec3) VectorTimesScalar 63 91
514               93:    8(float) Load 37(n)
515               94:    8(float) FAdd 93 18
516                               Store 37(n) 94
517               95:   39(fvec3) VectorTimesScalar 63 94
518               96:     87(two) CompositeConstruct 92 95
519                               Store 89(twoNonConst) 96
520                               Return
521                               FunctionEnd
522       12(@main():10(PS_OUTPUT) Function None 11
523               13:             Label
524    99(ps_output):     98(ptr) Variable Function
525               97:           2 FunctionCall 6(Test1()
526              104:    103(ptr) AccessChain 99(ps_output) 101
527                               Store 104 102
528              105:10(PS_OUTPUT) Load 99(ps_output)
529                               ReturnValue 105
530                               FunctionEnd