• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!amber
2
3# Copyright 2021 Google LLC
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9#     http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16
17
18# A test for a coverage-gap found by the GraphicsFuzz project.
19
20# Short description: A fragment shader that covers specific BRW code paths
21
22# The test passes because the shader always writes red.
23
24# Optimized using spirv-opt with the following arguments:
25# '-O'
26# spirv-opt commit hash: a0370efd589be33d5d9a85cfde2f85841b3755af
27
28
29
30SHADER vertex variant_vertex_shader PASSTHROUGH
31
32# variant_fragment_shader is derived from the following GLSL:
33# #version 320 es
34#
35# #define LOOP for (int i = 0; i < 1; i++)
36#
37# precision highp float;
38# precision highp int;
39#
40# layout(location = 0) out vec4 _GLF_color;
41#
42# layout(push_constant) uniform buf_push
43# {
44#     float five;
45# };
46#
47# // Function always returns 1.0.
48# float func(float x)
49# {
50#     float a = 1.0;
51#
52#     LOOP
53#     {
54#         LOOP
55#         {
56#             LOOP
57#             {
58#                 LOOP
59#                 {
60#                     LOOP
61#                     {
62#                         // Always false.
63#                         if (mod(1.0, x) < 0.0)
64#                         {
65#                             LOOP
66#                             {
67#                                 LOOP
68#                                 {
69#                                     LOOP
70#                                     {
71#                                         LOOP
72#                                         {
73#                                             LOOP
74#                                             {
75#                                                 LOOP
76#                                                 {
77#                                                     a += 1.0;
78#                                                 }
79#                                             }
80#                                         }
81#                                     }
82#                                 }
83#                             }
84#                         }
85#
86#                         // Always true.
87#                         if (x > 1.0)
88#                         {
89#                             return a;
90#                         }
91#                     }
92#                 }
93#             }
94#         }
95#     }
96#
97#     return 2.0;
98# }
99#
100# void main()
101# {
102#     float f = 0.0;
103#
104#     LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP {
105#     LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP {
106#     LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP
107#     {
108#         f = func(five);
109#     }
110#     } } } } } } } } } } } } } } } } } } } } } } } } } } }
111#
112#     // Always true.
113#     if (f == 1.0)
114#         _GLF_color = vec4(1, 0, 0, 1);
115#     else
116#         _GLF_color = vec4(0);
117# }
118SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0
119; SPIR-V
120; Version: 1.0
121; Generator: Khronos Glslang Reference Front End; 10
122; Bound: 1659
123; Schema: 0
124               OpCapability Shader
125          %1 = OpExtInstImport "GLSL.std.450"
126               OpMemoryModel Logical GLSL450
127               OpEntryPoint Fragment %4 "main" %441
128               OpExecutionMode %4 OriginUpperLeft
129               OpSource ESSL 320
130               OpName %4 "main"
131               OpName %371 "buf_push"
132               OpMemberName %371 0 "five"
133               OpName %373 ""
134               OpName %441 "_GLF_color"
135               OpMemberDecorate %371 0 Offset 0
136               OpDecorate %371 Block
137               OpDecorate %441 Location 0
138          %2 = OpTypeVoid
139          %3 = OpTypeFunction %2
140          %6 = OpTypeFloat 32
141         %13 = OpConstant %6 1
142         %14 = OpTypeInt 32 1
143         %17 = OpConstant %14 0
144         %24 = OpConstant %14 1
145         %25 = OpTypeBool
146         %61 = OpConstant %6 0
147        %143 = OpConstant %6 2
148        %371 = OpTypeStruct %6
149        %372 = OpTypePointer PushConstant %371
150        %373 = OpVariable %372 PushConstant
151        %375 = OpTypePointer PushConstant %6
152        %439 = OpTypeVector %6 4
153        %440 = OpTypePointer Output %439
154        %441 = OpVariable %440 Output
155        %442 = OpConstantComposite %439 %13 %61 %61 %13
156        %444 = OpConstantComposite %439 %61 %61 %61 %61
157        %449 = OpTypeInt 32 0
158        %450 = OpConstant %449 0
159        %451 = OpConstantFalse %25
160        %454 = OpConstantTrue %25
161        %747 = OpUndef %6
162          %4 = OpFunction %2 None %3
163          %5 = OpLabel
164               OpBranch %148
165        %148 = OpLabel
166        %606 = OpPhi %6 %61 %5 %786 %151
167        %605 = OpPhi %14 %17 %5 %434 %151
168        %746 = OpPhi %6 %747 %5 %745 %151
169        %154 = OpSLessThan %25 %605 %24
170               OpLoopMerge %150 %151 None
171               OpBranchConditional %154 %149 %150
172        %149 = OpLabel
173               OpBranch %156
174        %156 = OpLabel
175        %607 = OpPhi %14 %17 %149 %432 %159
176        %786 = OpPhi %6 %606 %149 %787 %159
177        %745 = OpPhi %6 %746 %149 %744 %159
178        %162 = OpSLessThan %25 %607 %24
179               OpLoopMerge %158 %159 None
180               OpBranchConditional %162 %157 %158
181        %157 = OpLabel
182               OpBranch %164
183        %164 = OpLabel
184        %609 = OpPhi %14 %17 %157 %430 %167
185        %787 = OpPhi %6 %786 %157 %788 %167
186        %744 = OpPhi %6 %745 %157 %743 %167
187        %170 = OpSLessThan %25 %609 %24
188               OpLoopMerge %166 %167 None
189               OpBranchConditional %170 %165 %166
190        %165 = OpLabel
191               OpBranch %172
192        %172 = OpLabel
193        %611 = OpPhi %14 %17 %165 %428 %175
194        %788 = OpPhi %6 %787 %165 %789 %175
195        %743 = OpPhi %6 %744 %165 %742 %175
196        %178 = OpSLessThan %25 %611 %24
197               OpLoopMerge %174 %175 None
198               OpBranchConditional %178 %173 %174
199        %173 = OpLabel
200               OpBranch %180
201        %180 = OpLabel
202        %613 = OpPhi %14 %17 %173 %426 %183
203        %789 = OpPhi %6 %788 %173 %790 %183
204        %742 = OpPhi %6 %743 %173 %741 %183
205        %186 = OpSLessThan %25 %613 %24
206               OpLoopMerge %182 %183 None
207               OpBranchConditional %186 %181 %182
208        %181 = OpLabel
209               OpBranch %188
210        %188 = OpLabel
211        %615 = OpPhi %14 %17 %181 %424 %191
212        %790 = OpPhi %6 %789 %181 %791 %191
213        %741 = OpPhi %6 %742 %181 %740 %191
214        %194 = OpSLessThan %25 %615 %24
215               OpLoopMerge %190 %191 None
216               OpBranchConditional %194 %189 %190
217        %189 = OpLabel
218               OpBranch %196
219        %196 = OpLabel
220        %617 = OpPhi %14 %17 %189 %422 %199
221        %791 = OpPhi %6 %790 %189 %792 %199
222        %740 = OpPhi %6 %741 %189 %739 %199
223        %202 = OpSLessThan %25 %617 %24
224               OpLoopMerge %198 %199 None
225               OpBranchConditional %202 %197 %198
226        %197 = OpLabel
227               OpBranch %204
228        %204 = OpLabel
229        %619 = OpPhi %14 %17 %197 %420 %207
230        %792 = OpPhi %6 %791 %197 %793 %207
231        %739 = OpPhi %6 %740 %197 %738 %207
232        %210 = OpSLessThan %25 %619 %24
233               OpLoopMerge %206 %207 None
234               OpBranchConditional %210 %205 %206
235        %205 = OpLabel
236               OpBranch %212
237        %212 = OpLabel
238        %621 = OpPhi %14 %17 %205 %418 %215
239        %793 = OpPhi %6 %792 %205 %794 %215
240        %738 = OpPhi %6 %739 %205 %737 %215
241        %218 = OpSLessThan %25 %621 %24
242               OpLoopMerge %214 %215 None
243               OpBranchConditional %218 %213 %214
244        %213 = OpLabel
245               OpBranch %220
246        %220 = OpLabel
247        %623 = OpPhi %14 %17 %213 %416 %223
248        %794 = OpPhi %6 %793 %213 %795 %223
249        %737 = OpPhi %6 %738 %213 %736 %223
250        %226 = OpSLessThan %25 %623 %24
251               OpLoopMerge %222 %223 None
252               OpBranchConditional %226 %221 %222
253        %221 = OpLabel
254               OpBranch %228
255        %228 = OpLabel
256        %625 = OpPhi %14 %17 %221 %414 %231
257        %795 = OpPhi %6 %794 %221 %796 %231
258        %736 = OpPhi %6 %737 %221 %735 %231
259        %234 = OpSLessThan %25 %625 %24
260               OpLoopMerge %230 %231 None
261               OpBranchConditional %234 %229 %230
262        %229 = OpLabel
263               OpBranch %236
264        %236 = OpLabel
265        %627 = OpPhi %14 %17 %229 %412 %239
266        %796 = OpPhi %6 %795 %229 %797 %239
267        %735 = OpPhi %6 %736 %229 %734 %239
268        %242 = OpSLessThan %25 %627 %24
269               OpLoopMerge %238 %239 None
270               OpBranchConditional %242 %237 %238
271        %237 = OpLabel
272               OpBranch %244
273        %244 = OpLabel
274        %629 = OpPhi %14 %17 %237 %410 %247
275        %797 = OpPhi %6 %796 %237 %798 %247
276        %734 = OpPhi %6 %735 %237 %733 %247
277        %250 = OpSLessThan %25 %629 %24
278               OpLoopMerge %246 %247 None
279               OpBranchConditional %250 %245 %246
280        %245 = OpLabel
281               OpBranch %252
282        %252 = OpLabel
283        %631 = OpPhi %14 %17 %245 %408 %255
284        %798 = OpPhi %6 %797 %245 %799 %255
285        %733 = OpPhi %6 %734 %245 %732 %255
286        %258 = OpSLessThan %25 %631 %24
287               OpLoopMerge %254 %255 None
288               OpBranchConditional %258 %253 %254
289        %253 = OpLabel
290               OpBranch %260
291        %260 = OpLabel
292        %633 = OpPhi %14 %17 %253 %406 %263
293        %799 = OpPhi %6 %798 %253 %800 %263
294        %732 = OpPhi %6 %733 %253 %731 %263
295        %266 = OpSLessThan %25 %633 %24
296               OpLoopMerge %262 %263 None
297               OpBranchConditional %266 %261 %262
298        %261 = OpLabel
299               OpBranch %268
300        %268 = OpLabel
301        %635 = OpPhi %14 %17 %261 %404 %271
302        %800 = OpPhi %6 %799 %261 %801 %271
303        %731 = OpPhi %6 %732 %261 %730 %271
304        %274 = OpSLessThan %25 %635 %24
305               OpLoopMerge %270 %271 None
306               OpBranchConditional %274 %269 %270
307        %269 = OpLabel
308               OpBranch %276
309        %276 = OpLabel
310        %637 = OpPhi %14 %17 %269 %402 %279
311        %801 = OpPhi %6 %800 %269 %802 %279
312        %730 = OpPhi %6 %731 %269 %729 %279
313        %282 = OpSLessThan %25 %637 %24
314               OpLoopMerge %278 %279 None
315               OpBranchConditional %282 %277 %278
316        %277 = OpLabel
317               OpBranch %284
318        %284 = OpLabel
319        %639 = OpPhi %14 %17 %277 %400 %287
320        %802 = OpPhi %6 %801 %277 %803 %287
321        %729 = OpPhi %6 %730 %277 %728 %287
322        %290 = OpSLessThan %25 %639 %24
323               OpLoopMerge %286 %287 None
324               OpBranchConditional %290 %285 %286
325        %285 = OpLabel
326               OpBranch %292
327        %292 = OpLabel
328        %641 = OpPhi %14 %17 %285 %398 %295
329        %803 = OpPhi %6 %802 %285 %804 %295
330        %728 = OpPhi %6 %729 %285 %727 %295
331        %298 = OpSLessThan %25 %641 %24
332               OpLoopMerge %294 %295 None
333               OpBranchConditional %298 %293 %294
334        %293 = OpLabel
335               OpBranch %300
336        %300 = OpLabel
337        %643 = OpPhi %14 %17 %293 %396 %303
338        %804 = OpPhi %6 %803 %293 %805 %303
339        %727 = OpPhi %6 %728 %293 %726 %303
340        %306 = OpSLessThan %25 %643 %24
341               OpLoopMerge %302 %303 None
342               OpBranchConditional %306 %301 %302
343        %301 = OpLabel
344               OpBranch %308
345        %308 = OpLabel
346        %645 = OpPhi %14 %17 %301 %394 %311
347        %805 = OpPhi %6 %804 %301 %806 %311
348        %726 = OpPhi %6 %727 %301 %725 %311
349        %314 = OpSLessThan %25 %645 %24
350               OpLoopMerge %310 %311 None
351               OpBranchConditional %314 %309 %310
352        %309 = OpLabel
353               OpBranch %316
354        %316 = OpLabel
355        %647 = OpPhi %14 %17 %309 %392 %319
356        %806 = OpPhi %6 %805 %309 %807 %319
357        %725 = OpPhi %6 %726 %309 %724 %319
358        %322 = OpSLessThan %25 %647 %24
359               OpLoopMerge %318 %319 None
360               OpBranchConditional %322 %317 %318
361        %317 = OpLabel
362               OpBranch %324
363        %324 = OpLabel
364        %649 = OpPhi %14 %17 %317 %390 %327
365        %807 = OpPhi %6 %806 %317 %808 %327
366        %724 = OpPhi %6 %725 %317 %723 %327
367        %330 = OpSLessThan %25 %649 %24
368               OpLoopMerge %326 %327 None
369               OpBranchConditional %330 %325 %326
370        %325 = OpLabel
371               OpBranch %332
372        %332 = OpLabel
373        %651 = OpPhi %14 %17 %325 %388 %335
374        %808 = OpPhi %6 %807 %325 %809 %335
375        %723 = OpPhi %6 %724 %325 %722 %335
376        %338 = OpSLessThan %25 %651 %24
377               OpLoopMerge %334 %335 None
378               OpBranchConditional %338 %333 %334
379        %333 = OpLabel
380               OpBranch %340
381        %340 = OpLabel
382        %653 = OpPhi %14 %17 %333 %386 %343
383        %809 = OpPhi %6 %808 %333 %810 %343
384        %722 = OpPhi %6 %723 %333 %721 %343
385        %346 = OpSLessThan %25 %653 %24
386               OpLoopMerge %342 %343 None
387               OpBranchConditional %346 %341 %342
388        %341 = OpLabel
389               OpBranch %348
390        %348 = OpLabel
391        %655 = OpPhi %14 %17 %341 %384 %351
392        %810 = OpPhi %6 %809 %341 %811 %351
393        %721 = OpPhi %6 %722 %341 %720 %351
394        %354 = OpSLessThan %25 %655 %24
395               OpLoopMerge %350 %351 None
396               OpBranchConditional %354 %349 %350
397        %349 = OpLabel
398               OpBranch %356
399        %356 = OpLabel
400        %657 = OpPhi %14 %17 %349 %382 %359
401        %811 = OpPhi %6 %810 %349 %812 %359
402        %720 = OpPhi %6 %721 %349 %719 %359
403        %362 = OpSLessThan %25 %657 %24
404               OpLoopMerge %358 %359 None
405               OpBranchConditional %362 %357 %358
406        %357 = OpLabel
407               OpBranch %364
408        %364 = OpLabel
409        %719 = OpPhi %6 %720 %357 %716 %367
410        %659 = OpPhi %14 %17 %357 %380 %367
411        %812 = OpPhi %6 %811 %357 %716 %367
412        %370 = OpSLessThan %25 %659 %24
413               OpLoopMerge %366 %367 None
414               OpBranchConditional %370 %365 %366
415        %365 = OpLabel
416        %376 = OpAccessChain %375 %373 %17
417        %377 = OpLoad %6 %376
418               OpSelectionMerge %603 None
419               OpSwitch %450 %481
420        %481 = OpLabel
421               OpBranch %482
422        %482 = OpLabel
423        %681 = OpPhi %25 %451 %481 %704 %597
424        %674 = OpPhi %6 %13 %481 %1655 %597
425        %661 = OpPhi %14 %17 %481 %599 %597
426        %718 = OpPhi %6 %719 %481 %748 %597
427        %485 = OpSLessThan %25 %661 %24
428               OpLoopMerge %600 %597 None
429               OpBranchConditional %485 %486 %600
430        %486 = OpLabel
431               OpBranch %487
432        %487 = OpLabel
433        %680 = OpPhi %25 %681 %486 %695 %591
434        %673 = OpPhi %6 %674 %486 %1656 %591
435        %662 = OpPhi %14 %17 %486 %593 %591
436        %749 = OpPhi %6 %718 %486 %750 %591
437        %490 = OpSLessThan %25 %662 %24
438               OpLoopMerge %594 %591 None
439               OpBranchConditional %490 %491 %594
440        %491 = OpLabel
441               OpBranch %492
442        %492 = OpLabel
443        %679 = OpPhi %25 %680 %491 %688 %585
444        %672 = OpPhi %6 %673 %491 %1657 %585
445        %663 = OpPhi %14 %17 %491 %587 %585
446        %751 = OpPhi %6 %749 %491 %752 %585
447        %495 = OpSLessThan %25 %663 %24
448               OpLoopMerge %588 %585 None
449               OpBranchConditional %495 %496 %588
450        %496 = OpLabel
451               OpBranch %497
452        %497 = OpLabel
453        %678 = OpPhi %25 %679 %496 %676 %579
454        %671 = OpPhi %6 %672 %496 %1658 %579
455        %664 = OpPhi %14 %17 %496 %581 %579
456        %753 = OpPhi %6 %751 %496 %754 %579
457        %500 = OpSLessThan %25 %664 %24
458               OpLoopMerge %582 %579 None
459               OpBranchConditional %500 %501 %582
460        %501 = OpLabel
461               OpBranch %502
462        %502 = OpLabel
463        %665 = OpPhi %14 %17 %501 %575 %573
464        %670 = OpPhi %6 %671 %501 %669 %573
465        %505 = OpSLessThan %25 %665 %24
466               OpLoopMerge %576 %573 None
467               OpBranchConditional %505 %506 %576
468        %506 = OpLabel
469        %508 = OpFMod %6 %13 %377
470        %509 = OpFOrdLessThan %25 %508 %61
471               OpSelectionMerge %567 None
472               OpBranchConditional %509 %510 %567
473        %510 = OpLabel
474               OpBranch %511
475        %511 = OpLabel
476        %675 = OpPhi %6 %670 %510 %785 %563
477        %666 = OpPhi %14 %17 %510 %565 %563
478        %514 = OpSLessThan %25 %666 %24
479               OpLoopMerge %566 %563 None
480               OpBranchConditional %514 %515 %566
481        %515 = OpLabel
482               OpBranch %516
483        %516 = OpLabel
484        %771 = OpPhi %14 %17 %515 %561 %559
485        %785 = OpPhi %6 %675 %515 %784 %559
486        %519 = OpSLessThan %25 %771 %24
487               OpLoopMerge %562 %559 None
488               OpBranchConditional %519 %520 %562
489        %520 = OpLabel
490               OpBranch %521
491        %521 = OpLabel
492        %773 = OpPhi %14 %17 %520 %557 %555
493        %784 = OpPhi %6 %785 %520 %783 %555
494        %524 = OpSLessThan %25 %773 %24
495               OpLoopMerge %558 %555 None
496               OpBranchConditional %524 %525 %558
497        %525 = OpLabel
498               OpBranch %526
499        %526 = OpLabel
500        %775 = OpPhi %14 %17 %525 %553 %551
501        %783 = OpPhi %6 %784 %525 %782 %551
502        %529 = OpSLessThan %25 %775 %24
503               OpLoopMerge %554 %551 None
504               OpBranchConditional %529 %530 %554
505        %530 = OpLabel
506               OpBranch %531
507        %531 = OpLabel
508        %777 = OpPhi %14 %17 %530 %549 %547
509        %782 = OpPhi %6 %783 %530 %781 %547
510        %534 = OpSLessThan %25 %777 %24
511               OpLoopMerge %550 %547 None
512               OpBranchConditional %534 %535 %550
513        %535 = OpLabel
514               OpBranch %536
515        %536 = OpLabel
516        %781 = OpPhi %6 %782 %535 %542 %540
517        %779 = OpPhi %14 %17 %535 %545 %540
518        %539 = OpSLessThan %25 %779 %24
519               OpLoopMerge %546 %540 None
520               OpBranchConditional %539 %540 %546
521        %540 = OpLabel
522        %542 = OpFAdd %6 %781 %13
523        %545 = OpIAdd %14 %779 %24
524               OpBranch %536
525        %546 = OpLabel
526               OpBranch %547
527        %547 = OpLabel
528        %549 = OpIAdd %14 %777 %24
529               OpBranch %531
530        %550 = OpLabel
531               OpBranch %551
532        %551 = OpLabel
533        %553 = OpIAdd %14 %775 %24
534               OpBranch %526
535        %554 = OpLabel
536               OpBranch %555
537        %555 = OpLabel
538        %557 = OpIAdd %14 %773 %24
539               OpBranch %521
540        %558 = OpLabel
541               OpBranch %559
542        %559 = OpLabel
543        %561 = OpIAdd %14 %771 %24
544               OpBranch %516
545        %562 = OpLabel
546               OpBranch %563
547        %563 = OpLabel
548        %565 = OpIAdd %14 %666 %24
549               OpBranch %511
550        %566 = OpLabel
551               OpBranch %567
552        %567 = OpLabel
553        %669 = OpPhi %6 %670 %506 %675 %566
554        %569 = OpFOrdGreaterThan %25 %377 %13
555               OpSelectionMerge %572 None
556               OpBranchConditional %569 %570 %572
557        %570 = OpLabel
558               OpBranch %576
559        %572 = OpLabel
560               OpBranch %573
561        %573 = OpLabel
562        %575 = OpIAdd %14 %665 %24
563               OpBranch %502
564        %576 = OpLabel
565       %1658 = OpPhi %6 %670 %502 %669 %570
566        %754 = OpPhi %6 %753 %502 %669 %570
567        %676 = OpPhi %25 %678 %502 %454 %570
568               OpSelectionMerge %578 None
569               OpBranchConditional %676 %582 %578
570        %578 = OpLabel
571               OpBranch %579
572        %579 = OpLabel
573        %581 = OpIAdd %14 %664 %24
574               OpBranch %497
575        %582 = OpLabel
576       %1657 = OpPhi %6 %671 %497 %1658 %576
577        %752 = OpPhi %6 %753 %497 %754 %576
578        %688 = OpPhi %25 %678 %497 %676 %576
579               OpSelectionMerge %584 None
580               OpBranchConditional %688 %588 %584
581        %584 = OpLabel
582               OpBranch %585
583        %585 = OpLabel
584        %587 = OpIAdd %14 %663 %24
585               OpBranch %492
586        %588 = OpLabel
587       %1656 = OpPhi %6 %672 %492 %1657 %582
588        %750 = OpPhi %6 %751 %492 %752 %582
589        %695 = OpPhi %25 %679 %492 %688 %582
590               OpSelectionMerge %590 None
591               OpBranchConditional %695 %594 %590
592        %590 = OpLabel
593               OpBranch %591
594        %591 = OpLabel
595        %593 = OpIAdd %14 %662 %24
596               OpBranch %487
597        %594 = OpLabel
598       %1655 = OpPhi %6 %673 %487 %1656 %588
599        %748 = OpPhi %6 %749 %487 %750 %588
600        %704 = OpPhi %25 %680 %487 %695 %588
601               OpSelectionMerge %596 None
602               OpBranchConditional %704 %600 %596
603        %596 = OpLabel
604               OpBranch %597
605        %597 = OpLabel
606        %599 = OpIAdd %14 %661 %24
607               OpBranch %482
608        %600 = OpLabel
609        %717 = OpPhi %6 %718 %482 %748 %594
610        %715 = OpPhi %25 %681 %482 %704 %594
611               OpSelectionMerge %602 None
612               OpBranchConditional %715 %603 %602
613        %602 = OpLabel
614               OpBranch %603
615        %603 = OpLabel
616        %716 = OpPhi %6 %717 %600 %143 %602
617               OpBranch %367
618        %367 = OpLabel
619        %380 = OpIAdd %14 %659 %24
620               OpBranch %364
621        %366 = OpLabel
622               OpBranch %359
623        %359 = OpLabel
624        %382 = OpIAdd %14 %657 %24
625               OpBranch %356
626        %358 = OpLabel
627               OpBranch %351
628        %351 = OpLabel
629        %384 = OpIAdd %14 %655 %24
630               OpBranch %348
631        %350 = OpLabel
632               OpBranch %343
633        %343 = OpLabel
634        %386 = OpIAdd %14 %653 %24
635               OpBranch %340
636        %342 = OpLabel
637               OpBranch %335
638        %335 = OpLabel
639        %388 = OpIAdd %14 %651 %24
640               OpBranch %332
641        %334 = OpLabel
642               OpBranch %327
643        %327 = OpLabel
644        %390 = OpIAdd %14 %649 %24
645               OpBranch %324
646        %326 = OpLabel
647               OpBranch %319
648        %319 = OpLabel
649        %392 = OpIAdd %14 %647 %24
650               OpBranch %316
651        %318 = OpLabel
652               OpBranch %311
653        %311 = OpLabel
654        %394 = OpIAdd %14 %645 %24
655               OpBranch %308
656        %310 = OpLabel
657               OpBranch %303
658        %303 = OpLabel
659        %396 = OpIAdd %14 %643 %24
660               OpBranch %300
661        %302 = OpLabel
662               OpBranch %295
663        %295 = OpLabel
664        %398 = OpIAdd %14 %641 %24
665               OpBranch %292
666        %294 = OpLabel
667               OpBranch %287
668        %287 = OpLabel
669        %400 = OpIAdd %14 %639 %24
670               OpBranch %284
671        %286 = OpLabel
672               OpBranch %279
673        %279 = OpLabel
674        %402 = OpIAdd %14 %637 %24
675               OpBranch %276
676        %278 = OpLabel
677               OpBranch %271
678        %271 = OpLabel
679        %404 = OpIAdd %14 %635 %24
680               OpBranch %268
681        %270 = OpLabel
682               OpBranch %263
683        %263 = OpLabel
684        %406 = OpIAdd %14 %633 %24
685               OpBranch %260
686        %262 = OpLabel
687               OpBranch %255
688        %255 = OpLabel
689        %408 = OpIAdd %14 %631 %24
690               OpBranch %252
691        %254 = OpLabel
692               OpBranch %247
693        %247 = OpLabel
694        %410 = OpIAdd %14 %629 %24
695               OpBranch %244
696        %246 = OpLabel
697               OpBranch %239
698        %239 = OpLabel
699        %412 = OpIAdd %14 %627 %24
700               OpBranch %236
701        %238 = OpLabel
702               OpBranch %231
703        %231 = OpLabel
704        %414 = OpIAdd %14 %625 %24
705               OpBranch %228
706        %230 = OpLabel
707               OpBranch %223
708        %223 = OpLabel
709        %416 = OpIAdd %14 %623 %24
710               OpBranch %220
711        %222 = OpLabel
712               OpBranch %215
713        %215 = OpLabel
714        %418 = OpIAdd %14 %621 %24
715               OpBranch %212
716        %214 = OpLabel
717               OpBranch %207
718        %207 = OpLabel
719        %420 = OpIAdd %14 %619 %24
720               OpBranch %204
721        %206 = OpLabel
722               OpBranch %199
723        %199 = OpLabel
724        %422 = OpIAdd %14 %617 %24
725               OpBranch %196
726        %198 = OpLabel
727               OpBranch %191
728        %191 = OpLabel
729        %424 = OpIAdd %14 %615 %24
730               OpBranch %188
731        %190 = OpLabel
732               OpBranch %183
733        %183 = OpLabel
734        %426 = OpIAdd %14 %613 %24
735               OpBranch %180
736        %182 = OpLabel
737               OpBranch %175
738        %175 = OpLabel
739        %428 = OpIAdd %14 %611 %24
740               OpBranch %172
741        %174 = OpLabel
742               OpBranch %167
743        %167 = OpLabel
744        %430 = OpIAdd %14 %609 %24
745               OpBranch %164
746        %166 = OpLabel
747               OpBranch %159
748        %159 = OpLabel
749        %432 = OpIAdd %14 %607 %24
750               OpBranch %156
751        %158 = OpLabel
752               OpBranch %151
753        %151 = OpLabel
754        %434 = OpIAdd %14 %605 %24
755               OpBranch %148
756        %150 = OpLabel
757        %436 = OpFOrdEqual %25 %606 %13
758               OpSelectionMerge %438 None
759               OpBranchConditional %436 %437 %443
760        %437 = OpLabel
761               OpStore %441 %442
762               OpBranch %438
763        %443 = OpLabel
764               OpStore %441 %444
765               OpBranch %438
766        %438 = OpLabel
767               OpReturn
768               OpFunctionEnd
769END
770
771# uniforms for variant
772
773# five
774BUFFER variant_five DATA_TYPE float STD140 DATA
775 5.0
776END
777
778BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
779
780PIPELINE graphics variant_pipeline
781  ATTACH variant_vertex_shader
782  ATTACH variant_fragment_shader
783  FRAMEBUFFER_SIZE 256 256
784  BIND BUFFER variant_framebuffer AS color LOCATION 0
785  BIND BUFFER variant_five AS push_constant
786END
787CLEAR_COLOR variant_pipeline 0 0 0 255
788
789CLEAR variant_pipeline
790RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 256 256
791
792EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255
793