This commit adds a batch of GraphicsFuzz coverage tests.
Components: Vulkan
New Tests:
dEQP-VK.graphicsfuzz.cov-function-divide-argument-until-lt-one
dEQP-VK.graphicsfuzz.cov-function-loop-check-determinant-zero-return-vector
dEQP-VK.graphicsfuzz.cov-function-parameter-zero-divided-by-uniform
dEQP-VK.graphicsfuzz.cov-function-round-unpack-half-2x16
dEQP-VK.graphicsfuzz.cov-function-switch-case-constant-clamp-transpose-identity-matrices
dEQP-VK.graphicsfuzz.cov-increment-array-element-usub-borrow
dEQP-VK.graphicsfuzz.cov-large-number-of-false-conditions-return-discard-continue
dEQP-VK.graphicsfuzz.cov-loop-iterator-bitwise-negate
dEQP-VK.graphicsfuzz.cov-loop-overwrite-sample-texture-as-color-output
dEQP-VK.graphicsfuzz.cov-min-vec2-transpose-mat2-identity
dEQP-VK.graphicsfuzz.cov-nested-loops-assign-vector-elements-from-matrix-no-negative-indexing
dEQP-VK.graphicsfuzz.cov-nested-loops-fragcoord-conditions-empty-blocks
dEQP-VK.graphicsfuzz.cov-one-bitwise-and-bitwise-or-full-bits
dEQP-VK.graphicsfuzz.cov-set-array-elements-to-uniform-check-value-break
dEQP-VK.graphicsfuzz.cov-small-array-overwrite-most-uniform-value-check-data-break
Change-Id: I20d10f67d1e5ab4510c673cfc3a90446221700b7
dEQP-VK.graphicsfuzz.cov-function-argument-uniform-float-loop-never-return
dEQP-VK.graphicsfuzz.cov-function-clamp-min-identical-shift-right
dEQP-VK.graphicsfuzz.cov-function-call-twice-clamp-global-variable
+dEQP-VK.graphicsfuzz.cov-function-divide-argument-until-lt-one
dEQP-VK.graphicsfuzz.cov-function-find-lsb-ivec2-one
dEQP-VK.graphicsfuzz.cov-function-fragcoord-condition-always-return
dEQP-VK.graphicsfuzz.cov-function-infinite-loop-always-return
dEQP-VK.graphicsfuzz.cov-function-infinite-loop-return-identical-condition
dEQP-VK.graphicsfuzz.cov-function-large-array-max-clamp
dEQP-VK.graphicsfuzz.cov-function-large-loop-break-argument-lte-global-loop-bound
+dEQP-VK.graphicsfuzz.cov-function-loop-check-determinant-zero-return-vector
dEQP-VK.graphicsfuzz.cov-function-loop-condition-uniform-shift-right
dEQP-VK.graphicsfuzz.cov-function-loop-condition-variable-less-than-min-itself
dEQP-VK.graphicsfuzz.cov-function-loop-copy-array-elements-based-on-arguments
dEQP-VK.graphicsfuzz.cov-function-nested-loops-break-early-never-discard
dEQP-VK.graphicsfuzz.cov-function-nested-loops-limit-uniform-xor-uniform
dEQP-VK.graphicsfuzz.cov-function-set-struct-field-zero-loop-reset-first-element
+dEQP-VK.graphicsfuzz.cov-function-parameter-zero-divided-by-uniform
+dEQP-VK.graphicsfuzz.cov-function-round-unpack-half-2x16
+dEQP-VK.graphicsfuzz.cov-function-switch-case-constant-clamp-transpose-identity-matrices
dEQP-VK.graphicsfuzz.cov-function-trivial-switch-case
dEQP-VK.graphicsfuzz.cov-function-two-loops-limit-using-arguments-array-element-copies
dEQP-VK.graphicsfuzz.cov-function-undefined-shift-left-index-array-with-return-value
dEQP-VK.graphicsfuzz.cov-if-true-discard-in-do-while-never-reached
dEQP-VK.graphicsfuzz.cov-if-true-float-bits-to-int-one
dEQP-VK.graphicsfuzz.cov-increment-array-element-in-loop
+dEQP-VK.graphicsfuzz.cov-increment-array-element-usub-borrow
dEQP-VK.graphicsfuzz.cov-increment-float-in-loop-abs
dEQP-VK.graphicsfuzz.cov-increment-global-counter-loop-function
dEQP-VK.graphicsfuzz.cov-increment-int-loop-counter-mod-array
dEQP-VK.graphicsfuzz.cov-large-int-array-nested-loops-set-ivec-index-component-sum
dEQP-VK.graphicsfuzz.cov-large-loop-break-early-condition-iterator-divided
dEQP-VK.graphicsfuzz.cov-large-loop-multiply-integer-by-uniform-one
+dEQP-VK.graphicsfuzz.cov-large-number-of-false-conditions-return-discard-continue
dEQP-VK.graphicsfuzz.cov-ldexp-exponent-undefined-divided-fragcoord-never-executed
dEQP-VK.graphicsfuzz.cov-left-shift-array-access
dEQP-VK.graphicsfuzz.cov-left-shift-right-shift-compare
dEQP-VK.graphicsfuzz.cov-loop-increment-or-divide-by-loop-index
dEQP-VK.graphicsfuzz.cov-loop-index-array-max-negative-zero
dEQP-VK.graphicsfuzz.cov-loop-integer-half-minus-one
+dEQP-VK.graphicsfuzz.cov-loop-iterator-bitwise-negate
dEQP-VK.graphicsfuzz.cov-loop-iterator-plus-one-variable-outside-index-array
dEQP-VK.graphicsfuzz.cov-loop-large-array-index-clamp-negative-value
dEQP-VK.graphicsfuzz.cov-loop-limiter-min-findlsb
dEQP-VK.graphicsfuzz.cov-loop-multiple-iterator-variables-copy-array-elements
dEQP-VK.graphicsfuzz.cov-loop-read-array-index-from-array-data
dEQP-VK.graphicsfuzz.cov-loop-max-divide-integer-by-ten
+dEQP-VK.graphicsfuzz.cov-loop-overwrite-sample-texture-as-color-output
dEQP-VK.graphicsfuzz.cov-loop-replace-output-color-restore-original
dEQP-VK.graphicsfuzz.cov-loop-returns-behind-true-and-false
dEQP-VK.graphicsfuzz.cov-loop-sampled-texel-integer-counter
dEQP-VK.graphicsfuzz.cov-min-intbitstofloat-undefined-never-used
dEQP-VK.graphicsfuzz.cov-min-negative-constant-always-below-one
dEQP-VK.graphicsfuzz.cov-min-nested-loop-same-value-for-variables
+dEQP-VK.graphicsfuzz.cov-min-vec2-transpose-mat2-identity
dEQP-VK.graphicsfuzz.cov-missing-return-value-function-never-called
dEQP-VK.graphicsfuzz.cov-mix-uninitialized-float-never-selected
dEQP-VK.graphicsfuzz.cov-mix-uninitialized-vector-select-only-defined-data
dEQP-VK.graphicsfuzz.cov-nested-loop-large-array-index-using-vector-components
dEQP-VK.graphicsfuzz.cov-nested-loop-not-greater-than-increment-array-element
dEQP-VK.graphicsfuzz.cov-nested-loop-undefined-smoothstep-never-executed
+dEQP-VK.graphicsfuzz.cov-nested-loops-assign-vector-elements-from-matrix-no-negative-indexing
dEQP-VK.graphicsfuzz.cov-nested-loops-clamp-ivec-push-constant-increment-global-counter
dEQP-VK.graphicsfuzz.cov-nested-loops-copy-array-elements-skip-first
dEQP-VK.graphicsfuzz.cov-nested-loops-decrease-ivec-component
dEQP-VK.graphicsfuzz.cov-nested-loops-decrease-vector-component-by-matrix-element-global-loop-counter
dEQP-VK.graphicsfuzz.cov-nested-loops-float-array-select-by-fragcoord
dEQP-VK.graphicsfuzz.cov-nested-loops-float-bits-to-int-increment-array
+dEQP-VK.graphicsfuzz.cov-nested-loops-fragcoord-conditions-empty-blocks
dEQP-VK.graphicsfuzz.cov-nested-loops-fragcoord-never-return-descending-loop
dEQP-VK.graphicsfuzz.cov-nested-loops-global-counter-func-set-struct-field
dEQP-VK.graphicsfuzz.cov-nested-loops-global-counter-increment-single-element
dEQP-VK.graphicsfuzz.cov-nir-opt-large-constants-for-clamp-vector-access
dEQP-VK.graphicsfuzz.cov-nir-opt-loop-unroll-if-if-if-if-do-while
dEQP-VK.graphicsfuzz.cov-nouble-negation-fragcoord-cast-ivec2-bitwise-and
+dEQP-VK.graphicsfuzz.cov-one-bitwise-and-bitwise-or-full-bits
dEQP-VK.graphicsfuzz.cov-one-minus-clamp-always-one-cast-to-int
dEQP-VK.graphicsfuzz.cov-packhalf-unpackunorm
dEQP-VK.graphicsfuzz.cov-pow-distance-uniform-vector-constant-one-vector
dEQP-VK.graphicsfuzz.cov-return-partly-undefined-vector-from-array
dEQP-VK.graphicsfuzz.cov-sample-texture-hundred-iterations
dEQP-VK.graphicsfuzz.cov-sampler-as-function-argument
+dEQP-VK.graphicsfuzz.cov-set-array-elements-to-uniform-check-value-break
dEQP-VK.graphicsfuzz.cov-set-output-color-function-call-nested-loop
dEQP-VK.graphicsfuzz.cov-sign-array-access-uaddcarry
dEQP-VK.graphicsfuzz.cov-sin-mul-mat-mat-mul-vec-mat
+dEQP-VK.graphicsfuzz.cov-small-array-overwrite-most-uniform-value-check-data-break
dEQP-VK.graphicsfuzz.cov-step-sinh
dEQP-VK.graphicsfuzz.cov-struct-float-array-mix-uniform-vectors
dEQP-VK.graphicsfuzz.cov-struct-int-array-select-uniform-ivec
dEQP-VK.graphicsfuzz.cov-function-argument-uniform-float-loop-never-return
dEQP-VK.graphicsfuzz.cov-function-clamp-min-identical-shift-right
dEQP-VK.graphicsfuzz.cov-function-call-twice-clamp-global-variable
+dEQP-VK.graphicsfuzz.cov-function-divide-argument-until-lt-one
dEQP-VK.graphicsfuzz.cov-function-find-lsb-ivec2-one
dEQP-VK.graphicsfuzz.cov-function-fragcoord-condition-always-return
dEQP-VK.graphicsfuzz.cov-function-infinite-loop-always-return
dEQP-VK.graphicsfuzz.cov-function-infinite-loop-return-identical-condition
dEQP-VK.graphicsfuzz.cov-function-large-array-max-clamp
dEQP-VK.graphicsfuzz.cov-function-large-loop-break-argument-lte-global-loop-bound
+dEQP-VK.graphicsfuzz.cov-function-loop-check-determinant-zero-return-vector
dEQP-VK.graphicsfuzz.cov-function-loop-condition-uniform-shift-right
dEQP-VK.graphicsfuzz.cov-function-loop-condition-variable-less-than-min-itself
dEQP-VK.graphicsfuzz.cov-function-loop-copy-array-elements-based-on-arguments
dEQP-VK.graphicsfuzz.cov-function-nested-loops-break-early-never-discard
dEQP-VK.graphicsfuzz.cov-function-nested-loops-limit-uniform-xor-uniform
dEQP-VK.graphicsfuzz.cov-function-set-struct-field-zero-loop-reset-first-element
+dEQP-VK.graphicsfuzz.cov-function-parameter-zero-divided-by-uniform
+dEQP-VK.graphicsfuzz.cov-function-round-unpack-half-2x16
+dEQP-VK.graphicsfuzz.cov-function-switch-case-constant-clamp-transpose-identity-matrices
dEQP-VK.graphicsfuzz.cov-function-trivial-switch-case
dEQP-VK.graphicsfuzz.cov-function-two-loops-limit-using-arguments-array-element-copies
dEQP-VK.graphicsfuzz.cov-function-undefined-shift-left-index-array-with-return-value
dEQP-VK.graphicsfuzz.cov-inc-array-element-loop-lsb
dEQP-VK.graphicsfuzz.cov-inc-inside-switch-and-for
dEQP-VK.graphicsfuzz.cov-increment-array-element-in-loop
+dEQP-VK.graphicsfuzz.cov-increment-array-element-usub-borrow
dEQP-VK.graphicsfuzz.cov-increment-float-in-loop-abs
dEQP-VK.graphicsfuzz.cov-increment-global-counter-loop-function
dEQP-VK.graphicsfuzz.cov-increment-inside-clamp
dEQP-VK.graphicsfuzz.cov-large-int-array-nested-loops-set-ivec-index-component-sum
dEQP-VK.graphicsfuzz.cov-large-loop-break-early-condition-iterator-divided
dEQP-VK.graphicsfuzz.cov-large-loop-multiply-integer-by-uniform-one
+dEQP-VK.graphicsfuzz.cov-large-number-of-false-conditions-return-discard-continue
dEQP-VK.graphicsfuzz.cov-ldexp-exponent-undefined-divided-fragcoord-never-executed
dEQP-VK.graphicsfuzz.cov-ldexp-undefined-mat-vec-multiply
dEQP-VK.graphicsfuzz.cov-left-shift-array-access
dEQP-VK.graphicsfuzz.cov-loop-increment-or-divide-by-loop-index
dEQP-VK.graphicsfuzz.cov-loop-index-array-max-negative-zero
dEQP-VK.graphicsfuzz.cov-loop-integer-half-minus-one
+dEQP-VK.graphicsfuzz.cov-loop-iterator-bitwise-negate
dEQP-VK.graphicsfuzz.cov-loop-iterator-plus-one-variable-outside-index-array
dEQP-VK.graphicsfuzz.cov-loop-large-array-index-clamp-negative-value
dEQP-VK.graphicsfuzz.cov-loop-limiter-min-findlsb
dEQP-VK.graphicsfuzz.cov-loop-multiple-iterator-variables-copy-array-elements
dEQP-VK.graphicsfuzz.cov-loop-read-array-index-from-array-data
dEQP-VK.graphicsfuzz.cov-loop-max-divide-integer-by-ten
+dEQP-VK.graphicsfuzz.cov-loop-overwrite-sample-texture-as-color-output
dEQP-VK.graphicsfuzz.cov-loop-replace-output-color-restore-original
dEQP-VK.graphicsfuzz.cov-loop-returns-behind-true-and-false
dEQP-VK.graphicsfuzz.cov-loop-sampled-texel-integer-counter
dEQP-VK.graphicsfuzz.cov-min-intbitstofloat-undefined-never-used
dEQP-VK.graphicsfuzz.cov-min-negative-constant-always-below-one
dEQP-VK.graphicsfuzz.cov-min-nested-loop-same-value-for-variables
+dEQP-VK.graphicsfuzz.cov-min-vec2-transpose-mat2-identity
dEQP-VK.graphicsfuzz.cov-missing-return-value-function-never-called
dEQP-VK.graphicsfuzz.cov-mix-uninitialized-float-never-selected
dEQP-VK.graphicsfuzz.cov-mix-uninitialized-vector-select-only-defined-data
dEQP-VK.graphicsfuzz.cov-nested-loop-large-array-index-using-vector-components
dEQP-VK.graphicsfuzz.cov-nested-loop-not-greater-than-increment-array-element
dEQP-VK.graphicsfuzz.cov-nested-loop-undefined-smoothstep-never-executed
+dEQP-VK.graphicsfuzz.cov-nested-loops-assign-vector-elements-from-matrix-no-negative-indexing
dEQP-VK.graphicsfuzz.cov-nested-loops-clamp-ivec-push-constant-increment-global-counter
dEQP-VK.graphicsfuzz.cov-nested-loops-copy-array-elements-skip-first
dEQP-VK.graphicsfuzz.cov-nested-loops-decrease-ivec-component
dEQP-VK.graphicsfuzz.cov-nested-loops-decrease-vector-component-by-matrix-element-global-loop-counter
dEQP-VK.graphicsfuzz.cov-nested-loops-float-array-select-by-fragcoord
dEQP-VK.graphicsfuzz.cov-nested-loops-float-bits-to-int-increment-array
+dEQP-VK.graphicsfuzz.cov-nested-loops-fragcoord-conditions-empty-blocks
dEQP-VK.graphicsfuzz.cov-nested-loops-fragcoord-never-return-descending-loop
dEQP-VK.graphicsfuzz.cov-nested-loops-global-counter-func-set-struct-field
dEQP-VK.graphicsfuzz.cov-nested-loops-global-counter-increment-single-element
dEQP-VK.graphicsfuzz.cov-nir-opt-large-constants-for-clamp-vector-access
dEQP-VK.graphicsfuzz.cov-nir-opt-loop-unroll-if-if-if-if-do-while
dEQP-VK.graphicsfuzz.cov-nouble-negation-fragcoord-cast-ivec2-bitwise-and
+dEQP-VK.graphicsfuzz.cov-one-bitwise-and-bitwise-or-full-bits
dEQP-VK.graphicsfuzz.cov-one-minus-clamp-always-one-cast-to-int
dEQP-VK.graphicsfuzz.cov-optimize-phis-for
dEQP-VK.graphicsfuzz.cov-optimize-phis-for-for-do-while-if-if
dEQP-VK.graphicsfuzz.cov-schedule-dag-rrlist-mix-log-cos
dEQP-VK.graphicsfuzz.cov-selection-dag-inverse-clamp
dEQP-VK.graphicsfuzz.cov-selection-dag-same-cond-twice
+dEQP-VK.graphicsfuzz.cov-set-array-elements-to-uniform-check-value-break
dEQP-VK.graphicsfuzz.cov-set-output-color-function-call-nested-loop
dEQP-VK.graphicsfuzz.cov-set-vector-cos-fragcoord
dEQP-VK.graphicsfuzz.cov-sign-array-access-uaddcarry
dEQP-VK.graphicsfuzz.cov-single-block-elim-self-assign
dEQP-VK.graphicsfuzz.cov-single-store-elim-assume-store
dEQP-VK.graphicsfuzz.cov-sinh-ldexp
+dEQP-VK.graphicsfuzz.cov-small-array-overwrite-most-uniform-value-check-data-break
dEQP-VK.graphicsfuzz.cov-ssa-rewrite-case-with-default
dEQP-VK.graphicsfuzz.cov-step-sinh
dEQP-VK.graphicsfuzz.cov-struct-float-array-mix-uniform-vectors
--- /dev/null
+#!amber
+
+# Copyright 2022 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+# A test for a coverage-gap found by the GraphicsFuzz project.
+
+# Short description: A fragment shader that covers specific LLVM code paths
+
+# The test passes because the shader always writes red.
+
+SHADER vertex variant_vertex_shader PASSTHROUGH
+
+# variant_fragment_shader is derived from the following GLSL:
+# #version 320 es
+#
+# #define _int_0 _GLF_uniform_int_values[0]
+# #define _int_1 _GLF_uniform_int_values[1]
+# #define _float_0_0 _GLF_uniform_float_values[0]
+#
+# precision highp float;
+# precision highp int;
+#
+# // Contents of _GLF_uniform_float_values: 0.0
+# layout(set = 0, binding = 0) uniform buf0
+# {
+# float _GLF_uniform_float_values[1];
+# };
+#
+# // Contents of _GLF_uniform_int_values: [0, 1]
+# layout(set = 0, binding = 1) uniform buf1
+# {
+# int _GLF_uniform_int_values[2];
+# };
+#
+# // Contents of injectionSwitch: [0.0, 1.0]
+# layout(push_constant) uniform buf_push
+# {
+# highp vec2 injectionSwitch;
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# // Returns 0 or 1 as long as x >= 0.
+# int func(int x)
+# {
+# while(x > 1)
+# {
+# x /= 2;
+# }
+#
+# return x;
+# }
+#
+# void main()
+# {
+# int a = int(gl_FragCoord.y);
+#
+# if(true)
+# {
+# }
+#
+# // Calls func with an argument of one or a positive integer based on gl_FragCoord. The return value is 0 or 1 which both index the red color.
+# _GLF_color = vec4[4](vec4(_int_1, _int_0, _int_0, _int_1), vec4(_int_1, _int_0, _int_0, _int_1), vec4(_int_0), vec4(_int_0))[(injectionSwitch.y < _float_0_0) ? _int_1 : func(a)];
+# }
+SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 10
+; Bound: 117
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %31 %42
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %10 "func(i1;"
+ OpName %9 "x"
+ OpName %27 "a"
+ OpName %31 "gl_FragCoord"
+ OpName %42 "_GLF_color"
+ OpName %45 "buf1"
+ OpMemberName %45 0 "_GLF_uniform_int_values"
+ OpName %47 ""
+ OpName %88 "buf_push"
+ OpMemberName %88 0 "injectionSwitch"
+ OpName %90 ""
+ OpName %95 "buf0"
+ OpMemberName %95 0 "_GLF_uniform_float_values"
+ OpName %97 ""
+ OpName %108 "param"
+ OpName %113 "indexable"
+ OpDecorate %31 BuiltIn FragCoord
+ OpDecorate %42 Location 0
+ OpDecorate %44 ArrayStride 16
+ OpMemberDecorate %45 0 Offset 0
+ OpDecorate %45 Block
+ OpDecorate %47 DescriptorSet 0
+ OpDecorate %47 Binding 1
+ OpMemberDecorate %88 0 Offset 0
+ OpDecorate %88 Block
+ OpDecorate %94 ArrayStride 16
+ OpMemberDecorate %95 0 Offset 0
+ OpDecorate %95 Block
+ OpDecorate %97 DescriptorSet 0
+ OpDecorate %97 Binding 0
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeInt 32 1
+ %7 = OpTypePointer Function %6
+ %8 = OpTypeFunction %6 %7
+ %18 = OpConstant %6 1
+ %19 = OpTypeBool
+ %21 = OpConstant %6 2
+ %28 = OpTypeFloat 32
+ %29 = OpTypeVector %28 4
+ %30 = OpTypePointer Input %29
+ %31 = OpVariable %30 Input
+ %32 = OpTypeInt 32 0
+ %33 = OpConstant %32 1
+ %34 = OpTypePointer Input %28
+ %38 = OpConstantTrue %19
+ %41 = OpTypePointer Output %29
+ %42 = OpVariable %41 Output
+ %43 = OpConstant %32 2
+ %44 = OpTypeArray %6 %43
+ %45 = OpTypeStruct %44
+ %46 = OpTypePointer Uniform %45
+ %47 = OpVariable %46 Uniform
+ %48 = OpConstant %6 0
+ %49 = OpTypePointer Uniform %6
+ %84 = OpConstant %32 4
+ %85 = OpTypeArray %29 %84
+ %87 = OpTypeVector %28 2
+ %88 = OpTypeStruct %87
+ %89 = OpTypePointer PushConstant %88
+ %90 = OpVariable %89 PushConstant
+ %91 = OpTypePointer PushConstant %28
+ %94 = OpTypeArray %28 %33
+ %95 = OpTypeStruct %94
+ %96 = OpTypePointer Uniform %95
+ %97 = OpVariable %96 Uniform
+ %98 = OpTypePointer Uniform %28
+ %112 = OpTypePointer Function %85
+ %114 = OpTypePointer Function %29
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ %27 = OpVariable %7 Function
+ %102 = OpVariable %7 Function
+ %108 = OpVariable %7 Function
+ %113 = OpVariable %112 Function
+ %35 = OpAccessChain %34 %31 %33
+ %36 = OpLoad %28 %35
+ %37 = OpConvertFToS %6 %36
+ OpStore %27 %37
+ OpSelectionMerge %40 None
+ OpBranchConditional %38 %39 %40
+ %39 = OpLabel
+ OpBranch %40
+ %40 = OpLabel
+ %50 = OpAccessChain %49 %47 %48 %18
+ %51 = OpLoad %6 %50
+ %52 = OpConvertSToF %28 %51
+ %53 = OpAccessChain %49 %47 %48 %48
+ %54 = OpLoad %6 %53
+ %55 = OpConvertSToF %28 %54
+ %56 = OpAccessChain %49 %47 %48 %48
+ %57 = OpLoad %6 %56
+ %58 = OpConvertSToF %28 %57
+ %59 = OpAccessChain %49 %47 %48 %18
+ %60 = OpLoad %6 %59
+ %61 = OpConvertSToF %28 %60
+ %62 = OpCompositeConstruct %29 %52 %55 %58 %61
+ %63 = OpAccessChain %49 %47 %48 %18
+ %64 = OpLoad %6 %63
+ %65 = OpConvertSToF %28 %64
+ %66 = OpAccessChain %49 %47 %48 %48
+ %67 = OpLoad %6 %66
+ %68 = OpConvertSToF %28 %67
+ %69 = OpAccessChain %49 %47 %48 %48
+ %70 = OpLoad %6 %69
+ %71 = OpConvertSToF %28 %70
+ %72 = OpAccessChain %49 %47 %48 %18
+ %73 = OpLoad %6 %72
+ %74 = OpConvertSToF %28 %73
+ %75 = OpCompositeConstruct %29 %65 %68 %71 %74
+ %76 = OpAccessChain %49 %47 %48 %48
+ %77 = OpLoad %6 %76
+ %78 = OpConvertSToF %28 %77
+ %79 = OpCompositeConstruct %29 %78 %78 %78 %78
+ %80 = OpAccessChain %49 %47 %48 %48
+ %81 = OpLoad %6 %80
+ %82 = OpConvertSToF %28 %81
+ %83 = OpCompositeConstruct %29 %82 %82 %82 %82
+ %86 = OpCompositeConstruct %85 %62 %75 %79 %83
+ %92 = OpAccessChain %91 %90 %48 %33
+ %93 = OpLoad %28 %92
+ %99 = OpAccessChain %98 %97 %48 %48
+ %100 = OpLoad %28 %99
+ %101 = OpFOrdLessThan %19 %93 %100
+ OpSelectionMerge %104 None
+ OpBranchConditional %101 %103 %107
+ %103 = OpLabel
+ %105 = OpAccessChain %49 %47 %48 %18
+ %106 = OpLoad %6 %105
+ OpStore %102 %106
+ OpBranch %104
+ %107 = OpLabel
+ %109 = OpLoad %6 %27
+ OpStore %108 %109
+ %110 = OpFunctionCall %6 %10 %108
+ OpStore %102 %110
+ OpBranch %104
+ %104 = OpLabel
+ %111 = OpLoad %6 %102
+ OpStore %113 %86
+ %115 = OpAccessChain %114 %113 %111
+ %116 = OpLoad %29 %115
+ OpStore %42 %116
+ OpReturn
+ OpFunctionEnd
+ %10 = OpFunction %6 None %8
+ %9 = OpFunctionParameter %7
+ %11 = OpLabel
+ OpBranch %12
+ %12 = OpLabel
+ OpLoopMerge %14 %15 None
+ OpBranch %16
+ %16 = OpLabel
+ %17 = OpLoad %6 %9
+ %20 = OpSGreaterThan %19 %17 %18
+ OpBranchConditional %20 %13 %14
+ %13 = OpLabel
+ %22 = OpLoad %6 %9
+ %23 = OpSDiv %6 %22 %21
+ OpStore %9 %23
+ OpBranch %15
+ %15 = OpLabel
+ OpBranch %12
+ %14 = OpLabel
+ %24 = OpLoad %6 %9
+ OpReturnValue %24
+ OpFunctionEnd
+END
+
+# uniforms for variant
+
+# injectionSwitch
+BUFFER variant_injectionSwitch DATA_TYPE vec2<float> STD140 DATA
+ 0.0 1.0
+END
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 0 1
+END
+# _GLF_uniform_float_values
+BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA
+ 0.0
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+ ATTACH variant_vertex_shader
+ ATTACH variant_fragment_shader
+ FRAMEBUFFER_SIZE 32 32
+ BIND BUFFER variant_framebuffer AS color LOCATION 0
+ BIND BUFFER variant_injectionSwitch AS push_constant
+ BIND BUFFER variant__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 1
+ BIND BUFFER variant__GLF_uniform_float_values AS uniform DESCRIPTOR_SET 0 BINDING 0
+END
+CLEAR_COLOR variant_pipeline 0 0 0 255
+
+CLEAR variant_pipeline
+RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 32 32
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 255 0 0 255
--- /dev/null
+#!amber
+
+# Copyright 2022 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+# A test for a coverage-gap found by the GraphicsFuzz project.
+
+# Short description: A fragment shader that covers specific LLVM code paths
+
+# The test passes because the shader always writes red.
+
+SHADER vertex variant_vertex_shader PASSTHROUGH
+
+# variant_fragment_shader is derived from the following GLSL:
+# #version 320 es
+# #define _int_1 _GLF_uniform_int_values[0]
+# #define _int_0 _GLF_uniform_int_values[1]
+# #define _float_0_0 _GLF_uniform_float_values[0]
+#
+# precision highp float;
+# precision highp int;
+#
+# // Contents of _GLF_uniform_float_values: 0.0
+# layout(set = 0, binding = 0) uniform buf0
+# {
+# float _GLF_uniform_float_values[1];
+# };
+#
+# // Contents of _GLF_uniform_int_values: [1, 0]
+# layout(set = 0, binding = 1) uniform buf1
+# {
+# int _GLF_uniform_int_values[2];
+# };
+#
+# const int _GLF_global_loop_bound = 10;
+# int _GLF_global_loop_count = 0;
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# vec4 func()
+# {
+# do
+# {
+# _GLF_global_loop_count++;
+#
+# // Always true.
+# if(determinant(mat4(_int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, 1, 1, _int_0, 0, 0)) == _float_0_0)
+# {
+# return vec4(_int_1, _int_0, _int_0, _int_1);
+# }
+# }
+# while(_GLF_global_loop_count < _GLF_global_loop_bound);
+#
+# // Never executed.
+# return vec4(_int_0);
+# }
+#
+# void main()
+# {
+# _GLF_color = func();
+# }
+SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 10
+; Bound: 112
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %110
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %9 "func("
+ OpName %13 "_GLF_global_loop_count"
+ OpName %25 "buf1"
+ OpMemberName %25 0 "_GLF_uniform_int_values"
+ OpName %27 ""
+ OpName %76 "buf0"
+ OpMemberName %76 0 "_GLF_uniform_float_values"
+ OpName %78 ""
+ OpName %110 "_GLF_color"
+ OpDecorate %24 ArrayStride 16
+ OpMemberDecorate %25 0 Offset 0
+ OpDecorate %25 Block
+ OpDecorate %27 DescriptorSet 0
+ OpDecorate %27 Binding 1
+ OpDecorate %75 ArrayStride 16
+ OpMemberDecorate %76 0 Offset 0
+ OpDecorate %76 Block
+ OpDecorate %78 DescriptorSet 0
+ OpDecorate %78 Binding 0
+ OpDecorate %110 Location 0
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeFloat 32
+ %7 = OpTypeVector %6 4
+ %8 = OpTypeFunction %7
+ %11 = OpTypeInt 32 1
+ %12 = OpTypePointer Private %11
+ %13 = OpVariable %12 Private
+ %14 = OpConstant %11 0
+ %20 = OpConstant %11 1
+ %22 = OpTypeInt 32 0
+ %23 = OpConstant %22 2
+ %24 = OpTypeArray %11 %23
+ %25 = OpTypeStruct %24
+ %26 = OpTypePointer Uniform %25
+ %27 = OpVariable %26 Uniform
+ %28 = OpTypePointer Uniform %11
+ %62 = OpConstant %6 1
+ %66 = OpConstant %6 0
+ %67 = OpTypeMatrix %7 4
+ %74 = OpConstant %22 1
+ %75 = OpTypeArray %6 %74
+ %76 = OpTypeStruct %75
+ %77 = OpTypePointer Uniform %76
+ %78 = OpVariable %77 Uniform
+ %79 = OpTypePointer Uniform %6
+ %82 = OpTypeBool
+ %101 = OpConstant %11 10
+ %109 = OpTypePointer Output %7
+ %110 = OpVariable %109 Output
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ OpStore %13 %14
+ %111 = OpFunctionCall %7 %9
+ OpStore %110 %111
+ OpReturn
+ OpFunctionEnd
+ %9 = OpFunction %7 None %8
+ %10 = OpLabel
+ OpBranch %15
+ %15 = OpLabel
+ OpLoopMerge %17 %18 None
+ OpBranch %16
+ %16 = OpLabel
+ %19 = OpLoad %11 %13
+ %21 = OpIAdd %11 %19 %20
+ OpStore %13 %21
+ %29 = OpAccessChain %28 %27 %14 %14
+ %30 = OpLoad %11 %29
+ %31 = OpConvertSToF %6 %30
+ %32 = OpAccessChain %28 %27 %14 %14
+ %33 = OpLoad %11 %32
+ %34 = OpConvertSToF %6 %33
+ %35 = OpAccessChain %28 %27 %14 %14
+ %36 = OpLoad %11 %35
+ %37 = OpConvertSToF %6 %36
+ %38 = OpAccessChain %28 %27 %14 %14
+ %39 = OpLoad %11 %38
+ %40 = OpConvertSToF %6 %39
+ %41 = OpAccessChain %28 %27 %14 %14
+ %42 = OpLoad %11 %41
+ %43 = OpConvertSToF %6 %42
+ %44 = OpAccessChain %28 %27 %14 %14
+ %45 = OpLoad %11 %44
+ %46 = OpConvertSToF %6 %45
+ %47 = OpAccessChain %28 %27 %14 %14
+ %48 = OpLoad %11 %47
+ %49 = OpConvertSToF %6 %48
+ %50 = OpAccessChain %28 %27 %14 %14
+ %51 = OpLoad %11 %50
+ %52 = OpConvertSToF %6 %51
+ %53 = OpAccessChain %28 %27 %14 %14
+ %54 = OpLoad %11 %53
+ %55 = OpConvertSToF %6 %54
+ %56 = OpAccessChain %28 %27 %14 %14
+ %57 = OpLoad %11 %56
+ %58 = OpConvertSToF %6 %57
+ %59 = OpAccessChain %28 %27 %14 %14
+ %60 = OpLoad %11 %59
+ %61 = OpConvertSToF %6 %60
+ %63 = OpAccessChain %28 %27 %14 %20
+ %64 = OpLoad %11 %63
+ %65 = OpConvertSToF %6 %64
+ %68 = OpCompositeConstruct %7 %31 %34 %37 %40
+ %69 = OpCompositeConstruct %7 %43 %46 %49 %52
+ %70 = OpCompositeConstruct %7 %55 %58 %61 %62
+ %71 = OpCompositeConstruct %7 %62 %65 %66 %66
+ %72 = OpCompositeConstruct %67 %68 %69 %70 %71
+ %73 = OpExtInst %6 %1 Determinant %72
+ %80 = OpAccessChain %79 %78 %14 %14
+ %81 = OpLoad %6 %80
+ %83 = OpFOrdEqual %82 %73 %81
+ OpSelectionMerge %85 None
+ OpBranchConditional %83 %84 %85
+ %84 = OpLabel
+ %86 = OpAccessChain %28 %27 %14 %14
+ %87 = OpLoad %11 %86
+ %88 = OpConvertSToF %6 %87
+ %89 = OpAccessChain %28 %27 %14 %20
+ %90 = OpLoad %11 %89
+ %91 = OpConvertSToF %6 %90
+ %92 = OpAccessChain %28 %27 %14 %20
+ %93 = OpLoad %11 %92
+ %94 = OpConvertSToF %6 %93
+ %95 = OpAccessChain %28 %27 %14 %14
+ %96 = OpLoad %11 %95
+ %97 = OpConvertSToF %6 %96
+ %98 = OpCompositeConstruct %7 %88 %91 %94 %97
+ OpReturnValue %98
+ %85 = OpLabel
+ OpBranch %18
+ %18 = OpLabel
+ %100 = OpLoad %11 %13
+ %102 = OpSLessThan %82 %100 %101
+ OpBranchConditional %102 %15 %17
+ %17 = OpLabel
+ %103 = OpAccessChain %28 %27 %14 %20
+ %104 = OpLoad %11 %103
+ %105 = OpConvertSToF %6 %104
+ %106 = OpCompositeConstruct %7 %105 %105 %105 %105
+ OpReturnValue %106
+ OpFunctionEnd
+END
+
+# uniforms for variant
+
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 1 0
+END
+# _GLF_uniform_float_values
+BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA
+ 0.0
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+ ATTACH variant_vertex_shader
+ ATTACH variant_fragment_shader
+ FRAMEBUFFER_SIZE 32 32
+ BIND BUFFER variant_framebuffer AS color LOCATION 0
+ BIND BUFFER variant__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 1
+ BIND BUFFER variant__GLF_uniform_float_values AS uniform DESCRIPTOR_SET 0 BINDING 0
+END
+CLEAR_COLOR variant_pipeline 0 0 0 255
+
+CLEAR variant_pipeline
+RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 32 32
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 255 0 0 255
--- /dev/null
+#!amber
+
+# Copyright 2022 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+# A test for a coverage-gap found by the GraphicsFuzz project.
+
+# Short description: A fragment shader that covers specific LLVM code paths
+
+# The test passes because the shader always writes red.
+
+SHADER vertex variant_vertex_shader PASSTHROUGH
+
+# variant_fragment_shader is derived from the following GLSL:
+# #version 320 es
+# #define _int_0 _GLF_uniform_int_values[0]
+# #define _int_1 _GLF_uniform_int_values[1]
+#
+# precision highp float;
+# precision highp int;
+#
+# // Contents of _GLF_uniform_int_values: [0, 1]
+# layout(set = 0, binding = 0) uniform buf0
+# {
+# int _GLF_uniform_int_values[2];
+# };
+#
+# const int _GLF_global_loop_bound = 100;
+# int _GLF_global_loop_count = 0;
+#
+# // Contents of resolution: [0.2501191, 0.1597625]
+# layout(set = 0, binding = 1) uniform buf1
+# {
+# vec2 resolution;
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# vec4 func(ivec2 v)
+# {
+# // Iterated once.
+# while(_GLF_global_loop_count < _GLF_global_loop_bound)
+# {
+# _GLF_global_loop_count ++;
+#
+# // Always true.
+# if(v.x < _int_1)
+# {
+# return vec4(_int_1, _int_0, _int_0, _int_1);
+# }
+# }
+#
+# // Never executed.
+# return vec4(_int_0);
+# }
+#
+# void main()
+# {
+# // The x component of the ivec is zero because 0 / N is always zero.
+# _GLF_color = func((ivec2(vec2(0, _int_1) / resolution)));
+# }
+SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 10
+; Bound: 84
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %67
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %13 "func(vi2;"
+ OpName %12 "v"
+ OpName %16 "_GLF_global_loop_count"
+ OpName %37 "buf0"
+ OpMemberName %37 0 "_GLF_uniform_int_values"
+ OpName %39 ""
+ OpName %67 "_GLF_color"
+ OpName %74 "buf1"
+ OpMemberName %74 0 "resolution"
+ OpName %76 ""
+ OpName %82 "param"
+ OpDecorate %36 ArrayStride 16
+ OpMemberDecorate %37 0 Offset 0
+ OpDecorate %37 Block
+ OpDecorate %39 DescriptorSet 0
+ OpDecorate %39 Binding 0
+ OpDecorate %67 Location 0
+ OpMemberDecorate %74 0 Offset 0
+ OpDecorate %74 Block
+ OpDecorate %76 DescriptorSet 0
+ OpDecorate %76 Binding 1
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeInt 32 1
+ %7 = OpTypeVector %6 2
+ %8 = OpTypePointer Function %7
+ %9 = OpTypeFloat 32
+ %10 = OpTypeVector %9 4
+ %11 = OpTypeFunction %10 %8
+ %15 = OpTypePointer Private %6
+ %16 = OpVariable %15 Private
+ %17 = OpConstant %6 0
+ %24 = OpConstant %6 100
+ %25 = OpTypeBool
+ %28 = OpConstant %6 1
+ %30 = OpTypeInt 32 0
+ %31 = OpConstant %30 0
+ %32 = OpTypePointer Function %6
+ %35 = OpConstant %30 2
+ %36 = OpTypeArray %6 %35
+ %37 = OpTypeStruct %36
+ %38 = OpTypePointer Uniform %37
+ %39 = OpVariable %38 Uniform
+ %40 = OpTypePointer Uniform %6
+ %66 = OpTypePointer Output %10
+ %67 = OpVariable %66 Output
+ %68 = OpConstant %9 0
+ %72 = OpTypeVector %9 2
+ %74 = OpTypeStruct %72
+ %75 = OpTypePointer Uniform %74
+ %76 = OpVariable %75 Uniform
+ %77 = OpTypePointer Uniform %72
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ %82 = OpVariable %8 Function
+ OpStore %16 %17
+ %69 = OpAccessChain %40 %39 %17 %28
+ %70 = OpLoad %6 %69
+ %71 = OpConvertSToF %9 %70
+ %73 = OpCompositeConstruct %72 %68 %71
+ %78 = OpAccessChain %77 %76 %17
+ %79 = OpLoad %72 %78
+ %80 = OpFDiv %72 %73 %79
+ %81 = OpConvertFToS %7 %80
+ OpStore %82 %81
+ %83 = OpFunctionCall %10 %13 %82
+ OpStore %67 %83
+ OpReturn
+ OpFunctionEnd
+ %13 = OpFunction %10 None %11
+ %12 = OpFunctionParameter %8
+ %14 = OpLabel
+ OpBranch %18
+ %18 = OpLabel
+ OpLoopMerge %20 %21 None
+ OpBranch %22
+ %22 = OpLabel
+ %23 = OpLoad %6 %16
+ %26 = OpSLessThan %25 %23 %24
+ OpBranchConditional %26 %19 %20
+ %19 = OpLabel
+ %27 = OpLoad %6 %16
+ %29 = OpIAdd %6 %27 %28
+ OpStore %16 %29
+ %33 = OpAccessChain %32 %12 %31
+ %34 = OpLoad %6 %33
+ %41 = OpAccessChain %40 %39 %17 %28
+ %42 = OpLoad %6 %41
+ %43 = OpSLessThan %25 %34 %42
+ OpSelectionMerge %45 None
+ OpBranchConditional %43 %44 %45
+ %44 = OpLabel
+ %46 = OpAccessChain %40 %39 %17 %28
+ %47 = OpLoad %6 %46
+ %48 = OpConvertSToF %9 %47
+ %49 = OpAccessChain %40 %39 %17 %17
+ %50 = OpLoad %6 %49
+ %51 = OpConvertSToF %9 %50
+ %52 = OpAccessChain %40 %39 %17 %17
+ %53 = OpLoad %6 %52
+ %54 = OpConvertSToF %9 %53
+ %55 = OpAccessChain %40 %39 %17 %28
+ %56 = OpLoad %6 %55
+ %57 = OpConvertSToF %9 %56
+ %58 = OpCompositeConstruct %10 %48 %51 %54 %57
+ OpReturnValue %58
+ %45 = OpLabel
+ OpBranch %21
+ %21 = OpLabel
+ OpBranch %18
+ %20 = OpLabel
+ %60 = OpAccessChain %40 %39 %17 %17
+ %61 = OpLoad %6 %60
+ %62 = OpConvertSToF %9 %61
+ %63 = OpCompositeConstruct %10 %62 %62 %62 %62
+ OpReturnValue %63
+ OpFunctionEnd
+END
+
+# uniforms for variant
+
+# resolution
+BUFFER variant_resolution DATA_TYPE vec2<float> STD140 DATA
+ 0.2501191 0.1597625
+END
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 0 1
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+ ATTACH variant_vertex_shader
+ ATTACH variant_fragment_shader
+ FRAMEBUFFER_SIZE 32 32
+ BIND BUFFER variant_framebuffer AS color LOCATION 0
+ BIND BUFFER variant_resolution AS uniform DESCRIPTOR_SET 0 BINDING 1
+ BIND BUFFER variant__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 0
+END
+CLEAR_COLOR variant_pipeline 0 0 0 255
+
+CLEAR variant_pipeline
+RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 32 32
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 255 0 0 255
--- /dev/null
+#!amber
+
+# Copyright 2022 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+# A test for a coverage-gap found by the GraphicsFuzz project.
+
+# Short description: A fragment shader that covers specific LLVM code paths
+
+# The test passes because the shader always writes red.
+
+SHADER vertex variant_vertex_shader PASSTHROUGH
+
+# variant_fragment_shader is derived from the following GLSL:
+# #version 320 es
+# #define _int_0 _GLF_uniform_int_values[0]
+# #define _int_1 _GLF_uniform_int_values[1]
+# #define _float_0_0 _GLF_uniform_float_values[0]
+#
+# precision highp float;
+# precision highp int;
+#
+# // Contents of _GLF_uniform_float_values: 0.0
+# layout(set = 0, binding = 0) uniform buf0
+# {
+# float _GLF_uniform_float_values[1];
+# };
+#
+# // Contents of _GLF_uniform_int_values: [0, 1]
+# layout(set = 0, binding = 1) uniform buf1
+# {
+# int _GLF_uniform_int_values[2];
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# float func()
+# {
+# // 1u unpacked as a half float is a number very close to zero.
+# // Rounding it makes it exactly zero.
+# return round(unpackHalf2x16(1u)).x;
+# }
+#
+# void main()
+# {
+# // Always true.
+# if(func() == _float_0_0)
+# {
+# _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1);
+# }
+# else
+# {
+# _GLF_color = vec4(_int_0);
+# }
+# }
+SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 10
+; Bound: 64
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %38
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %8 "func("
+ OpName %24 "buf0"
+ OpMemberName %24 0 "_GLF_uniform_float_values"
+ OpName %26 ""
+ OpName %38 "_GLF_color"
+ OpName %41 "buf1"
+ OpMemberName %41 0 "_GLF_uniform_int_values"
+ OpName %43 ""
+ OpDecorate %14 RelaxedPrecision
+ OpDecorate %16 RelaxedPrecision
+ OpDecorate %23 ArrayStride 16
+ OpMemberDecorate %24 0 Offset 0
+ OpDecorate %24 Block
+ OpDecorate %26 DescriptorSet 0
+ OpDecorate %26 Binding 0
+ OpDecorate %38 Location 0
+ OpDecorate %40 ArrayStride 16
+ OpMemberDecorate %41 0 Offset 0
+ OpDecorate %41 Block
+ OpDecorate %43 DescriptorSet 0
+ OpDecorate %43 Binding 1
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeFloat 32
+ %7 = OpTypeFunction %6
+ %10 = OpTypeInt 32 0
+ %11 = OpConstant %10 1
+ %12 = OpTypeVector %6 2
+ %15 = OpConstant %10 0
+ %17 = OpTypePointer Function %6
+ %23 = OpTypeArray %6 %11
+ %24 = OpTypeStruct %23
+ %25 = OpTypePointer Uniform %24
+ %26 = OpVariable %25 Uniform
+ %27 = OpTypeInt 32 1
+ %28 = OpConstant %27 0
+ %29 = OpTypePointer Uniform %6
+ %32 = OpTypeBool
+ %36 = OpTypeVector %6 4
+ %37 = OpTypePointer Output %36
+ %38 = OpVariable %37 Output
+ %39 = OpConstant %10 2
+ %40 = OpTypeArray %27 %39
+ %41 = OpTypeStruct %40
+ %42 = OpTypePointer Uniform %41
+ %43 = OpVariable %42 Uniform
+ %44 = OpConstant %27 1
+ %45 = OpTypePointer Uniform %27
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ %22 = OpFunctionCall %6 %8
+ %30 = OpAccessChain %29 %26 %28 %28
+ %31 = OpLoad %6 %30
+ %33 = OpFOrdEqual %32 %22 %31
+ OpSelectionMerge %35 None
+ OpBranchConditional %33 %34 %59
+ %34 = OpLabel
+ %46 = OpAccessChain %45 %43 %28 %44
+ %47 = OpLoad %27 %46
+ %48 = OpConvertSToF %6 %47
+ %49 = OpAccessChain %45 %43 %28 %28
+ %50 = OpLoad %27 %49
+ %51 = OpConvertSToF %6 %50
+ %52 = OpAccessChain %45 %43 %28 %28
+ %53 = OpLoad %27 %52
+ %54 = OpConvertSToF %6 %53
+ %55 = OpAccessChain %45 %43 %28 %44
+ %56 = OpLoad %27 %55
+ %57 = OpConvertSToF %6 %56
+ %58 = OpCompositeConstruct %36 %48 %51 %54 %57
+ OpStore %38 %58
+ OpBranch %35
+ %59 = OpLabel
+ %60 = OpAccessChain %45 %43 %28 %28
+ %61 = OpLoad %27 %60
+ %62 = OpConvertSToF %6 %61
+ %63 = OpCompositeConstruct %36 %62 %62 %62 %62
+ OpStore %38 %63
+ OpBranch %35
+ %35 = OpLabel
+ OpReturn
+ OpFunctionEnd
+ %8 = OpFunction %6 None %7
+ %9 = OpLabel
+ %18 = OpVariable %17 Function
+ %13 = OpExtInst %12 %1 UnpackHalf2x16 %11
+ %14 = OpExtInst %12 %1 Round %13
+ %16 = OpCompositeExtract %6 %14 0
+ OpStore %18 %16
+ %19 = OpLoad %6 %18
+ OpReturnValue %19
+ OpFunctionEnd
+END
+
+# uniforms for variant
+
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 0 1
+END
+# _GLF_uniform_float_values
+BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA
+ 0.0
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+ ATTACH variant_vertex_shader
+ ATTACH variant_fragment_shader
+ FRAMEBUFFER_SIZE 32 32
+ BIND BUFFER variant_framebuffer AS color LOCATION 0
+ BIND BUFFER variant__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 1
+ BIND BUFFER variant__GLF_uniform_float_values AS uniform DESCRIPTOR_SET 0 BINDING 0
+END
+CLEAR_COLOR variant_pipeline 0 0 0 255
+
+CLEAR variant_pipeline
+RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 32 32
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 255 0 0 255
--- /dev/null
+#!amber
+
+# Copyright 2022 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+# A test for a coverage-gap found by the GraphicsFuzz project.
+
+# Short description: A fragment shader that covers specific LLVM code paths
+
+# The test passes because the shader always writes red.
+
+# Optimized using spirv-opt with the following arguments:
+# '-Os'
+# spirv-opt commit hash: a0370efd589be33d5d9a85cfde2f85841b3755af
+
+
+
+SHADER vertex variant_vertex_shader PASSTHROUGH
+
+# variant_fragment_shader is derived from the following GLSL:
+# #version 320 es
+# #define _int_0 _GLF_uniform_int_values[0]
+# #define _int_1 _GLF_uniform_int_values[1]
+# #define _float_0_25 _GLF_uniform_float_values[0]
+# #define _float_1_0 _GLF_uniform_float_values[1]
+#
+# precision highp float;
+# precision highp int;
+#
+# // Contents of _GLF_uniform_float_values: [0.25, 1.0]
+# layout(set = 0, binding = 0) uniform buf0
+# {
+# float _GLF_uniform_float_values[2];
+# };
+#
+# // Contents of _GLF_uniform_int_values: [0, 1]
+# layout(set = 0, binding = 1) uniform buf1
+# {
+# int _GLF_uniform_int_values[2];
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# float func(vec2 v)
+# {
+# switch(1)
+# {
+# case 0:
+# return 1.0;
+# case 1:
+# // Trasposing an identity matrix has no effect. The line below simplifies to
+# // clamp(vec2(0.25, 0.25, vec2(0.5, 0.5), vec2(1.0, 1.0))).x = vec2(0.5, 0.5).x = 0.5
+# return clamp(vec2(transpose(mat4(_float_0_25))), v, vec2(transpose(mat4(_float_1_0)))).x;
+# }
+# }
+#
+# void main()
+# {
+# // The fraction parts of gl_FragCoord components are always 0.5 (the center of the pixel).
+# // The function returns 0.5.
+# if(func(fract(gl_FragCoord.xy)) == 0.5)
+# {
+# _GLF_color = vec4(1, _int_0, _int_0, _int_1);
+# }
+# else
+# {
+# _GLF_color = vec4(_int_0);
+# }
+# }
+SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 10
+; Bound: 124
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %61 %73
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %23 "buf0"
+ OpMemberName %23 0 "_GLF_uniform_float_values"
+ OpName %25 ""
+ OpName %61 "gl_FragCoord"
+ OpName %73 "_GLF_color"
+ OpName %75 "buf1"
+ OpMemberName %75 0 "_GLF_uniform_int_values"
+ OpName %77 ""
+ OpDecorate %22 ArrayStride 16
+ OpMemberDecorate %23 0 Offset 0
+ OpDecorate %23 Block
+ OpDecorate %25 DescriptorSet 0
+ OpDecorate %25 Binding 0
+ OpDecorate %61 BuiltIn FragCoord
+ OpDecorate %73 Location 0
+ OpDecorate %74 ArrayStride 16
+ OpMemberDecorate %75 0 Offset 0
+ OpDecorate %75 Block
+ OpDecorate %77 DescriptorSet 0
+ OpDecorate %77 Binding 1
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeFloat 32
+ %7 = OpTypeVector %6 2
+ %13 = OpTypeInt 32 1
+ %14 = OpConstant %13 1
+ %18 = OpConstant %6 1
+ %20 = OpTypeInt 32 0
+ %21 = OpConstant %20 2
+ %22 = OpTypeArray %6 %21
+ %23 = OpTypeStruct %22
+ %24 = OpTypePointer Uniform %23
+ %25 = OpVariable %24 Uniform
+ %26 = OpConstant %13 0
+ %27 = OpTypePointer Uniform %6
+ %30 = OpTypeVector %6 4
+ %31 = OpTypeMatrix %30 4
+ %32 = OpConstant %6 0
+ %60 = OpTypePointer Input %30
+ %61 = OpVariable %60 Input
+ %67 = OpConstant %6 0.5
+ %68 = OpTypeBool
+ %72 = OpTypePointer Output %30
+ %73 = OpVariable %72 Output
+ %74 = OpTypeArray %13 %21
+ %75 = OpTypeStruct %74
+ %76 = OpTypePointer Uniform %75
+ %77 = OpVariable %76 Uniform
+ %78 = OpTypePointer Uniform %13
+ %123 = OpUndef %6
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ %62 = OpLoad %30 %61
+ %63 = OpVectorShuffle %7 %62 %62 0 1
+ %64 = OpExtInst %7 %1 Fract %63
+ %98 = OpAccessChain %27 %25 %26 %26
+ %99 = OpLoad %6 %98
+ %100 = OpCompositeConstruct %30 %99 %32 %32 %32
+ %101 = OpCompositeConstruct %30 %32 %99 %32 %32
+ %102 = OpCompositeConstruct %30 %32 %32 %99 %32
+ %103 = OpCompositeConstruct %30 %32 %32 %32 %99
+ %104 = OpCompositeConstruct %31 %100 %101 %102 %103
+ %105 = OpTranspose %31 %104
+ %106 = OpCompositeExtract %6 %105 0 0
+ %108 = OpCompositeConstruct %7 %106 %123
+ %110 = OpAccessChain %27 %25 %26 %14
+ %111 = OpLoad %6 %110
+ %112 = OpCompositeConstruct %30 %111 %32 %32 %32
+ %113 = OpCompositeConstruct %30 %32 %111 %32 %32
+ %114 = OpCompositeConstruct %30 %32 %32 %111 %32
+ %115 = OpCompositeConstruct %30 %32 %32 %32 %111
+ %116 = OpCompositeConstruct %31 %112 %113 %114 %115
+ %117 = OpTranspose %31 %116
+ %118 = OpCompositeExtract %6 %117 0 0
+ %120 = OpCompositeConstruct %7 %118 %123
+ %121 = OpExtInst %7 %1 FClamp %108 %64 %120
+ %122 = OpCompositeExtract %6 %121 0
+ %69 = OpFOrdEqual %68 %122 %67
+ OpSelectionMerge %71 None
+ OpBranchConditional %69 %70 %89
+ %89 = OpLabel
+ %90 = OpAccessChain %78 %77 %26 %26
+ %91 = OpLoad %13 %90
+ %92 = OpConvertSToF %6 %91
+ %93 = OpCompositeConstruct %30 %92 %92 %92 %92
+ OpStore %73 %93
+ OpBranch %71
+ %70 = OpLabel
+ %79 = OpAccessChain %78 %77 %26 %26
+ %80 = OpLoad %13 %79
+ %81 = OpConvertSToF %6 %80
+ %85 = OpAccessChain %78 %77 %26 %14
+ %86 = OpLoad %13 %85
+ %87 = OpConvertSToF %6 %86
+ %88 = OpCompositeConstruct %30 %18 %81 %81 %87
+ OpStore %73 %88
+ OpBranch %71
+ %71 = OpLabel
+ OpReturn
+ OpFunctionEnd
+END
+
+# uniforms for variant
+
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 0 1
+END
+# _GLF_uniform_float_values
+BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA
+ 0.25 1.0
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+ ATTACH variant_vertex_shader
+ ATTACH variant_fragment_shader
+ FRAMEBUFFER_SIZE 32 32
+ BIND BUFFER variant_framebuffer AS color LOCATION 0
+ BIND BUFFER variant__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 1
+ BIND BUFFER variant__GLF_uniform_float_values AS uniform DESCRIPTOR_SET 0 BINDING 0
+END
+CLEAR_COLOR variant_pipeline 0 0 0 255
+
+CLEAR variant_pipeline
+RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 32 32
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 255 0 0 255
--- /dev/null
+#!amber
+
+# Copyright 2022 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+# A test for a coverage-gap found by the GraphicsFuzz project.
+
+# Short description: A fragment shader that covers specific LLVM code paths
+
+# The test passes because the shader always writes red.
+
+SHADER vertex variant_vertex_shader PASSTHROUGH
+
+# variant_fragment_shader is derived from the following GLSL:
+# #version 320 es
+#
+# #define _int_1 _GLF_uniform_int_values[0]
+# #define _int_0 _GLF_uniform_int_values[1]
+# #define _uint_1 _GLF_uniform_uint_values[0]
+# #define _uint_0 _GLF_uniform_uint_values[1]
+# #define _float_8_0 _GLF_uniform_float_values[0]
+# #define _float_1_0 _GLF_uniform_float_values[1]
+# #define _float_2_0 _GLF_uniform_float_values[2]
+# #define _float_3_0 _GLF_uniform_float_values[3]
+# #define _float_4_0 _GLF_uniform_float_values[4]
+# #define _float_5_0 _GLF_uniform_float_values[5]
+# #define _float_6_0 _GLF_uniform_float_values[6]
+# #define _float_7_0 _GLF_uniform_float_values[7]
+# #define _float_9_0 _GLF_uniform_float_values[8]
+# #define _float_10_0 _GLF_uniform_float_values[9]
+#
+# precision highp float;
+# precision highp int;
+#
+# // Contents of _GLF_uniform_float_values: [8.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 9.0, 10.0]
+# layout(set = 0, binding = 0) uniform buf0
+# {
+# float _GLF_uniform_float_values[10];
+# };
+#
+# // Contents of _GLF_uniform_int_values: [1, 0]
+# layout(set = 0, binding = 1) uniform buf1
+# {
+# int _GLF_uniform_int_values[2];
+# };
+#
+# // Contents of _GLF_uniform_uint_values: [1, 0]
+# layout(set = 0, binding = 2) uniform buf2
+# {
+# uint _GLF_uniform_uint_values[2];
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# void main()
+# {
+# uint a = _uint_1;
+# int b = _int_1;
+# float arr[5] = float[5](_float_1_0, _float_2_0, _float_3_0, _float_4_0, _float_5_0);
+# // arr[1] += 6.
+# arr[b] += float[5](_float_6_0, _float_7_0, _float_8_0, _float_9_0, _float_10_0)[usubBorrow(1u, 1u, a)];
+#
+# // Always true.
+# if(arr[_int_1] == _float_8_0 && a == _uint_0)
+# {
+# _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1);
+# }
+# else
+# {
+# _GLF_color = vec4(_int_0);
+# }
+# }
+SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 10
+; Bound: 122
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %103
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %8 "a"
+ OpName %11 "buf2"
+ OpMemberName %11 0 "_GLF_uniform_uint_values"
+ OpName %13 ""
+ OpName %20 "b"
+ OpName %22 "buf1"
+ OpMemberName %22 0 "_GLF_uniform_int_values"
+ OpName %24 ""
+ OpName %32 "arr"
+ OpName %35 "buf0"
+ OpMemberName %35 0 "_GLF_uniform_float_values"
+ OpName %37 ""
+ OpName %72 "ResType"
+ OpName %76 "indexable"
+ OpName %103 "_GLF_color"
+ OpDecorate %10 ArrayStride 16
+ OpMemberDecorate %11 0 Offset 0
+ OpDecorate %11 Block
+ OpDecorate %13 DescriptorSet 0
+ OpDecorate %13 Binding 2
+ OpDecorate %21 ArrayStride 16
+ OpMemberDecorate %22 0 Offset 0
+ OpDecorate %22 Block
+ OpDecorate %24 DescriptorSet 0
+ OpDecorate %24 Binding 1
+ OpDecorate %34 ArrayStride 16
+ OpMemberDecorate %35 0 Offset 0
+ OpDecorate %35 Block
+ OpDecorate %37 DescriptorSet 0
+ OpDecorate %37 Binding 0
+ OpDecorate %103 Location 0
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeInt 32 0
+ %7 = OpTypePointer Function %6
+ %9 = OpConstant %6 2
+ %10 = OpTypeArray %6 %9
+ %11 = OpTypeStruct %10
+ %12 = OpTypePointer Uniform %11
+ %13 = OpVariable %12 Uniform
+ %14 = OpTypeInt 32 1
+ %15 = OpConstant %14 0
+ %16 = OpTypePointer Uniform %6
+ %19 = OpTypePointer Function %14
+ %21 = OpTypeArray %14 %9
+ %22 = OpTypeStruct %21
+ %23 = OpTypePointer Uniform %22
+ %24 = OpVariable %23 Uniform
+ %25 = OpTypePointer Uniform %14
+ %28 = OpTypeFloat 32
+ %29 = OpConstant %6 5
+ %30 = OpTypeArray %28 %29
+ %31 = OpTypePointer Function %30
+ %33 = OpConstant %6 10
+ %34 = OpTypeArray %28 %33
+ %35 = OpTypeStruct %34
+ %36 = OpTypePointer Uniform %35
+ %37 = OpVariable %36 Uniform
+ %38 = OpConstant %14 1
+ %39 = OpTypePointer Uniform %28
+ %42 = OpConstant %14 2
+ %45 = OpConstant %14 3
+ %48 = OpConstant %14 4
+ %51 = OpConstant %14 5
+ %56 = OpConstant %14 6
+ %59 = OpConstant %14 7
+ %64 = OpConstant %14 8
+ %67 = OpConstant %14 9
+ %71 = OpConstant %6 1
+ %72 = OpTypeStruct %6 %6
+ %77 = OpTypePointer Function %28
+ %84 = OpTypeBool
+ %101 = OpTypeVector %28 4
+ %102 = OpTypePointer Output %101
+ %103 = OpVariable %102 Output
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ %8 = OpVariable %7 Function
+ %20 = OpVariable %19 Function
+ %32 = OpVariable %31 Function
+ %76 = OpVariable %31 Function
+ %17 = OpAccessChain %16 %13 %15 %15
+ %18 = OpLoad %6 %17
+ OpStore %8 %18
+ %26 = OpAccessChain %25 %24 %15 %15
+ %27 = OpLoad %14 %26
+ OpStore %20 %27
+ %40 = OpAccessChain %39 %37 %15 %38
+ %41 = OpLoad %28 %40
+ %43 = OpAccessChain %39 %37 %15 %42
+ %44 = OpLoad %28 %43
+ %46 = OpAccessChain %39 %37 %15 %45
+ %47 = OpLoad %28 %46
+ %49 = OpAccessChain %39 %37 %15 %48
+ %50 = OpLoad %28 %49
+ %52 = OpAccessChain %39 %37 %15 %51
+ %53 = OpLoad %28 %52
+ %54 = OpCompositeConstruct %30 %41 %44 %47 %50 %53
+ OpStore %32 %54
+ %55 = OpLoad %14 %20
+ %57 = OpAccessChain %39 %37 %15 %56
+ %58 = OpLoad %28 %57
+ %60 = OpAccessChain %39 %37 %15 %59
+ %61 = OpLoad %28 %60
+ %62 = OpAccessChain %39 %37 %15 %15
+ %63 = OpLoad %28 %62
+ %65 = OpAccessChain %39 %37 %15 %64
+ %66 = OpLoad %28 %65
+ %68 = OpAccessChain %39 %37 %15 %67
+ %69 = OpLoad %28 %68
+ %70 = OpCompositeConstruct %30 %58 %61 %63 %66 %69
+ %73 = OpISubBorrow %72 %71 %71
+ %74 = OpCompositeExtract %6 %73 1
+ OpStore %8 %74
+ %75 = OpCompositeExtract %6 %73 0
+ OpStore %76 %70
+ %78 = OpAccessChain %77 %76 %75
+ %79 = OpLoad %28 %78
+ %80 = OpAccessChain %77 %32 %55
+ %81 = OpLoad %28 %80
+ %82 = OpFAdd %28 %81 %79
+ %83 = OpAccessChain %77 %32 %55
+ OpStore %83 %82
+ %85 = OpAccessChain %25 %24 %15 %15
+ %86 = OpLoad %14 %85
+ %87 = OpAccessChain %77 %32 %86
+ %88 = OpLoad %28 %87
+ %89 = OpAccessChain %39 %37 %15 %15
+ %90 = OpLoad %28 %89
+ %91 = OpFOrdEqual %84 %88 %90
+ OpSelectionMerge %93 None
+ OpBranchConditional %91 %92 %93
+ %92 = OpLabel
+ %94 = OpLoad %6 %8
+ %95 = OpAccessChain %16 %13 %15 %38
+ %96 = OpLoad %6 %95
+ %97 = OpIEqual %84 %94 %96
+ OpBranch %93
+ %93 = OpLabel
+ %98 = OpPhi %84 %91 %5 %97 %92
+ OpSelectionMerge %100 None
+ OpBranchConditional %98 %99 %117
+ %99 = OpLabel
+ %104 = OpAccessChain %25 %24 %15 %15
+ %105 = OpLoad %14 %104
+ %106 = OpConvertSToF %28 %105
+ %107 = OpAccessChain %25 %24 %15 %38
+ %108 = OpLoad %14 %107
+ %109 = OpConvertSToF %28 %108
+ %110 = OpAccessChain %25 %24 %15 %38
+ %111 = OpLoad %14 %110
+ %112 = OpConvertSToF %28 %111
+ %113 = OpAccessChain %25 %24 %15 %15
+ %114 = OpLoad %14 %113
+ %115 = OpConvertSToF %28 %114
+ %116 = OpCompositeConstruct %101 %106 %109 %112 %115
+ OpStore %103 %116
+ OpBranch %100
+ %117 = OpLabel
+ %118 = OpAccessChain %25 %24 %15 %38
+ %119 = OpLoad %14 %118
+ %120 = OpConvertSToF %28 %119
+ %121 = OpCompositeConstruct %101 %120 %120 %120 %120
+ OpStore %103 %121
+ OpBranch %100
+ %100 = OpLabel
+ OpReturn
+ OpFunctionEnd
+END
+
+# uniforms for variant
+
+# _GLF_uniform_uint_values
+BUFFER variant__GLF_uniform_uint_values DATA_TYPE int32[] STD140 DATA
+ 1 0
+END
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 1 0
+END
+# _GLF_uniform_float_values
+BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA
+ 8.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 9.0 10.0
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+ ATTACH variant_vertex_shader
+ ATTACH variant_fragment_shader
+ FRAMEBUFFER_SIZE 32 32
+ BIND BUFFER variant_framebuffer AS color LOCATION 0
+ BIND BUFFER variant__GLF_uniform_uint_values AS uniform DESCRIPTOR_SET 0 BINDING 2
+ BIND BUFFER variant__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 1
+ BIND BUFFER variant__GLF_uniform_float_values AS uniform DESCRIPTOR_SET 0 BINDING 0
+END
+CLEAR_COLOR variant_pipeline 0 0 0 255
+
+CLEAR variant_pipeline
+RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 32 32
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 255 0 0 255
--- /dev/null
+#!amber
+
+# Copyright 2022 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+# A test for a coverage-gap found by the GraphicsFuzz project.
+
+# Short description: A fragment shader that covers specific LLVM code paths
+
+# The test passes because the shader always writes red.
+
+# Optimized using spirv-opt with the following arguments:
+# '-O'
+# spirv-opt commit hash: a0370efd589be33d5d9a85cfde2f85841b3755af
+
+
+
+SHADER vertex variant_vertex_shader PASSTHROUGH
+
+# variant_fragment_shader is derived from the following GLSL:
+# #version 320 es
+#
+# precision highp float;
+# precision highp int;
+#
+# const int _GLF_global_loop_bound = 10;
+# int _GLF_global_loop_count = 0;
+#
+# // Contents of injectionSwitch: [0.0, 1.0]
+# layout(set = 0, binding = 0) uniform buf0
+# {
+# highp vec2 injectionSwitch;
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# void main()
+# {
+# _GLF_color = vec4(0);
+#
+# int a = 0;
+#
+# // None of the returns, discards, or continues are executed in this loop, except for the return at the end.
+# do
+# {
+# _GLF_global_loop_count ++;
+#
+# 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;
+# 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;
+# 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;
+# 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;
+# 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;
+# 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;
+# 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;
+# 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;
+# 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;
+# 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;
+# 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;
+#
+# a++;
+#
+# // Always false.
+# if(a == 0)
+# {
+# 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;
+# 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;
+#
+# while (_GLF_global_loop_count < _GLF_global_loop_bound)
+# {
+# _GLF_global_loop_count ++;
+#
+# if(gl_FragCoord.x < 0.0) return;
+#
+# 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;
+# 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;
+# }
+#
+# if(gl_FragCoord.x < 0.0) discard; if(gl_FragCoord.x < 0.0) discard;
+# }
+# else
+# {
+# 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;
+# 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;
+# 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;
+# 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;
+# 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;
+# 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;
+# 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;
+# 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;
+# 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;
+# 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;
+# 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;
+# 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;
+# 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;
+# 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;
+# 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;
+# if(gl_FragCoord.x < 0.0) discard;
+#
+# if(injectionSwitch.x > injectionSwitch.y)
+# {
+# if(gl_FragCoord.x < 0.0) return;
+# if(gl_FragCoord.x < 0.0) continue;
+#
+# discard;
+# }
+#
+# }
+#
+# if(gl_FragCoord.x < 0.0) discard;
+# if(gl_FragCoord.x < 0.0) continue;
+#
+# _GLF_color = vec4(1, 0, 0, 1);
+#
+# return;
+# }
+# while(_GLF_global_loop_count < _GLF_global_loop_bound);
+# }
+SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 10
+; Bound: 857
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %13 %26
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %13 "_GLF_color"
+ OpName %26 "gl_FragCoord"
+ OpName %793 "buf0"
+ OpMemberName %793 0 "injectionSwitch"
+ OpName %795 ""
+ OpDecorate %13 Location 0
+ OpDecorate %26 BuiltIn FragCoord
+ OpMemberDecorate %793 0 Offset 0
+ OpDecorate %793 Block
+ OpDecorate %795 DescriptorSet 0
+ OpDecorate %795 Binding 0
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeInt 32 1
+ %9 = OpConstant %6 0
+ %10 = OpTypeFloat 32
+ %11 = OpTypeVector %10 4
+ %12 = OpTypePointer Output %11
+ %13 = OpVariable %12 Output
+ %14 = OpConstant %10 0
+ %15 = OpConstantComposite %11 %14 %14 %14 %14
+ %23 = OpConstant %6 1
+ %25 = OpTypePointer Input %11
+ %26 = OpVariable %25 Input
+ %27 = OpTypeInt 32 0
+ %28 = OpConstant %27 0
+ %29 = OpTypePointer Input %10
+ %32 = OpTypeBool
+ %355 = OpConstant %6 10
+ %792 = OpTypeVector %10 2
+ %793 = OpTypeStruct %792
+ %794 = OpTypePointer Uniform %793
+ %795 = OpVariable %794 Uniform
+ %796 = OpTypePointer Uniform %10
+ %799 = OpConstant %27 1
+ %830 = OpConstant %10 1
+ %831 = OpConstantComposite %11 %830 %14 %14 %830
+ %837 = OpConstantFalse %32
+ %840 = OpConstantTrue %32
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ OpSelectionMerge %835 None
+ OpSwitch %28 %836
+ %836 = OpLabel
+ OpStore %13 %15
+ OpBranch %18
+ %18 = OpLabel
+ %850 = OpPhi %32 %837 %836 %855 %21
+ %846 = OpPhi %6 %9 %836 %296 %21
+ %845 = OpPhi %6 %9 %836 %851 %21
+ OpLoopMerge %20 %21 None
+ OpBranch %19
+ %19 = OpLabel
+ %24 = OpIAdd %6 %845 %23
+ %30 = OpAccessChain %29 %26 %28
+ %31 = OpLoad %10 %30
+ %33 = OpFOrdLessThan %32 %31 %14
+ OpSelectionMerge %35 None
+ OpBranchConditional %33 %34 %35
+ %34 = OpLabel
+ OpBranch %20
+ %35 = OpLabel
+ OpSelectionMerge %41 None
+ OpBranchConditional %33 %40 %41
+ %40 = OpLabel
+ OpBranch %20
+ %41 = OpLabel
+ OpSelectionMerge %47 None
+ OpBranchConditional %33 %46 %47
+ %46 = OpLabel
+ OpBranch %20
+ %47 = OpLabel
+ OpSelectionMerge %53 None
+ OpBranchConditional %33 %52 %53
+ %52 = OpLabel
+ OpBranch %20
+ %53 = OpLabel
+ OpSelectionMerge %59 None
+ OpBranchConditional %33 %58 %59
+ %58 = OpLabel
+ OpBranch %20
+ %59 = OpLabel
+ OpSelectionMerge %65 None
+ OpBranchConditional %33 %64 %65
+ %64 = OpLabel
+ OpBranch %20
+ %65 = OpLabel
+ OpSelectionMerge %71 None
+ OpBranchConditional %33 %70 %71
+ %70 = OpLabel
+ OpBranch %20
+ %71 = OpLabel
+ OpSelectionMerge %77 None
+ OpBranchConditional %33 %76 %77
+ %76 = OpLabel
+ OpBranch %20
+ %77 = OpLabel
+ OpSelectionMerge %83 None
+ OpBranchConditional %33 %82 %83
+ %82 = OpLabel
+ OpBranch %20
+ %83 = OpLabel
+ OpSelectionMerge %89 None
+ OpBranchConditional %33 %88 %89
+ %88 = OpLabel
+ OpBranch %20
+ %89 = OpLabel
+ OpSelectionMerge %95 None
+ OpBranchConditional %33 %94 %95
+ %94 = OpLabel
+ OpBranch %20
+ %95 = OpLabel
+ OpSelectionMerge %101 None
+ OpBranchConditional %33 %100 %101
+ %100 = OpLabel
+ OpBranch %20
+ %101 = OpLabel
+ OpSelectionMerge %107 None
+ OpBranchConditional %33 %106 %107
+ %106 = OpLabel
+ OpBranch %20
+ %107 = OpLabel
+ OpSelectionMerge %113 None
+ OpBranchConditional %33 %112 %113
+ %112 = OpLabel
+ OpBranch %20
+ %113 = OpLabel
+ OpSelectionMerge %119 None
+ OpBranchConditional %33 %118 %119
+ %118 = OpLabel
+ OpBranch %20
+ %119 = OpLabel
+ OpSelectionMerge %125 None
+ OpBranchConditional %33 %124 %125
+ %124 = OpLabel
+ OpBranch %20
+ %125 = OpLabel
+ OpSelectionMerge %131 None
+ OpBranchConditional %33 %130 %131
+ %130 = OpLabel
+ OpBranch %20
+ %131 = OpLabel
+ OpSelectionMerge %137 None
+ OpBranchConditional %33 %136 %137
+ %136 = OpLabel
+ OpBranch %20
+ %137 = OpLabel
+ OpSelectionMerge %143 None
+ OpBranchConditional %33 %142 %143
+ %142 = OpLabel
+ OpBranch %20
+ %143 = OpLabel
+ OpSelectionMerge %149 None
+ OpBranchConditional %33 %148 %149
+ %148 = OpLabel
+ OpBranch %20
+ %149 = OpLabel
+ OpSelectionMerge %155 None
+ OpBranchConditional %33 %154 %155
+ %154 = OpLabel
+ OpBranch %20
+ %155 = OpLabel
+ OpSelectionMerge %161 None
+ OpBranchConditional %33 %160 %161
+ %160 = OpLabel
+ OpBranch %20
+ %161 = OpLabel
+ OpSelectionMerge %167 None
+ OpBranchConditional %33 %166 %167
+ %166 = OpLabel
+ OpBranch %20
+ %167 = OpLabel
+ OpSelectionMerge %173 None
+ OpBranchConditional %33 %172 %173
+ %172 = OpLabel
+ OpBranch %20
+ %173 = OpLabel
+ OpSelectionMerge %179 None
+ OpBranchConditional %33 %178 %179
+ %178 = OpLabel
+ OpBranch %20
+ %179 = OpLabel
+ OpSelectionMerge %185 None
+ OpBranchConditional %33 %184 %185
+ %184 = OpLabel
+ OpBranch %20
+ %185 = OpLabel
+ OpSelectionMerge %191 None
+ OpBranchConditional %33 %190 %191
+ %190 = OpLabel
+ OpBranch %20
+ %191 = OpLabel
+ OpSelectionMerge %197 None
+ OpBranchConditional %33 %196 %197
+ %196 = OpLabel
+ OpBranch %20
+ %197 = OpLabel
+ OpSelectionMerge %203 None
+ OpBranchConditional %33 %202 %203
+ %202 = OpLabel
+ OpBranch %20
+ %203 = OpLabel
+ OpSelectionMerge %209 None
+ OpBranchConditional %33 %208 %209
+ %208 = OpLabel
+ OpBranch %20
+ %209 = OpLabel
+ OpSelectionMerge %215 None
+ OpBranchConditional %33 %214 %215
+ %214 = OpLabel
+ OpBranch %20
+ %215 = OpLabel
+ OpSelectionMerge %221 None
+ OpBranchConditional %33 %220 %221
+ %220 = OpLabel
+ OpBranch %20
+ %221 = OpLabel
+ OpSelectionMerge %227 None
+ OpBranchConditional %33 %226 %227
+ %226 = OpLabel
+ OpBranch %20
+ %227 = OpLabel
+ OpSelectionMerge %233 None
+ OpBranchConditional %33 %232 %233
+ %232 = OpLabel
+ OpBranch %20
+ %233 = OpLabel
+ OpSelectionMerge %239 None
+ OpBranchConditional %33 %238 %239
+ %238 = OpLabel
+ OpBranch %20
+ %239 = OpLabel
+ OpSelectionMerge %245 None
+ OpBranchConditional %33 %244 %245
+ %244 = OpLabel
+ OpBranch %20
+ %245 = OpLabel
+ OpSelectionMerge %251 None
+ OpBranchConditional %33 %250 %251
+ %250 = OpLabel
+ OpBranch %20
+ %251 = OpLabel
+ OpSelectionMerge %257 None
+ OpBranchConditional %33 %256 %257
+ %256 = OpLabel
+ OpBranch %20
+ %257 = OpLabel
+ OpSelectionMerge %263 None
+ OpBranchConditional %33 %262 %263
+ %262 = OpLabel
+ OpBranch %20
+ %263 = OpLabel
+ OpSelectionMerge %269 None
+ OpBranchConditional %33 %268 %269
+ %268 = OpLabel
+ OpBranch %20
+ %269 = OpLabel
+ OpSelectionMerge %275 None
+ OpBranchConditional %33 %274 %275
+ %274 = OpLabel
+ OpBranch %20
+ %275 = OpLabel
+ OpSelectionMerge %281 None
+ OpBranchConditional %33 %280 %281
+ %280 = OpLabel
+ OpBranch %20
+ %281 = OpLabel
+ OpSelectionMerge %287 None
+ OpBranchConditional %33 %286 %287
+ %286 = OpLabel
+ OpBranch %20
+ %287 = OpLabel
+ OpSelectionMerge %293 None
+ OpBranchConditional %33 %292 %293
+ %292 = OpLabel
+ OpBranch %20
+ %293 = OpLabel
+ %296 = OpIAdd %6 %846 %23
+ %298 = OpIEqual %32 %296 %9
+ OpSelectionMerge %300 None
+ OpBranchConditional %298 %299 %425
+ %299 = OpLabel
+ OpSelectionMerge %305 None
+ OpBranchConditional %33 %304 %305
+ %304 = OpLabel
+ OpBranch %20
+ %305 = OpLabel
+ OpSelectionMerge %311 None
+ OpBranchConditional %33 %310 %311
+ %310 = OpLabel
+ OpBranch %20
+ %311 = OpLabel
+ OpSelectionMerge %317 None
+ OpBranchConditional %33 %316 %317
+ %316 = OpLabel
+ OpBranch %20
+ %317 = OpLabel
+ OpSelectionMerge %323 None
+ OpBranchConditional %33 %322 %323
+ %322 = OpLabel
+ OpBranch %20
+ %323 = OpLabel
+ OpSelectionMerge %329 None
+ OpBranchConditional %33 %328 %329
+ %328 = OpLabel
+ OpBranch %20
+ %329 = OpLabel
+ OpSelectionMerge %335 None
+ OpBranchConditional %33 %334 %335
+ %334 = OpLabel
+ OpBranch %20
+ %335 = OpLabel
+ OpSelectionMerge %341 None
+ OpBranchConditional %33 %340 %341
+ %340 = OpLabel
+ OpBranch %20
+ %341 = OpLabel
+ OpSelectionMerge %347 None
+ OpBranchConditional %33 %346 %347
+ %346 = OpLabel
+ OpBranch %20
+ %347 = OpLabel
+ OpBranch %349
+ %349 = OpLabel
+ %847 = OpPhi %6 %24 %347 %358 %352
+ %356 = OpSLessThan %32 %847 %355
+ OpLoopMerge %351 %352 None
+ OpBranchConditional %356 %350 %351
+ %350 = OpLabel
+ %358 = OpIAdd %6 %847 %23
+ OpSelectionMerge %363 None
+ OpBranchConditional %33 %362 %363
+ %362 = OpLabel
+ OpBranch %351
+ %363 = OpLabel
+ OpSelectionMerge %369 None
+ OpBranchConditional %33 %368 %369
+ %368 = OpLabel
+ OpKill
+ %369 = OpLabel
+ OpSelectionMerge %375 None
+ OpBranchConditional %33 %374 %375
+ %374 = OpLabel
+ OpKill
+ %375 = OpLabel
+ OpSelectionMerge %381 None
+ OpBranchConditional %33 %380 %381
+ %380 = OpLabel
+ OpKill
+ %381 = OpLabel
+ OpSelectionMerge %387 None
+ OpBranchConditional %33 %386 %387
+ %386 = OpLabel
+ OpKill
+ %387 = OpLabel
+ OpSelectionMerge %393 None
+ OpBranchConditional %33 %392 %393
+ %392 = OpLabel
+ OpKill
+ %393 = OpLabel
+ OpSelectionMerge %399 None
+ OpBranchConditional %33 %398 %399
+ %398 = OpLabel
+ OpKill
+ %399 = OpLabel
+ OpSelectionMerge %405 None
+ OpBranchConditional %33 %404 %405
+ %404 = OpLabel
+ OpKill
+ %405 = OpLabel
+ OpSelectionMerge %411 None
+ OpBranchConditional %33 %410 %411
+ %410 = OpLabel
+ OpKill
+ %411 = OpLabel
+ OpBranch %352
+ %352 = OpLabel
+ OpBranch %349
+ %351 = OpLabel
+ %853 = OpPhi %6 %847 %349 %358 %362
+ %848 = OpPhi %32 %850 %349 %840 %362
+ OpSelectionMerge %843 None
+ OpBranchConditional %848 %20 %843
+ %843 = OpLabel
+ OpSelectionMerge %417 None
+ OpBranchConditional %33 %416 %417
+ %416 = OpLabel
+ OpKill
+ %417 = OpLabel
+ OpSelectionMerge %423 None
+ OpBranchConditional %33 %422 %423
+ %422 = OpLabel
+ OpKill
+ %423 = OpLabel
+ OpBranch %300
+ %425 = OpLabel
+ OpSelectionMerge %430 None
+ OpBranchConditional %33 %429 %430
+ %429 = OpLabel
+ OpKill
+ %430 = OpLabel
+ OpSelectionMerge %436 None
+ OpBranchConditional %33 %435 %436
+ %435 = OpLabel
+ OpKill
+ %436 = OpLabel
+ OpSelectionMerge %442 None
+ OpBranchConditional %33 %441 %442
+ %441 = OpLabel
+ OpKill
+ %442 = OpLabel
+ OpSelectionMerge %448 None
+ OpBranchConditional %33 %447 %448
+ %447 = OpLabel
+ OpKill
+ %448 = OpLabel
+ OpSelectionMerge %454 None
+ OpBranchConditional %33 %453 %454
+ %453 = OpLabel
+ OpKill
+ %454 = OpLabel
+ OpSelectionMerge %460 None
+ OpBranchConditional %33 %459 %460
+ %459 = OpLabel
+ OpKill
+ %460 = OpLabel
+ OpSelectionMerge %466 None
+ OpBranchConditional %33 %465 %466
+ %465 = OpLabel
+ OpKill
+ %466 = OpLabel
+ OpSelectionMerge %472 None
+ OpBranchConditional %33 %471 %472
+ %471 = OpLabel
+ OpKill
+ %472 = OpLabel
+ OpSelectionMerge %478 None
+ OpBranchConditional %33 %477 %478
+ %477 = OpLabel
+ OpKill
+ %478 = OpLabel
+ OpSelectionMerge %484 None
+ OpBranchConditional %33 %483 %484
+ %483 = OpLabel
+ OpKill
+ %484 = OpLabel
+ OpSelectionMerge %490 None
+ OpBranchConditional %33 %489 %490
+ %489 = OpLabel
+ OpKill
+ %490 = OpLabel
+ OpSelectionMerge %496 None
+ OpBranchConditional %33 %495 %496
+ %495 = OpLabel
+ OpKill
+ %496 = OpLabel
+ OpSelectionMerge %502 None
+ OpBranchConditional %33 %501 %502
+ %501 = OpLabel
+ OpKill
+ %502 = OpLabel
+ OpSelectionMerge %508 None
+ OpBranchConditional %33 %507 %508
+ %507 = OpLabel
+ OpKill
+ %508 = OpLabel
+ OpSelectionMerge %514 None
+ OpBranchConditional %33 %513 %514
+ %513 = OpLabel
+ OpKill
+ %514 = OpLabel
+ OpSelectionMerge %520 None
+ OpBranchConditional %33 %519 %520
+ %519 = OpLabel
+ OpKill
+ %520 = OpLabel
+ OpSelectionMerge %526 None
+ OpBranchConditional %33 %525 %526
+ %525 = OpLabel
+ OpKill
+ %526 = OpLabel
+ OpSelectionMerge %532 None
+ OpBranchConditional %33 %531 %532
+ %531 = OpLabel
+ OpKill
+ %532 = OpLabel
+ OpSelectionMerge %538 None
+ OpBranchConditional %33 %537 %538
+ %537 = OpLabel
+ OpKill
+ %538 = OpLabel
+ OpSelectionMerge %544 None
+ OpBranchConditional %33 %543 %544
+ %543 = OpLabel
+ OpKill
+ %544 = OpLabel
+ OpSelectionMerge %550 None
+ OpBranchConditional %33 %549 %550
+ %549 = OpLabel
+ OpKill
+ %550 = OpLabel
+ OpSelectionMerge %556 None
+ OpBranchConditional %33 %555 %556
+ %555 = OpLabel
+ OpKill
+ %556 = OpLabel
+ OpSelectionMerge %562 None
+ OpBranchConditional %33 %561 %562
+ %561 = OpLabel
+ OpKill
+ %562 = OpLabel
+ OpSelectionMerge %568 None
+ OpBranchConditional %33 %567 %568
+ %567 = OpLabel
+ OpKill
+ %568 = OpLabel
+ OpSelectionMerge %574 None
+ OpBranchConditional %33 %573 %574
+ %573 = OpLabel
+ OpKill
+ %574 = OpLabel
+ OpSelectionMerge %580 None
+ OpBranchConditional %33 %579 %580
+ %579 = OpLabel
+ OpKill
+ %580 = OpLabel
+ OpSelectionMerge %586 None
+ OpBranchConditional %33 %585 %586
+ %585 = OpLabel
+ OpKill
+ %586 = OpLabel
+ OpSelectionMerge %592 None
+ OpBranchConditional %33 %591 %592
+ %591 = OpLabel
+ OpKill
+ %592 = OpLabel
+ OpSelectionMerge %598 None
+ OpBranchConditional %33 %597 %598
+ %597 = OpLabel
+ OpKill
+ %598 = OpLabel
+ OpSelectionMerge %604 None
+ OpBranchConditional %33 %603 %604
+ %603 = OpLabel
+ OpKill
+ %604 = OpLabel
+ OpSelectionMerge %610 None
+ OpBranchConditional %33 %609 %610
+ %609 = OpLabel
+ OpKill
+ %610 = OpLabel
+ OpSelectionMerge %616 None
+ OpBranchConditional %33 %615 %616
+ %615 = OpLabel
+ OpKill
+ %616 = OpLabel
+ OpSelectionMerge %622 None
+ OpBranchConditional %33 %621 %622
+ %621 = OpLabel
+ OpKill
+ %622 = OpLabel
+ OpSelectionMerge %628 None
+ OpBranchConditional %33 %627 %628
+ %627 = OpLabel
+ OpKill
+ %628 = OpLabel
+ OpSelectionMerge %634 None
+ OpBranchConditional %33 %633 %634
+ %633 = OpLabel
+ OpKill
+ %634 = OpLabel
+ OpSelectionMerge %640 None
+ OpBranchConditional %33 %639 %640
+ %639 = OpLabel
+ OpKill
+ %640 = OpLabel
+ OpSelectionMerge %646 None
+ OpBranchConditional %33 %645 %646
+ %645 = OpLabel
+ OpKill
+ %646 = OpLabel
+ OpSelectionMerge %652 None
+ OpBranchConditional %33 %651 %652
+ %651 = OpLabel
+ OpKill
+ %652 = OpLabel
+ OpSelectionMerge %658 None
+ OpBranchConditional %33 %657 %658
+ %657 = OpLabel
+ OpKill
+ %658 = OpLabel
+ OpSelectionMerge %664 None
+ OpBranchConditional %33 %663 %664
+ %663 = OpLabel
+ OpKill
+ %664 = OpLabel
+ OpSelectionMerge %670 None
+ OpBranchConditional %33 %669 %670
+ %669 = OpLabel
+ OpKill
+ %670 = OpLabel
+ OpSelectionMerge %676 None
+ OpBranchConditional %33 %675 %676
+ %675 = OpLabel
+ OpKill
+ %676 = OpLabel
+ OpSelectionMerge %682 None
+ OpBranchConditional %33 %681 %682
+ %681 = OpLabel
+ OpKill
+ %682 = OpLabel
+ OpSelectionMerge %688 None
+ OpBranchConditional %33 %687 %688
+ %687 = OpLabel
+ OpKill
+ %688 = OpLabel
+ OpSelectionMerge %694 None
+ OpBranchConditional %33 %693 %694
+ %693 = OpLabel
+ OpKill
+ %694 = OpLabel
+ OpSelectionMerge %700 None
+ OpBranchConditional %33 %699 %700
+ %699 = OpLabel
+ OpKill
+ %700 = OpLabel
+ OpSelectionMerge %706 None
+ OpBranchConditional %33 %705 %706
+ %705 = OpLabel
+ OpKill
+ %706 = OpLabel
+ OpSelectionMerge %712 None
+ OpBranchConditional %33 %711 %712
+ %711 = OpLabel
+ OpKill
+ %712 = OpLabel
+ OpSelectionMerge %718 None
+ OpBranchConditional %33 %717 %718
+ %717 = OpLabel
+ OpKill
+ %718 = OpLabel
+ OpSelectionMerge %724 None
+ OpBranchConditional %33 %723 %724
+ %723 = OpLabel
+ OpKill
+ %724 = OpLabel
+ OpSelectionMerge %730 None
+ OpBranchConditional %33 %729 %730
+ %729 = OpLabel
+ OpKill
+ %730 = OpLabel
+ OpSelectionMerge %736 None
+ OpBranchConditional %33 %735 %736
+ %735 = OpLabel
+ OpKill
+ %736 = OpLabel
+ OpSelectionMerge %742 None
+ OpBranchConditional %33 %741 %742
+ %741 = OpLabel
+ OpKill
+ %742 = OpLabel
+ OpSelectionMerge %748 None
+ OpBranchConditional %33 %747 %748
+ %747 = OpLabel
+ OpKill
+ %748 = OpLabel
+ OpSelectionMerge %754 None
+ OpBranchConditional %33 %753 %754
+ %753 = OpLabel
+ OpKill
+ %754 = OpLabel
+ OpSelectionMerge %760 None
+ OpBranchConditional %33 %759 %760
+ %759 = OpLabel
+ OpKill
+ %760 = OpLabel
+ OpSelectionMerge %766 None
+ OpBranchConditional %33 %765 %766
+ %765 = OpLabel
+ OpKill
+ %766 = OpLabel
+ OpSelectionMerge %772 None
+ OpBranchConditional %33 %771 %772
+ %771 = OpLabel
+ OpKill
+ %772 = OpLabel
+ OpSelectionMerge %778 None
+ OpBranchConditional %33 %777 %778
+ %777 = OpLabel
+ OpKill
+ %778 = OpLabel
+ OpSelectionMerge %784 None
+ OpBranchConditional %33 %783 %784
+ %783 = OpLabel
+ OpKill
+ %784 = OpLabel
+ OpSelectionMerge %790 None
+ OpBranchConditional %33 %789 %790
+ %789 = OpLabel
+ OpKill
+ %790 = OpLabel
+ %797 = OpAccessChain %796 %795 %9 %28
+ %798 = OpLoad %10 %797
+ %800 = OpAccessChain %796 %795 %9 %799
+ %801 = OpLoad %10 %800
+ %802 = OpFOrdGreaterThan %32 %798 %801
+ OpSelectionMerge %804 None
+ OpBranchConditional %802 %803 %804
+ %803 = OpLabel
+ OpSelectionMerge %809 None
+ OpBranchConditional %33 %808 %809
+ %808 = OpLabel
+ OpBranch %20
+ %809 = OpLabel
+ OpSelectionMerge %815 None
+ OpBranchConditional %33 %814 %815
+ %814 = OpLabel
+ OpBranch %21
+ %815 = OpLabel
+ OpKill
+ %804 = OpLabel
+ OpBranch %300
+ %300 = OpLabel
+ %856 = OpPhi %32 %848 %423 %850 %804
+ %852 = OpPhi %6 %853 %423 %24 %804
+ OpSelectionMerge %822 None
+ OpBranchConditional %33 %821 %822
+ %821 = OpLabel
+ OpKill
+ %822 = OpLabel
+ OpSelectionMerge %828 None
+ OpBranchConditional %33 %827 %828
+ %827 = OpLabel
+ OpBranch %21
+ %828 = OpLabel
+ OpStore %13 %831
+ OpBranch %20
+ %21 = OpLabel
+ %855 = OpPhi %32 %850 %814 %856 %827
+ %851 = OpPhi %6 %24 %814 %852 %827
+ %834 = OpSLessThan %32 %851 %355
+ OpBranchConditional %834 %18 %20
+ %20 = OpLabel
+ %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
+ OpSelectionMerge %841 None
+ OpBranchConditional %854 %835 %841
+ %841 = OpLabel
+ OpBranch %835
+ %835 = OpLabel
+ OpReturn
+ OpFunctionEnd
+END
+
+# uniforms for variant
+
+# resolution
+BUFFER variant_resolution DATA_TYPE vec2<float> STD140 DATA
+ 256.0 256.0
+END
+# injectionSwitch
+BUFFER variant_injectionSwitch DATA_TYPE vec2<float> STD140 DATA
+ 0.0 1.0
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+ ATTACH variant_vertex_shader
+ ATTACH variant_fragment_shader
+ FRAMEBUFFER_SIZE 32 32
+ BIND BUFFER variant_framebuffer AS color LOCATION 0
+ BIND BUFFER variant_resolution AS uniform DESCRIPTOR_SET 0 BINDING 1
+ BIND BUFFER variant_injectionSwitch AS uniform DESCRIPTOR_SET 0 BINDING 0
+END
+CLEAR_COLOR variant_pipeline 0 0 0 255
+
+CLEAR variant_pipeline
+RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 32 32
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 255 0 0 255
--- /dev/null
+#!amber
+
+# Copyright 2022 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+# A test for a coverage-gap found by the GraphicsFuzz project.
+
+# Short description: A fragment shader that covers specific LLVM code paths
+
+# The test passes because the shader always writes red.
+
+# Optimized using spirv-opt with the following arguments:
+# '-O'
+# spirv-opt commit hash: a0370efd589be33d5d9a85cfde2f85841b3755af
+
+
+
+SHADER vertex variant_vertex_shader PASSTHROUGH
+
+# variant_fragment_shader is derived from the following GLSL:
+# #version 320 es
+# #define _int_0 _GLF_uniform_int_values[0]
+# #define _int_3 _GLF_uniform_int_values[1]
+# #define _int_256 _GLF_uniform_int_values[2]
+# #define _int_1 _GLF_uniform_int_values[3]
+# #define _float_1_0 _GLF_uniform_float_values[0]
+#
+# precision highp int;
+# precision highp float;
+#
+# // Contents of _GLF_uniform_float_values: 1.0
+# layout(set = 0, binding = 0) uniform buf0
+# {
+# float _GLF_uniform_float_values[1];
+# };
+#
+# // Contents of _GLF_uniform_int_values: [0, 3, 256, 1]
+# layout(set = 0, binding = 1) uniform buf1
+# {
+# int _GLF_uniform_int_values[4];
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# void main()
+# {
+# _GLF_color = vec4(_int_0);
+#
+# for(int k = ~_int_0; k > ~_int_0 - _int_3; k--)
+# {
+# // Always true.
+# if(uint(~k) < uint(int(gl_FragCoord.y + _float_1_0) * _int_256))
+# {
+# _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1);
+# break;
+# }
+# }
+# }
+SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 10
+; Bound: 87
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %9 %47
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %9 "_GLF_color"
+ OpName %14 "buf1"
+ OpMemberName %14 0 "_GLF_uniform_int_values"
+ OpName %16 ""
+ OpName %47 "gl_FragCoord"
+ OpName %53 "buf0"
+ OpMemberName %53 0 "_GLF_uniform_float_values"
+ OpName %55 ""
+ OpDecorate %9 Location 0
+ OpDecorate %13 ArrayStride 16
+ OpMemberDecorate %14 0 Offset 0
+ OpDecorate %14 Block
+ OpDecorate %16 DescriptorSet 0
+ OpDecorate %16 Binding 1
+ OpDecorate %47 BuiltIn FragCoord
+ OpDecorate %52 ArrayStride 16
+ OpMemberDecorate %53 0 Offset 0
+ OpDecorate %53 Block
+ OpDecorate %55 DescriptorSet 0
+ OpDecorate %55 Binding 0
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeFloat 32
+ %7 = OpTypeVector %6 4
+ %8 = OpTypePointer Output %7
+ %9 = OpVariable %8 Output
+ %10 = OpTypeInt 32 1
+ %11 = OpTypeInt 32 0
+ %12 = OpConstant %11 4
+ %13 = OpTypeArray %10 %12
+ %14 = OpTypeStruct %13
+ %15 = OpTypePointer Uniform %14
+ %16 = OpVariable %15 Uniform
+ %17 = OpConstant %10 0
+ %18 = OpTypePointer Uniform %10
+ %37 = OpConstant %10 1
+ %41 = OpTypeBool
+ %46 = OpTypePointer Input %7
+ %47 = OpVariable %46 Input
+ %48 = OpConstant %11 1
+ %49 = OpTypePointer Input %6
+ %52 = OpTypeArray %6 %48
+ %53 = OpTypeStruct %52
+ %54 = OpTypePointer Uniform %53
+ %55 = OpVariable %54 Uniform
+ %56 = OpTypePointer Uniform %6
+ %61 = OpConstant %10 2
+ %69 = OpConstant %10 3
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ %19 = OpAccessChain %18 %16 %17 %17
+ %20 = OpLoad %10 %19
+ %21 = OpConvertSToF %6 %20
+ %22 = OpCompositeConstruct %7 %21 %21 %21 %21
+ OpStore %9 %22
+ %27 = OpNot %10 %20
+ OpBranch %28
+ %28 = OpLabel
+ %86 = OpPhi %10 %27 %5 %85 %31
+ %38 = OpAccessChain %18 %16 %17 %37
+ %39 = OpLoad %10 %38
+ %40 = OpISub %10 %27 %39
+ %42 = OpSGreaterThan %41 %86 %40
+ OpLoopMerge %30 %31 None
+ OpBranchConditional %42 %29 %30
+ %29 = OpLabel
+ %44 = OpNot %10 %86
+ %45 = OpBitcast %11 %44
+ %50 = OpAccessChain %49 %47 %48
+ %51 = OpLoad %6 %50
+ %57 = OpAccessChain %56 %55 %17 %17
+ %58 = OpLoad %6 %57
+ %59 = OpFAdd %6 %51 %58
+ %60 = OpConvertFToS %10 %59
+ %62 = OpAccessChain %18 %16 %17 %61
+ %63 = OpLoad %10 %62
+ %64 = OpIMul %10 %60 %63
+ %65 = OpBitcast %11 %64
+ %66 = OpULessThan %41 %45 %65
+ OpSelectionMerge %68 None
+ OpBranchConditional %66 %67 %68
+ %67 = OpLabel
+ %70 = OpAccessChain %18 %16 %17 %69
+ %71 = OpLoad %10 %70
+ %72 = OpConvertSToF %6 %71
+ %82 = OpCompositeConstruct %7 %72 %21 %21 %72
+ OpStore %9 %82
+ OpBranch %30
+ %68 = OpLabel
+ OpBranch %31
+ %31 = OpLabel
+ %85 = OpISub %10 %86 %37
+ OpBranch %28
+ %30 = OpLabel
+ OpReturn
+ OpFunctionEnd
+END
+
+# uniforms for variant
+
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 0 3 256 1
+END
+# _GLF_uniform_float_values
+BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA
+ 1.0
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+ ATTACH variant_vertex_shader
+ ATTACH variant_fragment_shader
+ FRAMEBUFFER_SIZE 32 32
+ BIND BUFFER variant_framebuffer AS color LOCATION 0
+ BIND BUFFER variant__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 1
+ BIND BUFFER variant__GLF_uniform_float_values AS uniform DESCRIPTOR_SET 0 BINDING 0
+END
+CLEAR_COLOR variant_pipeline 0 0 0 255
+
+CLEAR variant_pipeline
+RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 32 32
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 255 0 0 255
--- /dev/null
+#!amber
+
+# Copyright 2022 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+# A test for a coverage-gap found by the GraphicsFuzz project.
+
+# Short description: A fragment shader that covers specific LLVM code paths
+
+# The test passes because the shader always writes red.
+
+SHADER vertex texgen_vert PASSTHROUGH
+
+SHADER fragment texgen_frag GLSL
+#version 430
+precision highp float;
+
+layout(location = 0) out vec4 _GLF_color;
+
+void main()
+{
+ _GLF_color = vec4(
+ floor(gl_FragCoord.x) * (1.0 / 255.0),
+ (int(gl_FragCoord.x) ^ int(gl_FragCoord.y)) * (1.0 / 255.0),
+ floor(gl_FragCoord.y) * (1.0 / 255.0),
+ 1.0);
+}
+END
+BUFFER default_texture FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics texgen_pipeline
+ ATTACH texgen_vert
+ ATTACH texgen_frag
+ FRAMEBUFFER_SIZE 256 256
+ BIND BUFFER default_texture AS color LOCATION 0
+END
+
+CLEAR_COLOR texgen_pipeline 0 0 0 255
+CLEAR texgen_pipeline
+RUN texgen_pipeline DRAW_RECT POS 0 0 SIZE 256 256
+
+SHADER vertex variant_vertex_shader PASSTHROUGH
+
+# variant_fragment_shader is derived from the following GLSL:
+# #version 320 es
+# #define _int_1 _GLF_uniform_int_values[0]
+# #define _int_0 _GLF_uniform_int_values[1]
+# #define _float_1_0 _GLF_uniform_float_values[0]
+#
+# precision highp float;
+# precision highp int;
+#
+# // Contents of _GLF_uniform_float_values: 1.0
+# layout(set = 0, binding = 0) uniform buf0
+# {
+# float _GLF_uniform_float_values[1];
+# };
+#
+# // Contents of _GLF_uniform_int_values: [1, 0]
+# layout(set = 0, binding = 1) uniform buf1
+# {
+# int _GLF_uniform_int_values[2];
+# };
+#
+# const int _GLF_global_loop_bound = 10;
+# int _GLF_global_loop_count = 0;
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# layout(set = 0, binding = 2) uniform sampler2D tex;
+#
+# void main()
+# {
+# // This will be overwritten later.
+# _GLF_color = texture(tex, vec2(_float_1_0));
+#
+# vec2 v = vec2(_float_1_0);
+# int a = 0;
+#
+# // One of the conditions in parentheses is always true.
+# while((a < 1 || v.y > 1.0) && _GLF_global_loop_count < _GLF_global_loop_bound)
+# {
+# _GLF_global_loop_count++;
+# _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1);
+# v *= 2.0;
+# a++;
+# }
+#
+# // Always false: the previous loop was run until the global loop bound was reached.
+# if(_GLF_global_loop_count != _GLF_global_loop_bound)
+# {
+# _GLF_color = vec4(_int_0);
+# }
+# }
+SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 10
+; Bound: 94
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %13
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %8 "_GLF_global_loop_count"
+ OpName %13 "_GLF_color"
+ OpName %17 "tex"
+ OpName %22 "buf0"
+ OpMemberName %22 0 "_GLF_uniform_float_values"
+ OpName %24 ""
+ OpName %32 "v"
+ OpName %37 "a"
+ OpName %64 "buf1"
+ OpMemberName %64 0 "_GLF_uniform_int_values"
+ OpName %66 ""
+ OpDecorate %13 Location 0
+ OpDecorate %17 RelaxedPrecision
+ OpDecorate %17 DescriptorSet 0
+ OpDecorate %17 Binding 2
+ OpDecorate %18 RelaxedPrecision
+ OpDecorate %21 ArrayStride 16
+ OpMemberDecorate %22 0 Offset 0
+ OpDecorate %22 Block
+ OpDecorate %24 DescriptorSet 0
+ OpDecorate %24 Binding 0
+ OpDecorate %29 RelaxedPrecision
+ OpDecorate %30 RelaxedPrecision
+ OpDecorate %63 ArrayStride 16
+ OpMemberDecorate %64 0 Offset 0
+ OpDecorate %64 Block
+ OpDecorate %66 DescriptorSet 0
+ OpDecorate %66 Binding 1
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeInt 32 1
+ %7 = OpTypePointer Private %6
+ %8 = OpVariable %7 Private
+ %9 = OpConstant %6 0
+ %10 = OpTypeFloat 32
+ %11 = OpTypeVector %10 4
+ %12 = OpTypePointer Output %11
+ %13 = OpVariable %12 Output
+ %14 = OpTypeImage %10 2D 0 0 0 1 Unknown
+ %15 = OpTypeSampledImage %14
+ %16 = OpTypePointer UniformConstant %15
+ %17 = OpVariable %16 UniformConstant
+ %19 = OpTypeInt 32 0
+ %20 = OpConstant %19 1
+ %21 = OpTypeArray %10 %20
+ %22 = OpTypeStruct %21
+ %23 = OpTypePointer Uniform %22
+ %24 = OpVariable %23 Uniform
+ %25 = OpTypePointer Uniform %10
+ %28 = OpTypeVector %10 2
+ %31 = OpTypePointer Function %28
+ %36 = OpTypePointer Function %6
+ %43 = OpTypeBool
+ %45 = OpConstant %6 1
+ %50 = OpTypePointer Function %10
+ %53 = OpConstant %10 1
+ %57 = OpConstant %6 10
+ %62 = OpConstant %19 2
+ %63 = OpTypeArray %6 %62
+ %64 = OpTypeStruct %63
+ %65 = OpTypePointer Uniform %64
+ %66 = OpVariable %65 Uniform
+ %67 = OpTypePointer Uniform %6
+ %81 = OpConstant %10 2
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ %32 = OpVariable %31 Function
+ %37 = OpVariable %36 Function
+ OpStore %8 %9
+ %18 = OpLoad %15 %17
+ %26 = OpAccessChain %25 %24 %9 %9
+ %27 = OpLoad %10 %26
+ %29 = OpCompositeConstruct %28 %27 %27
+ %30 = OpImageSampleImplicitLod %11 %18 %29
+ OpStore %13 %30
+ %33 = OpAccessChain %25 %24 %9 %9
+ %34 = OpLoad %10 %33
+ %35 = OpCompositeConstruct %28 %34 %34
+ OpStore %32 %35
+ OpStore %37 %9
+ OpBranch %38
+ %38 = OpLabel
+ OpLoopMerge %40 %41 None
+ OpBranch %42
+ %42 = OpLabel
+ %44 = OpLoad %6 %37
+ %46 = OpSLessThan %43 %44 %45
+ %47 = OpLogicalNot %43 %46
+ OpSelectionMerge %49 None
+ OpBranchConditional %47 %48 %49
+ %48 = OpLabel
+ %51 = OpAccessChain %50 %32 %20
+ %52 = OpLoad %10 %51
+ %54 = OpFOrdGreaterThan %43 %52 %53
+ OpBranch %49
+ %49 = OpLabel
+ %55 = OpPhi %43 %46 %42 %54 %48
+ %56 = OpLoad %6 %8
+ %58 = OpSLessThan %43 %56 %57
+ %59 = OpLogicalAnd %43 %55 %58
+ OpBranchConditional %59 %39 %40
+ %39 = OpLabel
+ %60 = OpLoad %6 %8
+ %61 = OpIAdd %6 %60 %45
+ OpStore %8 %61
+ %68 = OpAccessChain %67 %66 %9 %9
+ %69 = OpLoad %6 %68
+ %70 = OpConvertSToF %10 %69
+ %71 = OpAccessChain %67 %66 %9 %45
+ %72 = OpLoad %6 %71
+ %73 = OpConvertSToF %10 %72
+ %74 = OpAccessChain %67 %66 %9 %45
+ %75 = OpLoad %6 %74
+ %76 = OpConvertSToF %10 %75
+ %77 = OpAccessChain %67 %66 %9 %9
+ %78 = OpLoad %6 %77
+ %79 = OpConvertSToF %10 %78
+ %80 = OpCompositeConstruct %11 %70 %73 %76 %79
+ OpStore %13 %80
+ %82 = OpLoad %28 %32
+ %83 = OpVectorTimesScalar %28 %82 %81
+ OpStore %32 %83
+ %84 = OpLoad %6 %37
+ %85 = OpIAdd %6 %84 %45
+ OpStore %37 %85
+ OpBranch %41
+ %41 = OpLabel
+ OpBranch %38
+ %40 = OpLabel
+ %86 = OpLoad %6 %8
+ %87 = OpINotEqual %43 %86 %57
+ OpSelectionMerge %89 None
+ OpBranchConditional %87 %88 %89
+ %88 = OpLabel
+ %90 = OpAccessChain %67 %66 %9 %45
+ %91 = OpLoad %6 %90
+ %92 = OpConvertSToF %10 %91
+ %93 = OpCompositeConstruct %11 %92 %92 %92 %92
+ OpStore %13 %93
+ OpBranch %89
+ %89 = OpLabel
+ OpReturn
+ OpFunctionEnd
+END
+
+# uniforms for variant
+
+# tex
+SAMPLER variant_tex
+
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 1 0
+END
+# _GLF_uniform_float_values
+BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA
+ 1.0
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+ ATTACH variant_vertex_shader
+ ATTACH variant_fragment_shader
+ FRAMEBUFFER_SIZE 32 32
+ BIND BUFFER variant_framebuffer AS color LOCATION 0
+ BIND BUFFER default_texture AS combined_image_sampler SAMPLER variant_tex DESCRIPTOR_SET 0 BINDING 2
+ BIND BUFFER variant__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 1
+ BIND BUFFER variant__GLF_uniform_float_values AS uniform DESCRIPTOR_SET 0 BINDING 0
+END
+CLEAR_COLOR variant_pipeline 0 0 0 255
+
+CLEAR variant_pipeline
+RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 32 32
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 255 0 0 255
--- /dev/null
+#!amber
+
+# Copyright 2022 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+# A test for a coverage-gap found by the GraphicsFuzz project.
+
+# Short description: A fragment shader that covers specific LLVM code paths
+
+# The test passes because the shader always writes red.
+
+# Optimized using spirv-opt with the following arguments:
+# '-Os'
+# spirv-opt commit hash: a0370efd589be33d5d9a85cfde2f85841b3755af
+
+
+
+SHADER vertex variant_vertex_shader PASSTHROUGH
+
+# variant_fragment_shader is derived from the following GLSL:
+# #version 320 es
+# #define _int_1 _GLF_uniform_int_values[0]
+# #define _int_0 _GLF_uniform_int_values[1]
+# #define _float_0_0 _GLF_uniform_float_values[0]
+#
+# precision highp float;
+# precision highp int;
+#
+# // Contents of _GLF_uniform_int_values: [1, 0]
+# layout(set = 0, binding = 0) uniform buf0
+# {
+# int _GLF_uniform_int_values[2];
+# };
+#
+# // Contents of _GLF_uniform_float_values: 0.0
+# layout(set = 0, binding = 1) uniform buf1
+# {
+# float _GLF_uniform_float_values[1];
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# void main()
+# {
+# // Always true. The line below simplifies to
+# // min(vec2(1, 1), vec2(transpose(mat2(1)))).y = min(vec2(1, 1), vec2(mat2(1))).y
+# // = min(vec2(1, 1), vec2(1, 0)).y = vec2(1, 0).y = 0.
+# if(min(vec2(1), vec2(transpose(mat2(_int_1)))).y == _float_0_0)
+# {
+# _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1);
+# }
+# else
+# {
+# _GLF_color = vec4(_int_0);
+# }
+# }
+SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 10
+; Bound: 68
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %47
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %14 "buf0"
+ OpMemberName %14 0 "_GLF_uniform_int_values"
+ OpName %16 ""
+ OpName %35 "buf1"
+ OpMemberName %35 0 "_GLF_uniform_float_values"
+ OpName %37 ""
+ OpName %47 "_GLF_color"
+ OpDecorate %13 ArrayStride 16
+ OpMemberDecorate %14 0 Offset 0
+ OpDecorate %14 Block
+ OpDecorate %16 DescriptorSet 0
+ OpDecorate %16 Binding 0
+ OpDecorate %34 ArrayStride 16
+ OpMemberDecorate %35 0 Offset 0
+ OpDecorate %35 Block
+ OpDecorate %37 DescriptorSet 0
+ OpDecorate %37 Binding 1
+ OpDecorate %47 Location 0
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeFloat 32
+ %7 = OpTypeVector %6 2
+ %8 = OpConstant %6 1
+ %9 = OpConstantComposite %7 %8 %8
+ %10 = OpTypeInt 32 1
+ %11 = OpTypeInt 32 0
+ %12 = OpConstant %11 2
+ %13 = OpTypeArray %10 %12
+ %14 = OpTypeStruct %13
+ %15 = OpTypePointer Uniform %14
+ %16 = OpVariable %15 Uniform
+ %17 = OpConstant %10 0
+ %18 = OpTypePointer Uniform %10
+ %22 = OpTypeMatrix %7 2
+ %23 = OpConstant %6 0
+ %32 = OpConstant %11 1
+ %34 = OpTypeArray %6 %32
+ %35 = OpTypeStruct %34
+ %36 = OpTypePointer Uniform %35
+ %37 = OpVariable %36 Uniform
+ %38 = OpTypePointer Uniform %6
+ %41 = OpTypeBool
+ %45 = OpTypeVector %6 4
+ %46 = OpTypePointer Output %45
+ %47 = OpVariable %46 Output
+ %51 = OpConstant %10 1
+ %67 = OpUndef %6
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ %19 = OpAccessChain %18 %16 %17 %17
+ %20 = OpLoad %10 %19
+ %21 = OpConvertSToF %6 %20
+ %24 = OpCompositeConstruct %7 %21 %23
+ %25 = OpCompositeConstruct %7 %23 %21
+ %26 = OpCompositeConstruct %22 %24 %25
+ %27 = OpTranspose %22 %26
+ %29 = OpCompositeExtract %6 %27 0 1
+ %30 = OpCompositeConstruct %7 %67 %29
+ %31 = OpExtInst %7 %1 FMin %9 %30
+ %33 = OpCompositeExtract %6 %31 1
+ %39 = OpAccessChain %38 %37 %17 %17
+ %40 = OpLoad %6 %39
+ %42 = OpFOrdEqual %41 %33 %40
+ OpSelectionMerge %44 None
+ OpBranchConditional %42 %43 %62
+ %43 = OpLabel
+ %52 = OpAccessChain %18 %16 %17 %51
+ %53 = OpLoad %10 %52
+ %54 = OpConvertSToF %6 %53
+ %61 = OpCompositeConstruct %45 %21 %54 %54 %21
+ OpStore %47 %61
+ OpBranch %44
+ %62 = OpLabel
+ %63 = OpAccessChain %18 %16 %17 %51
+ %64 = OpLoad %10 %63
+ %65 = OpConvertSToF %6 %64
+ %66 = OpCompositeConstruct %45 %65 %65 %65 %65
+ OpStore %47 %66
+ OpBranch %44
+ %44 = OpLabel
+ OpReturn
+ OpFunctionEnd
+END
+
+# uniforms for variant
+
+# _GLF_uniform_float_values
+BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA
+ 0.0
+END
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 1 0
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+ ATTACH variant_vertex_shader
+ ATTACH variant_fragment_shader
+ FRAMEBUFFER_SIZE 32 32
+ BIND BUFFER variant_framebuffer AS color LOCATION 0
+ BIND BUFFER variant__GLF_uniform_float_values AS uniform DESCRIPTOR_SET 0 BINDING 1
+ BIND BUFFER variant__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 0
+END
+CLEAR_COLOR variant_pipeline 0 0 0 255
+
+CLEAR variant_pipeline
+RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 32 32
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 255 0 0 255
--- /dev/null
+#!amber
+
+# Copyright 2022 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+# A test for a coverage-gap found by the GraphicsFuzz project.
+
+# Short description: A fragment shader that covers specific LLVM code paths
+
+# The test passes because the shader always writes red.
+
+SHADER vertex variant_vertex_shader PASSTHROUGH
+
+# variant_fragment_shader is derived from the following GLSL:
+# #version 320 es
+# #define _int_3 _GLF_uniform_int_values[0]
+# #define _int_1 _GLF_uniform_int_values[1]
+# #define _int_0 _GLF_uniform_int_values[2]
+# #define _int_2 _GLF_uniform_int_values[3]
+# #define _float_1_0 _GLF_uniform_float_values[0]
+#
+# precision highp float;
+# precision highp int;
+#
+# // Contents of _GLF_uniform_float_values: 1.0
+# layout(set = 0, binding = 0) uniform buf0
+# {
+# float _GLF_uniform_float_values[1];
+# };
+#
+# // Contents of _GLF_uniform_int_values: [3, 1, 0, 2]
+# layout(set = 0, binding = 1) uniform buf1
+# {
+# int _GLF_uniform_int_values[4];
+# };
+#
+# // Contents of zero: 0.0
+# layout(set = 0, binding = 2) uniform buf2 {
+# float zero;
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# void main()
+# {
+# mat4 m = mat4(_int_1);
+# m = mat4(_int_1);
+# vec4 v = vec4(_int_2);
+# int a = _int_0;
+#
+# for(int i = _int_1; a < _int_3; i++)
+# {
+# a++;
+#
+# // Iterates for j = 1 and j = 0 when i = 1.
+# for(int j = _int_1; i <= _int_1 && a < _int_3; j--)
+# {
+# a++;
+#
+# // Executed twice:
+# // v[1] = m[1][1] = 1
+# // v[0] = m[0][1] = 0
+# v[j] = m[j][i];
+#
+# // Always false.
+# if(zero > _float_1_0)
+# {
+# discard;
+# }
+# }
+# }
+#
+# // Always true.
+# if(v == vec4(_int_0, _int_1, _int_2, _int_2))
+# {
+# _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1);
+# }
+# else
+# {
+# _GLF_color = vec4(_int_0);
+# }
+# }
+SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 10
+; Bound: 154
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %135
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %10 "m"
+ OpName %15 "buf1"
+ OpMemberName %15 0 "_GLF_uniform_int_values"
+ OpName %17 ""
+ OpName %40 "v"
+ OpName %47 "a"
+ OpName %51 "i"
+ OpName %66 "j"
+ OpName %94 "buf2"
+ OpMemberName %94 0 "zero"
+ OpName %96 ""
+ OpName %102 "buf0"
+ OpMemberName %102 0 "_GLF_uniform_float_values"
+ OpName %104 ""
+ OpName %135 "_GLF_color"
+ OpDecorate %14 ArrayStride 16
+ OpMemberDecorate %15 0 Offset 0
+ OpDecorate %15 Block
+ OpDecorate %17 DescriptorSet 0
+ OpDecorate %17 Binding 1
+ OpMemberDecorate %94 0 Offset 0
+ OpDecorate %94 Block
+ OpDecorate %96 DescriptorSet 0
+ OpDecorate %96 Binding 2
+ OpDecorate %101 ArrayStride 16
+ OpMemberDecorate %102 0 Offset 0
+ OpDecorate %102 Block
+ OpDecorate %104 DescriptorSet 0
+ OpDecorate %104 Binding 0
+ OpDecorate %135 Location 0
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeFloat 32
+ %7 = OpTypeVector %6 4
+ %8 = OpTypeMatrix %7 4
+ %9 = OpTypePointer Function %8
+ %11 = OpTypeInt 32 1
+ %12 = OpTypeInt 32 0
+ %13 = OpConstant %12 4
+ %14 = OpTypeArray %11 %13
+ %15 = OpTypeStruct %14
+ %16 = OpTypePointer Uniform %15
+ %17 = OpVariable %16 Uniform
+ %18 = OpConstant %11 0
+ %19 = OpConstant %11 1
+ %20 = OpTypePointer Uniform %11
+ %24 = OpConstant %6 1
+ %25 = OpConstant %6 0
+ %39 = OpTypePointer Function %7
+ %41 = OpConstant %11 3
+ %46 = OpTypePointer Function %11
+ %48 = OpConstant %11 2
+ %62 = OpTypeBool
+ %90 = OpTypePointer Function %6
+ %94 = OpTypeStruct %6
+ %95 = OpTypePointer Uniform %94
+ %96 = OpVariable %95 Uniform
+ %97 = OpTypePointer Uniform %6
+ %100 = OpConstant %12 1
+ %101 = OpTypeArray %6 %100
+ %102 = OpTypeStruct %101
+ %103 = OpTypePointer Uniform %102
+ %104 = OpVariable %103 Uniform
+ %129 = OpTypeVector %62 4
+ %134 = OpTypePointer Output %7
+ %135 = OpVariable %134 Output
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ %10 = OpVariable %9 Function
+ %40 = OpVariable %39 Function
+ %47 = OpVariable %46 Function
+ %51 = OpVariable %46 Function
+ %66 = OpVariable %46 Function
+ %21 = OpAccessChain %20 %17 %18 %19
+ %22 = OpLoad %11 %21
+ %23 = OpConvertSToF %6 %22
+ %26 = OpCompositeConstruct %7 %23 %25 %25 %25
+ %27 = OpCompositeConstruct %7 %25 %23 %25 %25
+ %28 = OpCompositeConstruct %7 %25 %25 %23 %25
+ %29 = OpCompositeConstruct %7 %25 %25 %25 %23
+ %30 = OpCompositeConstruct %8 %26 %27 %28 %29
+ OpStore %10 %30
+ %31 = OpAccessChain %20 %17 %18 %19
+ %32 = OpLoad %11 %31
+ %33 = OpConvertSToF %6 %32
+ %34 = OpCompositeConstruct %7 %33 %25 %25 %25
+ %35 = OpCompositeConstruct %7 %25 %33 %25 %25
+ %36 = OpCompositeConstruct %7 %25 %25 %33 %25
+ %37 = OpCompositeConstruct %7 %25 %25 %25 %33
+ %38 = OpCompositeConstruct %8 %34 %35 %36 %37
+ OpStore %10 %38
+ %42 = OpAccessChain %20 %17 %18 %41
+ %43 = OpLoad %11 %42
+ %44 = OpConvertSToF %6 %43
+ %45 = OpCompositeConstruct %7 %44 %44 %44 %44
+ OpStore %40 %45
+ %49 = OpAccessChain %20 %17 %18 %48
+ %50 = OpLoad %11 %49
+ OpStore %47 %50
+ %52 = OpAccessChain %20 %17 %18 %19
+ %53 = OpLoad %11 %52
+ OpStore %51 %53
+ OpBranch %54
+ %54 = OpLabel
+ OpLoopMerge %56 %57 None
+ OpBranch %58
+ %58 = OpLabel
+ %59 = OpLoad %11 %47
+ %60 = OpAccessChain %20 %17 %18 %18
+ %61 = OpLoad %11 %60
+ %63 = OpSLessThan %62 %59 %61
+ OpBranchConditional %63 %55 %56
+ %55 = OpLabel
+ %64 = OpLoad %11 %47
+ %65 = OpIAdd %11 %64 %19
+ OpStore %47 %65
+ %67 = OpAccessChain %20 %17 %18 %19
+ %68 = OpLoad %11 %67
+ OpStore %66 %68
+ OpBranch %69
+ %69 = OpLabel
+ OpLoopMerge %71 %72 None
+ OpBranch %73
+ %73 = OpLabel
+ %74 = OpLoad %11 %51
+ %75 = OpAccessChain %20 %17 %18 %19
+ %76 = OpLoad %11 %75
+ %77 = OpSLessThanEqual %62 %74 %76
+ OpSelectionMerge %79 None
+ OpBranchConditional %77 %78 %79
+ %78 = OpLabel
+ %80 = OpLoad %11 %47
+ %81 = OpAccessChain %20 %17 %18 %18
+ %82 = OpLoad %11 %81
+ %83 = OpSLessThan %62 %80 %82
+ OpBranch %79
+ %79 = OpLabel
+ %84 = OpPhi %62 %77 %73 %83 %78
+ OpBranchConditional %84 %70 %71
+ %70 = OpLabel
+ %85 = OpLoad %11 %47
+ %86 = OpIAdd %11 %85 %19
+ OpStore %47 %86
+ %87 = OpLoad %11 %66
+ %88 = OpLoad %11 %66
+ %89 = OpLoad %11 %51
+ %91 = OpAccessChain %90 %10 %88 %89
+ %92 = OpLoad %6 %91
+ %93 = OpAccessChain %90 %40 %87
+ OpStore %93 %92
+ %98 = OpAccessChain %97 %96 %18
+ %99 = OpLoad %6 %98
+ %105 = OpAccessChain %97 %104 %18 %18
+ %106 = OpLoad %6 %105
+ %107 = OpFOrdGreaterThan %62 %99 %106
+ OpSelectionMerge %109 None
+ OpBranchConditional %107 %108 %109
+ %108 = OpLabel
+ OpKill
+ %109 = OpLabel
+ OpBranch %72
+ %72 = OpLabel
+ %111 = OpLoad %11 %66
+ %112 = OpISub %11 %111 %19
+ OpStore %66 %112
+ OpBranch %69
+ %71 = OpLabel
+ OpBranch %57
+ %57 = OpLabel
+ %113 = OpLoad %11 %51
+ %114 = OpIAdd %11 %113 %19
+ OpStore %51 %114
+ OpBranch %54
+ %56 = OpLabel
+ %115 = OpLoad %7 %40
+ %116 = OpAccessChain %20 %17 %18 %48
+ %117 = OpLoad %11 %116
+ %118 = OpConvertSToF %6 %117
+ %119 = OpAccessChain %20 %17 %18 %19
+ %120 = OpLoad %11 %119
+ %121 = OpConvertSToF %6 %120
+ %122 = OpAccessChain %20 %17 %18 %41
+ %123 = OpLoad %11 %122
+ %124 = OpConvertSToF %6 %123
+ %125 = OpAccessChain %20 %17 %18 %41
+ %126 = OpLoad %11 %125
+ %127 = OpConvertSToF %6 %126
+ %128 = OpCompositeConstruct %7 %118 %121 %124 %127
+ %130 = OpFOrdEqual %129 %115 %128
+ %131 = OpAll %62 %130
+ OpSelectionMerge %133 None
+ OpBranchConditional %131 %132 %149
+ %132 = OpLabel
+ %136 = OpAccessChain %20 %17 %18 %19
+ %137 = OpLoad %11 %136
+ %138 = OpConvertSToF %6 %137
+ %139 = OpAccessChain %20 %17 %18 %48
+ %140 = OpLoad %11 %139
+ %141 = OpConvertSToF %6 %140
+ %142 = OpAccessChain %20 %17 %18 %48
+ %143 = OpLoad %11 %142
+ %144 = OpConvertSToF %6 %143
+ %145 = OpAccessChain %20 %17 %18 %19
+ %146 = OpLoad %11 %145
+ %147 = OpConvertSToF %6 %146
+ %148 = OpCompositeConstruct %7 %138 %141 %144 %147
+ OpStore %135 %148
+ OpBranch %133
+ %149 = OpLabel
+ %150 = OpAccessChain %20 %17 %18 %48
+ %151 = OpLoad %11 %150
+ %152 = OpConvertSToF %6 %151
+ %153 = OpCompositeConstruct %7 %152 %152 %152 %152
+ OpStore %135 %153
+ OpBranch %133
+ %133 = OpLabel
+ OpReturn
+ OpFunctionEnd
+END
+
+# uniforms for variant
+
+# zero
+BUFFER variant_zero DATA_TYPE float STD140 DATA
+ 0.0
+END
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 3 1 0 2
+END
+# _GLF_uniform_float_values
+BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA
+ 1.0
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+ ATTACH variant_vertex_shader
+ ATTACH variant_fragment_shader
+ FRAMEBUFFER_SIZE 32 32
+ BIND BUFFER variant_framebuffer AS color LOCATION 0
+ BIND BUFFER variant_zero AS uniform DESCRIPTOR_SET 0 BINDING 2
+ BIND BUFFER variant__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 1
+ BIND BUFFER variant__GLF_uniform_float_values AS uniform DESCRIPTOR_SET 0 BINDING 0
+END
+CLEAR_COLOR variant_pipeline 0 0 0 255
+
+CLEAR variant_pipeline
+RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 32 32
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 255 0 0 255
--- /dev/null
+#!amber
+
+# Copyright 2022 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+# A test for a coverage-gap found by the GraphicsFuzz project.
+
+# Short description: A fragment shader that covers specific LLVM code paths
+
+# The test passes because the shader always writes red.
+
+SHADER vertex variant_vertex_shader PASSTHROUGH
+
+# variant_fragment_shader is derived from the following GLSL:
+# #version 320 es
+# #define _int_0 _GLF_uniform_int_values[0]
+# #define _float_0_0 _GLF_uniform_float_values[0]
+#
+# precision highp float;
+# precision highp int;
+#
+# // Contents of _GLF_uniform_int_values: 0
+# layout(set = 0, binding = 0) uniform buf0
+# {
+# int _GLF_uniform_int_values[1];
+# };
+#
+# // Contents of _GLF_uniform_float_values: 0.0
+# layout(set = 0, binding = 1) uniform buf1
+# {
+# float _GLF_uniform_float_values[1];
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# void main()
+# {
+# _GLF_color = vec4(_int_0);
+#
+# // Always false.
+# if(gl_FragCoord.x < _float_0_0)
+# {
+# }
+# else
+# {
+# // Always false.
+# if(gl_FragCoord.y < 0.0)
+# {
+# }
+# else
+# {
+# // Always true.
+# if(gl_FragCoord.x >= 0.0)
+# {
+# // Iterated once.
+# do
+# {
+# _GLF_color = vec4(1, _int_0, _int_0, 1);
+# }
+# while(gl_FragCoord.y < 0.0);
+# }
+# }
+# }
+# }
+SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 10
+; Bound: 68
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %9 %24
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %9 "_GLF_color"
+ OpName %14 "buf0"
+ OpMemberName %14 0 "_GLF_uniform_int_values"
+ OpName %16 ""
+ OpName %24 "gl_FragCoord"
+ OpName %30 "buf1"
+ OpMemberName %30 0 "_GLF_uniform_float_values"
+ OpName %32 ""
+ OpDecorate %9 Location 0
+ OpDecorate %13 ArrayStride 16
+ OpMemberDecorate %14 0 Offset 0
+ OpDecorate %14 Block
+ OpDecorate %16 DescriptorSet 0
+ OpDecorate %16 Binding 0
+ OpDecorate %24 BuiltIn FragCoord
+ OpDecorate %29 ArrayStride 16
+ OpMemberDecorate %30 0 Offset 0
+ OpDecorate %30 Block
+ OpDecorate %32 DescriptorSet 0
+ OpDecorate %32 Binding 1
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeFloat 32
+ %7 = OpTypeVector %6 4
+ %8 = OpTypePointer Output %7
+ %9 = OpVariable %8 Output
+ %10 = OpTypeInt 32 1
+ %11 = OpTypeInt 32 0
+ %12 = OpConstant %11 1
+ %13 = OpTypeArray %10 %12
+ %14 = OpTypeStruct %13
+ %15 = OpTypePointer Uniform %14
+ %16 = OpVariable %15 Uniform
+ %17 = OpConstant %10 0
+ %18 = OpTypePointer Uniform %10
+ %23 = OpTypePointer Input %7
+ %24 = OpVariable %23 Input
+ %25 = OpConstant %11 0
+ %26 = OpTypePointer Input %6
+ %29 = OpTypeArray %6 %12
+ %30 = OpTypeStruct %29
+ %31 = OpTypePointer Uniform %30
+ %32 = OpVariable %31 Uniform
+ %33 = OpTypePointer Uniform %6
+ %36 = OpTypeBool
+ %43 = OpConstant %6 0
+ %57 = OpConstant %6 1
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ %19 = OpAccessChain %18 %16 %17 %17
+ %20 = OpLoad %10 %19
+ %21 = OpConvertSToF %6 %20
+ %22 = OpCompositeConstruct %7 %21 %21 %21 %21
+ OpStore %9 %22
+ %27 = OpAccessChain %26 %24 %25
+ %28 = OpLoad %6 %27
+ %34 = OpAccessChain %33 %32 %17 %17
+ %35 = OpLoad %6 %34
+ %37 = OpFOrdLessThan %36 %28 %35
+ OpSelectionMerge %39 None
+ OpBranchConditional %37 %38 %40
+ %38 = OpLabel
+ OpBranch %39
+ %40 = OpLabel
+ %41 = OpAccessChain %26 %24 %12
+ %42 = OpLoad %6 %41
+ %44 = OpFOrdLessThan %36 %42 %43
+ OpSelectionMerge %46 None
+ OpBranchConditional %44 %45 %47
+ %45 = OpLabel
+ OpBranch %46
+ %47 = OpLabel
+ %48 = OpAccessChain %26 %24 %25
+ %49 = OpLoad %6 %48
+ %50 = OpFOrdGreaterThanEqual %36 %49 %43
+ OpSelectionMerge %52 None
+ OpBranchConditional %50 %51 %52
+ %51 = OpLabel
+ OpBranch %53
+ %53 = OpLabel
+ OpLoopMerge %55 %56 None
+ OpBranch %54
+ %54 = OpLabel
+ %58 = OpAccessChain %18 %16 %17 %17
+ %59 = OpLoad %10 %58
+ %60 = OpConvertSToF %6 %59
+ %61 = OpAccessChain %18 %16 %17 %17
+ %62 = OpLoad %10 %61
+ %63 = OpConvertSToF %6 %62
+ %64 = OpCompositeConstruct %7 %57 %60 %63 %57
+ OpStore %9 %64
+ OpBranch %56
+ %56 = OpLabel
+ %65 = OpAccessChain %26 %24 %12
+ %66 = OpLoad %6 %65
+ %67 = OpFOrdLessThan %36 %66 %43
+ OpBranchConditional %67 %53 %55
+ %55 = OpLabel
+ OpBranch %52
+ %52 = OpLabel
+ OpBranch %46
+ %46 = OpLabel
+ OpBranch %39
+ %39 = OpLabel
+ OpReturn
+ OpFunctionEnd
+END
+
+# uniforms for variant
+
+# _GLF_uniform_float_values
+BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA
+ 0.0
+END
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 0
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+ ATTACH variant_vertex_shader
+ ATTACH variant_fragment_shader
+ FRAMEBUFFER_SIZE 32 32
+ BIND BUFFER variant_framebuffer AS color LOCATION 0
+ BIND BUFFER variant__GLF_uniform_float_values AS uniform DESCRIPTOR_SET 0 BINDING 1
+ BIND BUFFER variant__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 0
+END
+CLEAR_COLOR variant_pipeline 0 0 0 255
+
+CLEAR variant_pipeline
+RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 32 32
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 255 0 0 255
--- /dev/null
+#!amber
+
+# Copyright 2022 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+# A test for a coverage-gap found by the GraphicsFuzz project.
+
+# Short description: A fragment shader that covers specific LLVM code paths
+
+# The test passes because the shader always writes red.
+
+# Optimized using spirv-opt with the following arguments:
+# '--eliminate-dead-branches'
+# '--merge-blocks'
+# '--eliminate-dead-code-aggressive'
+# '--convert-local-access-chains'
+# '--eliminate-dead-branches'
+# '--merge-blocks'
+# '--eliminate-local-multi-store'
+# '--reduce-load-size'
+# '--convert-local-access-chains'
+# '--eliminate-local-multi-store'
+# '--combine-access-chains'
+# '--vector-dce'
+# '--scalar-replacement=100'
+# '--eliminate-dead-branches'
+# '--merge-blocks'
+# '--copy-propagate-arrays'
+# '--eliminate-dead-branches'
+# '--scalar-replacement=100'
+# '--eliminate-dead-branches'
+# '--merge-blocks'
+# '--vector-dce'
+# '--convert-local-access-chains'
+# '--combine-access-chains'
+# '--redundancy-elimination'
+# '--inline-entry-points-exhaustive'
+# '--combine-access-chains'
+# '--eliminate-dead-branches'
+# '--eliminate-local-multi-store'
+# spirv-opt commit hash: a0370efd589be33d5d9a85cfde2f85841b3755af
+
+
+
+SHADER vertex variant_vertex_shader PASSTHROUGH
+
+# variant_fragment_shader is derived from the following GLSL:
+# #version 320 es
+# #define _int_1 _GLF_uniform_int_values[0]
+# #define _int_0 _GLF_uniform_int_values[1]
+#
+# precision highp int;
+# precision highp float;
+#
+# // Contents of _GLF_uniform_int_values: [1, 0]
+# layout(set = 0, binding = 0) uniform buf0
+# {
+# int _GLF_uniform_int_values[2];
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# void func(int x)
+# {
+# // Always false.
+# if(x > _int_1)
+# {
+# return;
+# }
+#
+# ivec2 a = ivec2(_int_1);
+# // b = 1 & ((~0 | ~0) >> 1) = 1 & (~0 >> 1) = 1 & ~0 = 1
+# int b = _int_1 & (((a.x != _int_1 ? 0 : ~ 0) | (a.x != _int_1 ? 0 : ~ 0)) >> _int_1);
+#
+# // Always true.
+# if(b == _int_1)
+# {
+# _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1);
+# }
+# else
+# {
+# _GLF_color = vec4(_int_0);
+# }
+# }
+#
+# void main()
+# {
+# func(_int_1);
+# }
+SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 10
+; Bound: 91
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %65
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %10 "func(i1;"
+ OpName %9 "x"
+ OpName %16 "buf0"
+ OpMemberName %16 0 "_GLF_uniform_int_values"
+ OpName %18 ""
+ OpName %30 "a"
+ OpName %34 "b"
+ OpName %65 "_GLF_color"
+ OpName %85 "param"
+ OpDecorate %15 ArrayStride 16
+ OpMemberDecorate %16 0 Offset 0
+ OpDecorate %16 Block
+ OpDecorate %18 DescriptorSet 0
+ OpDecorate %18 Binding 0
+ OpDecorate %65 Location 0
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeInt 32 1
+ %7 = OpTypePointer Function %6
+ %8 = OpTypeFunction %2 %7
+ %13 = OpTypeInt 32 0
+ %14 = OpConstant %13 2
+ %15 = OpTypeArray %6 %14
+ %16 = OpTypeStruct %15
+ %17 = OpTypePointer Uniform %16
+ %18 = OpVariable %17 Uniform
+ %19 = OpConstant %6 0
+ %20 = OpTypePointer Uniform %6
+ %23 = OpTypeBool
+ %28 = OpTypeVector %6 2
+ %29 = OpTypePointer Function %28
+ %37 = OpConstant %13 0
+ %43 = OpConstant %6 -1
+ %62 = OpTypeFloat 32
+ %63 = OpTypeVector %62 4
+ %64 = OpTypePointer Output %63
+ %65 = OpVariable %64 Output
+ %69 = OpConstant %6 1
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ %85 = OpVariable %7 Function
+ %86 = OpAccessChain %20 %18 %19 %19
+ %87 = OpLoad %6 %86
+ OpStore %85 %87
+ %88 = OpFunctionCall %2 %10 %85
+ OpReturn
+ OpFunctionEnd
+ %10 = OpFunction %2 None %8
+ %9 = OpFunctionParameter %7
+ %11 = OpLabel
+ %30 = OpVariable %29 Function
+ %34 = OpVariable %7 Function
+ %12 = OpLoad %6 %9
+ %21 = OpAccessChain %20 %18 %19 %19
+ %22 = OpLoad %6 %21
+ %24 = OpSGreaterThan %23 %12 %22
+ OpSelectionMerge %26 None
+ OpBranchConditional %24 %25 %26
+ %25 = OpLabel
+ OpReturn
+ %26 = OpLabel
+ %33 = OpCompositeConstruct %28 %22 %22
+ OpStore %30 %33
+ %38 = OpAccessChain %7 %30 %37
+ %89 = OpLoad %28 %30
+ %39 = OpCompositeExtract %6 %89 0
+ %42 = OpINotEqual %23 %39 %22
+ %44 = OpSelect %6 %42 %19 %43
+ %90 = OpLoad %28 %30
+ %46 = OpCompositeExtract %6 %90 0
+ %49 = OpINotEqual %23 %46 %22
+ %50 = OpSelect %6 %49 %19 %43
+ %51 = OpBitwiseOr %6 %44 %50
+ %54 = OpShiftRightArithmetic %6 %51 %22
+ %55 = OpBitwiseAnd %6 %22 %54
+ OpStore %34 %55
+ %59 = OpIEqual %23 %55 %22
+ OpSelectionMerge %61 None
+ OpBranchConditional %59 %60 %80
+ %60 = OpLabel
+ %68 = OpConvertSToF %62 %22
+ %70 = OpAccessChain %20 %18 %19 %69
+ %71 = OpLoad %6 %70
+ %72 = OpConvertSToF %62 %71
+ %79 = OpCompositeConstruct %63 %68 %72 %72 %68
+ OpStore %65 %79
+ OpBranch %61
+ %80 = OpLabel
+ %81 = OpAccessChain %20 %18 %19 %69
+ %82 = OpLoad %6 %81
+ %83 = OpConvertSToF %62 %82
+ %84 = OpCompositeConstruct %63 %83 %83 %83 %83
+ OpStore %65 %84
+ OpBranch %61
+ %61 = OpLabel
+ OpReturn
+ OpFunctionEnd
+END
+
+# uniforms for variant
+
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 1 0
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+ ATTACH variant_vertex_shader
+ ATTACH variant_fragment_shader
+ FRAMEBUFFER_SIZE 32 32
+ BIND BUFFER variant_framebuffer AS color LOCATION 0
+ BIND BUFFER variant__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 0
+END
+CLEAR_COLOR variant_pipeline 0 0 0 255
+
+CLEAR variant_pipeline
+RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 32 32
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 255 0 0 255
--- /dev/null
+#!amber
+
+# Copyright 2022 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+# A test for a coverage-gap found by the GraphicsFuzz project.
+
+# Short description: A fragment shader that covers specific LLVM code paths
+
+# The test passes because the shader always writes red.
+
+SHADER vertex variant_vertex_shader PASSTHROUGH
+
+# variant_fragment_shader is derived from the following GLSL:
+# #version 320 es
+#
+# #define _int_2 _GLF_uniform_int_values[0]
+# #define _int_1 _GLF_uniform_int_values[1]
+# #define _int_0 _GLF_uniform_int_values[2]
+# #define _int_10 _GLF_uniform_int_values[3]
+# #define _float_2_0 _GLF_uniform_float_values[0]
+# #define _float_1_0 _GLF_uniform_float_values[1]
+# #define _float_0_0 _GLF_uniform_float_values[2]
+#
+# precision highp float;
+# precision highp int;
+#
+# // Contents of _GLF_uniform_int_values: [2, 1, 0, 10]
+# layout(set = 0, binding = 0) uniform buf0
+# {
+# int _GLF_uniform_int_values[4];
+# };
+#
+# // Contents of _GLF_uniform_float_values: [2.0, 1.0, 0.0]
+# layout(set = 0, binding = 1) uniform buf1
+# {
+# float _GLF_uniform_float_values[3];
+# };
+#
+# // Contents of zero: 0.0
+# layout(set = 0, binding = 2) uniform buf2
+# {
+# float zero;
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# void main()
+# {
+# float data[10] = float[10](_float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0);
+#
+# // Set elements 1..9 to zero.
+# for(int i = _int_1; i < _int_10; i ++)
+# {
+# data[i] = zero;
+# }
+#
+# for(int i = 0; i < 9; i ++)
+# {
+# // True for i = 1.
+# if(data[i] < _float_1_0)
+# {
+# data[i] = _float_2_0;
+# break;
+# }
+# }
+#
+# // Always true.
+# if(data[_int_0] == _float_1_0 && data[_int_1] == _float_2_0 && data[_int_2] == _float_0_0)
+# {
+# _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1);
+# }
+# else
+# {
+# _GLF_color = vec4(_int_0);
+# }
+# }
+SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 10
+; Bound: 148
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %129
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %11 "data"
+ OpName %14 "buf1"
+ OpMemberName %14 0 "_GLF_uniform_float_values"
+ OpName %16 ""
+ OpName %43 "i"
+ OpName %46 "buf0"
+ OpMemberName %46 0 "_GLF_uniform_int_values"
+ OpName %48 ""
+ OpName %64 "buf2"
+ OpMemberName %64 0 "zero"
+ OpName %66 ""
+ OpName %73 "i"
+ OpName %129 "_GLF_color"
+ OpDecorate %13 ArrayStride 16
+ OpMemberDecorate %14 0 Offset 0
+ OpDecorate %14 Block
+ OpDecorate %16 DescriptorSet 0
+ OpDecorate %16 Binding 1
+ OpDecorate %45 ArrayStride 16
+ OpMemberDecorate %46 0 Offset 0
+ OpDecorate %46 Block
+ OpDecorate %48 DescriptorSet 0
+ OpDecorate %48 Binding 0
+ OpMemberDecorate %64 0 Offset 0
+ OpDecorate %64 Block
+ OpDecorate %66 DescriptorSet 0
+ OpDecorate %66 Binding 2
+ OpDecorate %129 Location 0
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeFloat 32
+ %7 = OpTypeInt 32 0
+ %8 = OpConstant %7 10
+ %9 = OpTypeArray %6 %8
+ %10 = OpTypePointer Function %9
+ %12 = OpConstant %7 3
+ %13 = OpTypeArray %6 %12
+ %14 = OpTypeStruct %13
+ %15 = OpTypePointer Uniform %14
+ %16 = OpVariable %15 Uniform
+ %17 = OpTypeInt 32 1
+ %18 = OpConstant %17 0
+ %19 = OpConstant %17 1
+ %20 = OpTypePointer Uniform %6
+ %42 = OpTypePointer Function %17
+ %44 = OpConstant %7 4
+ %45 = OpTypeArray %17 %44
+ %46 = OpTypeStruct %45
+ %47 = OpTypePointer Uniform %46
+ %48 = OpVariable %47 Uniform
+ %49 = OpTypePointer Uniform %17
+ %58 = OpConstant %17 3
+ %61 = OpTypeBool
+ %64 = OpTypeStruct %6
+ %65 = OpTypePointer Uniform %64
+ %66 = OpVariable %65 Uniform
+ %69 = OpTypePointer Function %6
+ %80 = OpConstant %17 9
+ %97 = OpConstant %17 2
+ %127 = OpTypeVector %6 4
+ %128 = OpTypePointer Output %127
+ %129 = OpVariable %128 Output
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ %11 = OpVariable %10 Function
+ %43 = OpVariable %42 Function
+ %73 = OpVariable %42 Function
+ %21 = OpAccessChain %20 %16 %18 %19
+ %22 = OpLoad %6 %21
+ %23 = OpAccessChain %20 %16 %18 %19
+ %24 = OpLoad %6 %23
+ %25 = OpAccessChain %20 %16 %18 %19
+ %26 = OpLoad %6 %25
+ %27 = OpAccessChain %20 %16 %18 %19
+ %28 = OpLoad %6 %27
+ %29 = OpAccessChain %20 %16 %18 %19
+ %30 = OpLoad %6 %29
+ %31 = OpAccessChain %20 %16 %18 %19
+ %32 = OpLoad %6 %31
+ %33 = OpAccessChain %20 %16 %18 %19
+ %34 = OpLoad %6 %33
+ %35 = OpAccessChain %20 %16 %18 %19
+ %36 = OpLoad %6 %35
+ %37 = OpAccessChain %20 %16 %18 %19
+ %38 = OpLoad %6 %37
+ %39 = OpAccessChain %20 %16 %18 %19
+ %40 = OpLoad %6 %39
+ %41 = OpCompositeConstruct %9 %22 %24 %26 %28 %30 %32 %34 %36 %38 %40
+ OpStore %11 %41
+ %50 = OpAccessChain %49 %48 %18 %19
+ %51 = OpLoad %17 %50
+ OpStore %43 %51
+ OpBranch %52
+ %52 = OpLabel
+ OpLoopMerge %54 %55 None
+ OpBranch %56
+ %56 = OpLabel
+ %57 = OpLoad %17 %43
+ %59 = OpAccessChain %49 %48 %18 %58
+ %60 = OpLoad %17 %59
+ %62 = OpSLessThan %61 %57 %60
+ OpBranchConditional %62 %53 %54
+ %53 = OpLabel
+ %63 = OpLoad %17 %43
+ %67 = OpAccessChain %20 %66 %18
+ %68 = OpLoad %6 %67
+ %70 = OpAccessChain %69 %11 %63
+ OpStore %70 %68
+ OpBranch %55
+ %55 = OpLabel
+ %71 = OpLoad %17 %43
+ %72 = OpIAdd %17 %71 %19
+ OpStore %43 %72
+ OpBranch %52
+ %54 = OpLabel
+ OpStore %73 %18
+ OpBranch %74
+ %74 = OpLabel
+ OpLoopMerge %76 %77 None
+ OpBranch %78
+ %78 = OpLabel
+ %79 = OpLoad %17 %73
+ %81 = OpSLessThan %61 %79 %80
+ OpBranchConditional %81 %75 %76
+ %75 = OpLabel
+ %82 = OpLoad %17 %73
+ %83 = OpAccessChain %69 %11 %82
+ %84 = OpLoad %6 %83
+ %85 = OpAccessChain %20 %16 %18 %19
+ %86 = OpLoad %6 %85
+ %87 = OpFOrdLessThan %61 %84 %86
+ OpSelectionMerge %89 None
+ OpBranchConditional %87 %88 %89
+ %88 = OpLabel
+ %90 = OpLoad %17 %73
+ %91 = OpAccessChain %20 %16 %18 %18
+ %92 = OpLoad %6 %91
+ %93 = OpAccessChain %69 %11 %90
+ OpStore %93 %92
+ OpBranch %76
+ %89 = OpLabel
+ OpBranch %77
+ %77 = OpLabel
+ %95 = OpLoad %17 %73
+ %96 = OpIAdd %17 %95 %19
+ OpStore %73 %96
+ OpBranch %74
+ %76 = OpLabel
+ %98 = OpAccessChain %49 %48 %18 %97
+ %99 = OpLoad %17 %98
+ %100 = OpAccessChain %69 %11 %99
+ %101 = OpLoad %6 %100
+ %102 = OpAccessChain %20 %16 %18 %19
+ %103 = OpLoad %6 %102
+ %104 = OpFOrdEqual %61 %101 %103
+ OpSelectionMerge %106 None
+ OpBranchConditional %104 %105 %106
+ %105 = OpLabel
+ %107 = OpAccessChain %49 %48 %18 %19
+ %108 = OpLoad %17 %107
+ %109 = OpAccessChain %69 %11 %108
+ %110 = OpLoad %6 %109
+ %111 = OpAccessChain %20 %16 %18 %18
+ %112 = OpLoad %6 %111
+ %113 = OpFOrdEqual %61 %110 %112
+ OpBranch %106
+ %106 = OpLabel
+ %114 = OpPhi %61 %104 %76 %113 %105
+ OpSelectionMerge %116 None
+ OpBranchConditional %114 %115 %116
+ %115 = OpLabel
+ %117 = OpAccessChain %49 %48 %18 %18
+ %118 = OpLoad %17 %117
+ %119 = OpAccessChain %69 %11 %118
+ %120 = OpLoad %6 %119
+ %121 = OpAccessChain %20 %16 %18 %97
+ %122 = OpLoad %6 %121
+ %123 = OpFOrdEqual %61 %120 %122
+ OpBranch %116
+ %116 = OpLabel
+ %124 = OpPhi %61 %114 %106 %123 %115
+ OpSelectionMerge %126 None
+ OpBranchConditional %124 %125 %143
+ %125 = OpLabel
+ %130 = OpAccessChain %49 %48 %18 %19
+ %131 = OpLoad %17 %130
+ %132 = OpConvertSToF %6 %131
+ %133 = OpAccessChain %49 %48 %18 %97
+ %134 = OpLoad %17 %133
+ %135 = OpConvertSToF %6 %134
+ %136 = OpAccessChain %49 %48 %18 %97
+ %137 = OpLoad %17 %136
+ %138 = OpConvertSToF %6 %137
+ %139 = OpAccessChain %49 %48 %18 %19
+ %140 = OpLoad %17 %139
+ %141 = OpConvertSToF %6 %140
+ %142 = OpCompositeConstruct %127 %132 %135 %138 %141
+ OpStore %129 %142
+ OpBranch %126
+ %143 = OpLabel
+ %144 = OpAccessChain %49 %48 %18 %97
+ %145 = OpLoad %17 %144
+ %146 = OpConvertSToF %6 %145
+ %147 = OpCompositeConstruct %127 %146 %146 %146 %146
+ OpStore %129 %147
+ OpBranch %126
+ %126 = OpLabel
+ OpReturn
+ OpFunctionEnd
+END
+
+# uniforms for variant
+
+# zero
+BUFFER variant_zero DATA_TYPE float STD140 DATA
+ 0.0
+END
+# _GLF_uniform_float_values
+BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA
+ 2.0 1.0 0.0
+END
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 2 1 0 10
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+ ATTACH variant_vertex_shader
+ ATTACH variant_fragment_shader
+ FRAMEBUFFER_SIZE 32 32
+ BIND BUFFER variant_framebuffer AS color LOCATION 0
+ BIND BUFFER variant_zero AS uniform DESCRIPTOR_SET 0 BINDING 2
+ BIND BUFFER variant__GLF_uniform_float_values AS uniform DESCRIPTOR_SET 0 BINDING 1
+ BIND BUFFER variant__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 0
+END
+CLEAR_COLOR variant_pipeline 0 0 0 255
+
+CLEAR variant_pipeline
+RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 32 32
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 255 0 0 255
--- /dev/null
+#!amber
+
+# Copyright 2022 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+# A test for a coverage-gap found by the GraphicsFuzz project.
+
+# Short description: A fragment shader that covers specific LLVM code paths
+
+# The test passes because the shader always writes red.
+
+SHADER vertex variant_vertex_shader PASSTHROUGH
+
+# variant_fragment_shader is derived from the following GLSL:
+# #version 320 es
+#
+# #define _int_2 _GLF_uniform_int_values[0]
+# #define _int_1 _GLF_uniform_int_values[1]
+# #define _int_0 _GLF_uniform_int_values[2]
+# #define _float_2_0 _GLF_uniform_float_values[0]
+# #define _float_1_0 _GLF_uniform_float_values[1]
+# #define _float_0_0 _GLF_uniform_float_values[2]
+#
+# precision highp float;
+# precision highp int;
+#
+# // Contents of _GLF_uniform_int_values: [2, 1, 0]
+# layout(set = 0, binding = 0) uniform buf0
+# {
+# int _GLF_uniform_int_values[3];
+# };
+#
+# // Contents of _GLF_uniform_float_values: [2.0, 1.0, 0.0]
+# layout(set = 0, binding = 1) uniform buf1
+# {
+# float _GLF_uniform_float_values[3];
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# void main()
+# {
+# float data[3] = float[3](1.0, _float_1_0, _float_1_0);
+#
+# // data becomes [1, 0, 0].
+# for(int i = 1; i < 3; i++)
+# {
+# data[i] = _float_0_0;
+# }
+#
+# // data becomes [1, 2, 0].
+# for(int i = 0; i < 3; i++)
+# {
+# if(data[i] < _float_1_0)
+# {
+# data[i] = _float_2_0;
+# break;
+# }
+# }
+#
+# // Always true.
+# if(data[_int_0] == _float_1_0 && data[_int_1] == _float_2_0 && data[_int_2] == _float_0_0)
+# {
+# _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1);
+# }
+# else
+# {
+# _GLF_color = vec4(_int_0);
+# }
+# }
+SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 10
+; Bound: 123
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %104
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %11 "data"
+ OpName %14 "buf1"
+ OpMemberName %14 0 "_GLF_uniform_float_values"
+ OpName %16 ""
+ OpName %27 "i"
+ OpName %45 "i"
+ OpName %69 "buf0"
+ OpMemberName %69 0 "_GLF_uniform_int_values"
+ OpName %71 ""
+ OpName %104 "_GLF_color"
+ OpDecorate %13 ArrayStride 16
+ OpMemberDecorate %14 0 Offset 0
+ OpDecorate %14 Block
+ OpDecorate %16 DescriptorSet 0
+ OpDecorate %16 Binding 1
+ OpDecorate %68 ArrayStride 16
+ OpMemberDecorate %69 0 Offset 0
+ OpDecorate %69 Block
+ OpDecorate %71 DescriptorSet 0
+ OpDecorate %71 Binding 0
+ OpDecorate %104 Location 0
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeFloat 32
+ %7 = OpTypeInt 32 0
+ %8 = OpConstant %7 3
+ %9 = OpTypeArray %6 %8
+ %10 = OpTypePointer Function %9
+ %12 = OpConstant %6 1
+ %13 = OpTypeArray %6 %8
+ %14 = OpTypeStruct %13
+ %15 = OpTypePointer Uniform %14
+ %16 = OpVariable %15 Uniform
+ %17 = OpTypeInt 32 1
+ %18 = OpConstant %17 0
+ %19 = OpConstant %17 1
+ %20 = OpTypePointer Uniform %6
+ %26 = OpTypePointer Function %17
+ %34 = OpConstant %17 3
+ %35 = OpTypeBool
+ %38 = OpConstant %17 2
+ %41 = OpTypePointer Function %6
+ %68 = OpTypeArray %17 %8
+ %69 = OpTypeStruct %68
+ %70 = OpTypePointer Uniform %69
+ %71 = OpVariable %70 Uniform
+ %72 = OpTypePointer Uniform %17
+ %102 = OpTypeVector %6 4
+ %103 = OpTypePointer Output %102
+ %104 = OpVariable %103 Output
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ %11 = OpVariable %10 Function
+ %27 = OpVariable %26 Function
+ %45 = OpVariable %26 Function
+ %21 = OpAccessChain %20 %16 %18 %19
+ %22 = OpLoad %6 %21
+ %23 = OpAccessChain %20 %16 %18 %19
+ %24 = OpLoad %6 %23
+ %25 = OpCompositeConstruct %9 %12 %22 %24
+ OpStore %11 %25
+ OpStore %27 %19
+ OpBranch %28
+ %28 = OpLabel
+ OpLoopMerge %30 %31 None
+ OpBranch %32
+ %32 = OpLabel
+ %33 = OpLoad %17 %27
+ %36 = OpSLessThan %35 %33 %34
+ OpBranchConditional %36 %29 %30
+ %29 = OpLabel
+ %37 = OpLoad %17 %27
+ %39 = OpAccessChain %20 %16 %18 %38
+ %40 = OpLoad %6 %39
+ %42 = OpAccessChain %41 %11 %37
+ OpStore %42 %40
+ OpBranch %31
+ %31 = OpLabel
+ %43 = OpLoad %17 %27
+ %44 = OpIAdd %17 %43 %19
+ OpStore %27 %44
+ OpBranch %28
+ %30 = OpLabel
+ OpStore %45 %18
+ OpBranch %46
+ %46 = OpLabel
+ OpLoopMerge %48 %49 None
+ OpBranch %50
+ %50 = OpLabel
+ %51 = OpLoad %17 %45
+ %52 = OpSLessThan %35 %51 %34
+ OpBranchConditional %52 %47 %48
+ %47 = OpLabel
+ %53 = OpLoad %17 %45
+ %54 = OpAccessChain %41 %11 %53
+ %55 = OpLoad %6 %54
+ %56 = OpAccessChain %20 %16 %18 %19
+ %57 = OpLoad %6 %56
+ %58 = OpFOrdLessThan %35 %55 %57
+ OpSelectionMerge %60 None
+ OpBranchConditional %58 %59 %60
+ %59 = OpLabel
+ %61 = OpLoad %17 %45
+ %62 = OpAccessChain %20 %16 %18 %18
+ %63 = OpLoad %6 %62
+ %64 = OpAccessChain %41 %11 %61
+ OpStore %64 %63
+ OpBranch %48
+ %60 = OpLabel
+ OpBranch %49
+ %49 = OpLabel
+ %66 = OpLoad %17 %45
+ %67 = OpIAdd %17 %66 %19
+ OpStore %45 %67
+ OpBranch %46
+ %48 = OpLabel
+ %73 = OpAccessChain %72 %71 %18 %38
+ %74 = OpLoad %17 %73
+ %75 = OpAccessChain %41 %11 %74
+ %76 = OpLoad %6 %75
+ %77 = OpAccessChain %20 %16 %18 %19
+ %78 = OpLoad %6 %77
+ %79 = OpFOrdEqual %35 %76 %78
+ OpSelectionMerge %81 None
+ OpBranchConditional %79 %80 %81
+ %80 = OpLabel
+ %82 = OpAccessChain %72 %71 %18 %19
+ %83 = OpLoad %17 %82
+ %84 = OpAccessChain %41 %11 %83
+ %85 = OpLoad %6 %84
+ %86 = OpAccessChain %20 %16 %18 %18
+ %87 = OpLoad %6 %86
+ %88 = OpFOrdEqual %35 %85 %87
+ OpBranch %81
+ %81 = OpLabel
+ %89 = OpPhi %35 %79 %48 %88 %80
+ OpSelectionMerge %91 None
+ OpBranchConditional %89 %90 %91
+ %90 = OpLabel
+ %92 = OpAccessChain %72 %71 %18 %18
+ %93 = OpLoad %17 %92
+ %94 = OpAccessChain %41 %11 %93
+ %95 = OpLoad %6 %94
+ %96 = OpAccessChain %20 %16 %18 %38
+ %97 = OpLoad %6 %96
+ %98 = OpFOrdEqual %35 %95 %97
+ OpBranch %91
+ %91 = OpLabel
+ %99 = OpPhi %35 %89 %81 %98 %90
+ OpSelectionMerge %101 None
+ OpBranchConditional %99 %100 %118
+ %100 = OpLabel
+ %105 = OpAccessChain %72 %71 %18 %19
+ %106 = OpLoad %17 %105
+ %107 = OpConvertSToF %6 %106
+ %108 = OpAccessChain %72 %71 %18 %38
+ %109 = OpLoad %17 %108
+ %110 = OpConvertSToF %6 %109
+ %111 = OpAccessChain %72 %71 %18 %38
+ %112 = OpLoad %17 %111
+ %113 = OpConvertSToF %6 %112
+ %114 = OpAccessChain %72 %71 %18 %19
+ %115 = OpLoad %17 %114
+ %116 = OpConvertSToF %6 %115
+ %117 = OpCompositeConstruct %102 %107 %110 %113 %116
+ OpStore %104 %117
+ OpBranch %101
+ %118 = OpLabel
+ %119 = OpAccessChain %72 %71 %18 %38
+ %120 = OpLoad %17 %119
+ %121 = OpConvertSToF %6 %120
+ %122 = OpCompositeConstruct %102 %121 %121 %121 %121
+ OpStore %104 %122
+ OpBranch %101
+ %101 = OpLabel
+ OpReturn
+ OpFunctionEnd
+END
+
+# uniforms for variant
+
+# _GLF_uniform_float_values
+BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA
+ 2.0 1.0 0.0
+END
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 2 1 0
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+ ATTACH variant_vertex_shader
+ ATTACH variant_fragment_shader
+ FRAMEBUFFER_SIZE 32 32
+ BIND BUFFER variant_framebuffer AS color LOCATION 0
+ BIND BUFFER variant__GLF_uniform_float_values AS uniform DESCRIPTOR_SET 0 BINDING 1
+ BIND BUFFER variant__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 0
+END
+CLEAR_COLOR variant_pipeline 0 0 0 255
+
+CLEAR variant_pipeline
+RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 32 32
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 255 0 0 255
{ "cov-function-argument-uniform-float-loop-never-return.amber", "cov-function-argument-uniform-float-loop-never-return", "A fragment shader that covers specific LLVM code paths" },
{ "cov-function-clamp-min-identical-shift-right.amber", "cov-function-clamp-min-identical-shift-right", "A fragment shader that covers specific LLVM code paths" },
{ "cov-function-call-twice-clamp-global-variable.amber", "cov-function-call-twice-clamp-global-variable", "A fragment shader that covers specific LLVM code paths" },
+{ "cov-function-divide-argument-until-lt-one.amber", "cov-function-divide-argument-until-lt-one", "A fragment shader that covers specific LLVM code paths" },
{ "cov-function-find-lsb-ivec2-one.amber", "cov-function-find-lsb-ivec2-one", "A fragment shader that covers specific LLVM code paths" },
{ "cov-function-fragcoord-condition-always-return.amber", "cov-function-fragcoord-condition-always-return", "A fragment shader that covers specific LLVM code paths" },
{ "cov-function-infinite-loop-always-return.amber", "cov-function-infinite-loop-always-return", "A fragment shader that covers specific LLVM code paths" },
{ "cov-function-infinite-loop-return-identical-condition.amber", "cov-function-infinite-loop-return-identical-condition", "A fragment shader that covers specific LLVM code paths" },
{ "cov-function-large-array-max-clamp.amber", "cov-function-large-array-max-clamp", "A fragment shader that covers specific LLVM code paths" },
{ "cov-function-large-loop-break-argument-lte-global-loop-bound.amber", "cov-function-large-loop-break-argument-lte-global-loop-bound", "A fragment shader that covers specific LLVM code paths" },
+{ "cov-function-loop-check-determinant-zero-return-vector.amber", "cov-function-loop-check-determinant-zero-return-vector", "A fragment shader that covers specific LLVM code paths" },
{ "cov-function-loop-condition-uniform-shift-right.amber", "cov-function-loop-condition-uniform-shift-right", "A fragment shader that covers specific LLVM code paths" },
{ "cov-function-loop-condition-variable-less-than-min-itself.amber", "cov-function-loop-condition-variable-less-than-min-itself", "A fragment shader that covers specific LLVM code paths" },
{ "cov-function-loop-copy-array-elements-based-on-arguments.amber", "cov-function-loop-copy-array-elements-based-on-arguments", "A fragment shader that covers specific LLVM code paths" },
{ "cov-function-nested-loops-break-early-never-discard.amber", "cov-function-nested-loops-break-early-never-discard", "A fragment shader that covers specific LLVM code paths" },
{ "cov-function-nested-loops-limit-uniform-xor-uniform.amber", "cov-function-nested-loops-limit-uniform-xor-uniform", "A fragment shader that covers specific LLVM code paths" },
{ "cov-function-set-struct-field-zero-loop-reset-first-element.amber", "cov-function-set-struct-field-zero-loop-reset-first-element", "A fragment shader that covers specific LLVM code paths" },
+{ "cov-function-parameter-zero-divided-by-uniform.amber", "cov-function-parameter-zero-divided-by-uniform", "A fragment shader that covers specific LLVM code paths" },
+{ "cov-function-round-unpack-half-2x16.amber", "cov-function-round-unpack-half-2x16", "A fragment shader that covers specific LLVM code paths" },
+{ "cov-function-switch-case-constant-clamp-transpose-identity-matrices.amber", "cov-function-switch-case-constant-clamp-transpose-identity-matrices", "A fragment shader that covers specific LLVM code paths" },
{ "cov-function-trivial-switch-case.amber", "cov-function-trivial-switch-case", "A fragment shader that covers specific LLVM code paths" },
{ "cov-function-two-loops-limit-using-arguments-array-element-copies.amber", "cov-function-two-loops-limit-using-arguments-array-element-copies", "A fragment shader that covers specific LLVM code paths" },
{ "cov-function-undefined-shift-left-index-array-with-return-value.amber", "cov-function-undefined-shift-left-index-array-with-return-value", "A fragment shader that covers specific LLVM code paths" },
{ "cov-inc-array-element-loop-lsb.amber", "cov-inc-array-element-loop-lsb", "A fragment shader that covers a specific SSCP path" },
{ "cov-inc-inside-switch-and-for.amber", "cov-inc-inside-switch-and-for", "A fragment shader that covers a specific LLVM analysis code path." },
{ "cov-increment-array-element-in-loop.amber", "cov-increment-array-element-in-loop", "A fragment shader that covers specific NIR code paths" },
+{ "cov-increment-array-element-usub-borrow.amber", "cov-increment-array-element-usub-borrow", "A fragment shader that covers specific LLVM code paths" },
{ "cov-increment-float-in-loop-abs.amber", "cov-increment-float-in-loop-abs", "A fragment shader that covers specific BRW code paths" },
{ "cov-increment-global-counter-loop-function.amber", "cov-increment-global-counter-loop-function", "A fragment shader that covers specific NIR code paths" },
{ "cov-increment-inside-clamp.amber", "cov-increment-inside-clamp", "A fragment shader that covers specific value tracking and simplification paths" },
{ "cov-large-int-array-nested-loops-set-ivec-index-component-sum.amber", "cov-large-int-array-nested-loops-set-ivec-index-component-sum", "A fragment shader that covers specific LLVM code paths" },
{ "cov-large-loop-break-early-condition-iterator-divided.amber", "cov-large-loop-break-early-condition-iterator-divided", "A fragment shader that covers specific LLVM code paths" },
{ "cov-large-loop-multiply-integer-by-uniform-one.amber", "cov-large-loop-multiply-integer-by-uniform-one", "A fragment shader that covers specific LLVM code paths" },
+{ "cov-large-number-of-false-conditions-return-discard-continue.amber", "cov-large-number-of-false-conditions-return-discard-continue", "A fragment shader that covers specific LLVM code paths" },
{ "cov-ldexp-exponent-undefined-divided-fragcoord-never-executed.amber", "cov-ldexp-exponent-undefined-divided-fragcoord-never-executed", "A fragment shader that covers specific LLVM code paths" },
{ "cov-ldexp-undefined-mat-vec-multiply.amber", "cov-ldexp-undefined-mat-vec-multiply", "Covers specific inst combine simplify demanded and inst combine shifts path" },
{ "cov-left-shift-array-access.amber", "cov-left-shift-array-access", "A fragment shader that covers a specific inst combine shifts code path" },
{ "cov-loop-increment-or-divide-by-loop-index.amber", "cov-loop-increment-or-divide-by-loop-index", "A fragment shader that covers specific NIR code paths" },
{ "cov-loop-index-array-max-negative-zero.amber", "cov-loop-index-array-max-negative-zero", "A fragment shader that covers specific LLVM code paths" },
{ "cov-loop-integer-half-minus-one.amber", "cov-loop-integer-half-minus-one", "A fragment shader that covers specific LLVM code paths" },
+{ "cov-loop-iterator-bitwise-negate.amber", "cov-loop-iterator-bitwise-negate", "A fragment shader that covers specific LLVM code paths" },
{ "cov-loop-iterator-plus-one-variable-outside-index-array.amber", "cov-loop-iterator-plus-one-variable-outside-index-array", "A fragment shader that covers specific LLVM code paths" },
{ "cov-loop-large-array-index-clamp-negative-value.amber", "cov-loop-large-array-index-clamp-negative-value", "A fragment shader that covers specific LLVM code paths" },
{ "cov-loop-limiter-min-findlsb.amber", "cov-loop-limiter-min-findlsb", "A fragment shader that covers specific LLVM code paths" },
{ "cov-loop-multiple-iterator-variables-copy-array-elements.amber", "cov-loop-multiple-iterator-variables-copy-array-elements", "A fragment shader that covers specific LLVM code paths" },
{ "cov-loop-read-array-index-from-array-data.amber", "cov-loop-read-array-index-from-array-data", "A fragment shader that covers specific LLVM code paths" },
{ "cov-loop-max-divide-integer-by-ten.amber", "cov-loop-max-divide-integer-by-ten", "A fragment shader that covers specific LLVM code paths" },
+{ "cov-loop-overwrite-sample-texture-as-color-output.amber", "cov-loop-overwrite-sample-texture-as-color-output", "A fragment shader that covers specific LLVM code paths" },
{ "cov-loop-replace-output-color-restore-original.amber", "cov-loop-replace-output-color-restore-original", "A fragment shader that covers specific LLVM code paths" },
{ "cov-loop-returns-behind-true-and-false.amber", "cov-loop-returns-behind-true-and-false", "A fragment shader that covers specific NIR code paths" },
{ "cov-loop-sampled-texel-integer-counter.amber", "cov-loop-sampled-texel-integer-counter", "A fragment shader that covers specific LLVM code paths" },
{ "cov-min-intbitstofloat-undefined-never-used.amber", "cov-min-intbitstofloat-undefined-never-used", "A fragment shader that covers specific LLVM code paths" },
{ "cov-min-negative-constant-always-below-one.amber", "cov-min-negative-constant-always-below-one", "A fragment shader that covers specific LLVM code paths" },
{ "cov-min-nested-loop-same-value-for-variables.amber", "cov-min-nested-loop-same-value-for-variables", "A fragment shader that covers specific NIR code paths" },
+{ "cov-min-vec2-transpose-mat2-identity.amber", "cov-min-vec2-transpose-mat2-identity", "A fragment shader that covers specific LLVM code paths" },
{ "cov-missing-return-value-function-never-called.amber", "cov-missing-return-value-function-never-called", "A fragment shader that covers specific BRW code paths" },
{ "cov-mix-uninitialized-float-never-selected.amber", "cov-mix-uninitialized-float-never-selected", "A fragment shader that covers specific LLVM code paths" },
{ "cov-mix-uninitialized-vector-select-only-defined-data.amber", "cov-mix-uninitialized-vector-select-only-defined-data", "A fragment shader that covers specific LLVM code paths" },
{ "cov-nested-loop-large-array-index-using-vector-components.amber", "cov-nested-loop-large-array-index-using-vector-components", "A fragment shader that covers specific LLVM code paths" },
{ "cov-nested-loop-not-greater-than-increment-array-element.amber", "cov-nested-loop-not-greater-than-increment-array-element", "A fragment shader that covers specific LLVM code paths" },
{ "cov-nested-loop-undefined-smoothstep-never-executed.amber", "cov-nested-loop-undefined-smoothstep-never-executed", "A fragment shader that covers specific BRW code paths" },
+{ "cov-nested-loops-assign-vector-elements-from-matrix-no-negative-indexing.amber", "cov-nested-loops-assign-vector-elements-from-matrix-no-negative-indexing", "A fragment shader that covers specific LLVM code paths" },
{ "cov-nested-loops-clamp-ivec-push-constant-increment-global-counter.amber", "cov-nested-loops-clamp-ivec-push-constant-increment-global-counter", "A fragment shader that covers specific LLVM code paths" },
{ "cov-nested-loops-copy-array-elements-skip-first.amber", "cov-nested-loops-copy-array-elements-skip-first", "A fragment shader that covers specific LLVM code paths" },
{ "cov-nested-loops-decrease-ivec-component.amber", "cov-nested-loops-decrease-ivec-component", "A fragment shader that covers specific LLVM code paths" },
{ "cov-nested-loops-decrease-vector-component-by-matrix-element-global-loop-counter.amber", "cov-nested-loops-decrease-vector-component-by-matrix-element-global-loop-counter", "A fragment shader that covers specific LLVM code paths" },
{ "cov-nested-loops-float-array-select-by-fragcoord.amber", "cov-nested-loops-float-array-select-by-fragcoord", "A fragment shader that covers specific BRW code paths" },
{ "cov-nested-loops-float-bits-to-int-increment-array.amber", "cov-nested-loops-float-bits-to-int-increment-array", "A fragment shader that covers specific LLVM code paths" },
+{ "cov-nested-loops-fragcoord-conditions-empty-blocks.amber", "cov-nested-loops-fragcoord-conditions-empty-blocks", "A fragment shader that covers specific LLVM code paths" },
{ "cov-nested-loops-fragcoord-never-return-descending-loop.amber", "cov-nested-loops-fragcoord-never-return-descending-loop", "A fragment shader that covers specific LLVM code paths" },
{ "cov-nested-loops-global-counter-func-set-struct-field.amber", "cov-nested-loops-global-counter-func-set-struct-field", "A fragment shader that covers specific LLVM code paths" },
{ "cov-nested-loops-global-counter-increment-single-element.amber", "cov-nested-loops-global-counter-increment-single-element", "A fragment shader that covers specific LLVM code paths" },
{ "cov-nir-opt-large-constants-for-clamp-vector-access.amber", "cov-nir-opt-large-constants-for-clamp-vector-access", "A fragment shader that covers a specific nir opt large constants path" },
{ "cov-nir-opt-loop-unroll-if-if-if-if-do-while.amber", "cov-nir-opt-loop-unroll-if-if-if-if-do-while", "A fragment shader that covers a specific nir opt loop unroll path" },
{ "cov-nouble-negation-fragcoord-cast-ivec2-bitwise-and.amber", "cov-nouble-negation-fragcoord-cast-ivec2-bitwise-and", "A fragment shader that covers specific LLVM code paths" },
+{ "cov-one-bitwise-and-bitwise-or-full-bits.amber", "cov-one-bitwise-and-bitwise-or-full-bits", "A fragment shader that covers specific LLVM code paths" },
{ "cov-one-minus-clamp-always-one-cast-to-int.amber", "cov-one-minus-clamp-always-one-cast-to-int", "A fragment shader that covers specific NIR code paths" },
{ "cov-optimize-phis-for.amber", "cov-optimize-phis-for", "A fragment shader that cover specific optimize phis code paths" },
{ "cov-optimize-phis-for-for-do-while-if-if.amber", "cov-optimize-phis-for-for-do-while-if-if", "A fragment shader that covers a specific optimize PHIs code path" },
{ "cov-schedule-dag-rrlist-mix-log-cos.amber", "cov-schedule-dag-rrlist-mix-log-cos", "Covers a specific schedule dag register reduction list code path" },
{ "cov-selection-dag-inverse-clamp.amber", "cov-selection-dag-inverse-clamp", "A fragment shader that covers a specific selection DAG code path" },
{ "cov-selection-dag-same-cond-twice.amber", "cov-selection-dag-same-cond-twice", "A fragment shader that covers a specific selection DAG code path" },
+{ "cov-set-array-elements-to-uniform-check-value-break.amber", "cov-set-array-elements-to-uniform-check-value-break", "A fragment shader that covers specific LLVM code paths" },
{ "cov-set-output-color-function-call-nested-loop.amber", "cov-set-output-color-function-call-nested-loop", "A fragment shader that covers specific BRW code paths" },
{ "cov-set-vector-cos-fragcoord.amber", "cov-set-vector-cos-fragcoord", "A fragment shader that covers a specific set vector code path." },
{ "cov-sign-array-access-uaddcarry.amber", "cov-sign-array-access-uaddcarry", "A fragment shader that covers a specific inst combine compares code path" },
{ "cov-single-block-elim-self-assign.amber", "cov-single-block-elim-self-assign", "A fragment shader that covers a specific single block elimination path." },
{ "cov-single-store-elim-assume-store.amber", "cov-single-store-elim-assume-store", "A fragment shader that covers a specific single store elimination path." },
{ "cov-sinh-ldexp.amber", "cov-sinh-ldexp", "A fragment shader that covers a specific inst combine compares code path" },
+{ "cov-small-array-overwrite-most-uniform-value-check-data-break.amber", "cov-small-array-overwrite-most-uniform-value-check-data-break", "A fragment shader that covers specific LLVM code paths" },
{ "cov-ssa-rewrite-case-with-default.amber", "cov-ssa-rewrite-case-with-default", "A fragment shader that covers a specific SSA rewrite path." },
{ "cov-step-sinh.amber", "cov-step-sinh", "A fragment shader that covers a specific APFloat code path" },
{ "cov-struct-float-array-mix-uniform-vectors.amber", "cov-struct-float-array-mix-uniform-vectors", "A fragment shader that covers specific LLVM code paths" },
dEQP-VK.graphicsfuzz.cov-function-argument-uniform-float-loop-never-return
dEQP-VK.graphicsfuzz.cov-function-clamp-min-identical-shift-right
dEQP-VK.graphicsfuzz.cov-function-call-twice-clamp-global-variable
+dEQP-VK.graphicsfuzz.cov-function-divide-argument-until-lt-one
dEQP-VK.graphicsfuzz.cov-function-find-lsb-ivec2-one
dEQP-VK.graphicsfuzz.cov-function-fragcoord-condition-always-return
dEQP-VK.graphicsfuzz.cov-function-infinite-loop-always-return
dEQP-VK.graphicsfuzz.cov-function-infinite-loop-return-identical-condition
dEQP-VK.graphicsfuzz.cov-function-large-array-max-clamp
dEQP-VK.graphicsfuzz.cov-function-large-loop-break-argument-lte-global-loop-bound
+dEQP-VK.graphicsfuzz.cov-function-loop-check-determinant-zero-return-vector
dEQP-VK.graphicsfuzz.cov-function-loop-condition-uniform-shift-right
dEQP-VK.graphicsfuzz.cov-function-loop-condition-variable-less-than-min-itself
dEQP-VK.graphicsfuzz.cov-function-loop-copy-array-elements-based-on-arguments
dEQP-VK.graphicsfuzz.cov-function-nested-loops-break-early-never-discard
dEQP-VK.graphicsfuzz.cov-function-nested-loops-limit-uniform-xor-uniform
dEQP-VK.graphicsfuzz.cov-function-set-struct-field-zero-loop-reset-first-element
+dEQP-VK.graphicsfuzz.cov-function-parameter-zero-divided-by-uniform
+dEQP-VK.graphicsfuzz.cov-function-round-unpack-half-2x16
+dEQP-VK.graphicsfuzz.cov-function-switch-case-constant-clamp-transpose-identity-matrices
dEQP-VK.graphicsfuzz.cov-function-trivial-switch-case
dEQP-VK.graphicsfuzz.cov-function-two-loops-limit-using-arguments-array-element-copies
dEQP-VK.graphicsfuzz.cov-function-undefined-shift-left-index-array-with-return-value
dEQP-VK.graphicsfuzz.cov-inc-array-element-loop-lsb
dEQP-VK.graphicsfuzz.cov-inc-inside-switch-and-for
dEQP-VK.graphicsfuzz.cov-increment-array-element-in-loop
+dEQP-VK.graphicsfuzz.cov-increment-array-element-usub-borrow
dEQP-VK.graphicsfuzz.cov-increment-float-in-loop-abs
dEQP-VK.graphicsfuzz.cov-increment-global-counter-loop-function
dEQP-VK.graphicsfuzz.cov-increment-inside-clamp
dEQP-VK.graphicsfuzz.cov-large-int-array-nested-loops-set-ivec-index-component-sum
dEQP-VK.graphicsfuzz.cov-large-loop-break-early-condition-iterator-divided
dEQP-VK.graphicsfuzz.cov-large-loop-multiply-integer-by-uniform-one
+dEQP-VK.graphicsfuzz.cov-large-number-of-false-conditions-return-discard-continue
dEQP-VK.graphicsfuzz.cov-ldexp-exponent-undefined-divided-fragcoord-never-executed
dEQP-VK.graphicsfuzz.cov-ldexp-undefined-mat-vec-multiply
dEQP-VK.graphicsfuzz.cov-left-shift-array-access
dEQP-VK.graphicsfuzz.cov-loop-increment-or-divide-by-loop-index
dEQP-VK.graphicsfuzz.cov-loop-index-array-max-negative-zero
dEQP-VK.graphicsfuzz.cov-loop-integer-half-minus-one
+dEQP-VK.graphicsfuzz.cov-loop-iterator-bitwise-negate
dEQP-VK.graphicsfuzz.cov-loop-iterator-plus-one-variable-outside-index-array
dEQP-VK.graphicsfuzz.cov-loop-large-array-index-clamp-negative-value
dEQP-VK.graphicsfuzz.cov-loop-limiter-min-findlsb
dEQP-VK.graphicsfuzz.cov-loop-multiple-iterator-variables-copy-array-elements
dEQP-VK.graphicsfuzz.cov-loop-read-array-index-from-array-data
dEQP-VK.graphicsfuzz.cov-loop-max-divide-integer-by-ten
+dEQP-VK.graphicsfuzz.cov-loop-overwrite-sample-texture-as-color-output
dEQP-VK.graphicsfuzz.cov-loop-replace-output-color-restore-original
dEQP-VK.graphicsfuzz.cov-loop-returns-behind-true-and-false
dEQP-VK.graphicsfuzz.cov-loop-sampled-texel-integer-counter
dEQP-VK.graphicsfuzz.cov-min-intbitstofloat-undefined-never-used
dEQP-VK.graphicsfuzz.cov-min-negative-constant-always-below-one
dEQP-VK.graphicsfuzz.cov-min-nested-loop-same-value-for-variables
+dEQP-VK.graphicsfuzz.cov-min-vec2-transpose-mat2-identity
dEQP-VK.graphicsfuzz.cov-missing-return-value-function-never-called
dEQP-VK.graphicsfuzz.cov-mix-uninitialized-float-never-selected
dEQP-VK.graphicsfuzz.cov-mix-uninitialized-vector-select-only-defined-data
dEQP-VK.graphicsfuzz.cov-nested-loop-large-array-index-using-vector-components
dEQP-VK.graphicsfuzz.cov-nested-loop-not-greater-than-increment-array-element
dEQP-VK.graphicsfuzz.cov-nested-loop-undefined-smoothstep-never-executed
+dEQP-VK.graphicsfuzz.cov-nested-loops-assign-vector-elements-from-matrix-no-negative-indexing
dEQP-VK.graphicsfuzz.cov-nested-loops-clamp-ivec-push-constant-increment-global-counter
dEQP-VK.graphicsfuzz.cov-nested-loops-copy-array-elements-skip-first
dEQP-VK.graphicsfuzz.cov-nested-loops-decrease-ivec-component
dEQP-VK.graphicsfuzz.cov-nested-loops-decrease-vector-component-by-matrix-element-global-loop-counter
dEQP-VK.graphicsfuzz.cov-nested-loops-float-array-select-by-fragcoord
dEQP-VK.graphicsfuzz.cov-nested-loops-float-bits-to-int-increment-array
+dEQP-VK.graphicsfuzz.cov-nested-loops-fragcoord-conditions-empty-blocks
dEQP-VK.graphicsfuzz.cov-nested-loops-fragcoord-never-return-descending-loop
dEQP-VK.graphicsfuzz.cov-nested-loops-global-counter-func-set-struct-field
dEQP-VK.graphicsfuzz.cov-nested-loops-global-counter-increment-single-element
dEQP-VK.graphicsfuzz.cov-nir-opt-large-constants-for-clamp-vector-access
dEQP-VK.graphicsfuzz.cov-nir-opt-loop-unroll-if-if-if-if-do-while
dEQP-VK.graphicsfuzz.cov-nouble-negation-fragcoord-cast-ivec2-bitwise-and
+dEQP-VK.graphicsfuzz.cov-one-bitwise-and-bitwise-or-full-bits
dEQP-VK.graphicsfuzz.cov-one-minus-clamp-always-one-cast-to-int
dEQP-VK.graphicsfuzz.cov-optimize-phis-for
dEQP-VK.graphicsfuzz.cov-optimize-phis-for-for-do-while-if-if
dEQP-VK.graphicsfuzz.cov-schedule-dag-rrlist-mix-log-cos
dEQP-VK.graphicsfuzz.cov-selection-dag-inverse-clamp
dEQP-VK.graphicsfuzz.cov-selection-dag-same-cond-twice
+dEQP-VK.graphicsfuzz.cov-set-array-elements-to-uniform-check-value-break
dEQP-VK.graphicsfuzz.cov-set-output-color-function-call-nested-loop
dEQP-VK.graphicsfuzz.cov-set-vector-cos-fragcoord
dEQP-VK.graphicsfuzz.cov-sign-array-access-uaddcarry
dEQP-VK.graphicsfuzz.cov-single-block-elim-self-assign
dEQP-VK.graphicsfuzz.cov-single-store-elim-assume-store
dEQP-VK.graphicsfuzz.cov-sinh-ldexp
+dEQP-VK.graphicsfuzz.cov-small-array-overwrite-most-uniform-value-check-data-break
dEQP-VK.graphicsfuzz.cov-ssa-rewrite-case-with-default
dEQP-VK.graphicsfuzz.cov-step-sinh
dEQP-VK.graphicsfuzz.cov-struct-float-array-mix-uniform-vectors