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