3 # Copyright 2019 Google LLC
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
9 # http://www.apache.org/licenses/LICENSE-2.0
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.
18 # A test for a bug found by GraphicsFuzz.
20 # Short description: A fragment shader with a lot of control flow
22 # The test passes because the fragment shader does not enter the first if statement, then writes
25 SHADER vertex variant_vertex_shader PASSTHROUGH
27 # variant_fragment_shader is derived from the following GLSL:
29 # precision highp float;
31 # layout(set = 0, binding = 0) uniform buf0
33 # vec2 injectionSwitch;
35 # layout(location = 0) out vec4 _GLF_color;
37 # vec3 drawShape(vec2 pos)
64 # c6 = pos.x + 1.0 > 1.0;
69 # int GLF_live4_looplimiter5;
75 # if (GLF_live4_looplimiter5 >= 7)
79 # GLF_live4_looplimiter5++;
80 # mat4x2 GLF_live7m42;
81 # GLF_live7m42 = mat4x2(1.0);
83 # GLF_live7m33 = mat3(1.0);
84 # int GLF_live7_looplimiter3;
86 # int GLF_live7cols = 2;
90 # if (GLF_live7_looplimiter3 >= 7)
94 # GLF_live7_looplimiter3++;
95 # int GLF_live7_looplimiter2;
97 # int GLF_live7rows = 2;
101 # if (GLF_live7_looplimiter2 >= 7)
105 # GLF_live7_looplimiter2++;
106 # int GLF_live7_looplimiter1;
107 # GLF_live7_looplimiter1 = 0;
109 # int GLF_live7c = 0;
113 # if (GLF_live7_looplimiter1 >= 7)
117 # GLF_live7_looplimiter1++;
118 # int GLF_live7_looplimiter0;
120 # int GLF_live7r = 0;
124 # if (GLF_live7_looplimiter0 >= 7)
128 # GLF_live7_looplimiter0++;
129 # GLF_live7m33[GLF_live7c >= 0 && GLF_live7c < 3 ? GLF_live7c : 0][GLF_live7r >= 0 && GLF_live7r < 3 ? GLF_live7r : 0] = 1.0;
130 # if (0.0 > injectionSwitch.y)
135 # GLF_live7m42[GLF_live7c >= 0 && GLF_live7c < 4 ? GLF_live7c : 0][GLF_live7r >= 0 && GLF_live7r < 2 ? GLF_live7r : 0] = 1.0;
141 # float GLF_live7sums[9];
142 # int GLF_live7sum_index;
143 # GLF_live7sum_index = 0;
144 # int GLF_live7_looplimiter7;
145 # GLF_live7_looplimiter7 = 0;
147 # int GLF_live7cols = 2;
151 # if (GLF_live7_looplimiter7 >= 7)
155 # GLF_live7_looplimiter7++;
158 # GLF_live7sums[GLF_live7sum_index >= 0 && GLF_live7sum_index < 9 ? GLF_live7sum_index : 0] = 0.0;
160 # int GLF_live7c = 0;
165 # int GLF_live7r = 0;
166 # GLF_live7r < GLF_live7rows;
169 # GLF_live7sums[GLF_live7sum_index >= 0 && GLF_live7sum_index < 9 ? GLF_live7sum_index : 0] += transpose(GLF_live7m33)[GLF_live7c < 3 ? 1 : int(injectionSwitch.x)][GLF_live7r < 3 ? 1 : 0];
170 # GLF_live7sums[GLF_live7sum_index >= 0 && GLF_live7sum_index < 9 ? GLF_live7sum_index : 0] += GLF_live7m42[1][GLF_live7r];
173 # GLF_live7sum_index++;
180 # if (injectionSwitch.x >= 2.0) // always false
182 # vec2 position = gl_FragCoord.xy;
183 # drawShape(position);
184 # drawShape(position);
191 # drawShape(position);
194 # _GLF_color = vec4(1.0, 0.0, 0.0, 1.0);
196 SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0
199 ; Generator: Khronos Glslang Reference Front End; 7
203 %1 = OpExtInstImport "GLSL.std.450"
204 OpMemoryModel Logical GLSL450
205 OpEntryPoint Fragment %4 "main" %326 %350
206 OpExecutionMode %4 OriginUpperLeft
209 OpName %12 "drawShape(vf2;"
216 OpName %65 "GLF_live4i"
217 OpName %75 "GLF_live4_looplimiter5"
218 OpName %87 "GLF_live7m42"
219 OpName %95 "GLF_live7m33"
220 OpName %100 "GLF_live7cols"
221 OpName %109 "GLF_live7_looplimiter3"
222 OpName %117 "GLF_live7rows"
223 OpName %125 "GLF_live7_looplimiter2"
224 OpName %133 "GLF_live7_looplimiter1"
225 OpName %134 "GLF_live7c"
226 OpName %150 "GLF_live7r"
227 OpName %158 "GLF_live7_looplimiter0"
229 OpMemberName %181 0 "injectionSwitch"
231 OpName %214 "GLF_live7sum_index"
232 OpName %215 "GLF_live7_looplimiter7"
233 OpName %216 "GLF_live7cols"
234 OpName %231 "GLF_live7rows"
235 OpName %235 "GLF_live7sums"
236 OpName %245 "GLF_live7c"
237 OpName %253 "GLF_live7r"
238 OpName %284 "indexable"
239 OpName %323 "position"
240 OpName %326 "gl_FragCoord"
245 OpName %350 "_GLF_color"
246 OpDecorate %65 RelaxedPrecision
247 OpDecorate %72 RelaxedPrecision
248 OpDecorate %75 RelaxedPrecision
249 OpDecorate %76 RelaxedPrecision
250 OpDecorate %82 RelaxedPrecision
251 OpDecorate %84 RelaxedPrecision
252 OpDecorate %100 RelaxedPrecision
253 OpDecorate %107 RelaxedPrecision
254 OpDecorate %109 RelaxedPrecision
255 OpDecorate %110 RelaxedPrecision
256 OpDecorate %115 RelaxedPrecision
257 OpDecorate %116 RelaxedPrecision
258 OpDecorate %117 RelaxedPrecision
259 OpDecorate %123 RelaxedPrecision
260 OpDecorate %125 RelaxedPrecision
261 OpDecorate %126 RelaxedPrecision
262 OpDecorate %131 RelaxedPrecision
263 OpDecorate %132 RelaxedPrecision
264 OpDecorate %133 RelaxedPrecision
265 OpDecorate %134 RelaxedPrecision
266 OpDecorate %140 RelaxedPrecision
267 OpDecorate %143 RelaxedPrecision
268 OpDecorate %148 RelaxedPrecision
269 OpDecorate %149 RelaxedPrecision
270 OpDecorate %150 RelaxedPrecision
271 OpDecorate %156 RelaxedPrecision
272 OpDecorate %158 RelaxedPrecision
273 OpDecorate %159 RelaxedPrecision
274 OpDecorate %164 RelaxedPrecision
275 OpDecorate %165 RelaxedPrecision
276 OpDecorate %166 RelaxedPrecision
277 OpDecorate %168 RelaxedPrecision
278 OpDecorate %171 RelaxedPrecision
279 OpDecorate %173 RelaxedPrecision
280 OpDecorate %175 RelaxedPrecision
281 OpDecorate %178 RelaxedPrecision
282 OpMemberDecorate %181 0 Offset 0
283 OpDecorate %181 Block
284 OpDecorate %183 DescriptorSet 0
285 OpDecorate %183 Binding 0
286 OpDecorate %191 RelaxedPrecision
287 OpDecorate %193 RelaxedPrecision
288 OpDecorate %196 RelaxedPrecision
289 OpDecorate %198 RelaxedPrecision
290 OpDecorate %200 RelaxedPrecision
291 OpDecorate %203 RelaxedPrecision
292 OpDecorate %206 RelaxedPrecision
293 OpDecorate %207 RelaxedPrecision
294 OpDecorate %208 RelaxedPrecision
295 OpDecorate %209 RelaxedPrecision
296 OpDecorate %210 RelaxedPrecision
297 OpDecorate %211 RelaxedPrecision
298 OpDecorate %212 RelaxedPrecision
299 OpDecorate %213 RelaxedPrecision
300 OpDecorate %214 RelaxedPrecision
301 OpDecorate %215 RelaxedPrecision
302 OpDecorate %216 RelaxedPrecision
303 OpDecorate %222 RelaxedPrecision
304 OpDecorate %224 RelaxedPrecision
305 OpDecorate %229 RelaxedPrecision
306 OpDecorate %230 RelaxedPrecision
307 OpDecorate %231 RelaxedPrecision
308 OpDecorate %236 RelaxedPrecision
309 OpDecorate %238 RelaxedPrecision
310 OpDecorate %242 RelaxedPrecision
311 OpDecorate %245 RelaxedPrecision
312 OpDecorate %251 RelaxedPrecision
313 OpDecorate %253 RelaxedPrecision
314 OpDecorate %259 RelaxedPrecision
315 OpDecorate %260 RelaxedPrecision
316 OpDecorate %262 RelaxedPrecision
317 OpDecorate %264 RelaxedPrecision
318 OpDecorate %267 RelaxedPrecision
319 OpDecorate %271 RelaxedPrecision
320 OpDecorate %281 RelaxedPrecision
321 OpDecorate %291 RelaxedPrecision
322 OpDecorate %293 RelaxedPrecision
323 OpDecorate %296 RelaxedPrecision
324 OpDecorate %298 RelaxedPrecision
325 OpDecorate %305 RelaxedPrecision
326 OpDecorate %306 RelaxedPrecision
327 OpDecorate %307 RelaxedPrecision
328 OpDecorate %308 RelaxedPrecision
329 OpDecorate %309 RelaxedPrecision
330 OpDecorate %310 RelaxedPrecision
331 OpDecorate %311 RelaxedPrecision
332 OpDecorate %312 RelaxedPrecision
333 OpDecorate %313 RelaxedPrecision
334 OpDecorate %314 RelaxedPrecision
335 OpDecorate %326 BuiltIn FragCoord
336 OpDecorate %335 RelaxedPrecision
337 OpDecorate %342 RelaxedPrecision
338 OpDecorate %347 RelaxedPrecision
339 OpDecorate %348 RelaxedPrecision
340 OpDecorate %350 Location 0
342 %3 = OpTypeFunction %2
344 %7 = OpTypeVector %6 2
345 %8 = OpTypePointer Function %7
346 %9 = OpTypeVector %6 3
347 %10 = OpTypeFunction %9 %8
349 %15 = OpTypePointer Function %14
351 %18 = OpConstant %17 0
352 %19 = OpTypePointer Function %6
353 %22 = OpConstant %6 1
354 %27 = OpConstantComposite %9 %22 %22 %22
355 %30 = OpConstant %17 1
357 %64 = OpTypePointer Function %63
358 %66 = OpConstant %63 0
359 %73 = OpConstant %63 4
360 %77 = OpConstant %63 7
361 %83 = OpConstant %63 1
362 %85 = OpTypeMatrix %7 4
363 %86 = OpTypePointer Function %85
364 %88 = OpConstant %6 0
365 %89 = OpConstantComposite %7 %22 %88
366 %90 = OpConstantComposite %7 %88 %22
367 %91 = OpConstantComposite %7 %88 %88
368 %92 = OpConstantComposite %85 %89 %90 %91 %89
369 %93 = OpTypeMatrix %9 3
370 %94 = OpTypePointer Function %93
371 %96 = OpConstantComposite %9 %22 %88 %88
372 %97 = OpConstantComposite %9 %88 %22 %88
373 %98 = OpConstantComposite %9 %88 %88 %22
374 %99 = OpConstantComposite %93 %96 %97 %98
375 %101 = OpConstant %63 2
376 %141 = OpConstant %63 3
377 %181 = OpTypeStruct %7
378 %182 = OpTypePointer Uniform %181
379 %183 = OpVariable %182 Uniform
380 %184 = OpTypePointer Uniform %6
381 %232 = OpConstant %17 9
382 %233 = OpTypeArray %6 %232
383 %234 = OpTypePointer Function %233
384 %239 = OpConstant %63 9
385 %319 = OpConstant %6 2
386 %324 = OpTypeVector %6 4
387 %325 = OpTypePointer Input %324
388 %326 = OpVariable %325 Input
389 %336 = OpConstant %63 25
390 %349 = OpTypePointer Output %324
391 %350 = OpVariable %349 Output
392 %351 = OpConstantComposite %324 %22 %88 %88 %22
393 %4 = OpFunction %2 None %3
395 %323 = OpVariable %8 Function
396 %329 = OpVariable %8 Function
397 %332 = OpVariable %8 Function
398 %335 = OpVariable %64 Function
399 %344 = OpVariable %8 Function
400 %317 = OpAccessChain %184 %183 %66 %18
401 %318 = OpLoad %6 %317
402 %320 = OpFOrdGreaterThanEqual %14 %318 %319
403 OpSelectionMerge %322 None
404 OpBranchConditional %320 %321 %322
406 %327 = OpLoad %324 %326
407 %328 = OpVectorShuffle %7 %327 %327 0 1
409 %330 = OpLoad %7 %323
411 %331 = OpFunctionCall %9 %12 %329
412 %333 = OpLoad %7 %323
414 %334 = OpFunctionCall %9 %12 %332
418 OpLoopMerge %339 %340 None
421 %342 = OpLoad %63 %335
422 %343 = OpSGreaterThan %14 %342 %66
423 OpBranchConditional %343 %338 %339
425 %345 = OpLoad %7 %323
427 %346 = OpFunctionCall %9 %12 %344
430 %347 = OpLoad %63 %335
431 %348 = OpISub %63 %347 %83
440 %12 = OpFunction %9 None %10
441 %11 = OpFunctionParameter %8
443 %16 = OpVariable %15 Function
444 %29 = OpVariable %15 Function
445 %38 = OpVariable %15 Function
446 %46 = OpVariable %15 Function
447 %54 = OpVariable %15 Function
448 %65 = OpVariable %64 Function
449 %75 = OpVariable %64 Function
450 %87 = OpVariable %86 Function
451 %95 = OpVariable %94 Function
452 %100 = OpVariable %64 Function
453 %109 = OpVariable %64 Function
454 %117 = OpVariable %64 Function
455 %125 = OpVariable %64 Function
456 %133 = OpVariable %64 Function
457 %134 = OpVariable %64 Function
458 %150 = OpVariable %64 Function
459 %158 = OpVariable %64 Function
460 %214 = OpVariable %64 Function
461 %215 = OpVariable %64 Function
462 %216 = OpVariable %64 Function
463 %231 = OpVariable %64 Function
464 %235 = OpVariable %234 Function
465 %245 = OpVariable %64 Function
466 %253 = OpVariable %64 Function
467 %273 = OpVariable %64 Function
468 %284 = OpVariable %94 Function
469 %20 = OpAccessChain %19 %11 %18
471 %23 = OpFOrdGreaterThan %14 %21 %22
474 OpSelectionMerge %26 None
475 OpBranchConditional %24 %25 %26
479 %31 = OpAccessChain %19 %11 %30
481 %33 = OpFOrdLessThan %14 %32 %22
484 OpSelectionMerge %36 None
485 OpBranchConditional %34 %35 %36
489 %39 = OpAccessChain %19 %11 %30
491 %41 = OpFOrdGreaterThan %14 %40 %22
494 OpSelectionMerge %44 None
495 OpBranchConditional %42 %43 %44
499 %47 = OpAccessChain %19 %11 %18
501 %49 = OpFOrdLessThan %14 %48 %22
504 OpSelectionMerge %52 None
505 OpBranchConditional %50 %51 %52
509 %55 = OpAccessChain %19 %11 %18
511 %57 = OpFAdd %6 %56 %22
512 %58 = OpFOrdGreaterThan %14 %57 %22
515 OpSelectionMerge %61 None
516 OpBranchConditional %59 %60 %61
523 OpLoopMerge %69 %70 None
527 %74 = OpSLessThan %14 %72 %73
528 OpBranchConditional %74 %68 %69
531 %78 = OpSGreaterThanEqual %14 %76 %77
532 OpSelectionMerge %80 None
533 OpBranchConditional %78 %79 %80
538 %84 = OpIAdd %63 %82 %83
545 OpLoopMerge %104 %105 None
548 %107 = OpLoad %63 %100
549 %108 = OpSLessThan %14 %107 %73
550 OpBranchConditional %108 %103 %104
552 %110 = OpLoad %63 %109
553 %111 = OpSGreaterThanEqual %14 %110 %77
554 OpSelectionMerge %113 None
555 OpBranchConditional %111 %112 %113
559 %115 = OpLoad %63 %109
560 %116 = OpIAdd %63 %115 %83
565 OpLoopMerge %120 %121 None
568 %123 = OpLoad %63 %117
569 %124 = OpSLessThan %14 %123 %73
570 OpBranchConditional %124 %119 %120
572 %126 = OpLoad %63 %125
573 %127 = OpSGreaterThanEqual %14 %126 %77
574 OpSelectionMerge %129 None
575 OpBranchConditional %127 %128 %129
579 %131 = OpLoad %63 %125
580 %132 = OpIAdd %63 %131 %83
586 OpLoopMerge %137 %138 None
589 %140 = OpLoad %63 %134
590 %142 = OpSLessThan %14 %140 %141
591 OpBranchConditional %142 %136 %137
593 %143 = OpLoad %63 %133
594 %144 = OpSGreaterThanEqual %14 %143 %77
595 OpSelectionMerge %146 None
596 OpBranchConditional %144 %145 %146
600 %148 = OpLoad %63 %133
601 %149 = OpIAdd %63 %148 %83
606 OpLoopMerge %153 %154 None
609 %156 = OpLoad %63 %150
610 %157 = OpSLessThan %14 %156 %101
611 OpBranchConditional %157 %152 %153
613 %159 = OpLoad %63 %158
614 %160 = OpSGreaterThanEqual %14 %159 %77
615 OpSelectionMerge %162 None
616 OpBranchConditional %160 %161 %162
620 %164 = OpLoad %63 %158
621 %165 = OpIAdd %63 %164 %83
623 %166 = OpLoad %63 %134
624 %167 = OpSGreaterThanEqual %14 %166 %66
625 %168 = OpLoad %63 %134
626 %169 = OpSLessThan %14 %168 %141
627 %170 = OpLogicalAnd %14 %167 %169
628 %171 = OpLoad %63 %134
629 %172 = OpSelect %63 %170 %171 %66
630 %173 = OpLoad %63 %150
631 %174 = OpSGreaterThanEqual %14 %173 %66
632 %175 = OpLoad %63 %150
633 %176 = OpSLessThan %14 %175 %141
634 %177 = OpLogicalAnd %14 %174 %176
635 %178 = OpLoad %63 %150
636 %179 = OpSelect %63 %177 %178 %66
637 %180 = OpAccessChain %19 %95 %172 %179
639 %185 = OpAccessChain %184 %183 %66 %30
640 %186 = OpLoad %6 %185
641 %187 = OpFOrdGreaterThan %14 %88 %186
642 OpSelectionMerge %189 None
643 OpBranchConditional %187 %188 %190
647 %191 = OpLoad %63 %134
648 %192 = OpSGreaterThanEqual %14 %191 %66
649 %193 = OpLoad %63 %134
650 %194 = OpSLessThan %14 %193 %73
651 %195 = OpLogicalAnd %14 %192 %194
652 %196 = OpLoad %63 %134
653 %197 = OpSelect %63 %195 %196 %66
654 %198 = OpLoad %63 %150
655 %199 = OpSGreaterThanEqual %14 %198 %66
656 %200 = OpLoad %63 %150
657 %201 = OpSLessThan %14 %200 %101
658 %202 = OpLogicalAnd %14 %199 %201
659 %203 = OpLoad %63 %150
660 %204 = OpSelect %63 %202 %203 %66
661 %205 = OpAccessChain %19 %87 %197 %204
667 %206 = OpLoad %63 %150
668 %207 = OpIAdd %63 %206 %83
674 %208 = OpLoad %63 %134
675 %209 = OpIAdd %63 %208 %83
681 %210 = OpLoad %63 %117
682 %211 = OpIAdd %63 %210 %83
688 %212 = OpLoad %63 %100
689 %213 = OpIAdd %63 %212 %83
698 OpLoopMerge %219 %220 None
701 %222 = OpLoad %63 %216
702 %223 = OpSLessThan %14 %222 %73
703 OpBranchConditional %223 %218 %219
705 %224 = OpLoad %63 %215
706 %225 = OpSGreaterThanEqual %14 %224 %77
707 OpSelectionMerge %227 None
708 OpBranchConditional %225 %226 %227
712 %229 = OpLoad %63 %215
713 %230 = OpIAdd %63 %229 %83
716 %236 = OpLoad %63 %214
717 %237 = OpSGreaterThanEqual %14 %236 %66
718 %238 = OpLoad %63 %214
719 %240 = OpSLessThan %14 %238 %239
720 %241 = OpLogicalAnd %14 %237 %240
721 %242 = OpLoad %63 %214
722 %243 = OpSelect %63 %241 %242 %66
723 %244 = OpAccessChain %19 %235 %243
728 OpLoopMerge %248 %249 None
731 %251 = OpLoad %63 %245
732 %252 = OpSLessThan %14 %251 %83
733 OpBranchConditional %252 %247 %248
738 OpLoopMerge %256 %257 None
741 %259 = OpLoad %63 %253
742 %260 = OpLoad %63 %231
743 %261 = OpSLessThan %14 %259 %260
744 OpBranchConditional %261 %255 %256
746 %262 = OpLoad %63 %214
747 %263 = OpSGreaterThanEqual %14 %262 %66
748 %264 = OpLoad %63 %214
749 %265 = OpSLessThan %14 %264 %239
750 %266 = OpLogicalAnd %14 %263 %265
751 %267 = OpLoad %63 %214
752 %268 = OpSelect %63 %266 %267 %66
753 %269 = OpLoad %93 %95
754 %270 = OpTranspose %93 %269
755 %271 = OpLoad %63 %245
756 %272 = OpSLessThan %14 %271 %141
757 OpSelectionMerge %275 None
758 OpBranchConditional %272 %274 %276
763 %277 = OpAccessChain %184 %183 %66 %18
764 %278 = OpLoad %6 %277
765 %279 = OpConvertFToS %63 %278
769 %280 = OpLoad %63 %273
770 %281 = OpLoad %63 %253
771 %282 = OpSLessThan %14 %281 %141
772 %283 = OpSelect %63 %282 %83 %66
774 %285 = OpAccessChain %19 %284 %280 %283
775 %286 = OpLoad %6 %285
776 %287 = OpAccessChain %19 %235 %268
777 %288 = OpLoad %6 %287
778 %289 = OpFAdd %6 %288 %286
779 %290 = OpAccessChain %19 %235 %268
781 %291 = OpLoad %63 %214
782 %292 = OpSGreaterThanEqual %14 %291 %66
783 %293 = OpLoad %63 %214
784 %294 = OpSLessThan %14 %293 %239
785 %295 = OpLogicalAnd %14 %292 %294
786 %296 = OpLoad %63 %214
787 %297 = OpSelect %63 %295 %296 %66
788 %298 = OpLoad %63 %253
789 %299 = OpAccessChain %19 %87 %83 %298
790 %300 = OpLoad %6 %299
791 %301 = OpAccessChain %19 %235 %297
792 %302 = OpLoad %6 %301
793 %303 = OpFAdd %6 %302 %300
794 %304 = OpAccessChain %19 %235 %297
798 %305 = OpLoad %63 %253
799 %306 = OpIAdd %63 %305 %83
805 %307 = OpLoad %63 %245
806 %308 = OpIAdd %63 %307 %83
810 %309 = OpLoad %63 %214
811 %310 = OpIAdd %63 %309 %83
815 %311 = OpLoad %63 %216
816 %312 = OpIAdd %63 %311 %83
822 %313 = OpLoad %63 %65
823 %314 = OpIAdd %63 %313 %83
831 # uniforms for variant
834 BUFFER variant_injectionSwitch DATA_TYPE vec2<float> DATA
838 BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
840 PIPELINE graphics variant_pipeline
841 ATTACH variant_vertex_shader
842 ATTACH variant_fragment_shader
843 FRAMEBUFFER_SIZE 256 256
844 BIND BUFFER variant_framebuffer AS color LOCATION 0
845 BIND BUFFER variant_injectionSwitch AS uniform DESCRIPTOR_SET 0 BINDING 0
847 CLEAR_COLOR variant_pipeline 0 0 0 255
849 CLEAR variant_pipeline
850 RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 256 256
852 EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255