Fix missing dependency on sparse binds
[platform/upstream/VK-GL-CTS.git] / external / vulkancts / data / vulkan / amber / graphicsfuzz / cov-large-number-of-false-conditions-return-discard-continue.amber
1 #!amber
2
3 # Copyright 2022 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 LLVM 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
30 SHADER vertex variant_vertex_shader PASSTHROUGH
31
32 # variant_fragment_shader is derived from the following GLSL:
33 # #version 320 es
34 #
35 # precision highp float;
36 # precision highp int;
37 #
38 # const int _GLF_global_loop_bound = 10;
39 # int _GLF_global_loop_count = 0;
40 #
41 # // Contents of injectionSwitch: [0.0, 1.0]
42 # layout(set = 0, binding = 0) uniform buf0
43 # {
44 #     highp vec2 injectionSwitch;
45 # };
46 #
47 # layout(location = 0) out vec4 _GLF_color;
48 #
49 # void main()
50 # {
51 #     _GLF_color = vec4(0);
52 #
53 #     int a = 0;
54 #
55 #     // None of the returns, discards, or continues are executed in this loop, except for the return at the end.
56 #     do
57 #     {
58 #         _GLF_global_loop_count ++;
59 #
60 #         if(gl_FragCoord.x < 0.0) return; if(gl_FragCoord.x < 0.0) return; if(gl_FragCoord.x < 0.0) return; if(gl_FragCoord.x < 0.0) return;
61 #         if(gl_FragCoord.x < 0.0) return; if(gl_FragCoord.x < 0.0) return; if(gl_FragCoord.x < 0.0) return; if(gl_FragCoord.x < 0.0) return;
62 #         if(gl_FragCoord.x < 0.0) return; if(gl_FragCoord.x < 0.0) return; if(gl_FragCoord.x < 0.0) return; if(gl_FragCoord.x < 0.0) return;
63 #         if(gl_FragCoord.x < 0.0) return; if(gl_FragCoord.x < 0.0) return; if(gl_FragCoord.x < 0.0) return; if(gl_FragCoord.x < 0.0) return;
64 #         if(gl_FragCoord.x < 0.0) return; if(gl_FragCoord.x < 0.0) return; if(gl_FragCoord.x < 0.0) return; if(gl_FragCoord.x < 0.0) return;
65 #         if(gl_FragCoord.x < 0.0) return; if(gl_FragCoord.x < 0.0) return; if(gl_FragCoord.x < 0.0) return; if(gl_FragCoord.x < 0.0) return;
66 #         if(gl_FragCoord.x < 0.0) return; if(gl_FragCoord.x < 0.0) return; if(gl_FragCoord.x < 0.0) return; if(gl_FragCoord.x < 0.0) return;
67 #         if(gl_FragCoord.x < 0.0) return; if(gl_FragCoord.x < 0.0) return; if(gl_FragCoord.x < 0.0) return; if(gl_FragCoord.x < 0.0) return;
68 #         if(gl_FragCoord.x < 0.0) return; if(gl_FragCoord.x < 0.0) return; if(gl_FragCoord.x < 0.0) return; if(gl_FragCoord.x < 0.0) return;
69 #         if(gl_FragCoord.x < 0.0) return; if(gl_FragCoord.x < 0.0) return; if(gl_FragCoord.x < 0.0) return; if(gl_FragCoord.x < 0.0) return;
70 #         if(gl_FragCoord.x < 0.0) return; if(gl_FragCoord.x < 0.0) return; if(gl_FragCoord.x < 0.0) return; if(gl_FragCoord.x < 0.0) return;
71 #
72 #         a++;
73 #
74 #         // Always false.
75 #         if(a == 0)
76 #         {
77 #             if(gl_FragCoord.x < 0.0) return; if(gl_FragCoord.x < 0.0) return; if(gl_FragCoord.x < 0.0) return; if(gl_FragCoord.x < 0.0) return;
78 #             if(gl_FragCoord.x < 0.0) return; if(gl_FragCoord.x < 0.0) return; if(gl_FragCoord.x < 0.0) return; if(gl_FragCoord.x < 0.0) return;
79 #
80 #             while (_GLF_global_loop_count < _GLF_global_loop_bound)
81 #             {
82 #                 _GLF_global_loop_count ++;
83 #
84 #                 if(gl_FragCoord.x < 0.0) return;
85 #
86 #                 if(gl_FragCoord.x < 0.0) discard; if(gl_FragCoord.x < 0.0) discard; if(gl_FragCoord.x < 0.0) discard; if(gl_FragCoord.x < 0.0) discard;
87 #                 if(gl_FragCoord.x < 0.0) discard; if(gl_FragCoord.x < 0.0) discard; if(gl_FragCoord.x < 0.0) discard; if(gl_FragCoord.x < 0.0) discard;
88 #             }
89 #
90 #             if(gl_FragCoord.x < 0.0) discard; if(gl_FragCoord.x < 0.0) discard;
91 #         }
92 #         else
93 #         {
94 #             if(gl_FragCoord.x < 0.0) discard; if(gl_FragCoord.x < 0.0) discard; if(gl_FragCoord.x < 0.0) discard; if(gl_FragCoord.x < 0.0) discard;
95 #             if(gl_FragCoord.x < 0.0) discard; if(gl_FragCoord.x < 0.0) discard; if(gl_FragCoord.x < 0.0) discard; if(gl_FragCoord.x < 0.0) discard;
96 #             if(gl_FragCoord.x < 0.0) discard; if(gl_FragCoord.x < 0.0) discard; if(gl_FragCoord.x < 0.0) discard; if(gl_FragCoord.x < 0.0) discard;
97 #             if(gl_FragCoord.x < 0.0) discard; if(gl_FragCoord.x < 0.0) discard; if(gl_FragCoord.x < 0.0) discard; if(gl_FragCoord.x < 0.0) discard;
98 #             if(gl_FragCoord.x < 0.0) discard; if(gl_FragCoord.x < 0.0) discard; if(gl_FragCoord.x < 0.0) discard; if(gl_FragCoord.x < 0.0) discard;
99 #             if(gl_FragCoord.x < 0.0) discard; if(gl_FragCoord.x < 0.0) discard; if(gl_FragCoord.x < 0.0) discard; if(gl_FragCoord.x < 0.0) discard;
100 #             if(gl_FragCoord.x < 0.0) discard; if(gl_FragCoord.x < 0.0) discard; if(gl_FragCoord.x < 0.0) discard; if(gl_FragCoord.x < 0.0) discard;
101 #             if(gl_FragCoord.x < 0.0) discard; if(gl_FragCoord.x < 0.0) discard; if(gl_FragCoord.x < 0.0) discard; if(gl_FragCoord.x < 0.0) discard;
102 #             if(gl_FragCoord.x < 0.0) discard; if(gl_FragCoord.x < 0.0) discard; if(gl_FragCoord.x < 0.0) discard; if(gl_FragCoord.x < 0.0) discard;
103 #             if(gl_FragCoord.x < 0.0) discard; if(gl_FragCoord.x < 0.0) discard; if(gl_FragCoord.x < 0.0) discard; if(gl_FragCoord.x < 0.0) discard;
104 #             if(gl_FragCoord.x < 0.0) discard; if(gl_FragCoord.x < 0.0) discard; if(gl_FragCoord.x < 0.0) discard; if(gl_FragCoord.x < 0.0) discard;
105 #             if(gl_FragCoord.x < 0.0) discard; if(gl_FragCoord.x < 0.0) discard; if(gl_FragCoord.x < 0.0) discard; if(gl_FragCoord.x < 0.0) discard;
106 #             if(gl_FragCoord.x < 0.0) discard; if(gl_FragCoord.x < 0.0) discard; if(gl_FragCoord.x < 0.0) discard; if(gl_FragCoord.x < 0.0) discard;
107 #             if(gl_FragCoord.x < 0.0) discard; if(gl_FragCoord.x < 0.0) discard; if(gl_FragCoord.x < 0.0) discard; if(gl_FragCoord.x < 0.0) discard;
108 #             if(gl_FragCoord.x < 0.0) discard; if(gl_FragCoord.x < 0.0) discard; if(gl_FragCoord.x < 0.0) discard; if(gl_FragCoord.x < 0.0) discard;
109 #             if(gl_FragCoord.x < 0.0) discard;
110 #
111 #             if(injectionSwitch.x > injectionSwitch.y)
112 #             {
113 #                 if(gl_FragCoord.x < 0.0) return;
114 #                 if(gl_FragCoord.x < 0.0) continue;
115 #
116 #                 discard;
117 #             }
118 #
119 #         }
120 #
121 #         if(gl_FragCoord.x < 0.0) discard;
122 #         if(gl_FragCoord.x < 0.0) continue;
123 #
124 #         _GLF_color = vec4(1, 0, 0, 1);
125 #
126 #         return;
127 #     }
128 #     while(_GLF_global_loop_count < _GLF_global_loop_bound);
129 # }
130 SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0
131 ; SPIR-V
132 ; Version: 1.0
133 ; Generator: Khronos Glslang Reference Front End; 10
134 ; Bound: 857
135 ; Schema: 0
136                OpCapability Shader
137           %1 = OpExtInstImport "GLSL.std.450"
138                OpMemoryModel Logical GLSL450
139                OpEntryPoint Fragment %4 "main" %13 %26
140                OpExecutionMode %4 OriginUpperLeft
141                OpSource ESSL 320
142                OpName %4 "main"
143                OpName %13 "_GLF_color"
144                OpName %26 "gl_FragCoord"
145                OpName %793 "buf0"
146                OpMemberName %793 0 "injectionSwitch"
147                OpName %795 ""
148                OpDecorate %13 Location 0
149                OpDecorate %26 BuiltIn FragCoord
150                OpMemberDecorate %793 0 Offset 0
151                OpDecorate %793 Block
152                OpDecorate %795 DescriptorSet 0
153                OpDecorate %795 Binding 0
154           %2 = OpTypeVoid
155           %3 = OpTypeFunction %2
156           %6 = OpTypeInt 32 1
157           %9 = OpConstant %6 0
158          %10 = OpTypeFloat 32
159          %11 = OpTypeVector %10 4
160          %12 = OpTypePointer Output %11
161          %13 = OpVariable %12 Output
162          %14 = OpConstant %10 0
163          %15 = OpConstantComposite %11 %14 %14 %14 %14
164          %23 = OpConstant %6 1
165          %25 = OpTypePointer Input %11
166          %26 = OpVariable %25 Input
167          %27 = OpTypeInt 32 0
168          %28 = OpConstant %27 0
169          %29 = OpTypePointer Input %10
170          %32 = OpTypeBool
171         %355 = OpConstant %6 10
172         %792 = OpTypeVector %10 2
173         %793 = OpTypeStruct %792
174         %794 = OpTypePointer Uniform %793
175         %795 = OpVariable %794 Uniform
176         %796 = OpTypePointer Uniform %10
177         %799 = OpConstant %27 1
178         %830 = OpConstant %10 1
179         %831 = OpConstantComposite %11 %830 %14 %14 %830
180         %837 = OpConstantFalse %32
181         %840 = OpConstantTrue %32
182           %4 = OpFunction %2 None %3
183           %5 = OpLabel
184                OpSelectionMerge %835 None
185                OpSwitch %28 %836
186         %836 = OpLabel
187                OpStore %13 %15
188                OpBranch %18
189          %18 = OpLabel
190         %850 = OpPhi %32 %837 %836 %855 %21
191         %846 = OpPhi %6 %9 %836 %296 %21
192         %845 = OpPhi %6 %9 %836 %851 %21
193                OpLoopMerge %20 %21 None
194                OpBranch %19
195          %19 = OpLabel
196          %24 = OpIAdd %6 %845 %23
197          %30 = OpAccessChain %29 %26 %28
198          %31 = OpLoad %10 %30
199          %33 = OpFOrdLessThan %32 %31 %14
200                OpSelectionMerge %35 None
201                OpBranchConditional %33 %34 %35
202          %34 = OpLabel
203                OpBranch %20
204          %35 = OpLabel
205                OpSelectionMerge %41 None
206                OpBranchConditional %33 %40 %41
207          %40 = OpLabel
208                OpBranch %20
209          %41 = OpLabel
210                OpSelectionMerge %47 None
211                OpBranchConditional %33 %46 %47
212          %46 = OpLabel
213                OpBranch %20
214          %47 = OpLabel
215                OpSelectionMerge %53 None
216                OpBranchConditional %33 %52 %53
217          %52 = OpLabel
218                OpBranch %20
219          %53 = OpLabel
220                OpSelectionMerge %59 None
221                OpBranchConditional %33 %58 %59
222          %58 = OpLabel
223                OpBranch %20
224          %59 = OpLabel
225                OpSelectionMerge %65 None
226                OpBranchConditional %33 %64 %65
227          %64 = OpLabel
228                OpBranch %20
229          %65 = OpLabel
230                OpSelectionMerge %71 None
231                OpBranchConditional %33 %70 %71
232          %70 = OpLabel
233                OpBranch %20
234          %71 = OpLabel
235                OpSelectionMerge %77 None
236                OpBranchConditional %33 %76 %77
237          %76 = OpLabel
238                OpBranch %20
239          %77 = OpLabel
240                OpSelectionMerge %83 None
241                OpBranchConditional %33 %82 %83
242          %82 = OpLabel
243                OpBranch %20
244          %83 = OpLabel
245                OpSelectionMerge %89 None
246                OpBranchConditional %33 %88 %89
247          %88 = OpLabel
248                OpBranch %20
249          %89 = OpLabel
250                OpSelectionMerge %95 None
251                OpBranchConditional %33 %94 %95
252          %94 = OpLabel
253                OpBranch %20
254          %95 = OpLabel
255                OpSelectionMerge %101 None
256                OpBranchConditional %33 %100 %101
257         %100 = OpLabel
258                OpBranch %20
259         %101 = OpLabel
260                OpSelectionMerge %107 None
261                OpBranchConditional %33 %106 %107
262         %106 = OpLabel
263                OpBranch %20
264         %107 = OpLabel
265                OpSelectionMerge %113 None
266                OpBranchConditional %33 %112 %113
267         %112 = OpLabel
268                OpBranch %20
269         %113 = OpLabel
270                OpSelectionMerge %119 None
271                OpBranchConditional %33 %118 %119
272         %118 = OpLabel
273                OpBranch %20
274         %119 = OpLabel
275                OpSelectionMerge %125 None
276                OpBranchConditional %33 %124 %125
277         %124 = OpLabel
278                OpBranch %20
279         %125 = OpLabel
280                OpSelectionMerge %131 None
281                OpBranchConditional %33 %130 %131
282         %130 = OpLabel
283                OpBranch %20
284         %131 = OpLabel
285                OpSelectionMerge %137 None
286                OpBranchConditional %33 %136 %137
287         %136 = OpLabel
288                OpBranch %20
289         %137 = OpLabel
290                OpSelectionMerge %143 None
291                OpBranchConditional %33 %142 %143
292         %142 = OpLabel
293                OpBranch %20
294         %143 = OpLabel
295                OpSelectionMerge %149 None
296                OpBranchConditional %33 %148 %149
297         %148 = OpLabel
298                OpBranch %20
299         %149 = OpLabel
300                OpSelectionMerge %155 None
301                OpBranchConditional %33 %154 %155
302         %154 = OpLabel
303                OpBranch %20
304         %155 = OpLabel
305                OpSelectionMerge %161 None
306                OpBranchConditional %33 %160 %161
307         %160 = OpLabel
308                OpBranch %20
309         %161 = OpLabel
310                OpSelectionMerge %167 None
311                OpBranchConditional %33 %166 %167
312         %166 = OpLabel
313                OpBranch %20
314         %167 = OpLabel
315                OpSelectionMerge %173 None
316                OpBranchConditional %33 %172 %173
317         %172 = OpLabel
318                OpBranch %20
319         %173 = OpLabel
320                OpSelectionMerge %179 None
321                OpBranchConditional %33 %178 %179
322         %178 = OpLabel
323                OpBranch %20
324         %179 = OpLabel
325                OpSelectionMerge %185 None
326                OpBranchConditional %33 %184 %185
327         %184 = OpLabel
328                OpBranch %20
329         %185 = OpLabel
330                OpSelectionMerge %191 None
331                OpBranchConditional %33 %190 %191
332         %190 = OpLabel
333                OpBranch %20
334         %191 = OpLabel
335                OpSelectionMerge %197 None
336                OpBranchConditional %33 %196 %197
337         %196 = OpLabel
338                OpBranch %20
339         %197 = OpLabel
340                OpSelectionMerge %203 None
341                OpBranchConditional %33 %202 %203
342         %202 = OpLabel
343                OpBranch %20
344         %203 = OpLabel
345                OpSelectionMerge %209 None
346                OpBranchConditional %33 %208 %209
347         %208 = OpLabel
348                OpBranch %20
349         %209 = OpLabel
350                OpSelectionMerge %215 None
351                OpBranchConditional %33 %214 %215
352         %214 = OpLabel
353                OpBranch %20
354         %215 = OpLabel
355                OpSelectionMerge %221 None
356                OpBranchConditional %33 %220 %221
357         %220 = OpLabel
358                OpBranch %20
359         %221 = OpLabel
360                OpSelectionMerge %227 None
361                OpBranchConditional %33 %226 %227
362         %226 = OpLabel
363                OpBranch %20
364         %227 = OpLabel
365                OpSelectionMerge %233 None
366                OpBranchConditional %33 %232 %233
367         %232 = OpLabel
368                OpBranch %20
369         %233 = OpLabel
370                OpSelectionMerge %239 None
371                OpBranchConditional %33 %238 %239
372         %238 = OpLabel
373                OpBranch %20
374         %239 = OpLabel
375                OpSelectionMerge %245 None
376                OpBranchConditional %33 %244 %245
377         %244 = OpLabel
378                OpBranch %20
379         %245 = OpLabel
380                OpSelectionMerge %251 None
381                OpBranchConditional %33 %250 %251
382         %250 = OpLabel
383                OpBranch %20
384         %251 = OpLabel
385                OpSelectionMerge %257 None
386                OpBranchConditional %33 %256 %257
387         %256 = OpLabel
388                OpBranch %20
389         %257 = OpLabel
390                OpSelectionMerge %263 None
391                OpBranchConditional %33 %262 %263
392         %262 = OpLabel
393                OpBranch %20
394         %263 = OpLabel
395                OpSelectionMerge %269 None
396                OpBranchConditional %33 %268 %269
397         %268 = OpLabel
398                OpBranch %20
399         %269 = OpLabel
400                OpSelectionMerge %275 None
401                OpBranchConditional %33 %274 %275
402         %274 = OpLabel
403                OpBranch %20
404         %275 = OpLabel
405                OpSelectionMerge %281 None
406                OpBranchConditional %33 %280 %281
407         %280 = OpLabel
408                OpBranch %20
409         %281 = OpLabel
410                OpSelectionMerge %287 None
411                OpBranchConditional %33 %286 %287
412         %286 = OpLabel
413                OpBranch %20
414         %287 = OpLabel
415                OpSelectionMerge %293 None
416                OpBranchConditional %33 %292 %293
417         %292 = OpLabel
418                OpBranch %20
419         %293 = OpLabel
420         %296 = OpIAdd %6 %846 %23
421         %298 = OpIEqual %32 %296 %9
422                OpSelectionMerge %300 None
423                OpBranchConditional %298 %299 %425
424         %299 = OpLabel
425                OpSelectionMerge %305 None
426                OpBranchConditional %33 %304 %305
427         %304 = OpLabel
428                OpBranch %20
429         %305 = OpLabel
430                OpSelectionMerge %311 None
431                OpBranchConditional %33 %310 %311
432         %310 = OpLabel
433                OpBranch %20
434         %311 = OpLabel
435                OpSelectionMerge %317 None
436                OpBranchConditional %33 %316 %317
437         %316 = OpLabel
438                OpBranch %20
439         %317 = OpLabel
440                OpSelectionMerge %323 None
441                OpBranchConditional %33 %322 %323
442         %322 = OpLabel
443                OpBranch %20
444         %323 = OpLabel
445                OpSelectionMerge %329 None
446                OpBranchConditional %33 %328 %329
447         %328 = OpLabel
448                OpBranch %20
449         %329 = OpLabel
450                OpSelectionMerge %335 None
451                OpBranchConditional %33 %334 %335
452         %334 = OpLabel
453                OpBranch %20
454         %335 = OpLabel
455                OpSelectionMerge %341 None
456                OpBranchConditional %33 %340 %341
457         %340 = OpLabel
458                OpBranch %20
459         %341 = OpLabel
460                OpSelectionMerge %347 None
461                OpBranchConditional %33 %346 %347
462         %346 = OpLabel
463                OpBranch %20
464         %347 = OpLabel
465                OpBranch %349
466         %349 = OpLabel
467         %847 = OpPhi %6 %24 %347 %358 %352
468         %356 = OpSLessThan %32 %847 %355
469                OpLoopMerge %351 %352 None
470                OpBranchConditional %356 %350 %351
471         %350 = OpLabel
472         %358 = OpIAdd %6 %847 %23
473                OpSelectionMerge %363 None
474                OpBranchConditional %33 %362 %363
475         %362 = OpLabel
476                OpBranch %351
477         %363 = OpLabel
478                OpSelectionMerge %369 None
479                OpBranchConditional %33 %368 %369
480         %368 = OpLabel
481                OpKill
482         %369 = OpLabel
483                OpSelectionMerge %375 None
484                OpBranchConditional %33 %374 %375
485         %374 = OpLabel
486                OpKill
487         %375 = OpLabel
488                OpSelectionMerge %381 None
489                OpBranchConditional %33 %380 %381
490         %380 = OpLabel
491                OpKill
492         %381 = OpLabel
493                OpSelectionMerge %387 None
494                OpBranchConditional %33 %386 %387
495         %386 = OpLabel
496                OpKill
497         %387 = OpLabel
498                OpSelectionMerge %393 None
499                OpBranchConditional %33 %392 %393
500         %392 = OpLabel
501                OpKill
502         %393 = OpLabel
503                OpSelectionMerge %399 None
504                OpBranchConditional %33 %398 %399
505         %398 = OpLabel
506                OpKill
507         %399 = OpLabel
508                OpSelectionMerge %405 None
509                OpBranchConditional %33 %404 %405
510         %404 = OpLabel
511                OpKill
512         %405 = OpLabel
513                OpSelectionMerge %411 None
514                OpBranchConditional %33 %410 %411
515         %410 = OpLabel
516                OpKill
517         %411 = OpLabel
518                OpBranch %352
519         %352 = OpLabel
520                OpBranch %349
521         %351 = OpLabel
522         %853 = OpPhi %6 %847 %349 %358 %362
523         %848 = OpPhi %32 %850 %349 %840 %362
524                OpSelectionMerge %843 None
525                OpBranchConditional %848 %20 %843
526         %843 = OpLabel
527                OpSelectionMerge %417 None
528                OpBranchConditional %33 %416 %417
529         %416 = OpLabel
530                OpKill
531         %417 = OpLabel
532                OpSelectionMerge %423 None
533                OpBranchConditional %33 %422 %423
534         %422 = OpLabel
535                OpKill
536         %423 = OpLabel
537                OpBranch %300
538         %425 = OpLabel
539                OpSelectionMerge %430 None
540                OpBranchConditional %33 %429 %430
541         %429 = OpLabel
542                OpKill
543         %430 = OpLabel
544                OpSelectionMerge %436 None
545                OpBranchConditional %33 %435 %436
546         %435 = OpLabel
547                OpKill
548         %436 = OpLabel
549                OpSelectionMerge %442 None
550                OpBranchConditional %33 %441 %442
551         %441 = OpLabel
552                OpKill
553         %442 = OpLabel
554                OpSelectionMerge %448 None
555                OpBranchConditional %33 %447 %448
556         %447 = OpLabel
557                OpKill
558         %448 = OpLabel
559                OpSelectionMerge %454 None
560                OpBranchConditional %33 %453 %454
561         %453 = OpLabel
562                OpKill
563         %454 = OpLabel
564                OpSelectionMerge %460 None
565                OpBranchConditional %33 %459 %460
566         %459 = OpLabel
567                OpKill
568         %460 = OpLabel
569                OpSelectionMerge %466 None
570                OpBranchConditional %33 %465 %466
571         %465 = OpLabel
572                OpKill
573         %466 = OpLabel
574                OpSelectionMerge %472 None
575                OpBranchConditional %33 %471 %472
576         %471 = OpLabel
577                OpKill
578         %472 = OpLabel
579                OpSelectionMerge %478 None
580                OpBranchConditional %33 %477 %478
581         %477 = OpLabel
582                OpKill
583         %478 = OpLabel
584                OpSelectionMerge %484 None
585                OpBranchConditional %33 %483 %484
586         %483 = OpLabel
587                OpKill
588         %484 = OpLabel
589                OpSelectionMerge %490 None
590                OpBranchConditional %33 %489 %490
591         %489 = OpLabel
592                OpKill
593         %490 = OpLabel
594                OpSelectionMerge %496 None
595                OpBranchConditional %33 %495 %496
596         %495 = OpLabel
597                OpKill
598         %496 = OpLabel
599                OpSelectionMerge %502 None
600                OpBranchConditional %33 %501 %502
601         %501 = OpLabel
602                OpKill
603         %502 = OpLabel
604                OpSelectionMerge %508 None
605                OpBranchConditional %33 %507 %508
606         %507 = OpLabel
607                OpKill
608         %508 = OpLabel
609                OpSelectionMerge %514 None
610                OpBranchConditional %33 %513 %514
611         %513 = OpLabel
612                OpKill
613         %514 = OpLabel
614                OpSelectionMerge %520 None
615                OpBranchConditional %33 %519 %520
616         %519 = OpLabel
617                OpKill
618         %520 = OpLabel
619                OpSelectionMerge %526 None
620                OpBranchConditional %33 %525 %526
621         %525 = OpLabel
622                OpKill
623         %526 = OpLabel
624                OpSelectionMerge %532 None
625                OpBranchConditional %33 %531 %532
626         %531 = OpLabel
627                OpKill
628         %532 = OpLabel
629                OpSelectionMerge %538 None
630                OpBranchConditional %33 %537 %538
631         %537 = OpLabel
632                OpKill
633         %538 = OpLabel
634                OpSelectionMerge %544 None
635                OpBranchConditional %33 %543 %544
636         %543 = OpLabel
637                OpKill
638         %544 = OpLabel
639                OpSelectionMerge %550 None
640                OpBranchConditional %33 %549 %550
641         %549 = OpLabel
642                OpKill
643         %550 = OpLabel
644                OpSelectionMerge %556 None
645                OpBranchConditional %33 %555 %556
646         %555 = OpLabel
647                OpKill
648         %556 = OpLabel
649                OpSelectionMerge %562 None
650                OpBranchConditional %33 %561 %562
651         %561 = OpLabel
652                OpKill
653         %562 = OpLabel
654                OpSelectionMerge %568 None
655                OpBranchConditional %33 %567 %568
656         %567 = OpLabel
657                OpKill
658         %568 = OpLabel
659                OpSelectionMerge %574 None
660                OpBranchConditional %33 %573 %574
661         %573 = OpLabel
662                OpKill
663         %574 = OpLabel
664                OpSelectionMerge %580 None
665                OpBranchConditional %33 %579 %580
666         %579 = OpLabel
667                OpKill
668         %580 = OpLabel
669                OpSelectionMerge %586 None
670                OpBranchConditional %33 %585 %586
671         %585 = OpLabel
672                OpKill
673         %586 = OpLabel
674                OpSelectionMerge %592 None
675                OpBranchConditional %33 %591 %592
676         %591 = OpLabel
677                OpKill
678         %592 = OpLabel
679                OpSelectionMerge %598 None
680                OpBranchConditional %33 %597 %598
681         %597 = OpLabel
682                OpKill
683         %598 = OpLabel
684                OpSelectionMerge %604 None
685                OpBranchConditional %33 %603 %604
686         %603 = OpLabel
687                OpKill
688         %604 = OpLabel
689                OpSelectionMerge %610 None
690                OpBranchConditional %33 %609 %610
691         %609 = OpLabel
692                OpKill
693         %610 = OpLabel
694                OpSelectionMerge %616 None
695                OpBranchConditional %33 %615 %616
696         %615 = OpLabel
697                OpKill
698         %616 = OpLabel
699                OpSelectionMerge %622 None
700                OpBranchConditional %33 %621 %622
701         %621 = OpLabel
702                OpKill
703         %622 = OpLabel
704                OpSelectionMerge %628 None
705                OpBranchConditional %33 %627 %628
706         %627 = OpLabel
707                OpKill
708         %628 = OpLabel
709                OpSelectionMerge %634 None
710                OpBranchConditional %33 %633 %634
711         %633 = OpLabel
712                OpKill
713         %634 = OpLabel
714                OpSelectionMerge %640 None
715                OpBranchConditional %33 %639 %640
716         %639 = OpLabel
717                OpKill
718         %640 = OpLabel
719                OpSelectionMerge %646 None
720                OpBranchConditional %33 %645 %646
721         %645 = OpLabel
722                OpKill
723         %646 = OpLabel
724                OpSelectionMerge %652 None
725                OpBranchConditional %33 %651 %652
726         %651 = OpLabel
727                OpKill
728         %652 = OpLabel
729                OpSelectionMerge %658 None
730                OpBranchConditional %33 %657 %658
731         %657 = OpLabel
732                OpKill
733         %658 = OpLabel
734                OpSelectionMerge %664 None
735                OpBranchConditional %33 %663 %664
736         %663 = OpLabel
737                OpKill
738         %664 = OpLabel
739                OpSelectionMerge %670 None
740                OpBranchConditional %33 %669 %670
741         %669 = OpLabel
742                OpKill
743         %670 = OpLabel
744                OpSelectionMerge %676 None
745                OpBranchConditional %33 %675 %676
746         %675 = OpLabel
747                OpKill
748         %676 = OpLabel
749                OpSelectionMerge %682 None
750                OpBranchConditional %33 %681 %682
751         %681 = OpLabel
752                OpKill
753         %682 = OpLabel
754                OpSelectionMerge %688 None
755                OpBranchConditional %33 %687 %688
756         %687 = OpLabel
757                OpKill
758         %688 = OpLabel
759                OpSelectionMerge %694 None
760                OpBranchConditional %33 %693 %694
761         %693 = OpLabel
762                OpKill
763         %694 = OpLabel
764                OpSelectionMerge %700 None
765                OpBranchConditional %33 %699 %700
766         %699 = OpLabel
767                OpKill
768         %700 = OpLabel
769                OpSelectionMerge %706 None
770                OpBranchConditional %33 %705 %706
771         %705 = OpLabel
772                OpKill
773         %706 = OpLabel
774                OpSelectionMerge %712 None
775                OpBranchConditional %33 %711 %712
776         %711 = OpLabel
777                OpKill
778         %712 = OpLabel
779                OpSelectionMerge %718 None
780                OpBranchConditional %33 %717 %718
781         %717 = OpLabel
782                OpKill
783         %718 = OpLabel
784                OpSelectionMerge %724 None
785                OpBranchConditional %33 %723 %724
786         %723 = OpLabel
787                OpKill
788         %724 = OpLabel
789                OpSelectionMerge %730 None
790                OpBranchConditional %33 %729 %730
791         %729 = OpLabel
792                OpKill
793         %730 = OpLabel
794                OpSelectionMerge %736 None
795                OpBranchConditional %33 %735 %736
796         %735 = OpLabel
797                OpKill
798         %736 = OpLabel
799                OpSelectionMerge %742 None
800                OpBranchConditional %33 %741 %742
801         %741 = OpLabel
802                OpKill
803         %742 = OpLabel
804                OpSelectionMerge %748 None
805                OpBranchConditional %33 %747 %748
806         %747 = OpLabel
807                OpKill
808         %748 = OpLabel
809                OpSelectionMerge %754 None
810                OpBranchConditional %33 %753 %754
811         %753 = OpLabel
812                OpKill
813         %754 = OpLabel
814                OpSelectionMerge %760 None
815                OpBranchConditional %33 %759 %760
816         %759 = OpLabel
817                OpKill
818         %760 = OpLabel
819                OpSelectionMerge %766 None
820                OpBranchConditional %33 %765 %766
821         %765 = OpLabel
822                OpKill
823         %766 = OpLabel
824                OpSelectionMerge %772 None
825                OpBranchConditional %33 %771 %772
826         %771 = OpLabel
827                OpKill
828         %772 = OpLabel
829                OpSelectionMerge %778 None
830                OpBranchConditional %33 %777 %778
831         %777 = OpLabel
832                OpKill
833         %778 = OpLabel
834                OpSelectionMerge %784 None
835                OpBranchConditional %33 %783 %784
836         %783 = OpLabel
837                OpKill
838         %784 = OpLabel
839                OpSelectionMerge %790 None
840                OpBranchConditional %33 %789 %790
841         %789 = OpLabel
842                OpKill
843         %790 = OpLabel
844         %797 = OpAccessChain %796 %795 %9 %28
845         %798 = OpLoad %10 %797
846         %800 = OpAccessChain %796 %795 %9 %799
847         %801 = OpLoad %10 %800
848         %802 = OpFOrdGreaterThan %32 %798 %801
849                OpSelectionMerge %804 None
850                OpBranchConditional %802 %803 %804
851         %803 = OpLabel
852                OpSelectionMerge %809 None
853                OpBranchConditional %33 %808 %809
854         %808 = OpLabel
855                OpBranch %20
856         %809 = OpLabel
857                OpSelectionMerge %815 None
858                OpBranchConditional %33 %814 %815
859         %814 = OpLabel
860                OpBranch %21
861         %815 = OpLabel
862                OpKill
863         %804 = OpLabel
864                OpBranch %300
865         %300 = OpLabel
866         %856 = OpPhi %32 %848 %423 %850 %804
867         %852 = OpPhi %6 %853 %423 %24 %804
868                OpSelectionMerge %822 None
869                OpBranchConditional %33 %821 %822
870         %821 = OpLabel
871                OpKill
872         %822 = OpLabel
873                OpSelectionMerge %828 None
874                OpBranchConditional %33 %827 %828
875         %827 = OpLabel
876                OpBranch %21
877         %828 = OpLabel
878                OpStore %13 %831
879                OpBranch %20
880          %21 = OpLabel
881         %855 = OpPhi %32 %850 %814 %856 %827
882         %851 = OpPhi %6 %24 %814 %852 %827
883         %834 = OpSLessThan %32 %851 %355
884                OpBranchConditional %834 %18 %20
885          %20 = OpLabel
886         %854 = OpPhi %32 %840 %34 %840 %40 %840 %46 %840 %52 %840 %58 %840 %64 %840 %70 %840 %76 %840 %82 %840 %88 %840 %94 %840 %100 %840 %106 %840 %112 %840 %118 %840 %124 %840 %130 %840 %136 %840 %142 %840 %148 %840 %154 %840 %160 %840 %166 %840 %172 %840 %178 %840 %184 %840 %190 %840 %196 %840 %202 %840 %208 %840 %214 %840 %220 %840 %226 %840 %232 %840 %238 %840 %244 %840 %250 %840 %256 %840 %262 %840 %268 %840 %274 %840 %280 %840 %286 %840 %292 %840 %304 %840 %310 %840 %316 %840 %322 %840 %328 %840 %334 %840 %340 %840 %346 %848 %351 %840 %808 %840 %828 %855 %21
887                OpSelectionMerge %841 None
888                OpBranchConditional %854 %835 %841
889         %841 = OpLabel
890                OpBranch %835
891         %835 = OpLabel
892                OpReturn
893                OpFunctionEnd
894 END
895
896 # uniforms for variant
897
898 # resolution
899 BUFFER variant_resolution DATA_TYPE vec2<float> STD140 DATA
900  256.0 256.0
901 END
902 # injectionSwitch
903 BUFFER variant_injectionSwitch DATA_TYPE vec2<float> STD140 DATA
904  0.0 1.0
905 END
906
907 BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
908
909 PIPELINE graphics variant_pipeline
910   ATTACH variant_vertex_shader
911   ATTACH variant_fragment_shader
912   FRAMEBUFFER_SIZE 32 32
913   BIND BUFFER variant_framebuffer AS color LOCATION 0
914   BIND BUFFER variant_resolution AS uniform DESCRIPTOR_SET 0 BINDING 1
915   BIND BUFFER variant_injectionSwitch AS uniform DESCRIPTOR_SET 0 BINDING 0
916 END
917 CLEAR_COLOR variant_pipeline 0 0 0 255
918
919 CLEAR variant_pipeline
920 RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 32 32
921
922 EXPECT variant_framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 255 0 0 255