a14b9ac0b930a7771ad9ac2bd4d29c20b435d04a
[platform/upstream/glslang.git] / Test / baseResults / hlsl.forLoop.frag.out
1 hlsl.forLoop.frag
2 Shader version: 450
3 gl_FragCoord origin is upper left
4 0:? Sequence
5 0:2  Function Definition: @PixelShaderFunction(vf4; ( temp 4-component vector of float)
6 0:2    Function Parameters: 
7 0:2      'input' ( in 4-component vector of float)
8 0:?     Sequence
9 0:?       Sequence
10 0:3        Loop with condition tested first
11 0:3          No loop condition
12 0:3          No loop body
13 0:4      Sequence
14 0:4        Pre-Increment ( temp 4-component vector of float)
15 0:4          'input' ( in 4-component vector of float)
16 0:4        Loop with condition tested first
17 0:4          No loop condition
18 0:4          No loop body
19 0:?       Sequence
20 0:5        Loop with condition tested first
21 0:5          Loop Condition
22 0:5          any ( temp bool)
23 0:5            NotEqual ( temp 4-component vector of bool)
24 0:5              'input' ( in 4-component vector of float)
25 0:5              'input' ( in 4-component vector of float)
26 0:5          No loop body
27 0:?       Sequence
28 0:6        Loop with condition tested first
29 0:6          Loop Condition
30 0:6          any ( temp bool)
31 0:6            NotEqual ( temp 4-component vector of bool)
32 0:6              'input' ( in 4-component vector of float)
33 0:6              'input' ( in 4-component vector of float)
34 0:6          Loop Body
35 0:?           Sequence
36 0:6            Branch: Return with expression
37 0:6              Negate value ( temp 4-component vector of float)
38 0:6                'input' ( in 4-component vector of float)
39 0:7      Sequence
40 0:7        Pre-Decrement ( temp 4-component vector of float)
41 0:7          'input' ( in 4-component vector of float)
42 0:7        Loop with condition tested first
43 0:7          Loop Condition
44 0:7          any ( temp bool)
45 0:7            NotEqual ( temp 4-component vector of bool)
46 0:7              'input' ( in 4-component vector of float)
47 0:7              'input' ( in 4-component vector of float)
48 0:7          Loop Body
49 0:?           Sequence
50 0:7            Branch: Return with expression
51 0:7              Negate value ( temp 4-component vector of float)
52 0:7                'input' ( in 4-component vector of float)
53 0:7          Loop Terminal Expression
54 0:7          add second child into first child ( temp 4-component vector of float)
55 0:7            'input' ( in 4-component vector of float)
56 0:7            Constant:
57 0:7              2.000000
58 0:?       Sequence
59 0:8        Loop with condition tested first
60 0:8          No loop condition
61 0:8          Loop Body
62 0:8          Test condition and select ( temp void)
63 0:8            Condition
64 0:8            Compare Greater Than ( temp bool)
65 0:8              direct index ( temp float)
66 0:8                'input' ( in 4-component vector of float)
67 0:8                Constant:
68 0:8                  0 (const int)
69 0:8              Constant:
70 0:8                2.000000
71 0:8            true case
72 0:8            Branch: Break
73 0:?       Sequence
74 0:9        Loop with condition tested first
75 0:9          No loop condition
76 0:9          Loop Body
77 0:9          Test condition and select ( temp void)
78 0:9            Condition
79 0:9            Compare Greater Than ( temp bool)
80 0:9              direct index ( temp float)
81 0:9                'input' ( in 4-component vector of float)
82 0:9                Constant:
83 0:9                  0 (const int)
84 0:9              Constant:
85 0:9                2.000000
86 0:9            true case
87 0:9            Branch: Continue
88 0:11      Sequence
89 0:11        move second child to first child ( temp int)
90 0:11          'ii' ( temp int)
91 0:11          Constant:
92 0:11            -1 (const int)
93 0:11        Loop with condition tested first
94 0:11          Loop Condition
95 0:11          Compare Less Than ( temp bool)
96 0:11            'ii' ( temp int)
97 0:11            Constant:
98 0:11              3 (const int)
99 0:11          Loop Body
100 0:11          Test condition and select ( temp void)
101 0:11            Condition
102 0:11            Compare Equal ( temp bool)
103 0:11              'ii' ( temp int)
104 0:11              Constant:
105 0:11                2 (const int)
106 0:11            true case
107 0:11            Branch: Continue
108 0:11          Loop Terminal Expression
109 0:11          Pre-Increment ( temp int)
110 0:11            'ii' ( temp int)
111 0:12      Pre-Decrement ( temp float)
112 0:12        'ii' ( temp float)
113 0:2  Function Definition: PixelShaderFunction( ( temp void)
114 0:2    Function Parameters: 
115 0:?     Sequence
116 0:2      move second child to first child ( temp 4-component vector of float)
117 0:?         'input' ( temp 4-component vector of float)
118 0:?         'input' (layout( location=0) in 4-component vector of float)
119 0:2      move second child to first child ( temp 4-component vector of float)
120 0:?         '@entryPointOutput' (layout( location=0) out 4-component vector of float)
121 0:2        Function Call: @PixelShaderFunction(vf4; ( temp 4-component vector of float)
122 0:?           'input' ( temp 4-component vector of float)
123 0:?   Linker Objects
124 0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
125 0:?     'input' (layout( location=0) in 4-component vector of float)
126
127
128 Linked fragment stage:
129
130
131 Shader version: 450
132 gl_FragCoord origin is upper left
133 0:? Sequence
134 0:2  Function Definition: @PixelShaderFunction(vf4; ( temp 4-component vector of float)
135 0:2    Function Parameters: 
136 0:2      'input' ( in 4-component vector of float)
137 0:?     Sequence
138 0:?       Sequence
139 0:3        Loop with condition tested first
140 0:3          No loop condition
141 0:3          No loop body
142 0:4      Sequence
143 0:4        Pre-Increment ( temp 4-component vector of float)
144 0:4          'input' ( in 4-component vector of float)
145 0:4        Loop with condition tested first
146 0:4          No loop condition
147 0:4          No loop body
148 0:?       Sequence
149 0:5        Loop with condition tested first
150 0:5          Loop Condition
151 0:5          any ( temp bool)
152 0:5            NotEqual ( temp 4-component vector of bool)
153 0:5              'input' ( in 4-component vector of float)
154 0:5              'input' ( in 4-component vector of float)
155 0:5          No loop body
156 0:?       Sequence
157 0:6        Loop with condition tested first
158 0:6          Loop Condition
159 0:6          any ( temp bool)
160 0:6            NotEqual ( temp 4-component vector of bool)
161 0:6              'input' ( in 4-component vector of float)
162 0:6              'input' ( in 4-component vector of float)
163 0:6          Loop Body
164 0:?           Sequence
165 0:6            Branch: Return with expression
166 0:6              Negate value ( temp 4-component vector of float)
167 0:6                'input' ( in 4-component vector of float)
168 0:7      Sequence
169 0:7        Pre-Decrement ( temp 4-component vector of float)
170 0:7          'input' ( in 4-component vector of float)
171 0:7        Loop with condition tested first
172 0:7          Loop Condition
173 0:7          any ( temp bool)
174 0:7            NotEqual ( temp 4-component vector of bool)
175 0:7              'input' ( in 4-component vector of float)
176 0:7              'input' ( in 4-component vector of float)
177 0:7          Loop Body
178 0:?           Sequence
179 0:7            Branch: Return with expression
180 0:7              Negate value ( temp 4-component vector of float)
181 0:7                'input' ( in 4-component vector of float)
182 0:7          Loop Terminal Expression
183 0:7          add second child into first child ( temp 4-component vector of float)
184 0:7            'input' ( in 4-component vector of float)
185 0:7            Constant:
186 0:7              2.000000
187 0:?       Sequence
188 0:8        Loop with condition tested first
189 0:8          No loop condition
190 0:8          Loop Body
191 0:8          Test condition and select ( temp void)
192 0:8            Condition
193 0:8            Compare Greater Than ( temp bool)
194 0:8              direct index ( temp float)
195 0:8                'input' ( in 4-component vector of float)
196 0:8                Constant:
197 0:8                  0 (const int)
198 0:8              Constant:
199 0:8                2.000000
200 0:8            true case
201 0:8            Branch: Break
202 0:?       Sequence
203 0:9        Loop with condition tested first
204 0:9          No loop condition
205 0:9          Loop Body
206 0:9          Test condition and select ( temp void)
207 0:9            Condition
208 0:9            Compare Greater Than ( temp bool)
209 0:9              direct index ( temp float)
210 0:9                'input' ( in 4-component vector of float)
211 0:9                Constant:
212 0:9                  0 (const int)
213 0:9              Constant:
214 0:9                2.000000
215 0:9            true case
216 0:9            Branch: Continue
217 0:11      Sequence
218 0:11        move second child to first child ( temp int)
219 0:11          'ii' ( temp int)
220 0:11          Constant:
221 0:11            -1 (const int)
222 0:11        Loop with condition tested first
223 0:11          Loop Condition
224 0:11          Compare Less Than ( temp bool)
225 0:11            'ii' ( temp int)
226 0:11            Constant:
227 0:11              3 (const int)
228 0:11          Loop Body
229 0:11          Test condition and select ( temp void)
230 0:11            Condition
231 0:11            Compare Equal ( temp bool)
232 0:11              'ii' ( temp int)
233 0:11              Constant:
234 0:11                2 (const int)
235 0:11            true case
236 0:11            Branch: Continue
237 0:11          Loop Terminal Expression
238 0:11          Pre-Increment ( temp int)
239 0:11            'ii' ( temp int)
240 0:12      Pre-Decrement ( temp float)
241 0:12        'ii' ( temp float)
242 0:2  Function Definition: PixelShaderFunction( ( temp void)
243 0:2    Function Parameters: 
244 0:?     Sequence
245 0:2      move second child to first child ( temp 4-component vector of float)
246 0:?         'input' ( temp 4-component vector of float)
247 0:?         'input' (layout( location=0) in 4-component vector of float)
248 0:2      move second child to first child ( temp 4-component vector of float)
249 0:?         '@entryPointOutput' (layout( location=0) out 4-component vector of float)
250 0:2        Function Call: @PixelShaderFunction(vf4; ( temp 4-component vector of float)
251 0:?           'input' ( temp 4-component vector of float)
252 0:?   Linker Objects
253 0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
254 0:?     'input' (layout( location=0) in 4-component vector of float)
255
256 // Module Version 10000
257 // Generated by (magic number): 80001
258 // Id's are bound by 124
259
260                               Capability Shader
261                1:             ExtInstImport  "GLSL.std.450"
262                               MemoryModel Logical GLSL450
263                               EntryPoint Fragment 4  "PixelShaderFunction" 117 120
264                               ExecutionMode 4 OriginUpperLeft
265                               Name 4  "PixelShaderFunction"
266                               Name 11  "@PixelShaderFunction(vf4;"
267                               Name 10  "input"
268                               Name 92  "ii"
269                               Name 111  "ii"
270                               Name 115  "input"
271                               Name 117  "input"
272                               Name 120  "@entryPointOutput"
273                               Name 121  "param"
274                               Decorate 117(input) Location 0
275                               Decorate 120(@entryPointOutput) Location 0
276                2:             TypeVoid
277                3:             TypeFunction 2
278                6:             TypeFloat 32
279                7:             TypeVector 6(float) 4
280                8:             TypePointer Function 7(fvec4)
281                9:             TypeFunction 7(fvec4) 8(ptr)
282               18:    6(float) Constant 1065353216
283               32:             TypeBool
284               33:             TypeVector 32(bool) 4
285               63:    6(float) Constant 1073741824
286               71:             TypeInt 32 0
287               72:     71(int) Constant 0
288               73:             TypePointer Function 6(float)
289               90:             TypeInt 32 1
290               91:             TypePointer Function 90(int)
291               93:     90(int) Constant 4294967295
292              100:     90(int) Constant 3
293              103:     90(int) Constant 2
294              109:     90(int) Constant 1
295              116:             TypePointer Input 7(fvec4)
296       117(input):    116(ptr) Variable Input
297              119:             TypePointer Output 7(fvec4)
298 120(@entryPointOutput):    119(ptr) Variable Output
299 4(PixelShaderFunction):           2 Function None 3
300                5:             Label
301       115(input):      8(ptr) Variable Function
302       121(param):      8(ptr) Variable Function
303              118:    7(fvec4) Load 117(input)
304                               Store 115(input) 118
305              122:    7(fvec4) Load 115(input)
306                               Store 121(param) 122
307              123:    7(fvec4) FunctionCall 11(@PixelShaderFunction(vf4;) 121(param)
308                               Store 120(@entryPointOutput) 123
309                               Return
310                               FunctionEnd
311 11(@PixelShaderFunction(vf4;):    7(fvec4) Function None 9
312        10(input):      8(ptr) FunctionParameter
313               12:             Label
314           92(ii):     91(ptr) Variable Function
315          111(ii):     73(ptr) Variable Function
316                               Branch 13
317               13:             Label
318                               LoopMerge 15 16 None
319                               Branch 14
320               14:             Label
321                               Branch 16
322               16:             Label
323                               Branch 13
324               15:             Label
325               17:    7(fvec4) Load 10(input)
326               19:    7(fvec4) CompositeConstruct 18 18 18 18
327               20:    7(fvec4) FAdd 17 19
328                               Store 10(input) 20
329                               Branch 21
330               21:             Label
331                               LoopMerge 23 24 None
332                               Branch 22
333               22:             Label
334                               Branch 24
335               24:             Label
336                               Branch 21
337               23:             Label
338                               Branch 25
339               25:             Label
340                               LoopMerge 27 28 None
341                               Branch 29
342               29:             Label
343               30:    7(fvec4) Load 10(input)
344               31:    7(fvec4) Load 10(input)
345               34:   33(bvec4) FOrdNotEqual 30 31
346               35:    32(bool) Any 34
347                               BranchConditional 35 26 27
348               26:               Label
349                                 Branch 28
350               28:               Label
351                                 Branch 25
352               27:             Label
353                               Branch 36
354               36:             Label
355                               LoopMerge 38 39 None
356                               Branch 40
357               40:             Label
358               41:    7(fvec4) Load 10(input)
359               42:    7(fvec4) Load 10(input)
360               43:   33(bvec4) FOrdNotEqual 41 42
361               44:    32(bool) Any 43
362                               BranchConditional 44 37 38
363               37:               Label
364               45:    7(fvec4)   Load 10(input)
365               46:    7(fvec4)   FNegate 45
366                                 ReturnValue 46
367               39:               Label
368                                 Branch 36
369               38:             Label
370               48:    7(fvec4) Load 10(input)
371               49:    7(fvec4) CompositeConstruct 18 18 18 18
372               50:    7(fvec4) FSub 48 49
373                               Store 10(input) 50
374                               Branch 51
375               51:             Label
376                               LoopMerge 53 54 None
377                               Branch 55
378               55:             Label
379               56:    7(fvec4) Load 10(input)
380               57:    7(fvec4) Load 10(input)
381               58:   33(bvec4) FOrdNotEqual 56 57
382               59:    32(bool) Any 58
383                               BranchConditional 59 52 53
384               52:               Label
385               60:    7(fvec4)   Load 10(input)
386               61:    7(fvec4)   FNegate 60
387                                 ReturnValue 61
388               54:               Label
389               64:    7(fvec4)   Load 10(input)
390               65:    7(fvec4)   CompositeConstruct 63 63 63 63
391               66:    7(fvec4)   FAdd 64 65
392                                 Store 10(input) 66
393                                 Branch 51
394               53:             Label
395                               Branch 67
396               67:             Label
397                               LoopMerge 69 70 None
398                               Branch 68
399               68:             Label
400               74:     73(ptr) AccessChain 10(input) 72
401               75:    6(float) Load 74
402               76:    32(bool) FOrdGreaterThan 75 63
403                               SelectionMerge 78 None
404                               BranchConditional 76 77 78
405               77:               Label
406                                 Branch 69
407               78:             Label
408                               Branch 70
409               70:             Label
410                               Branch 67
411               69:             Label
412                               Branch 80
413               80:             Label
414                               LoopMerge 82 83 None
415                               Branch 81
416               81:             Label
417               84:     73(ptr) AccessChain 10(input) 72
418               85:    6(float) Load 84
419               86:    32(bool) FOrdGreaterThan 85 63
420                               SelectionMerge 88 None
421                               BranchConditional 86 87 88
422               87:               Label
423                                 Branch 83
424               88:             Label
425                               Branch 83
426               83:             Label
427                               Branch 80
428               82:             Label
429                               Store 92(ii) 93
430                               Branch 94
431               94:             Label
432                               LoopMerge 96 97 None
433                               Branch 98
434               98:             Label
435               99:     90(int) Load 92(ii)
436              101:    32(bool) SLessThan 99 100
437                               BranchConditional 101 95 96
438               95:               Label
439              102:     90(int)   Load 92(ii)
440              104:    32(bool)   IEqual 102 103
441                                 SelectionMerge 106 None
442                                 BranchConditional 104 105 106
443              105:                 Label
444                                   Branch 97
445              106:               Label
446                                 Branch 97
447               97:               Label
448              108:     90(int)   Load 92(ii)
449              110:     90(int)   IAdd 108 109
450                                 Store 92(ii) 110
451                                 Branch 94
452               96:             Label
453              112:    6(float) Load 111(ii)
454              113:    6(float) FSub 112 18
455                               Store 111(ii) 113
456              114:    7(fvec4) Undef
457                               ReturnValue 114
458                               FunctionEnd