This commit adds a batch of GraphicsFuzz coverage tests.
Components: Vulkan
New Tests:
dEQP-VK.graphicsfuzz.cov-clamp-vector-component-condition-using-matrix
dEQP-VK.graphicsfuzz.cov-color-output-undefined-in-unexecuted-branch
dEQP-VK.graphicsfuzz.cov-empty-loop-minus-one-modulo-variable-one
dEQP-VK.graphicsfuzz.cov-float-array-init-pow
dEQP-VK.graphicsfuzz.cov-fract-asin-undefined-never-used
dEQP-VK.graphicsfuzz.cov-function-fragcoord-condition-always-return
dEQP-VK.graphicsfuzz.cov-global-loop-counter-squared-comparison
dEQP-VK.graphicsfuzz.cov-isnan-asinh-clamp-always-zero
dEQP-VK.graphicsfuzz.cov-loop-dfdx-constant-divide
dEQP-VK.graphicsfuzz.cov-loop-integer-half-minus-one
dEQP-VK.graphicsfuzz.cov-min-intbitstofloat-undefined-never-used
dEQP-VK.graphicsfuzz.cov-pow-identical-value-sqrt
dEQP-VK.graphicsfuzz.cov-pow-undefined-result-condition-with-always-true
dEQP-VK.graphicsfuzz.cov-struct-float-array-mix-uniform-vectors
dEQP-VK.graphicsfuzz.cov-switch-fallthrough-variable-from-first-case
Change-Id: I239e7263068ddb6216f97c447e733cc2857fecfd
dEQP-VK.graphicsfuzz.cov-cast-float-to-int-and-back
dEQP-VK.graphicsfuzz.cov-clamp-loop-limit-increment-float-array
dEQP-VK.graphicsfuzz.cov-clamp-lower-limit-from-always-false
+dEQP-VK.graphicsfuzz.cov-clamp-vector-component-condition-using-matrix
dEQP-VK.graphicsfuzz.cov-clamp-vector-element-ceil-negative
dEQP-VK.graphicsfuzz.cov-clamp-vector-variable-negative-offset
dEQP-VK.graphicsfuzz.cov-clear-yz-inside-condition
+dEQP-VK.graphicsfuzz.cov-color-output-undefined-in-unexecuted-branch
dEQP-VK.graphicsfuzz.cov-combine-and-or-xor-gt-lt
dEQP-VK.graphicsfuzz.cov-condition-loop-index-bitwise-not
dEQP-VK.graphicsfuzz.cov-conditional-discard-inside-loop
dEQP-VK.graphicsfuzz.cov-derivative-uniform-vector-global-loop-count
dEQP-VK.graphicsfuzz.cov-descending-loop-min-max-always-zero
dEQP-VK.graphicsfuzz.cov-double-if-true-in-loop
+dEQP-VK.graphicsfuzz.cov-empty-loop-minus-one-modulo-variable-one
dEQP-VK.graphicsfuzz.cov-exp2-two
dEQP-VK.graphicsfuzz.cov-findlsb-division-by-zero
+dEQP-VK.graphicsfuzz.cov-float-array-init-pow
dEQP-VK.graphicsfuzz.cov-fold-and-in-for-loop-range
dEQP-VK.graphicsfuzz.cov-fold-bitwise-and-zero
dEQP-VK.graphicsfuzz.cov-fold-bitwise-or-full-mask
dEQP-VK.graphicsfuzz.cov-for-array-initializing-modulo
dEQP-VK.graphicsfuzz.cov-for-loop-min-increment-array-element
dEQP-VK.graphicsfuzz.cov-for-switch-fallthrough
+dEQP-VK.graphicsfuzz.cov-fract-asin-undefined-never-used
dEQP-VK.graphicsfuzz.cov-fract-smoothstep-undefined
dEQP-VK.graphicsfuzz.cov-fragcoord-clamp-array-access
dEQP-VK.graphicsfuzz.cov-fragcoord-multiply
+dEQP-VK.graphicsfuzz.cov-function-fragcoord-condition-always-return
dEQP-VK.graphicsfuzz.cov-function-vec2-never-discard
dEQP-VK.graphicsfuzz.cov-global-loop-bound-true-logical-or
dEQP-VK.graphicsfuzz.cov-global-loop-counter-float-accumulate-matrix
dEQP-VK.graphicsfuzz.cov-global-loop-counter-main-function-call
dEQP-VK.graphicsfuzz.cov-global-loop-counter-multiply-one-minus
+dEQP-VK.graphicsfuzz.cov-global-loop-counter-squared-comparison
dEQP-VK.graphicsfuzz.cov-if-conversion-identical-branches
dEQP-VK.graphicsfuzz.cov-if-switch-fallthrough
dEQP-VK.graphicsfuzz.cov-if-true-continue
dEQP-VK.graphicsfuzz.cov-intervalmap-set-stop
dEQP-VK.graphicsfuzz.cov-ir-builder-constant-fold-inst-combine-calls-value-tracking-findmsb-incr-if
dEQP-VK.graphicsfuzz.cov-irbuilder-matrix-cell-uniform
+dEQP-VK.graphicsfuzz.cov-isnan-asinh-clamp-always-zero
dEQP-VK.graphicsfuzz.cov-ldexp-undefined-mat-vec-multiply
dEQP-VK.graphicsfuzz.cov-left-shift-array-access
dEQP-VK.graphicsfuzz.cov-left-shift-right-shift-compare
dEQP-VK.graphicsfuzz.cov-loop-abs-multiply-offset
dEQP-VK.graphicsfuzz.cov-loop-clamp-to-one-empty-condition
dEQP-VK.graphicsfuzz.cov-loop-condition-double-negate
+dEQP-VK.graphicsfuzz.cov-loop-dfdx-constant-divide
dEQP-VK.graphicsfuzz.cov-loop-findmsb-findlsb
dEQP-VK.graphicsfuzz.cov-loop-increment-matrix-element-break-after-first-iteration
dEQP-VK.graphicsfuzz.cov-loop-increment-or-divide-by-loop-index
+dEQP-VK.graphicsfuzz.cov-loop-integer-half-minus-one
dEQP-VK.graphicsfuzz.cov-loop-logical-xor
dEQP-VK.graphicsfuzz.cov-loop-returns-behind-true-and-false
dEQP-VK.graphicsfuzz.cov-loop-with-two-integers
dEQP-VK.graphicsfuzz.cov-mem-pass-sum-struct-members
dEQP-VK.graphicsfuzz.cov-mem-pass-unused-component
dEQP-VK.graphicsfuzz.cov-merge-return-condition-twice
+dEQP-VK.graphicsfuzz.cov-min-intbitstofloat-undefined-never-used
dEQP-VK.graphicsfuzz.cov-min-nested-loop-same-value-for-variables
dEQP-VK.graphicsfuzz.cov-mod-acosh
dEQP-VK.graphicsfuzz.cov-mod-uint-bits-float
dEQP-VK.graphicsfuzz.cov-pattern-match-signum
dEQP-VK.graphicsfuzz.cov-pattern-match-single-bit
dEQP-VK.graphicsfuzz.cov-peephole-optimizer-target-instr-info-for-if-if-if
+dEQP-VK.graphicsfuzz.cov-pow-identical-value-sqrt
dEQP-VK.graphicsfuzz.cov-pow-undefined
+dEQP-VK.graphicsfuzz.cov-pow-undefined-result-condition-with-always-true
dEQP-VK.graphicsfuzz.cov-rcp-negative-int
dEQP-VK.graphicsfuzz.cov-reciprocal-var-minus-one
dEQP-VK.graphicsfuzz.cov-reduce-load-replace-extract
dEQP-VK.graphicsfuzz.cov-sinh-ldexp
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
dEQP-VK.graphicsfuzz.cov-sum-uniform-vector-components-round
+dEQP-VK.graphicsfuzz.cov-switch-fallthrough-variable-from-first-case
dEQP-VK.graphicsfuzz.cov-tail-duplicator-for-for-for
dEQP-VK.graphicsfuzz.cov-tail-duplicator-infinite-loops
dEQP-VK.graphicsfuzz.cov-target-lowering-dfdx-cos
dEQP-VK.graphicsfuzz.cov-cast-float-to-int-and-back
dEQP-VK.graphicsfuzz.cov-clamp-loop-limit-increment-float-array
dEQP-VK.graphicsfuzz.cov-clamp-lower-limit-from-always-false
+dEQP-VK.graphicsfuzz.cov-clamp-vector-component-condition-using-matrix
dEQP-VK.graphicsfuzz.cov-clamp-vector-element-ceil-negative
dEQP-VK.graphicsfuzz.cov-clamp-vector-variable-negative-offset
dEQP-VK.graphicsfuzz.cov-clear-yz-inside-condition
+dEQP-VK.graphicsfuzz.cov-color-output-undefined-in-unexecuted-branch
dEQP-VK.graphicsfuzz.cov-combine-and-or-xor-gt-lt
dEQP-VK.graphicsfuzz.cov-condition-loop-index-bitwise-not
dEQP-VK.graphicsfuzz.cov-conditional-discard-inside-loop
dEQP-VK.graphicsfuzz.cov-derivative-uniform-vector-global-loop-count
dEQP-VK.graphicsfuzz.cov-descending-loop-min-max-always-zero
dEQP-VK.graphicsfuzz.cov-double-if-true-in-loop
+dEQP-VK.graphicsfuzz.cov-empty-loop-minus-one-modulo-variable-one
dEQP-VK.graphicsfuzz.cov-exp2-two
dEQP-VK.graphicsfuzz.cov-findlsb-division-by-zero
+dEQP-VK.graphicsfuzz.cov-float-array-init-pow
dEQP-VK.graphicsfuzz.cov-fold-and-in-for-loop-range
dEQP-VK.graphicsfuzz.cov-fold-bitwise-and-zero
dEQP-VK.graphicsfuzz.cov-fold-bitwise-or-full-mask
dEQP-VK.graphicsfuzz.cov-for-array-initializing-modulo
dEQP-VK.graphicsfuzz.cov-for-loop-min-increment-array-element
dEQP-VK.graphicsfuzz.cov-for-switch-fallthrough
+dEQP-VK.graphicsfuzz.cov-fract-asin-undefined-never-used
dEQP-VK.graphicsfuzz.cov-fract-smoothstep-undefined
dEQP-VK.graphicsfuzz.cov-fragcoord-clamp-array-access
dEQP-VK.graphicsfuzz.cov-fragcoord-multiply
+dEQP-VK.graphicsfuzz.cov-function-fragcoord-condition-always-return
dEQP-VK.graphicsfuzz.cov-function-vec2-never-discard
dEQP-VK.graphicsfuzz.cov-global-loop-bound-true-logical-or
dEQP-VK.graphicsfuzz.cov-global-loop-counter-float-accumulate-matrix
dEQP-VK.graphicsfuzz.cov-global-loop-counter-main-function-call
dEQP-VK.graphicsfuzz.cov-global-loop-counter-multiply-one-minus
+dEQP-VK.graphicsfuzz.cov-global-loop-counter-squared-comparison
dEQP-VK.graphicsfuzz.cov-if-conversion-identical-branches
dEQP-VK.graphicsfuzz.cov-if-switch-fallthrough
dEQP-VK.graphicsfuzz.cov-if-true-continue
dEQP-VK.graphicsfuzz.cov-intervalmap-set-stop
dEQP-VK.graphicsfuzz.cov-ir-builder-constant-fold-inst-combine-calls-value-tracking-findmsb-incr-if
dEQP-VK.graphicsfuzz.cov-irbuilder-matrix-cell-uniform
+dEQP-VK.graphicsfuzz.cov-isnan-asinh-clamp-always-zero
dEQP-VK.graphicsfuzz.cov-ldexp-undefined-mat-vec-multiply
dEQP-VK.graphicsfuzz.cov-left-shift-array-access
dEQP-VK.graphicsfuzz.cov-left-shift-right-shift-compare
dEQP-VK.graphicsfuzz.cov-loop-abs-multiply-offset
dEQP-VK.graphicsfuzz.cov-loop-clamp-to-one-empty-condition
dEQP-VK.graphicsfuzz.cov-loop-condition-double-negate
+dEQP-VK.graphicsfuzz.cov-loop-dfdx-constant-divide
dEQP-VK.graphicsfuzz.cov-loop-findmsb-findlsb
dEQP-VK.graphicsfuzz.cov-loop-increment-matrix-element-break-after-first-iteration
dEQP-VK.graphicsfuzz.cov-loop-increment-or-divide-by-loop-index
+dEQP-VK.graphicsfuzz.cov-loop-integer-half-minus-one
dEQP-VK.graphicsfuzz.cov-loop-logical-xor
dEQP-VK.graphicsfuzz.cov-loop-returns-behind-true-and-false
dEQP-VK.graphicsfuzz.cov-loop-with-two-integers
dEQP-VK.graphicsfuzz.cov-mem-pass-sum-struct-members
dEQP-VK.graphicsfuzz.cov-mem-pass-unused-component
dEQP-VK.graphicsfuzz.cov-merge-return-condition-twice
+dEQP-VK.graphicsfuzz.cov-min-intbitstofloat-undefined-never-used
dEQP-VK.graphicsfuzz.cov-min-nested-loop-same-value-for-variables
dEQP-VK.graphicsfuzz.cov-mod-acosh
dEQP-VK.graphicsfuzz.cov-mod-uint-bits-float
dEQP-VK.graphicsfuzz.cov-pattern-match-signum
dEQP-VK.graphicsfuzz.cov-pattern-match-single-bit
dEQP-VK.graphicsfuzz.cov-peephole-optimizer-target-instr-info-for-if-if-if
+dEQP-VK.graphicsfuzz.cov-pow-identical-value-sqrt
dEQP-VK.graphicsfuzz.cov-pow-undefined
+dEQP-VK.graphicsfuzz.cov-pow-undefined-result-condition-with-always-true
dEQP-VK.graphicsfuzz.cov-rcp-negative-int
dEQP-VK.graphicsfuzz.cov-reciprocal-var-minus-one
dEQP-VK.graphicsfuzz.cov-reduce-load-replace-extract
dEQP-VK.graphicsfuzz.cov-sinh-ldexp
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
dEQP-VK.graphicsfuzz.cov-sum-uniform-vector-components-round
+dEQP-VK.graphicsfuzz.cov-switch-fallthrough-variable-from-first-case
dEQP-VK.graphicsfuzz.cov-tail-duplicator-for-for-for
dEQP-VK.graphicsfuzz.cov-tail-duplicator-infinite-loops
dEQP-VK.graphicsfuzz.cov-target-lowering-dfdx-cos
--- /dev/null
+#!amber
+
+# Copyright 2021 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 patch optimization 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_4 _GLF_uniform_int_values[0]
+# #define _int_1 _GLF_uniform_int_values[1]
+# #define _int_2 _GLF_uniform_int_values[2]
+# #define _int_3 _GLF_uniform_int_values[3]
+# #define _int_0 _GLF_uniform_int_values[4]
+# #define _float_1_0 _GLF_uniform_float_values[0]
+# #define _float_0_0 _GLF_uniform_float_values[1]
+#
+# precision highp float;
+# precision highp int;
+#
+# // Contents of _GLF_uniform_float_values: [1.0, 0.0]
+# layout(set = 0, binding = 0) uniform buf0
+# {
+# float _GLF_uniform_float_values[2];
+# };
+# // Contents of _GLF_uniform_int_values: [4, 1, 2, 3, 0]
+# layout(set = 0, binding = 1) uniform buf1
+# {
+# int _GLF_uniform_int_values[5];
+# };
+# layout(location = 0) out vec4 _GLF_color;
+#
+# void main()
+# {
+# vec4 v = vec4(_int_1, _int_2, _int_3, _int_4);
+#
+# // Clamps v.y, v.z, and v.z to a range of 0..1.
+# // After the loop all the components of v has a value of one.
+# for (int i = _int_0; i < _int_4; i++)
+# {
+# if(mat4(v, v, v, v)[0][i] > _float_1_0)
+# {
+# v[i] = clamp(v, vec4(_float_0_0), vec4(_float_1_0))[_int_1];
+# }
+# }
+#
+# // Always true.
+# if(v == vec4(_int_1))
+# {
+# _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: 138
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %119
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %9 "v"
+ OpName %14 "buf1"
+ OpMemberName %14 0 "_GLF_uniform_int_values"
+ OpName %16 ""
+ OpName %36 "i"
+ OpName %83 "buf0"
+ OpMemberName %83 0 "_GLF_uniform_float_values"
+ OpName %85 ""
+ OpName %119 "_GLF_color"
+ OpDecorate %13 ArrayStride 16
+ OpMemberDecorate %14 0 Offset 0
+ OpDecorate %14 Block
+ OpDecorate %16 DescriptorSet 0
+ OpDecorate %16 Binding 1
+ OpDecorate %82 ArrayStride 16
+ OpMemberDecorate %83 0 Offset 0
+ OpDecorate %83 Block
+ OpDecorate %85 DescriptorSet 0
+ OpDecorate %85 Binding 0
+ OpDecorate %119 Location 0
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeFloat 32
+ %7 = OpTypeVector %6 4
+ %8 = OpTypePointer Function %7
+ %10 = OpTypeInt 32 1
+ %11 = OpTypeInt 32 0
+ %12 = OpConstant %11 5
+ %13 = OpTypeArray %10 %12
+ %14 = OpTypeStruct %13
+ %15 = OpTypePointer Uniform %14
+ %16 = OpVariable %15 Uniform
+ %17 = OpConstant %10 0
+ %18 = OpConstant %10 1
+ %19 = OpTypePointer Uniform %10
+ %23 = OpConstant %10 2
+ %27 = OpConstant %10 3
+ %35 = OpTypePointer Function %10
+ %37 = OpConstant %10 4
+ %48 = OpTypeBool
+ %54 = OpTypeMatrix %7 4
+ %55 = OpConstant %6 1
+ %56 = OpConstant %6 0
+ %81 = OpConstant %11 2
+ %82 = OpTypeArray %6 %81
+ %83 = OpTypeStruct %82
+ %84 = OpTypePointer Uniform %83
+ %85 = OpVariable %84 Uniform
+ %86 = OpTypePointer Uniform %6
+ %104 = OpTypePointer Function %6
+ %113 = OpTypeVector %48 4
+ %118 = OpTypePointer Output %7
+ %119 = OpVariable %118 Output
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ %9 = OpVariable %8 Function
+ %36 = OpVariable %35 Function
+ %20 = OpAccessChain %19 %16 %17 %18
+ %21 = OpLoad %10 %20
+ %22 = OpConvertSToF %6 %21
+ %24 = OpAccessChain %19 %16 %17 %23
+ %25 = OpLoad %10 %24
+ %26 = OpConvertSToF %6 %25
+ %28 = OpAccessChain %19 %16 %17 %27
+ %29 = OpLoad %10 %28
+ %30 = OpConvertSToF %6 %29
+ %31 = OpAccessChain %19 %16 %17 %17
+ %32 = OpLoad %10 %31
+ %33 = OpConvertSToF %6 %32
+ %34 = OpCompositeConstruct %7 %22 %26 %30 %33
+ OpStore %9 %34
+ %38 = OpAccessChain %19 %16 %17 %37
+ %39 = OpLoad %10 %38
+ OpStore %36 %39
+ OpBranch %40
+ %40 = OpLabel
+ OpLoopMerge %42 %43 None
+ OpBranch %44
+ %44 = OpLabel
+ %45 = OpLoad %10 %36
+ %46 = OpAccessChain %19 %16 %17 %17
+ %47 = OpLoad %10 %46
+ %49 = OpSLessThan %48 %45 %47
+ OpBranchConditional %49 %41 %42
+ %41 = OpLabel
+ %50 = OpLoad %7 %9
+ %51 = OpLoad %7 %9
+ %52 = OpLoad %7 %9
+ %53 = OpLoad %7 %9
+ %57 = OpCompositeExtract %6 %50 0
+ %58 = OpCompositeExtract %6 %50 1
+ %59 = OpCompositeExtract %6 %50 2
+ %60 = OpCompositeExtract %6 %50 3
+ %61 = OpCompositeExtract %6 %51 0
+ %62 = OpCompositeExtract %6 %51 1
+ %63 = OpCompositeExtract %6 %51 2
+ %64 = OpCompositeExtract %6 %51 3
+ %65 = OpCompositeExtract %6 %52 0
+ %66 = OpCompositeExtract %6 %52 1
+ %67 = OpCompositeExtract %6 %52 2
+ %68 = OpCompositeExtract %6 %52 3
+ %69 = OpCompositeExtract %6 %53 0
+ %70 = OpCompositeExtract %6 %53 1
+ %71 = OpCompositeExtract %6 %53 2
+ %72 = OpCompositeExtract %6 %53 3
+ %73 = OpCompositeConstruct %7 %57 %58 %59 %60
+ %74 = OpCompositeConstruct %7 %61 %62 %63 %64
+ %75 = OpCompositeConstruct %7 %65 %66 %67 %68
+ %76 = OpCompositeConstruct %7 %69 %70 %71 %72
+ %77 = OpCompositeConstruct %54 %73 %74 %75 %76
+ %78 = OpLoad %10 %36
+ %79 = OpCompositeExtract %7 %77 0
+ %80 = OpVectorExtractDynamic %6 %79 %78
+ %87 = OpAccessChain %86 %85 %17 %17
+ %88 = OpLoad %6 %87
+ %89 = OpFOrdGreaterThan %48 %80 %88
+ OpSelectionMerge %91 None
+ OpBranchConditional %89 %90 %91
+ %90 = OpLabel
+ %92 = OpLoad %10 %36
+ %93 = OpLoad %7 %9
+ %94 = OpAccessChain %86 %85 %17 %18
+ %95 = OpLoad %6 %94
+ %96 = OpCompositeConstruct %7 %95 %95 %95 %95
+ %97 = OpAccessChain %86 %85 %17 %17
+ %98 = OpLoad %6 %97
+ %99 = OpCompositeConstruct %7 %98 %98 %98 %98
+ %100 = OpExtInst %7 %1 FClamp %93 %96 %99
+ %101 = OpAccessChain %19 %16 %17 %18
+ %102 = OpLoad %10 %101
+ %103 = OpVectorExtractDynamic %6 %100 %102
+ %105 = OpAccessChain %104 %9 %92
+ OpStore %105 %103
+ OpBranch %91
+ %91 = OpLabel
+ OpBranch %43
+ %43 = OpLabel
+ %106 = OpLoad %10 %36
+ %107 = OpIAdd %10 %106 %18
+ OpStore %36 %107
+ OpBranch %40
+ %42 = OpLabel
+ %108 = OpLoad %7 %9
+ %109 = OpAccessChain %19 %16 %17 %18
+ %110 = OpLoad %10 %109
+ %111 = OpConvertSToF %6 %110
+ %112 = OpCompositeConstruct %7 %111 %111 %111 %111
+ %114 = OpFOrdEqual %113 %108 %112
+ %115 = OpAll %48 %114
+ OpSelectionMerge %117 None
+ OpBranchConditional %115 %116 %133
+ %116 = OpLabel
+ %120 = OpAccessChain %19 %16 %17 %18
+ %121 = OpLoad %10 %120
+ %122 = OpConvertSToF %6 %121
+ %123 = OpAccessChain %19 %16 %17 %37
+ %124 = OpLoad %10 %123
+ %125 = OpConvertSToF %6 %124
+ %126 = OpAccessChain %19 %16 %17 %37
+ %127 = OpLoad %10 %126
+ %128 = OpConvertSToF %6 %127
+ %129 = OpAccessChain %19 %16 %17 %18
+ %130 = OpLoad %10 %129
+ %131 = OpConvertSToF %6 %130
+ %132 = OpCompositeConstruct %7 %122 %125 %128 %131
+ OpStore %119 %132
+ OpBranch %117
+ %133 = OpLabel
+ %134 = OpAccessChain %19 %16 %17 %37
+ %135 = OpLoad %10 %134
+ %136 = OpConvertSToF %6 %135
+ %137 = OpCompositeConstruct %7 %136 %136 %136 %136
+ OpStore %119 %137
+ OpBranch %117
+ %117 = OpLabel
+ OpReturn
+ OpFunctionEnd
+END
+
+# uniforms for variant
+
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 4 1 2 3 0
+END
+# _GLF_uniform_float_values
+BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA
+ 1.0 0.0
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+ ATTACH variant_vertex_shader
+ ATTACH variant_fragment_shader
+ FRAMEBUFFER_SIZE 256 256
+ 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 256 256
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255
--- /dev/null
+#!amber
+
+# Copyright 2021 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_20 _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 _uint_60433 _GLF_uniform_uint_values[0]
+# #define _float_1_0 _GLF_uniform_float_values[0]
+# #define _float_0_0 _GLF_uniform_float_values[1]
+# #define _float_1_7 _GLF_uniform_float_values[2]
+#
+# precision highp float;
+#
+# precision highp int;
+#
+# // Contents of _GLF_uniform_uint_values: 60433
+# layout(set = 0, binding = 0) uniform buf0
+# {
+# uint _GLF_uniform_uint_values[1];
+# };
+# // Contents of _GLF_uniform_float_values: [1.0, 0.0, 1.7]
+# layout(set = 0, binding = 1) uniform buf1
+# {
+# float _GLF_uniform_float_values[3];
+# };
+# // Contents of _GLF_uniform_int_values: [20, 1, 0, 2]
+# layout(set = 0, binding = 2) uniform buf2
+# {
+# int _GLF_uniform_int_values[4];
+# };
+# // Contents of three: 3
+# layout(set = 0, binding = 3) uniform buf3
+# {
+# int three;
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# // This function does nothing as it backs up _GLF_color and writes it back.
+# void func0()
+# {
+# vec4 tmp;
+# // Always true.
+# if(gl_FragCoord.x > _float_0_0)
+# {
+# tmp = _GLF_color;
+# }
+# _GLF_color = tmp;
+# }
+#
+# // This function always returns 2.
+# int func1()
+# {
+# int a = _int_1;
+#
+# while(a < _int_2)
+# {
+# // Always true.
+# if(three > _int_1)
+# {
+# func0();
+# a = _int_2;
+# }
+# else
+# {
+# func0();
+# }
+# }
+#
+# return a;
+# }
+#
+# void main()
+# {
+# // Always true.
+# if(gl_FragCoord.x > _float_0_0)
+# {
+# _GLF_color = vec4(_float_1_0, _float_0_0, _float_1_0, _float_1_7);
+# }
+# else
+# {
+# _GLF_color = unpackSnorm4x8(_uint_60433);
+# }
+#
+# int a = _int_0;
+# for(int i = 0; i < 5; i ++)
+# {
+# for(int j = 0; j < 2; j ++)
+# {
+# // Executed ten times. Func1 always returns 2, hence a gets incremented by total of 20.
+# a += func1();
+# }
+# }
+#
+# // Always true.
+# if(a == _int_20)
+# {
+# _GLF_color.z -= _float_1_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: 147
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %15 %38
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %6 "func0("
+ OpName %10 "func1("
+ OpName %15 "gl_FragCoord"
+ OpName %23 "buf1"
+ OpMemberName %23 0 "_GLF_uniform_float_values"
+ OpName %25 ""
+ OpName %36 "tmp"
+ OpName %38 "_GLF_color"
+ OpName %42 "a"
+ OpName %45 "buf2"
+ OpMemberName %45 0 "_GLF_uniform_int_values"
+ OpName %47 ""
+ OpName %61 "buf3"
+ OpMemberName %61 0 "three"
+ OpName %63 ""
+ OpName %99 "buf0"
+ OpMemberName %99 0 "_GLF_uniform_uint_values"
+ OpName %101 ""
+ OpName %106 "a"
+ OpName %109 "i"
+ OpName %118 "j"
+ OpDecorate %15 BuiltIn FragCoord
+ OpDecorate %22 ArrayStride 16
+ OpMemberDecorate %23 0 Offset 0
+ OpDecorate %23 Block
+ OpDecorate %25 DescriptorSet 0
+ OpDecorate %25 Binding 1
+ OpDecorate %38 Location 0
+ OpDecorate %44 ArrayStride 16
+ OpMemberDecorate %45 0 Offset 0
+ OpDecorate %45 Block
+ OpDecorate %47 DescriptorSet 0
+ OpDecorate %47 Binding 2
+ OpMemberDecorate %61 0 Offset 0
+ OpDecorate %61 Block
+ OpDecorate %63 DescriptorSet 0
+ OpDecorate %63 Binding 3
+ OpDecorate %98 ArrayStride 16
+ OpMemberDecorate %99 0 Offset 0
+ OpDecorate %99 Block
+ OpDecorate %101 DescriptorSet 0
+ OpDecorate %101 Binding 0
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %8 = OpTypeInt 32 1
+ %9 = OpTypeFunction %8
+ %12 = OpTypeFloat 32
+ %13 = OpTypeVector %12 4
+ %14 = OpTypePointer Input %13
+ %15 = OpVariable %14 Input
+ %16 = OpTypeInt 32 0
+ %17 = OpConstant %16 0
+ %18 = OpTypePointer Input %12
+ %21 = OpConstant %16 3
+ %22 = OpTypeArray %12 %21
+ %23 = OpTypeStruct %22
+ %24 = OpTypePointer Uniform %23
+ %25 = OpVariable %24 Uniform
+ %26 = OpConstant %8 0
+ %27 = OpConstant %8 1
+ %28 = OpTypePointer Uniform %12
+ %31 = OpTypeBool
+ %35 = OpTypePointer Function %13
+ %37 = OpTypePointer Output %13
+ %38 = OpVariable %37 Output
+ %41 = OpTypePointer Function %8
+ %43 = OpConstant %16 4
+ %44 = OpTypeArray %8 %43
+ %45 = OpTypeStruct %44
+ %46 = OpTypePointer Uniform %45
+ %47 = OpVariable %46 Uniform
+ %48 = OpTypePointer Uniform %8
+ %57 = OpConstant %8 3
+ %61 = OpTypeStruct %8
+ %62 = OpTypePointer Uniform %61
+ %63 = OpVariable %62 Uniform
+ %92 = OpConstant %8 2
+ %97 = OpConstant %16 1
+ %98 = OpTypeArray %16 %97
+ %99 = OpTypeStruct %98
+ %100 = OpTypePointer Uniform %99
+ %101 = OpVariable %100 Uniform
+ %102 = OpTypePointer Uniform %16
+ %116 = OpConstant %8 5
+ %141 = OpConstant %16 2
+ %142 = OpTypePointer Output %12
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ %106 = OpVariable %41 Function
+ %109 = OpVariable %41 Function
+ %118 = OpVariable %41 Function
+ %79 = OpAccessChain %18 %15 %17
+ %80 = OpLoad %12 %79
+ %81 = OpAccessChain %28 %25 %26 %27
+ %82 = OpLoad %12 %81
+ %83 = OpFOrdGreaterThan %31 %80 %82
+ OpSelectionMerge %85 None
+ OpBranchConditional %83 %84 %96
+ %84 = OpLabel
+ %86 = OpAccessChain %28 %25 %26 %26
+ %87 = OpLoad %12 %86
+ %88 = OpAccessChain %28 %25 %26 %27
+ %89 = OpLoad %12 %88
+ %90 = OpAccessChain %28 %25 %26 %26
+ %91 = OpLoad %12 %90
+ %93 = OpAccessChain %28 %25 %26 %92
+ %94 = OpLoad %12 %93
+ %95 = OpCompositeConstruct %13 %87 %89 %91 %94
+ OpStore %38 %95
+ OpBranch %85
+ %96 = OpLabel
+ %103 = OpAccessChain %102 %101 %26 %26
+ %104 = OpLoad %16 %103
+ %105 = OpExtInst %13 %1 UnpackSnorm4x8 %104
+ OpStore %38 %105
+ OpBranch %85
+ %85 = OpLabel
+ %107 = OpAccessChain %48 %47 %26 %92
+ %108 = OpLoad %8 %107
+ OpStore %106 %108
+ OpStore %109 %26
+ OpBranch %110
+ %110 = OpLabel
+ OpLoopMerge %112 %113 None
+ OpBranch %114
+ %114 = OpLabel
+ %115 = OpLoad %8 %109
+ %117 = OpSLessThan %31 %115 %116
+ OpBranchConditional %117 %111 %112
+ %111 = OpLabel
+ OpStore %118 %26
+ OpBranch %119
+ %119 = OpLabel
+ OpLoopMerge %121 %122 None
+ OpBranch %123
+ %123 = OpLabel
+ %124 = OpLoad %8 %118
+ %125 = OpSLessThan %31 %124 %92
+ OpBranchConditional %125 %120 %121
+ %120 = OpLabel
+ %126 = OpFunctionCall %8 %10
+ %127 = OpLoad %8 %106
+ %128 = OpIAdd %8 %127 %126
+ OpStore %106 %128
+ OpBranch %122
+ %122 = OpLabel
+ %129 = OpLoad %8 %118
+ %130 = OpIAdd %8 %129 %27
+ OpStore %118 %130
+ OpBranch %119
+ %121 = OpLabel
+ OpBranch %113
+ %113 = OpLabel
+ %131 = OpLoad %8 %109
+ %132 = OpIAdd %8 %131 %27
+ OpStore %109 %132
+ OpBranch %110
+ %112 = OpLabel
+ %133 = OpLoad %8 %106
+ %134 = OpAccessChain %48 %47 %26 %26
+ %135 = OpLoad %8 %134
+ %136 = OpIEqual %31 %133 %135
+ OpSelectionMerge %138 None
+ OpBranchConditional %136 %137 %138
+ %137 = OpLabel
+ %139 = OpAccessChain %28 %25 %26 %26
+ %140 = OpLoad %12 %139
+ %143 = OpAccessChain %142 %38 %141
+ %144 = OpLoad %12 %143
+ %145 = OpFSub %12 %144 %140
+ %146 = OpAccessChain %142 %38 %141
+ OpStore %146 %145
+ OpBranch %138
+ %138 = OpLabel
+ OpReturn
+ OpFunctionEnd
+ %6 = OpFunction %2 None %3
+ %7 = OpLabel
+ %36 = OpVariable %35 Function
+ %19 = OpAccessChain %18 %15 %17
+ %20 = OpLoad %12 %19
+ %29 = OpAccessChain %28 %25 %26 %27
+ %30 = OpLoad %12 %29
+ %32 = OpFOrdGreaterThan %31 %20 %30
+ OpSelectionMerge %34 None
+ OpBranchConditional %32 %33 %34
+ %33 = OpLabel
+ %39 = OpLoad %13 %38
+ OpStore %36 %39
+ OpBranch %34
+ %34 = OpLabel
+ %40 = OpLoad %13 %36
+ OpStore %38 %40
+ OpReturn
+ OpFunctionEnd
+ %10 = OpFunction %8 None %9
+ %11 = OpLabel
+ %42 = OpVariable %41 Function
+ %49 = OpAccessChain %48 %47 %26 %27
+ %50 = OpLoad %8 %49
+ OpStore %42 %50
+ OpBranch %51
+ %51 = OpLabel
+ OpLoopMerge %53 %54 None
+ OpBranch %55
+ %55 = OpLabel
+ %56 = OpLoad %8 %42
+ %58 = OpAccessChain %48 %47 %26 %57
+ %59 = OpLoad %8 %58
+ %60 = OpSLessThan %31 %56 %59
+ OpBranchConditional %60 %52 %53
+ %52 = OpLabel
+ %64 = OpAccessChain %48 %63 %26
+ %65 = OpLoad %8 %64
+ %66 = OpAccessChain %48 %47 %26 %27
+ %67 = OpLoad %8 %66
+ %68 = OpSGreaterThan %31 %65 %67
+ OpSelectionMerge %70 None
+ OpBranchConditional %68 %69 %74
+ %69 = OpLabel
+ %71 = OpFunctionCall %2 %6
+ %72 = OpAccessChain %48 %47 %26 %57
+ %73 = OpLoad %8 %72
+ OpStore %42 %73
+ OpBranch %70
+ %74 = OpLabel
+ %75 = OpFunctionCall %2 %6
+ OpBranch %70
+ %70 = OpLabel
+ OpBranch %54
+ %54 = OpLabel
+ OpBranch %51
+ %53 = OpLabel
+ %76 = OpLoad %8 %42
+ OpReturnValue %76
+ OpFunctionEnd
+END
+
+# uniforms for variant
+
+# three
+BUFFER variant_three DATA_TYPE int32 STD140 DATA
+ 3
+END
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 20 1 0 2
+END
+# _GLF_uniform_float_values
+BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA
+ 1.0 0.0 1.7
+END
+# _GLF_uniform_uint_values
+BUFFER variant__GLF_uniform_uint_values DATA_TYPE int32[] STD140 DATA
+ 60433
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+ ATTACH variant_vertex_shader
+ ATTACH variant_fragment_shader
+ FRAMEBUFFER_SIZE 256 256
+ BIND BUFFER variant_framebuffer AS color LOCATION 0
+ BIND BUFFER variant_three AS uniform DESCRIPTOR_SET 0 BINDING 3
+ BIND BUFFER variant__GLF_uniform_int_values 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_uint_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 256 256
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255
--- /dev/null
+#!amber
+
+# Copyright 2021 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_10 _GLF_uniform_int_values[0]
+# #define _int_1 _GLF_uniform_int_values[1]
+# #define _int_0 _GLF_uniform_int_values[2]
+#
+# precision highp float;
+# precision highp int;
+#
+# // Contents of _GLF_uniform_int_values: [10, 1, 0]
+# layout(set = 0, binding = 0) uniform buf0 {
+# int _GLF_uniform_int_values[3];
+# };
+# layout(location = 0) out vec4 _GLF_color;
+#
+# void main()
+# {
+# int arr[10] = int[10](1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
+# int a = 0;
+#
+# // Always true.
+# if (arr[_int_1] == 2)
+# {
+# // An empty for loop doing nothing.
+# for(int i = _int_0; i < _int_10; i++) {}
+# a++;
+# }
+#
+# // Always true because -1 % a = -1 % 1 = 0.
+# if (-1 % a == _int_0)
+# {
+# arr[ivec2(_int_1).y] = _int_0;
+# }
+#
+# // Always true.
+# if (arr[_int_1] == _int_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: 104
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %85
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %11 "arr"
+ OpName %24 "a"
+ OpName %28 "buf0"
+ OpMemberName %28 0 "_GLF_uniform_int_values"
+ OpName %30 ""
+ OpName %40 "i"
+ OpName %85 "_GLF_color"
+ OpDecorate %27 ArrayStride 16
+ OpMemberDecorate %28 0 Offset 0
+ OpDecorate %28 Block
+ OpDecorate %30 DescriptorSet 0
+ OpDecorate %30 Binding 0
+ OpDecorate %85 Location 0
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeInt 32 1
+ %7 = OpTypeInt 32 0
+ %8 = OpConstant %7 10
+ %9 = OpTypeArray %6 %8
+ %10 = OpTypePointer Function %9
+ %12 = OpConstant %6 1
+ %13 = OpConstant %6 2
+ %14 = OpConstant %6 3
+ %15 = OpConstant %6 4
+ %16 = OpConstant %6 5
+ %17 = OpConstant %6 6
+ %18 = OpConstant %6 7
+ %19 = OpConstant %6 8
+ %20 = OpConstant %6 9
+ %21 = OpConstant %6 10
+ %22 = OpConstantComposite %9 %12 %13 %14 %15 %16 %17 %18 %19 %20 %21
+ %23 = OpTypePointer Function %6
+ %25 = OpConstant %6 0
+ %26 = OpConstant %7 3
+ %27 = OpTypeArray %6 %26
+ %28 = OpTypeStruct %27
+ %29 = OpTypePointer Uniform %28
+ %30 = OpVariable %29 Uniform
+ %31 = OpTypePointer Uniform %6
+ %36 = OpTypeBool
+ %56 = OpConstant %6 -1
+ %66 = OpTypeVector %6 2
+ %68 = OpConstant %7 1
+ %82 = OpTypeFloat 32
+ %83 = OpTypeVector %82 4
+ %84 = OpTypePointer Output %83
+ %85 = OpVariable %84 Output
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ %11 = OpVariable %10 Function
+ %24 = OpVariable %23 Function
+ %40 = OpVariable %23 Function
+ OpStore %11 %22
+ OpStore %24 %25
+ %32 = OpAccessChain %31 %30 %25 %12
+ %33 = OpLoad %6 %32
+ %34 = OpAccessChain %23 %11 %33
+ %35 = OpLoad %6 %34
+ %37 = OpIEqual %36 %35 %13
+ OpSelectionMerge %39 None
+ OpBranchConditional %37 %38 %39
+ %38 = OpLabel
+ %41 = OpAccessChain %31 %30 %25 %13
+ %42 = OpLoad %6 %41
+ OpStore %40 %42
+ OpBranch %43
+ %43 = OpLabel
+ OpLoopMerge %45 %46 None
+ OpBranch %47
+ %47 = OpLabel
+ %48 = OpLoad %6 %40
+ %49 = OpAccessChain %31 %30 %25 %25
+ %50 = OpLoad %6 %49
+ %51 = OpSLessThan %36 %48 %50
+ OpBranchConditional %51 %44 %45
+ %44 = OpLabel
+ OpBranch %46
+ %46 = OpLabel
+ %52 = OpLoad %6 %40
+ %53 = OpIAdd %6 %52 %12
+ OpStore %40 %53
+ OpBranch %43
+ %45 = OpLabel
+ %54 = OpLoad %6 %24
+ %55 = OpIAdd %6 %54 %12
+ OpStore %24 %55
+ OpBranch %39
+ %39 = OpLabel
+ %57 = OpLoad %6 %24
+ %58 = OpSMod %6 %56 %57
+ %59 = OpAccessChain %31 %30 %25 %13
+ %60 = OpLoad %6 %59
+ %61 = OpIEqual %36 %58 %60
+ OpSelectionMerge %63 None
+ OpBranchConditional %61 %62 %63
+ %62 = OpLabel
+ %64 = OpAccessChain %31 %30 %25 %12
+ %65 = OpLoad %6 %64
+ %67 = OpCompositeConstruct %66 %65 %65
+ %69 = OpCompositeExtract %6 %67 1
+ %70 = OpAccessChain %31 %30 %25 %13
+ %71 = OpLoad %6 %70
+ %72 = OpAccessChain %23 %11 %69
+ OpStore %72 %71
+ OpBranch %63
+ %63 = OpLabel
+ %73 = OpAccessChain %31 %30 %25 %12
+ %74 = OpLoad %6 %73
+ %75 = OpAccessChain %23 %11 %74
+ %76 = OpLoad %6 %75
+ %77 = OpAccessChain %31 %30 %25 %13
+ %78 = OpLoad %6 %77
+ %79 = OpIEqual %36 %76 %78
+ OpSelectionMerge %81 None
+ OpBranchConditional %79 %80 %99
+ %80 = OpLabel
+ %86 = OpAccessChain %31 %30 %25 %12
+ %87 = OpLoad %6 %86
+ %88 = OpConvertSToF %82 %87
+ %89 = OpAccessChain %31 %30 %25 %13
+ %90 = OpLoad %6 %89
+ %91 = OpConvertSToF %82 %90
+ %92 = OpAccessChain %31 %30 %25 %13
+ %93 = OpLoad %6 %92
+ %94 = OpConvertSToF %82 %93
+ %95 = OpAccessChain %31 %30 %25 %12
+ %96 = OpLoad %6 %95
+ %97 = OpConvertSToF %82 %96
+ %98 = OpCompositeConstruct %83 %88 %91 %94 %97
+ OpStore %85 %98
+ OpBranch %81
+ %99 = OpLabel
+ %100 = OpAccessChain %31 %30 %25 %13
+ %101 = OpLoad %6 %100
+ %102 = OpConvertSToF %82 %101
+ %103 = OpCompositeConstruct %83 %102 %102 %102 %102
+ OpStore %85 %103
+ OpBranch %81
+ %81 = OpLabel
+ OpReturn
+ OpFunctionEnd
+END
+
+# uniforms for variant
+
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 10 1 0
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+ ATTACH variant_vertex_shader
+ ATTACH variant_fragment_shader
+ FRAMEBUFFER_SIZE 256 256
+ 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 256 256
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255
--- /dev/null
+#!amber
+
+# Copyright 2021 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 arith builder code path
+
+# 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_7 _GLF_uniform_int_values[0]
+# #define _int_1 _GLF_uniform_int_values[1]
+# #define _int_0 _GLF_uniform_int_values[2]
+# #define _int_8 _GLF_uniform_int_values[3]
+# #define _float_1_0 _GLF_uniform_float_values[0]
+# #define _float_3_0 _GLF_uniform_float_values[1]
+#
+# precision highp float;
+# precision highp int;
+#
+# // Contents of _GLF_uniform_int_values: [7, 1, 0, 8]
+# layout(set = 0, binding = 0) uniform buf0
+# {
+# int _GLF_uniform_int_values[4];
+# };
+# // Contents of _GLF_uniform_float_values: [1.0, 3.0]
+# layout(set = 0, binding = 1) uniform buf1
+# {
+# float _GLF_uniform_float_values[2];
+# };
+# layout(location = 0) out vec4 _GLF_color;
+#
+# void main()
+# {
+# float f = 2.0;
+# float arr[10] = float[10](_float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0, pow(f, _float_3_0), _float_1_0, _float_1_0);
+#
+# // Always true.
+# if(int(arr[_int_7]) == _int_8)
+# {
+# _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: 87
+; 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 %8 "f"
+ OpName %14 "arr"
+ OpName %17 "buf1"
+ OpMemberName %17 0 "_GLF_uniform_float_values"
+ OpName %19 ""
+ OpName %49 "buf0"
+ OpMemberName %49 0 "_GLF_uniform_int_values"
+ OpName %51 ""
+ OpName %67 "_GLF_color"
+ OpDecorate %16 ArrayStride 16
+ OpMemberDecorate %17 0 Offset 0
+ OpDecorate %17 Block
+ OpDecorate %19 DescriptorSet 0
+ OpDecorate %19 Binding 1
+ OpDecorate %48 ArrayStride 16
+ OpMemberDecorate %49 0 Offset 0
+ OpDecorate %49 Block
+ OpDecorate %51 DescriptorSet 0
+ OpDecorate %51 Binding 0
+ OpDecorate %67 Location 0
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeFloat 32
+ %7 = OpTypePointer Function %6
+ %9 = OpConstant %6 2
+ %10 = OpTypeInt 32 0
+ %11 = OpConstant %10 10
+ %12 = OpTypeArray %6 %11
+ %13 = OpTypePointer Function %12
+ %15 = OpConstant %10 2
+ %16 = OpTypeArray %6 %15
+ %17 = OpTypeStruct %16
+ %18 = OpTypePointer Uniform %17
+ %19 = OpVariable %18 Uniform
+ %20 = OpTypeInt 32 1
+ %21 = OpConstant %20 0
+ %22 = OpTypePointer Uniform %6
+ %38 = OpConstant %20 1
+ %47 = OpConstant %10 4
+ %48 = OpTypeArray %20 %47
+ %49 = OpTypeStruct %48
+ %50 = OpTypePointer Uniform %49
+ %51 = OpVariable %50 Uniform
+ %52 = OpTypePointer Uniform %20
+ %58 = OpConstant %20 3
+ %61 = OpTypeBool
+ %65 = OpTypeVector %6 4
+ %66 = OpTypePointer Output %65
+ %67 = OpVariable %66 Output
+ %71 = OpConstant %20 2
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ %8 = OpVariable %7 Function
+ %14 = OpVariable %13 Function
+ OpStore %8 %9
+ %23 = OpAccessChain %22 %19 %21 %21
+ %24 = OpLoad %6 %23
+ %25 = OpAccessChain %22 %19 %21 %21
+ %26 = OpLoad %6 %25
+ %27 = OpAccessChain %22 %19 %21 %21
+ %28 = OpLoad %6 %27
+ %29 = OpAccessChain %22 %19 %21 %21
+ %30 = OpLoad %6 %29
+ %31 = OpAccessChain %22 %19 %21 %21
+ %32 = OpLoad %6 %31
+ %33 = OpAccessChain %22 %19 %21 %21
+ %34 = OpLoad %6 %33
+ %35 = OpAccessChain %22 %19 %21 %21
+ %36 = OpLoad %6 %35
+ %37 = OpLoad %6 %8
+ %39 = OpAccessChain %22 %19 %21 %38
+ %40 = OpLoad %6 %39
+ %41 = OpExtInst %6 %1 Pow %37 %40
+ %42 = OpAccessChain %22 %19 %21 %21
+ %43 = OpLoad %6 %42
+ %44 = OpAccessChain %22 %19 %21 %21
+ %45 = OpLoad %6 %44
+ %46 = OpCompositeConstruct %12 %24 %26 %28 %30 %32 %34 %36 %41 %43 %45
+ OpStore %14 %46
+ %53 = OpAccessChain %52 %51 %21 %21
+ %54 = OpLoad %20 %53
+ %55 = OpAccessChain %7 %14 %54
+ %56 = OpLoad %6 %55
+ %57 = OpConvertFToS %20 %56
+ %59 = OpAccessChain %52 %51 %21 %58
+ %60 = OpLoad %20 %59
+ %62 = OpIEqual %61 %57 %60
+ OpSelectionMerge %64 None
+ OpBranchConditional %62 %63 %82
+ %63 = OpLabel
+ %68 = OpAccessChain %52 %51 %21 %38
+ %69 = OpLoad %20 %68
+ %70 = OpConvertSToF %6 %69
+ %72 = OpAccessChain %52 %51 %21 %71
+ %73 = OpLoad %20 %72
+ %74 = OpConvertSToF %6 %73
+ %75 = OpAccessChain %52 %51 %21 %71
+ %76 = OpLoad %20 %75
+ %77 = OpConvertSToF %6 %76
+ %78 = OpAccessChain %52 %51 %21 %38
+ %79 = OpLoad %20 %78
+ %80 = OpConvertSToF %6 %79
+ %81 = OpCompositeConstruct %65 %70 %74 %77 %80
+ OpStore %67 %81
+ OpBranch %64
+ %82 = OpLabel
+ %83 = OpAccessChain %52 %51 %21 %71
+ %84 = OpLoad %20 %83
+ %85 = OpConvertSToF %6 %84
+ %86 = OpCompositeConstruct %65 %85 %85 %85 %85
+ OpStore %67 %86
+ OpBranch %64
+ %64 = OpLabel
+ OpReturn
+ OpFunctionEnd
+END
+
+# uniforms for variant
+
+# _GLF_uniform_float_values
+BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA
+ 1.0 3.0
+END
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 7 1 0 8
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+ ATTACH variant_vertex_shader
+ ATTACH variant_fragment_shader
+ FRAMEBUFFER_SIZE 256 256
+ 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 256 256
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255
--- /dev/null
+#!amber
+
+# Copyright 2021 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 int;
+# precision highp float;
+#
+# // 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;
+#
+# void main()
+# {
+# // The result of asin is undefined.
+# float f0 = asin(2.0);
+# float f1 = fract(f0);
+#
+# // Always true.
+# if(gl_FragCoord.x > _float_0_0)
+# {
+# _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1);
+# }
+# else
+# {
+# // f1 is undefined, but this branch is never executed.
+# _GLF_color = vec4(f1);
+# }
+# }
+SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 10
+; Bound: 60
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %15 %36
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %8 "f0"
+ OpName %10 "f1"
+ OpName %15 "gl_FragCoord"
+ OpName %23 "buf0"
+ OpMemberName %23 0 "_GLF_uniform_float_values"
+ OpName %25 ""
+ OpName %36 "_GLF_color"
+ OpName %39 "buf1"
+ OpMemberName %39 0 "_GLF_uniform_int_values"
+ OpName %41 ""
+ OpDecorate %15 BuiltIn FragCoord
+ OpDecorate %22 ArrayStride 16
+ OpMemberDecorate %23 0 Offset 0
+ OpDecorate %23 Block
+ OpDecorate %25 DescriptorSet 0
+ OpDecorate %25 Binding 0
+ OpDecorate %36 Location 0
+ OpDecorate %38 ArrayStride 16
+ OpMemberDecorate %39 0 Offset 0
+ OpDecorate %39 Block
+ OpDecorate %41 DescriptorSet 0
+ OpDecorate %41 Binding 1
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeFloat 32
+ %7 = OpTypePointer Function %6
+ %9 = OpConstant %6 0x1.8p+128
+ %13 = OpTypeVector %6 4
+ %14 = OpTypePointer Input %13
+ %15 = OpVariable %14 Input
+ %16 = OpTypeInt 32 0
+ %17 = OpConstant %16 0
+ %18 = OpTypePointer Input %6
+ %21 = OpConstant %16 1
+ %22 = OpTypeArray %6 %21
+ %23 = OpTypeStruct %22
+ %24 = OpTypePointer Uniform %23
+ %25 = OpVariable %24 Uniform
+ %26 = OpTypeInt 32 1
+ %27 = OpConstant %26 0
+ %28 = OpTypePointer Uniform %6
+ %31 = OpTypeBool
+ %35 = OpTypePointer Output %13
+ %36 = OpVariable %35 Output
+ %37 = OpConstant %16 2
+ %38 = OpTypeArray %26 %37
+ %39 = OpTypeStruct %38
+ %40 = OpTypePointer Uniform %39
+ %41 = OpVariable %40 Uniform
+ %42 = OpConstant %26 1
+ %43 = OpTypePointer Uniform %26
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ %8 = OpVariable %7 Function
+ %10 = OpVariable %7 Function
+ OpStore %8 %9
+ %11 = OpLoad %6 %8
+ %12 = OpExtInst %6 %1 Fract %11
+ OpStore %10 %12
+ %19 = OpAccessChain %18 %15 %17
+ %20 = OpLoad %6 %19
+ %29 = OpAccessChain %28 %25 %27 %27
+ %30 = OpLoad %6 %29
+ %32 = OpFOrdGreaterThan %31 %20 %30
+ OpSelectionMerge %34 None
+ OpBranchConditional %32 %33 %57
+ %33 = OpLabel
+ %44 = OpAccessChain %43 %41 %27 %42
+ %45 = OpLoad %26 %44
+ %46 = OpConvertSToF %6 %45
+ %47 = OpAccessChain %43 %41 %27 %27
+ %48 = OpLoad %26 %47
+ %49 = OpConvertSToF %6 %48
+ %50 = OpAccessChain %43 %41 %27 %27
+ %51 = OpLoad %26 %50
+ %52 = OpConvertSToF %6 %51
+ %53 = OpAccessChain %43 %41 %27 %42
+ %54 = OpLoad %26 %53
+ %55 = OpConvertSToF %6 %54
+ %56 = OpCompositeConstruct %13 %46 %49 %52 %55
+ OpStore %36 %56
+ OpBranch %34
+ %57 = OpLabel
+ %58 = OpLoad %6 %10
+ %59 = OpCompositeConstruct %13 %58 %58 %58 %58
+ OpStore %36 %59
+ OpBranch %34
+ %34 = 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.0
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+ ATTACH variant_vertex_shader
+ ATTACH variant_fragment_shader
+ FRAMEBUFFER_SIZE 256 256
+ 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 256 256
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255
--- /dev/null
+#!amber
+
+# Copyright 2021 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_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]
+# #define _float_300_0 _GLF_uniform_float_values[3]
+#
+# 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];
+# };
+# // Contents of _GLF_uniform_float_values: [2.0, 1.0, 0.0, 300.0]
+# layout(set = 0, binding = 1) uniform buf1
+# {
+# float _GLF_uniform_float_values[4];
+# };
+# layout(location = 0) out vec4 _GLF_color;
+#
+# // This function always returns 1.0.
+# float func(float x)
+# {
+# while(true)
+# {
+# do
+# {
+# // Always false.
+# if(gl_FragCoord.y < _float_0_0)
+# {
+# do
+# {
+# }
+# while(gl_FragCoord.x < _float_0_0);
+# }
+#
+# // Always true.
+# if(x < _float_300_0)
+# {
+# return _float_1_0;
+# }
+# }
+# while(gl_FragCoord.y < _float_0_0); // Always false.
+# }
+# return _float_2_0;
+# }
+#
+# void main()
+# {
+# // Always true.
+# if(func(gl_FragCoord.x) == _float_1_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: 110
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %25 %85
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %10 "func(f1;"
+ OpName %9 "x"
+ OpName %25 "gl_FragCoord"
+ OpName %33 "buf1"
+ OpMemberName %33 0 "_GLF_uniform_float_values"
+ OpName %35 ""
+ OpName %75 "param"
+ OpName %85 "_GLF_color"
+ OpName %88 "buf0"
+ OpMemberName %88 0 "_GLF_uniform_int_values"
+ OpName %90 ""
+ OpDecorate %25 BuiltIn FragCoord
+ OpDecorate %32 ArrayStride 16
+ OpMemberDecorate %33 0 Offset 0
+ OpDecorate %33 Block
+ OpDecorate %35 DescriptorSet 0
+ OpDecorate %35 Binding 1
+ OpDecorate %85 Location 0
+ OpDecorate %87 ArrayStride 16
+ OpMemberDecorate %88 0 Offset 0
+ OpDecorate %88 Block
+ OpDecorate %90 DescriptorSet 0
+ OpDecorate %90 Binding 0
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeFloat 32
+ %7 = OpTypePointer Function %6
+ %8 = OpTypeFunction %6 %7
+ %17 = OpTypeBool
+ %18 = OpConstantTrue %17
+ %23 = OpTypeVector %6 4
+ %24 = OpTypePointer Input %23
+ %25 = OpVariable %24 Input
+ %26 = OpTypeInt 32 0
+ %27 = OpConstant %26 1
+ %28 = OpTypePointer Input %6
+ %31 = OpConstant %26 4
+ %32 = OpTypeArray %6 %31
+ %33 = OpTypeStruct %32
+ %34 = OpTypePointer Uniform %33
+ %35 = OpVariable %34 Uniform
+ %36 = OpTypeInt 32 1
+ %37 = OpConstant %36 0
+ %38 = OpConstant %36 2
+ %39 = OpTypePointer Uniform %6
+ %49 = OpConstant %26 0
+ %56 = OpConstant %36 3
+ %62 = OpConstant %36 1
+ %84 = OpTypePointer Output %23
+ %85 = OpVariable %84 Output
+ %86 = OpConstant %26 2
+ %87 = OpTypeArray %36 %86
+ %88 = OpTypeStruct %87
+ %89 = OpTypePointer Uniform %88
+ %90 = OpVariable %89 Uniform
+ %91 = OpTypePointer Uniform %36
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ %75 = OpVariable %7 Function
+ %76 = OpAccessChain %28 %25 %49
+ %77 = OpLoad %6 %76
+ OpStore %75 %77
+ %78 = OpFunctionCall %6 %10 %75
+ %79 = OpAccessChain %39 %35 %37 %62
+ %80 = OpLoad %6 %79
+ %81 = OpFOrdEqual %17 %78 %80
+ OpSelectionMerge %83 None
+ OpBranchConditional %81 %82 %105
+ %82 = OpLabel
+ %92 = OpAccessChain %91 %90 %37 %37
+ %93 = OpLoad %36 %92
+ %94 = OpConvertSToF %6 %93
+ %95 = OpAccessChain %91 %90 %37 %62
+ %96 = OpLoad %36 %95
+ %97 = OpConvertSToF %6 %96
+ %98 = OpAccessChain %91 %90 %37 %62
+ %99 = OpLoad %36 %98
+ %100 = OpConvertSToF %6 %99
+ %101 = OpAccessChain %91 %90 %37 %37
+ %102 = OpLoad %36 %101
+ %103 = OpConvertSToF %6 %102
+ %104 = OpCompositeConstruct %23 %94 %97 %100 %103
+ OpStore %85 %104
+ OpBranch %83
+ %105 = OpLabel
+ %106 = OpAccessChain %91 %90 %37 %62
+ %107 = OpLoad %36 %106
+ %108 = OpConvertSToF %6 %107
+ %109 = OpCompositeConstruct %23 %108 %108 %108 %108
+ OpStore %85 %109
+ OpBranch %83
+ %83 = OpLabel
+ OpReturn
+ OpFunctionEnd
+ %10 = OpFunction %6 None %8
+ %9 = OpFunctionParameter %7
+ %11 = OpLabel
+ OpBranch %12
+ %12 = OpLabel
+ OpLoopMerge %14 %15 None
+ OpBranch %16
+ %16 = OpLabel
+ OpBranchConditional %18 %13 %14
+ %13 = OpLabel
+ OpBranch %19
+ %19 = OpLabel
+ OpLoopMerge %21 %22 None
+ OpBranch %20
+ %20 = OpLabel
+ %29 = OpAccessChain %28 %25 %27
+ %30 = OpLoad %6 %29
+ %40 = OpAccessChain %39 %35 %37 %38
+ %41 = OpLoad %6 %40
+ %42 = OpFOrdLessThan %17 %30 %41
+ OpSelectionMerge %44 None
+ OpBranchConditional %42 %43 %44
+ %43 = OpLabel
+ OpBranch %45
+ %45 = OpLabel
+ OpLoopMerge %47 %48 None
+ OpBranch %46
+ %46 = OpLabel
+ OpBranch %48
+ %48 = OpLabel
+ %50 = OpAccessChain %28 %25 %49
+ %51 = OpLoad %6 %50
+ %52 = OpAccessChain %39 %35 %37 %38
+ %53 = OpLoad %6 %52
+ %54 = OpFOrdLessThan %17 %51 %53
+ OpBranchConditional %54 %45 %47
+ %47 = OpLabel
+ OpBranch %44
+ %44 = OpLabel
+ %55 = OpLoad %6 %9
+ %57 = OpAccessChain %39 %35 %37 %56
+ %58 = OpLoad %6 %57
+ %59 = OpFOrdLessThan %17 %55 %58
+ OpSelectionMerge %61 None
+ OpBranchConditional %59 %60 %61
+ %60 = OpLabel
+ %63 = OpAccessChain %39 %35 %37 %62
+ %64 = OpLoad %6 %63
+ OpReturnValue %64
+ %61 = OpLabel
+ OpBranch %22
+ %22 = OpLabel
+ %66 = OpAccessChain %28 %25 %27
+ %67 = OpLoad %6 %66
+ %68 = OpAccessChain %39 %35 %37 %38
+ %69 = OpLoad %6 %68
+ %70 = OpFOrdLessThan %17 %67 %69
+ OpBranchConditional %70 %19 %21
+ %21 = OpLabel
+ OpBranch %15
+ %15 = OpLabel
+ OpBranch %12
+ %14 = OpLabel
+ %71 = OpAccessChain %39 %35 %37 %37
+ %72 = OpLoad %6 %71
+ OpReturnValue %72
+ 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 300.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 256 256
+ 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 256 256
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255
--- /dev/null
+#!amber
+
+# Copyright 2021 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]
+#
+# 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];
+# };
+# layout(location = 0) out vec4 _GLF_color;
+#
+# const int _GLF_global_loop_bound = 100;
+# int _GLF_global_loop_count = 0;
+#
+# void main()
+# {
+# while(_GLF_global_loop_count < _GLF_global_loop_bound)
+# {
+# _GLF_global_loop_count ++;
+#
+# if(_GLF_global_loop_count * _GLF_global_loop_count > 10)
+# {
+# break;
+# }
+# }
+#
+# // Always true.
+# if(_GLF_global_loop_count == 4)
+# {
+# _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 "_GLF_global_loop_count"
+ OpName %38 "_GLF_color"
+ OpName %42 "buf0"
+ OpMemberName %42 0 "_GLF_uniform_int_values"
+ OpName %44 ""
+ OpDecorate %38 Location 0
+ OpDecorate %41 ArrayStride 16
+ OpMemberDecorate %42 0 Offset 0
+ OpDecorate %42 Block
+ OpDecorate %44 DescriptorSet 0
+ OpDecorate %44 Binding 0
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeInt 32 1
+ %7 = OpTypePointer Private %6
+ %8 = OpVariable %7 Private
+ %9 = OpConstant %6 0
+ %16 = OpConstant %6 100
+ %17 = OpTypeBool
+ %20 = OpConstant %6 1
+ %25 = OpConstant %6 10
+ %31 = OpConstant %6 4
+ %35 = OpTypeFloat 32
+ %36 = OpTypeVector %35 4
+ %37 = OpTypePointer Output %36
+ %38 = OpVariable %37 Output
+ %39 = OpTypeInt 32 0
+ %40 = OpConstant %39 2
+ %41 = OpTypeArray %6 %40
+ %42 = OpTypeStruct %41
+ %43 = OpTypePointer Uniform %42
+ %44 = OpVariable %43 Uniform
+ %45 = OpTypePointer Uniform %6
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ OpStore %8 %9
+ OpBranch %10
+ %10 = OpLabel
+ OpLoopMerge %12 %13 None
+ OpBranch %14
+ %14 = OpLabel
+ %15 = OpLoad %6 %8
+ %18 = OpSLessThan %17 %15 %16
+ OpBranchConditional %18 %11 %12
+ %11 = OpLabel
+ %19 = OpLoad %6 %8
+ %21 = OpIAdd %6 %19 %20
+ OpStore %8 %21
+ %22 = OpLoad %6 %8
+ %23 = OpLoad %6 %8
+ %24 = OpIMul %6 %22 %23
+ %26 = OpSGreaterThan %17 %24 %25
+ OpSelectionMerge %28 None
+ OpBranchConditional %26 %27 %28
+ %27 = OpLabel
+ OpBranch %12
+ %28 = OpLabel
+ OpBranch %13
+ %13 = OpLabel
+ OpBranch %10
+ %12 = OpLabel
+ %30 = OpLoad %6 %8
+ %32 = OpIEqual %17 %30 %31
+ OpSelectionMerge %34 None
+ OpBranchConditional %32 %33 %59
+ %33 = OpLabel
+ %46 = OpAccessChain %45 %44 %9 %9
+ %47 = OpLoad %6 %46
+ %48 = OpConvertSToF %35 %47
+ %49 = OpAccessChain %45 %44 %9 %20
+ %50 = OpLoad %6 %49
+ %51 = OpConvertSToF %35 %50
+ %52 = OpAccessChain %45 %44 %9 %20
+ %53 = OpLoad %6 %52
+ %54 = OpConvertSToF %35 %53
+ %55 = OpAccessChain %45 %44 %9 %9
+ %56 = OpLoad %6 %55
+ %57 = OpConvertSToF %35 %56
+ %58 = OpCompositeConstruct %36 %48 %51 %54 %57
+ OpStore %38 %58
+ OpBranch %34
+ %59 = OpLabel
+ %60 = OpAccessChain %45 %44 %9 %20
+ %61 = OpLoad %6 %60
+ %62 = OpConvertSToF %35 %61
+ %63 = OpCompositeConstruct %36 %62 %62 %62 %62
+ OpStore %38 %63
+ OpBranch %34
+ %34 = 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 256 256
+ 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 256 256
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255
--- /dev/null
+#!amber
+
+# Copyright 2021 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 _int_10 _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: [1, 0, 10]
+# 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()
+# {
+# int data[10];
+#
+# for(int i = _int_0; i < _int_10; i++)
+# {
+# data[i] = _int_1;
+# }
+#
+# float f0 = _float_1_0;
+# // Always selects 2.0.
+# float f1 = isnan(f0) ? _float_1_0 : _float_2_0;
+# // Clamp always returns 1.0. Substract 1.0 and asinh gets zero for its input resulting in f2 = 0.
+# float f2 = asinh(clamp(_float_1_0, _float_1_0, gl_FragCoord.x + _float_1_0) - float(data[_int_1]));
+#
+# // Always true.
+# if (f1 == _float_2_0 && f2 == _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: 119
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %70 %100
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %8 "i"
+ OpName %12 "buf0"
+ OpMemberName %12 0 "_GLF_uniform_int_values"
+ OpName %14 ""
+ OpName %34 "data"
+ OpName %43 "f0"
+ OpName %45 "buf1"
+ OpMemberName %45 0 "_GLF_uniform_float_values"
+ OpName %47 ""
+ OpName %51 "f1"
+ OpName %63 "f2"
+ OpName %70 "gl_FragCoord"
+ OpName %100 "_GLF_color"
+ OpDecorate %11 ArrayStride 16
+ OpMemberDecorate %12 0 Offset 0
+ OpDecorate %12 Block
+ OpDecorate %14 DescriptorSet 0
+ OpDecorate %14 Binding 0
+ OpDecorate %44 ArrayStride 16
+ OpMemberDecorate %45 0 Offset 0
+ OpDecorate %45 Block
+ OpDecorate %47 DescriptorSet 0
+ OpDecorate %47 Binding 1
+ OpDecorate %70 BuiltIn FragCoord
+ OpDecorate %100 Location 0
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeInt 32 1
+ %7 = OpTypePointer Function %6
+ %9 = OpTypeInt 32 0
+ %10 = OpConstant %9 3
+ %11 = OpTypeArray %6 %10
+ %12 = OpTypeStruct %11
+ %13 = OpTypePointer Uniform %12
+ %14 = OpVariable %13 Uniform
+ %15 = OpConstant %6 0
+ %16 = OpConstant %6 1
+ %17 = OpTypePointer Uniform %6
+ %26 = OpConstant %6 2
+ %29 = OpTypeBool
+ %31 = OpConstant %9 10
+ %32 = OpTypeArray %6 %31
+ %33 = OpTypePointer Function %32
+ %41 = OpTypeFloat 32
+ %42 = OpTypePointer Function %41
+ %44 = OpTypeArray %41 %10
+ %45 = OpTypeStruct %44
+ %46 = OpTypePointer Uniform %45
+ %47 = OpVariable %46 Uniform
+ %48 = OpTypePointer Uniform %41
+ %68 = OpTypeVector %41 4
+ %69 = OpTypePointer Input %68
+ %70 = OpVariable %69 Input
+ %71 = OpConstant %9 0
+ %72 = OpTypePointer Input %41
+ %99 = OpTypePointer Output %68
+ %100 = OpVariable %99 Output
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ %8 = OpVariable %7 Function
+ %34 = OpVariable %33 Function
+ %43 = OpVariable %42 Function
+ %51 = OpVariable %42 Function
+ %54 = OpVariable %42 Function
+ %63 = OpVariable %42 Function
+ %18 = OpAccessChain %17 %14 %15 %16
+ %19 = OpLoad %6 %18
+ OpStore %8 %19
+ OpBranch %20
+ %20 = OpLabel
+ OpLoopMerge %22 %23 None
+ OpBranch %24
+ %24 = OpLabel
+ %25 = OpLoad %6 %8
+ %27 = OpAccessChain %17 %14 %15 %26
+ %28 = OpLoad %6 %27
+ %30 = OpSLessThan %29 %25 %28
+ OpBranchConditional %30 %21 %22
+ %21 = OpLabel
+ %35 = OpLoad %6 %8
+ %36 = OpAccessChain %17 %14 %15 %15
+ %37 = OpLoad %6 %36
+ %38 = OpAccessChain %7 %34 %35
+ OpStore %38 %37
+ OpBranch %23
+ %23 = OpLabel
+ %39 = OpLoad %6 %8
+ %40 = OpIAdd %6 %39 %16
+ OpStore %8 %40
+ OpBranch %20
+ %22 = OpLabel
+ %49 = OpAccessChain %48 %47 %15 %16
+ %50 = OpLoad %41 %49
+ OpStore %43 %50
+ %52 = OpLoad %41 %43
+ %53 = OpIsNan %29 %52
+ OpSelectionMerge %56 None
+ OpBranchConditional %53 %55 %59
+ %55 = OpLabel
+ %57 = OpAccessChain %48 %47 %15 %16
+ %58 = OpLoad %41 %57
+ OpStore %54 %58
+ OpBranch %56
+ %59 = OpLabel
+ %60 = OpAccessChain %48 %47 %15 %15
+ %61 = OpLoad %41 %60
+ OpStore %54 %61
+ OpBranch %56
+ %56 = OpLabel
+ %62 = OpLoad %41 %54
+ OpStore %51 %62
+ %64 = OpAccessChain %48 %47 %15 %16
+ %65 = OpLoad %41 %64
+ %66 = OpAccessChain %48 %47 %15 %16
+ %67 = OpLoad %41 %66
+ %73 = OpAccessChain %72 %70 %71
+ %74 = OpLoad %41 %73
+ %75 = OpAccessChain %48 %47 %15 %16
+ %76 = OpLoad %41 %75
+ %77 = OpFAdd %41 %74 %76
+ %78 = OpExtInst %41 %1 FClamp %65 %67 %77
+ %79 = OpAccessChain %17 %14 %15 %15
+ %80 = OpLoad %6 %79
+ %81 = OpAccessChain %7 %34 %80
+ %82 = OpLoad %6 %81
+ %83 = OpConvertSToF %41 %82
+ %84 = OpFSub %41 %78 %83
+ %85 = OpExtInst %41 %1 Asinh %84
+ OpStore %63 %85
+ %86 = OpLoad %41 %51
+ %87 = OpAccessChain %48 %47 %15 %15
+ %88 = OpLoad %41 %87
+ %89 = OpFOrdEqual %29 %86 %88
+ OpSelectionMerge %91 None
+ OpBranchConditional %89 %90 %91
+ %90 = OpLabel
+ %92 = OpLoad %41 %63
+ %93 = OpAccessChain %48 %47 %15 %26
+ %94 = OpLoad %41 %93
+ %95 = OpFOrdEqual %29 %92 %94
+ OpBranch %91
+ %91 = OpLabel
+ %96 = OpPhi %29 %89 %56 %95 %90
+ OpSelectionMerge %98 None
+ OpBranchConditional %96 %97 %114
+ %97 = OpLabel
+ %101 = OpAccessChain %17 %14 %15 %15
+ %102 = OpLoad %6 %101
+ %103 = OpConvertSToF %41 %102
+ %104 = OpAccessChain %17 %14 %15 %16
+ %105 = OpLoad %6 %104
+ %106 = OpConvertSToF %41 %105
+ %107 = OpAccessChain %17 %14 %15 %16
+ %108 = OpLoad %6 %107
+ %109 = OpConvertSToF %41 %108
+ %110 = OpAccessChain %17 %14 %15 %15
+ %111 = OpLoad %6 %110
+ %112 = OpConvertSToF %41 %111
+ %113 = OpCompositeConstruct %68 %103 %106 %109 %112
+ OpStore %100 %113
+ OpBranch %98
+ %114 = OpLabel
+ %115 = OpAccessChain %17 %14 %15 %16
+ %116 = OpLoad %6 %115
+ %117 = OpConvertSToF %41 %116
+ %118 = OpCompositeConstruct %68 %117 %117 %117 %117
+ OpStore %100 %118
+ OpBranch %98
+ %98 = 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
+ 1 0 10
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+ ATTACH variant_vertex_shader
+ ATTACH variant_fragment_shader
+ FRAMEBUFFER_SIZE 256 256
+ 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 256 256
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255
--- /dev/null
+#!amber
+
+# Copyright 2021 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 patch optimization 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_0 _GLF_uniform_int_values[1]
+# #define _int_1 _GLF_uniform_int_values[2]
+# #define _float_0_0 _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.0, 1.0]
+# layout(set = 0, binding = 0) uniform buf0
+# {
+# float _GLF_uniform_float_values[2];
+# };
+#
+# // Contents of _GLF_uniform_int_values: [3, 0, 1]
+# layout(set = 0, binding = 1) uniform buf1
+# {
+# int _GLF_uniform_int_values[3];
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# void main()
+# {
+# float a = _float_1_0;
+# float b = _float_1_0;
+# float c = _float_1_0;
+#
+# for (int i = _int_0; i < _int_3; i ++)
+# {
+# if (i == _int_1)
+# {
+# // Executed when i == 1 but this still keeps b as one.
+# b = dFdx(a) + _float_1_0;
+# }
+#
+# // c = 0
+# c = dFdx(a);
+#
+# // a = 0 / 1 = 0
+# a = c / b;
+# }
+#
+# // Always true.
+# if (a == _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: 93
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %74
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %8 "a"
+ OpName %12 "buf0"
+ OpMemberName %12 0 "_GLF_uniform_float_values"
+ OpName %14 ""
+ OpName %21 "b"
+ OpName %24 "c"
+ OpName %28 "i"
+ OpName %31 "buf1"
+ OpMemberName %31 0 "_GLF_uniform_int_values"
+ OpName %33 ""
+ OpName %74 "_GLF_color"
+ OpDecorate %11 ArrayStride 16
+ OpMemberDecorate %12 0 Offset 0
+ OpDecorate %12 Block
+ OpDecorate %14 DescriptorSet 0
+ OpDecorate %14 Binding 0
+ OpDecorate %30 ArrayStride 16
+ OpMemberDecorate %31 0 Offset 0
+ OpDecorate %31 Block
+ OpDecorate %33 DescriptorSet 0
+ OpDecorate %33 Binding 1
+ OpDecorate %74 Location 0
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeFloat 32
+ %7 = OpTypePointer Function %6
+ %9 = OpTypeInt 32 0
+ %10 = OpConstant %9 2
+ %11 = OpTypeArray %6 %10
+ %12 = OpTypeStruct %11
+ %13 = OpTypePointer Uniform %12
+ %14 = OpVariable %13 Uniform
+ %15 = OpTypeInt 32 1
+ %16 = OpConstant %15 0
+ %17 = OpConstant %15 1
+ %18 = OpTypePointer Uniform %6
+ %27 = OpTypePointer Function %15
+ %29 = OpConstant %9 3
+ %30 = OpTypeArray %15 %29
+ %31 = OpTypeStruct %30
+ %32 = OpTypePointer Uniform %31
+ %33 = OpVariable %32 Uniform
+ %34 = OpTypePointer Uniform %15
+ %45 = OpTypeBool
+ %48 = OpConstant %15 2
+ %72 = OpTypeVector %6 4
+ %73 = OpTypePointer Output %72
+ %74 = OpVariable %73 Output
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ %8 = OpVariable %7 Function
+ %21 = OpVariable %7 Function
+ %24 = OpVariable %7 Function
+ %28 = OpVariable %27 Function
+ %19 = OpAccessChain %18 %14 %16 %17
+ %20 = OpLoad %6 %19
+ OpStore %8 %20
+ %22 = OpAccessChain %18 %14 %16 %17
+ %23 = OpLoad %6 %22
+ OpStore %21 %23
+ %25 = OpAccessChain %18 %14 %16 %17
+ %26 = OpLoad %6 %25
+ OpStore %24 %26
+ %35 = OpAccessChain %34 %33 %16 %17
+ %36 = OpLoad %15 %35
+ OpStore %28 %36
+ OpBranch %37
+ %37 = OpLabel
+ OpLoopMerge %39 %40 None
+ OpBranch %41
+ %41 = OpLabel
+ %42 = OpLoad %15 %28
+ %43 = OpAccessChain %34 %33 %16 %16
+ %44 = OpLoad %15 %43
+ %46 = OpSLessThan %45 %42 %44
+ OpBranchConditional %46 %38 %39
+ %38 = OpLabel
+ %47 = OpLoad %15 %28
+ %49 = OpAccessChain %34 %33 %16 %48
+ %50 = OpLoad %15 %49
+ %51 = OpIEqual %45 %47 %50
+ OpSelectionMerge %53 None
+ OpBranchConditional %51 %52 %53
+ %52 = OpLabel
+ %54 = OpLoad %6 %8
+ %55 = OpDPdx %6 %54
+ %56 = OpAccessChain %18 %14 %16 %17
+ %57 = OpLoad %6 %56
+ %58 = OpFAdd %6 %55 %57
+ OpStore %21 %58
+ OpBranch %53
+ %53 = OpLabel
+ %59 = OpLoad %6 %8
+ %60 = OpDPdx %6 %59
+ OpStore %24 %60
+ %61 = OpLoad %6 %24
+ %62 = OpLoad %6 %21
+ %63 = OpFDiv %6 %61 %62
+ OpStore %8 %63
+ OpBranch %40
+ %40 = OpLabel
+ %64 = OpLoad %15 %28
+ %65 = OpIAdd %15 %64 %17
+ OpStore %28 %65
+ OpBranch %37
+ %39 = OpLabel
+ %66 = OpLoad %6 %8
+ %67 = OpAccessChain %18 %14 %16 %16
+ %68 = OpLoad %6 %67
+ %69 = OpFOrdEqual %45 %66 %68
+ OpSelectionMerge %71 None
+ OpBranchConditional %69 %70 %88
+ %70 = OpLabel
+ %75 = OpAccessChain %34 %33 %16 %48
+ %76 = OpLoad %15 %75
+ %77 = OpConvertSToF %6 %76
+ %78 = OpAccessChain %34 %33 %16 %17
+ %79 = OpLoad %15 %78
+ %80 = OpConvertSToF %6 %79
+ %81 = OpAccessChain %34 %33 %16 %17
+ %82 = OpLoad %15 %81
+ %83 = OpConvertSToF %6 %82
+ %84 = OpAccessChain %34 %33 %16 %48
+ %85 = OpLoad %15 %84
+ %86 = OpConvertSToF %6 %85
+ %87 = OpCompositeConstruct %72 %77 %80 %83 %86
+ OpStore %74 %87
+ OpBranch %71
+ %88 = OpLabel
+ %89 = OpAccessChain %34 %33 %16 %17
+ %90 = OpLoad %15 %89
+ %91 = OpConvertSToF %6 %90
+ %92 = OpCompositeConstruct %72 %91 %91 %91 %91
+ OpStore %74 %92
+ 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
+ 3 0 1
+END
+# _GLF_uniform_float_values
+BUFFER variant__GLF_uniform_float_values DATA_TYPE 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 256 256
+ 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 256 256
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255
--- /dev/null
+#!amber
+
+# Copyright 2021 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 _int_9 _GLF_uniform_int_values[2]
+#
+# precision highp int;
+# precision highp float;
+#
+# // Contents of _GLF_uniform_int_values: [1, 0, 9]
+# layout(set = 0, binding = 0) uniform buf0
+# {
+# int _GLF_uniform_int_values[3];
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# void main()
+# {
+# int a = _int_9;
+#
+# while (a >= 0)
+# {
+# a = (a / 2) - 1;
+# }
+#
+# // Always true.
+# if (a == -_int_1)
+# {
+# _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: 61
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %42
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %8 "a"
+ OpName %12 "buf0"
+ OpMemberName %12 0 "_GLF_uniform_int_values"
+ OpName %14 ""
+ OpName %42 "_GLF_color"
+ OpDecorate %11 ArrayStride 16
+ OpMemberDecorate %12 0 Offset 0
+ OpDecorate %12 Block
+ OpDecorate %14 DescriptorSet 0
+ OpDecorate %14 Binding 0
+ OpDecorate %42 Location 0
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeInt 32 1
+ %7 = OpTypePointer Function %6
+ %9 = OpTypeInt 32 0
+ %10 = OpConstant %9 3
+ %11 = OpTypeArray %6 %10
+ %12 = OpTypeStruct %11
+ %13 = OpTypePointer Uniform %12
+ %14 = OpVariable %13 Uniform
+ %15 = OpConstant %6 0
+ %16 = OpConstant %6 2
+ %17 = OpTypePointer Uniform %6
+ %26 = OpTypeBool
+ %30 = OpConstant %6 1
+ %39 = OpTypeFloat 32
+ %40 = OpTypeVector %39 4
+ %41 = OpTypePointer Output %40
+ %42 = OpVariable %41 Output
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ %8 = OpVariable %7 Function
+ %18 = OpAccessChain %17 %14 %15 %16
+ %19 = OpLoad %6 %18
+ OpStore %8 %19
+ OpBranch %20
+ %20 = OpLabel
+ OpLoopMerge %22 %23 None
+ OpBranch %24
+ %24 = OpLabel
+ %25 = OpLoad %6 %8
+ %27 = OpSGreaterThanEqual %26 %25 %15
+ OpBranchConditional %27 %21 %22
+ %21 = OpLabel
+ %28 = OpLoad %6 %8
+ %29 = OpSDiv %6 %28 %16
+ %31 = OpISub %6 %29 %30
+ OpStore %8 %31
+ OpBranch %23
+ %23 = OpLabel
+ OpBranch %20
+ %22 = OpLabel
+ %32 = OpLoad %6 %8
+ %33 = OpAccessChain %17 %14 %15 %15
+ %34 = OpLoad %6 %33
+ %35 = OpSNegate %6 %34
+ %36 = OpIEqual %26 %32 %35
+ OpSelectionMerge %38 None
+ OpBranchConditional %36 %37 %56
+ %37 = OpLabel
+ %43 = OpAccessChain %17 %14 %15 %15
+ %44 = OpLoad %6 %43
+ %45 = OpConvertSToF %39 %44
+ %46 = OpAccessChain %17 %14 %15 %30
+ %47 = OpLoad %6 %46
+ %48 = OpConvertSToF %39 %47
+ %49 = OpAccessChain %17 %14 %15 %30
+ %50 = OpLoad %6 %49
+ %51 = OpConvertSToF %39 %50
+ %52 = OpAccessChain %17 %14 %15 %15
+ %53 = OpLoad %6 %52
+ %54 = OpConvertSToF %39 %53
+ %55 = OpCompositeConstruct %40 %45 %48 %51 %54
+ OpStore %42 %55
+ OpBranch %38
+ %56 = OpLabel
+ %57 = OpAccessChain %17 %14 %15 %30
+ %58 = OpLoad %6 %57
+ %59 = OpConvertSToF %39 %58
+ %60 = OpCompositeConstruct %40 %59 %59 %59 %59
+ OpStore %42 %60
+ OpBranch %38
+ %38 = OpLabel
+ OpReturn
+ OpFunctionEnd
+END
+
+# uniforms for variant
+
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 1 0 9
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+ ATTACH variant_vertex_shader
+ ATTACH variant_fragment_shader
+ FRAMEBUFFER_SIZE 256 256
+ 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 256 256
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255
--- /dev/null
+#!amber
+
+# Copyright 2021 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 int;
+# precision highp float;
+#
+# // 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;
+#
+# void main()
+# {
+# // -1 encodes a NaN, which makes the result of
+# // intBitsToFloat undefined.
+# float f = min(intBitsToFloat(-1), 1.0);
+#
+# // Always true.
+# if(gl_FragCoord.x > _float_0_0)
+# {
+# _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1);
+# }
+# else
+# {
+# // f is undefined, but this is never executed.
+# _GLF_color = vec4(f);
+# }
+# }
+SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 10
+; Bound: 60
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %16 %36
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %8 "f"
+ OpName %16 "gl_FragCoord"
+ OpName %24 "buf0"
+ OpMemberName %24 0 "_GLF_uniform_float_values"
+ OpName %26 ""
+ OpName %36 "_GLF_color"
+ OpName %39 "buf1"
+ OpMemberName %39 0 "_GLF_uniform_int_values"
+ OpName %41 ""
+ OpDecorate %16 BuiltIn FragCoord
+ OpDecorate %23 ArrayStride 16
+ OpMemberDecorate %24 0 Offset 0
+ OpDecorate %24 Block
+ OpDecorate %26 DescriptorSet 0
+ OpDecorate %26 Binding 0
+ OpDecorate %36 Location 0
+ OpDecorate %38 ArrayStride 16
+ OpMemberDecorate %39 0 Offset 0
+ OpDecorate %39 Block
+ OpDecorate %41 DescriptorSet 0
+ OpDecorate %41 Binding 1
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeFloat 32
+ %7 = OpTypePointer Function %6
+ %9 = OpTypeInt 32 1
+ %10 = OpConstant %9 -1
+ %12 = OpConstant %6 1
+ %14 = OpTypeVector %6 4
+ %15 = OpTypePointer Input %14
+ %16 = OpVariable %15 Input
+ %17 = OpTypeInt 32 0
+ %18 = OpConstant %17 0
+ %19 = OpTypePointer Input %6
+ %22 = OpConstant %17 1
+ %23 = OpTypeArray %6 %22
+ %24 = OpTypeStruct %23
+ %25 = OpTypePointer Uniform %24
+ %26 = OpVariable %25 Uniform
+ %27 = OpConstant %9 0
+ %28 = OpTypePointer Uniform %6
+ %31 = OpTypeBool
+ %35 = OpTypePointer Output %14
+ %36 = OpVariable %35 Output
+ %37 = OpConstant %17 2
+ %38 = OpTypeArray %9 %37
+ %39 = OpTypeStruct %38
+ %40 = OpTypePointer Uniform %39
+ %41 = OpVariable %40 Uniform
+ %42 = OpConstant %9 1
+ %43 = OpTypePointer Uniform %9
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ %8 = OpVariable %7 Function
+ %11 = OpBitcast %6 %10
+ %13 = OpExtInst %6 %1 FMin %11 %12
+ OpStore %8 %13
+ %20 = OpAccessChain %19 %16 %18
+ %21 = OpLoad %6 %20
+ %29 = OpAccessChain %28 %26 %27 %27
+ %30 = OpLoad %6 %29
+ %32 = OpFOrdGreaterThan %31 %21 %30
+ OpSelectionMerge %34 None
+ OpBranchConditional %32 %33 %57
+ %33 = OpLabel
+ %44 = OpAccessChain %43 %41 %27 %42
+ %45 = OpLoad %9 %44
+ %46 = OpConvertSToF %6 %45
+ %47 = OpAccessChain %43 %41 %27 %27
+ %48 = OpLoad %9 %47
+ %49 = OpConvertSToF %6 %48
+ %50 = OpAccessChain %43 %41 %27 %27
+ %51 = OpLoad %9 %50
+ %52 = OpConvertSToF %6 %51
+ %53 = OpAccessChain %43 %41 %27 %42
+ %54 = OpLoad %9 %53
+ %55 = OpConvertSToF %6 %54
+ %56 = OpCompositeConstruct %14 %46 %49 %52 %55
+ OpStore %36 %56
+ OpBranch %34
+ %57 = OpLabel
+ %58 = OpLoad %6 %8
+ %59 = OpCompositeConstruct %14 %58 %58 %58 %58
+ OpStore %36 %59
+ OpBranch %34
+ %34 = 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.0
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+ ATTACH variant_vertex_shader
+ ATTACH variant_fragment_shader
+ FRAMEBUFFER_SIZE 256 256
+ 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 256 256
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255
--- /dev/null
+#!amber
+
+# Copyright 2021 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 SPIR-V lower math 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_2_0 _GLF_uniform_float_values[0]
+# #define _float_0_5 _GLF_uniform_float_values[1]
+#
+# precision highp float;
+# precision highp int;
+#
+# // Contents of _GLF_uniform_float_values: [2.0, 0.5]
+# layout(set = 0, binding = 0) uniform buf0
+# {
+# float _GLF_uniform_float_values[2];
+# };
+# // Contents of _GLF_uniform_int_values: [1, 0]
+# layout(set = 0, binding = 1) uniform buf1
+# {
+# int _GLF_uniform_int_values[2];
+# };
+# // Contents of one: 1.0
+# layout(set = 0, binding = 2) uniform buf2
+# {
+# float one;
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# void main()
+# {
+# float f0 = _float_2_0;
+# float f1 = _float_0_5 * pow(f0, 4.0);
+# float f2 = _float_0_5 * pow(f0, 4.0);
+# // f3 = sqrt((8-8) - 1 + 2) = sqrt(1) = 1.
+# float f3 = sqrt((f1 - f2) - one + f0);
+#
+# // Always true.
+# if(int(f3) == _int_1)
+# {
+# _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: 81
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %62
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %8 "f0"
+ OpName %12 "buf0"
+ OpMemberName %12 0 "_GLF_uniform_float_values"
+ OpName %14 ""
+ OpName %20 "f1"
+ OpName %28 "f2"
+ OpName %34 "f3"
+ OpName %38 "buf2"
+ OpMemberName %38 0 "one"
+ OpName %40 ""
+ OpName %50 "buf1"
+ OpMemberName %50 0 "_GLF_uniform_int_values"
+ OpName %52 ""
+ OpName %62 "_GLF_color"
+ OpDecorate %11 ArrayStride 16
+ OpMemberDecorate %12 0 Offset 0
+ OpDecorate %12 Block
+ OpDecorate %14 DescriptorSet 0
+ OpDecorate %14 Binding 0
+ OpMemberDecorate %38 0 Offset 0
+ OpDecorate %38 Block
+ OpDecorate %40 DescriptorSet 0
+ OpDecorate %40 Binding 2
+ OpDecorate %49 ArrayStride 16
+ OpMemberDecorate %50 0 Offset 0
+ OpDecorate %50 Block
+ OpDecorate %52 DescriptorSet 0
+ OpDecorate %52 Binding 1
+ OpDecorate %62 Location 0
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeFloat 32
+ %7 = OpTypePointer Function %6
+ %9 = OpTypeInt 32 0
+ %10 = OpConstant %9 2
+ %11 = OpTypeArray %6 %10
+ %12 = OpTypeStruct %11
+ %13 = OpTypePointer Uniform %12
+ %14 = OpVariable %13 Uniform
+ %15 = OpTypeInt 32 1
+ %16 = OpConstant %15 0
+ %17 = OpTypePointer Uniform %6
+ %21 = OpConstant %15 1
+ %25 = OpConstant %6 4
+ %38 = OpTypeStruct %6
+ %39 = OpTypePointer Uniform %38
+ %40 = OpVariable %39 Uniform
+ %49 = OpTypeArray %15 %10
+ %50 = OpTypeStruct %49
+ %51 = OpTypePointer Uniform %50
+ %52 = OpVariable %51 Uniform
+ %53 = OpTypePointer Uniform %15
+ %56 = OpTypeBool
+ %60 = OpTypeVector %6 4
+ %61 = OpTypePointer Output %60
+ %62 = OpVariable %61 Output
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ %8 = OpVariable %7 Function
+ %20 = OpVariable %7 Function
+ %28 = OpVariable %7 Function
+ %34 = OpVariable %7 Function
+ %18 = OpAccessChain %17 %14 %16 %16
+ %19 = OpLoad %6 %18
+ OpStore %8 %19
+ %22 = OpAccessChain %17 %14 %16 %21
+ %23 = OpLoad %6 %22
+ %24 = OpLoad %6 %8
+ %26 = OpExtInst %6 %1 Pow %24 %25
+ %27 = OpFMul %6 %23 %26
+ OpStore %20 %27
+ %29 = OpAccessChain %17 %14 %16 %21
+ %30 = OpLoad %6 %29
+ %31 = OpLoad %6 %8
+ %32 = OpExtInst %6 %1 Pow %31 %25
+ %33 = OpFMul %6 %30 %32
+ OpStore %28 %33
+ %35 = OpLoad %6 %20
+ %36 = OpLoad %6 %28
+ %37 = OpFSub %6 %35 %36
+ %41 = OpAccessChain %17 %40 %16
+ %42 = OpLoad %6 %41
+ %43 = OpFSub %6 %37 %42
+ %44 = OpLoad %6 %8
+ %45 = OpFAdd %6 %43 %44
+ %46 = OpExtInst %6 %1 Sqrt %45
+ OpStore %34 %46
+ %47 = OpLoad %6 %34
+ %48 = OpConvertFToS %15 %47
+ %54 = OpAccessChain %53 %52 %16 %16
+ %55 = OpLoad %15 %54
+ %57 = OpIEqual %56 %48 %55
+ OpSelectionMerge %59 None
+ OpBranchConditional %57 %58 %76
+ %58 = OpLabel
+ %63 = OpAccessChain %53 %52 %16 %16
+ %64 = OpLoad %15 %63
+ %65 = OpConvertSToF %6 %64
+ %66 = OpAccessChain %53 %52 %16 %21
+ %67 = OpLoad %15 %66
+ %68 = OpConvertSToF %6 %67
+ %69 = OpAccessChain %53 %52 %16 %21
+ %70 = OpLoad %15 %69
+ %71 = OpConvertSToF %6 %70
+ %72 = OpAccessChain %53 %52 %16 %16
+ %73 = OpLoad %15 %72
+ %74 = OpConvertSToF %6 %73
+ %75 = OpCompositeConstruct %60 %65 %68 %71 %74
+ OpStore %62 %75
+ OpBranch %59
+ %76 = OpLabel
+ %77 = OpAccessChain %53 %52 %16 %21
+ %78 = OpLoad %15 %77
+ %79 = OpConvertSToF %6 %78
+ %80 = OpCompositeConstruct %60 %79 %79 %79 %79
+ OpStore %62 %80
+ OpBranch %59
+ %59 = OpLabel
+ OpReturn
+ OpFunctionEnd
+END
+
+# uniforms for variant
+
+# one
+BUFFER variant_one DATA_TYPE float 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
+ 2.0 0.5
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+ ATTACH variant_vertex_shader
+ ATTACH variant_fragment_shader
+ FRAMEBUFFER_SIZE 256 256
+ BIND BUFFER variant_framebuffer AS color LOCATION 0
+ BIND BUFFER variant_one 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 256 256
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255
--- /dev/null
+#!amber
+
+# Copyright 2021 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]
+# #define _float_1_0 _GLF_uniform_float_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];
+# };
+#
+# // Contents of _GLF_uniform_float_values: [0.0, 1.0]
+# layout(set = 0, binding = 1) uniform buf1
+# {
+# float _GLF_uniform_float_values[2];
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# // Contents of zero: 0
+# layout(set = 0, binding = 2) uniform buf2
+# {
+# int zero;
+# };
+#
+# void main()
+# {
+# // Results are undefined.
+# float f = pow(- _float_1_0, sinh(1.0));
+#
+# // The value of f doesn't matter because the right side is always true.
+# if(f == _float_0_0 || zero == _int_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: 70
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %51
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %8 "f"
+ OpName %12 "buf1"
+ OpMemberName %12 0 "_GLF_uniform_float_values"
+ OpName %14 ""
+ OpName %33 "buf2"
+ OpMemberName %33 0 "zero"
+ OpName %35 ""
+ OpName %40 "buf0"
+ OpMemberName %40 0 "_GLF_uniform_int_values"
+ OpName %42 ""
+ OpName %51 "_GLF_color"
+ OpDecorate %11 ArrayStride 16
+ OpMemberDecorate %12 0 Offset 0
+ OpDecorate %12 Block
+ OpDecorate %14 DescriptorSet 0
+ OpDecorate %14 Binding 1
+ OpMemberDecorate %33 0 Offset 0
+ OpDecorate %33 Block
+ OpDecorate %35 DescriptorSet 0
+ OpDecorate %35 Binding 2
+ OpDecorate %39 ArrayStride 16
+ OpMemberDecorate %40 0 Offset 0
+ OpDecorate %40 Block
+ OpDecorate %42 DescriptorSet 0
+ OpDecorate %42 Binding 0
+ OpDecorate %51 Location 0
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeFloat 32
+ %7 = OpTypePointer Function %6
+ %9 = OpTypeInt 32 0
+ %10 = OpConstant %9 2
+ %11 = OpTypeArray %6 %10
+ %12 = OpTypeStruct %11
+ %13 = OpTypePointer Uniform %12
+ %14 = OpVariable %13 Uniform
+ %15 = OpTypeInt 32 1
+ %16 = OpConstant %15 0
+ %17 = OpConstant %15 1
+ %18 = OpTypePointer Uniform %6
+ %22 = OpConstant %6 1
+ %25 = OpTypeBool
+ %33 = OpTypeStruct %15
+ %34 = OpTypePointer Uniform %33
+ %35 = OpVariable %34 Uniform
+ %36 = OpTypePointer Uniform %15
+ %39 = OpTypeArray %15 %10
+ %40 = OpTypeStruct %39
+ %41 = OpTypePointer Uniform %40
+ %42 = OpVariable %41 Uniform
+ %49 = OpTypeVector %6 4
+ %50 = OpTypePointer Output %49
+ %51 = OpVariable %50 Output
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ %8 = OpVariable %7 Function
+ %19 = OpAccessChain %18 %14 %16 %17
+ %20 = OpLoad %6 %19
+ %21 = OpFNegate %6 %20
+ %23 = OpExtInst %6 %1 Sinh %22
+ %24 = OpExtInst %6 %1 Pow %21 %23
+ OpStore %8 %24
+ %26 = OpLoad %6 %8
+ %27 = OpAccessChain %18 %14 %16 %16
+ %28 = OpLoad %6 %27
+ %29 = OpFOrdEqual %25 %26 %28
+ %30 = OpLogicalNot %25 %29
+ OpSelectionMerge %32 None
+ OpBranchConditional %30 %31 %32
+ %31 = OpLabel
+ %37 = OpAccessChain %36 %35 %16
+ %38 = OpLoad %15 %37
+ %43 = OpAccessChain %36 %42 %16 %16
+ %44 = OpLoad %15 %43
+ %45 = OpIEqual %25 %38 %44
+ OpBranch %32
+ %32 = OpLabel
+ %46 = OpPhi %25 %29 %5 %45 %31
+ OpSelectionMerge %48 None
+ OpBranchConditional %46 %47 %65
+ %47 = OpLabel
+ %52 = OpAccessChain %36 %42 %16 %17
+ %53 = OpLoad %15 %52
+ %54 = OpConvertSToF %6 %53
+ %55 = OpAccessChain %36 %42 %16 %16
+ %56 = OpLoad %15 %55
+ %57 = OpConvertSToF %6 %56
+ %58 = OpAccessChain %36 %42 %16 %16
+ %59 = OpLoad %15 %58
+ %60 = OpConvertSToF %6 %59
+ %61 = OpAccessChain %36 %42 %16 %17
+ %62 = OpLoad %15 %61
+ %63 = OpConvertSToF %6 %62
+ %64 = OpCompositeConstruct %49 %54 %57 %60 %63
+ OpStore %51 %64
+ OpBranch %48
+ %65 = OpLabel
+ %66 = OpAccessChain %36 %42 %16 %16
+ %67 = OpLoad %15 %66
+ %68 = OpConvertSToF %6 %67
+ %69 = OpCompositeConstruct %49 %68 %68 %68 %68
+ OpStore %51 %69
+ OpBranch %48
+ %48 = OpLabel
+ OpReturn
+ OpFunctionEnd
+END
+
+# uniforms for variant
+
+# zero
+BUFFER variant_zero DATA_TYPE int32 STD140 DATA
+ 0
+END
+# _GLF_uniform_float_values
+BUFFER variant__GLF_uniform_float_values DATA_TYPE 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
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+ ATTACH variant_vertex_shader
+ ATTACH variant_fragment_shader
+ FRAMEBUFFER_SIZE 256 256
+ 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 256 256
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255
--- /dev/null
+#!amber
+
+# Copyright 2021 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]
+# #define _float_0_01 _GLF_uniform_float_values[1]
+# #define _float_0_2 _GLF_uniform_float_values[2]
+# #define _float_0_1 _GLF_uniform_float_values[3]
+# #define _float_0_3 _GLF_uniform_float_values[4]
+#
+# 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, 0.01, 0.2, 0.1, 0.3]
+# layout(set = 0, binding = 1) uniform buf1
+# {
+# float _GLF_uniform_float_values[5];
+# };
+# // Contents of zeroVec: [0.0, 0.0]
+# layout(set = 0, binding = 2) uniform buf2
+# {
+# vec2 zeroVec;
+# };
+# // Contents of oneVec: [1.0, 1.0]
+# layout(set = 0, binding = 3) uniform buf3
+# {
+# vec2 oneVec;
+# };
+# layout(location = 0) out vec4 _GLF_color;
+#
+# struct S
+# {
+# float numbers[3];
+# };
+#
+# void main()
+# {
+# S obj = S(float[3](_float_0_1, _float_0_2, _float_0_3));
+# // obj becomes [0.0, 0.2, 0.3].
+# obj.numbers[int(zeroVec.x)] = _float_0_0;
+# // a becomes 1.0.
+# float a = ((zeroVec.x > _float_0_0) ? zeroVec : oneVec).y;
+# // b becomes 0.2.
+# float b = mix(_float_0_0, a, obj.numbers[_int_1]);
+#
+# // Always true.
+# if(distance(b, _float_0_2) < _float_0_01)
+# {
+# _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: 113
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %94
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %10 "S"
+ OpMemberName %10 0 "numbers"
+ OpName %12 "obj"
+ OpName %15 "buf1"
+ OpMemberName %15 0 "_GLF_uniform_float_values"
+ OpName %17 ""
+ OpName %33 "buf2"
+ OpMemberName %33 0 "zeroVec"
+ OpName %35 ""
+ OpName %44 "a"
+ OpName %59 "buf3"
+ OpMemberName %59 0 "oneVec"
+ OpName %61 ""
+ OpName %67 "b"
+ OpName %73 "buf0"
+ OpMemberName %73 0 "_GLF_uniform_int_values"
+ OpName %75 ""
+ OpName %94 "_GLF_color"
+ OpDecorate %14 ArrayStride 16
+ OpMemberDecorate %15 0 Offset 0
+ OpDecorate %15 Block
+ OpDecorate %17 DescriptorSet 0
+ OpDecorate %17 Binding 1
+ OpMemberDecorate %33 0 Offset 0
+ OpDecorate %33 Block
+ OpDecorate %35 DescriptorSet 0
+ OpDecorate %35 Binding 2
+ OpMemberDecorate %59 0 Offset 0
+ OpDecorate %59 Block
+ OpDecorate %61 DescriptorSet 0
+ OpDecorate %61 Binding 3
+ OpDecorate %72 ArrayStride 16
+ OpMemberDecorate %73 0 Offset 0
+ OpDecorate %73 Block
+ OpDecorate %75 DescriptorSet 0
+ OpDecorate %75 Binding 0
+ OpDecorate %94 Location 0
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeFloat 32
+ %7 = OpTypeInt 32 0
+ %8 = OpConstant %7 3
+ %9 = OpTypeArray %6 %8
+ %10 = OpTypeStruct %9
+ %11 = OpTypePointer Function %10
+ %13 = OpConstant %7 5
+ %14 = OpTypeArray %6 %13
+ %15 = OpTypeStruct %14
+ %16 = OpTypePointer Uniform %15
+ %17 = OpVariable %16 Uniform
+ %18 = OpTypeInt 32 1
+ %19 = OpConstant %18 0
+ %20 = OpConstant %18 3
+ %21 = OpTypePointer Uniform %6
+ %24 = OpConstant %18 2
+ %27 = OpConstant %18 4
+ %32 = OpTypeVector %6 2
+ %33 = OpTypeStruct %32
+ %34 = OpTypePointer Uniform %33
+ %35 = OpVariable %34 Uniform
+ %36 = OpConstant %7 0
+ %42 = OpTypePointer Function %6
+ %49 = OpTypeBool
+ %51 = OpTypePointer Function %32
+ %55 = OpTypePointer Uniform %32
+ %59 = OpTypeStruct %32
+ %60 = OpTypePointer Uniform %59
+ %61 = OpVariable %60 Uniform
+ %64 = OpConstant %7 1
+ %71 = OpConstant %7 2
+ %72 = OpTypeArray %18 %71
+ %73 = OpTypeStruct %72
+ %74 = OpTypePointer Uniform %73
+ %75 = OpVariable %74 Uniform
+ %76 = OpTypePointer Uniform %18
+ %86 = OpConstant %18 1
+ %92 = OpTypeVector %6 4
+ %93 = OpTypePointer Output %92
+ %94 = OpVariable %93 Output
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ %12 = OpVariable %11 Function
+ %44 = OpVariable %42 Function
+ %52 = OpVariable %51 Function
+ %67 = OpVariable %42 Function
+ %22 = OpAccessChain %21 %17 %19 %20
+ %23 = OpLoad %6 %22
+ %25 = OpAccessChain %21 %17 %19 %24
+ %26 = OpLoad %6 %25
+ %28 = OpAccessChain %21 %17 %19 %27
+ %29 = OpLoad %6 %28
+ %30 = OpCompositeConstruct %9 %23 %26 %29
+ %31 = OpCompositeConstruct %10 %30
+ OpStore %12 %31
+ %37 = OpAccessChain %21 %35 %19 %36
+ %38 = OpLoad %6 %37
+ %39 = OpConvertFToS %18 %38
+ %40 = OpAccessChain %21 %17 %19 %19
+ %41 = OpLoad %6 %40
+ %43 = OpAccessChain %42 %12 %19 %39
+ OpStore %43 %41
+ %45 = OpAccessChain %21 %35 %19 %36
+ %46 = OpLoad %6 %45
+ %47 = OpAccessChain %21 %17 %19 %19
+ %48 = OpLoad %6 %47
+ %50 = OpFOrdGreaterThan %49 %46 %48
+ OpSelectionMerge %54 None
+ OpBranchConditional %50 %53 %58
+ %53 = OpLabel
+ %56 = OpAccessChain %55 %35 %19
+ %57 = OpLoad %32 %56
+ OpStore %52 %57
+ OpBranch %54
+ %58 = OpLabel
+ %62 = OpAccessChain %55 %61 %19
+ %63 = OpLoad %32 %62
+ OpStore %52 %63
+ OpBranch %54
+ %54 = OpLabel
+ %65 = OpAccessChain %42 %52 %64
+ %66 = OpLoad %6 %65
+ OpStore %44 %66
+ %68 = OpAccessChain %21 %17 %19 %19
+ %69 = OpLoad %6 %68
+ %70 = OpLoad %6 %44
+ %77 = OpAccessChain %76 %75 %19 %19
+ %78 = OpLoad %18 %77
+ %79 = OpAccessChain %42 %12 %19 %78
+ %80 = OpLoad %6 %79
+ %81 = OpExtInst %6 %1 FMix %69 %70 %80
+ OpStore %67 %81
+ %82 = OpLoad %6 %67
+ %83 = OpAccessChain %21 %17 %19 %24
+ %84 = OpLoad %6 %83
+ %85 = OpExtInst %6 %1 Distance %82 %84
+ %87 = OpAccessChain %21 %17 %19 %86
+ %88 = OpLoad %6 %87
+ %89 = OpFOrdLessThan %49 %85 %88
+ OpSelectionMerge %91 None
+ OpBranchConditional %89 %90 %108
+ %90 = OpLabel
+ %95 = OpAccessChain %76 %75 %19 %19
+ %96 = OpLoad %18 %95
+ %97 = OpConvertSToF %6 %96
+ %98 = OpAccessChain %76 %75 %19 %86
+ %99 = OpLoad %18 %98
+ %100 = OpConvertSToF %6 %99
+ %101 = OpAccessChain %76 %75 %19 %86
+ %102 = OpLoad %18 %101
+ %103 = OpConvertSToF %6 %102
+ %104 = OpAccessChain %76 %75 %19 %19
+ %105 = OpLoad %18 %104
+ %106 = OpConvertSToF %6 %105
+ %107 = OpCompositeConstruct %92 %97 %100 %103 %106
+ OpStore %94 %107
+ OpBranch %91
+ %108 = OpLabel
+ %109 = OpAccessChain %76 %75 %19 %86
+ %110 = OpLoad %18 %109
+ %111 = OpConvertSToF %6 %110
+ %112 = OpCompositeConstruct %92 %111 %111 %111 %111
+ OpStore %94 %112
+ OpBranch %91
+ %91 = OpLabel
+ OpReturn
+ OpFunctionEnd
+END
+
+# uniforms for variant
+
+# zeroVec
+BUFFER variant_zeroVec DATA_TYPE vec2<float> STD140 DATA
+ 0.0 0.0
+END
+# oneVec
+BUFFER variant_oneVec DATA_TYPE vec2<float> STD140 DATA
+ 1.0 1.0
+END
+# _GLF_uniform_float_values
+BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA
+ 0.0 0.01 0.2 0.1 0.3
+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 256 256
+ BIND BUFFER variant_framebuffer AS color LOCATION 0
+ BIND BUFFER variant_zeroVec AS uniform DESCRIPTOR_SET 0 BINDING 2
+ BIND BUFFER variant_oneVec AS uniform DESCRIPTOR_SET 0 BINDING 3
+ 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 256 256
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255
--- /dev/null
+#!amber
+
+# Copyright 2021 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 _int_2 _GLF_uniform_int_values[2]
+# #define _float_1_0 _GLF_uniform_float_values[0]
+# #define _float_0_0 _GLF_uniform_float_values[1]
+#
+# precision highp float;
+# precision highp int;
+#
+# // Contents of _GLF_uniform_int_values: [1, 0, 2]
+# layout(set = 0, binding = 0) uniform buf0
+# {
+# int _GLF_uniform_int_values[3];
+# };
+# // Contents of _GLF_uniform_float_values: [1.0, 0.0]
+# layout(set = 0, binding = 1) uniform buf1
+# {
+# float _GLF_uniform_float_values[2];
+# };
+#
+# // Contents of zero: 0
+# layout(push_constant) uniform buf_push
+# {
+# int zero;
+# };
+#
+# struct S
+# {
+# float arr[10];
+# };
+#
+# const int _GLF_global_loop_bound = 10;
+# int _GLF_global_loop_count = 0;
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# int func()
+# {
+# int m = _int_0;
+#
+# for( m = _int_1; _GLF_global_loop_count < _GLF_global_loop_bound; m = _int_2)
+# {
+# _GLF_global_loop_count++;
+#
+# switch(zero)
+# {
+# case 0:
+# S s0 = S(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));
+#
+# // Always true.
+# if(s0.arr[m] > _float_0_0)
+# {
+# m = _int_1;
+# }
+#
+# int a = _int_0;
+# // Fallthrough
+# case 1:
+# // a would be undefined if zero == 1, but case 0 gets always executed.
+# while (a > _int_0 && _GLF_global_loop_count < _GLF_global_loop_bound)
+# {
+# // Never executed.
+# _GLF_global_loop_count ++;
+# }
+#
+# S s1 = S(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));
+#
+# // Always true.
+# if(s1.arr[m] > _float_0_0)
+# {
+# a = _int_1;
+# }
+# }
+# }
+#
+# // The loop sets m = 2 after each iteration so this function
+# // always returns 2 regardless of how many times the loop was run.
+# return m;
+# }
+#
+# void main()
+# {
+# // Always true.
+# if(func() == _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: 176
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %157
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %8 "func("
+ OpName %11 "_GLF_global_loop_count"
+ OpName %14 "m"
+ OpName %18 "buf0"
+ OpMemberName %18 0 "_GLF_uniform_int_values"
+ OpName %20 ""
+ OpName %38 "buf_push"
+ OpMemberName %38 0 "zero"
+ OpName %40 ""
+ OpName %50 "S"
+ OpMemberName %50 0 "arr"
+ OpName %52 "s0"
+ OpName %55 "buf1"
+ OpMemberName %55 0 "_GLF_uniform_float_values"
+ OpName %57 ""
+ OpName %92 "a"
+ OpName %109 "s1"
+ OpName %157 "_GLF_color"
+ OpDecorate %17 ArrayStride 16
+ OpMemberDecorate %18 0 Offset 0
+ OpDecorate %18 Block
+ OpDecorate %20 DescriptorSet 0
+ OpDecorate %20 Binding 0
+ OpMemberDecorate %38 0 Offset 0
+ OpDecorate %38 Block
+ OpDecorate %54 ArrayStride 16
+ OpMemberDecorate %55 0 Offset 0
+ OpDecorate %55 Block
+ OpDecorate %57 DescriptorSet 0
+ OpDecorate %57 Binding 1
+ OpDecorate %157 Location 0
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeInt 32 1
+ %7 = OpTypeFunction %6
+ %10 = OpTypePointer Private %6
+ %11 = OpVariable %10 Private
+ %12 = OpConstant %6 0
+ %13 = OpTypePointer Function %6
+ %15 = OpTypeInt 32 0
+ %16 = OpConstant %15 3
+ %17 = OpTypeArray %6 %16
+ %18 = OpTypeStruct %17
+ %19 = OpTypePointer Uniform %18
+ %20 = OpVariable %19 Uniform
+ %21 = OpConstant %6 1
+ %22 = OpTypePointer Uniform %6
+ %33 = OpConstant %6 10
+ %34 = OpTypeBool
+ %38 = OpTypeStruct %6
+ %39 = OpTypePointer PushConstant %38
+ %40 = OpVariable %39 PushConstant
+ %41 = OpTypePointer PushConstant %6
+ %47 = OpTypeFloat 32
+ %48 = OpConstant %15 10
+ %49 = OpTypeArray %47 %48
+ %50 = OpTypeStruct %49
+ %51 = OpTypePointer Function %50
+ %53 = OpConstant %15 2
+ %54 = OpTypeArray %47 %53
+ %55 = OpTypeStruct %54
+ %56 = OpTypePointer Uniform %55
+ %57 = OpVariable %56 Uniform
+ %58 = OpTypePointer Uniform %47
+ %82 = OpTypePointer Function %47
+ %143 = OpConstant %6 2
+ %155 = OpTypeVector %47 4
+ %156 = OpTypePointer Output %155
+ %157 = OpVariable %156 Output
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ OpStore %11 %12
+ %149 = OpFunctionCall %6 %8
+ %150 = OpAccessChain %22 %20 %12 %143
+ %151 = OpLoad %6 %150
+ %152 = OpIEqual %34 %149 %151
+ OpSelectionMerge %154 None
+ OpBranchConditional %152 %153 %171
+ %153 = OpLabel
+ %158 = OpAccessChain %22 %20 %12 %12
+ %159 = OpLoad %6 %158
+ %160 = OpConvertSToF %47 %159
+ %161 = OpAccessChain %22 %20 %12 %21
+ %162 = OpLoad %6 %161
+ %163 = OpConvertSToF %47 %162
+ %164 = OpAccessChain %22 %20 %12 %21
+ %165 = OpLoad %6 %164
+ %166 = OpConvertSToF %47 %165
+ %167 = OpAccessChain %22 %20 %12 %12
+ %168 = OpLoad %6 %167
+ %169 = OpConvertSToF %47 %168
+ %170 = OpCompositeConstruct %155 %160 %163 %166 %169
+ OpStore %157 %170
+ OpBranch %154
+ %171 = OpLabel
+ %172 = OpAccessChain %22 %20 %12 %21
+ %173 = OpLoad %6 %172
+ %174 = OpConvertSToF %47 %173
+ %175 = OpCompositeConstruct %155 %174 %174 %174 %174
+ OpStore %157 %175
+ OpBranch %154
+ %154 = OpLabel
+ OpReturn
+ OpFunctionEnd
+ %8 = OpFunction %6 None %7
+ %9 = OpLabel
+ %14 = OpVariable %13 Function
+ %52 = OpVariable %51 Function
+ %92 = OpVariable %13 Function
+ %109 = OpVariable %51 Function
+ %23 = OpAccessChain %22 %20 %12 %21
+ %24 = OpLoad %6 %23
+ OpStore %14 %24
+ %25 = OpAccessChain %22 %20 %12 %12
+ %26 = OpLoad %6 %25
+ OpStore %14 %26
+ OpBranch %27
+ %27 = OpLabel
+ OpLoopMerge %29 %30 None
+ OpBranch %31
+ %31 = OpLabel
+ %32 = OpLoad %6 %11
+ %35 = OpSLessThan %34 %32 %33
+ OpBranchConditional %35 %28 %29
+ %28 = OpLabel
+ %36 = OpLoad %6 %11
+ %37 = OpIAdd %6 %36 %21
+ OpStore %11 %37
+ %42 = OpAccessChain %41 %40 %12
+ %43 = OpLoad %6 %42
+ OpSelectionMerge %46 None
+ OpSwitch %43 %46 0 %44 1 %45
+ %44 = OpLabel
+ %59 = OpAccessChain %58 %57 %12 %12
+ %60 = OpLoad %47 %59
+ %61 = OpAccessChain %58 %57 %12 %12
+ %62 = OpLoad %47 %61
+ %63 = OpAccessChain %58 %57 %12 %12
+ %64 = OpLoad %47 %63
+ %65 = OpAccessChain %58 %57 %12 %12
+ %66 = OpLoad %47 %65
+ %67 = OpAccessChain %58 %57 %12 %12
+ %68 = OpLoad %47 %67
+ %69 = OpAccessChain %58 %57 %12 %12
+ %70 = OpLoad %47 %69
+ %71 = OpAccessChain %58 %57 %12 %12
+ %72 = OpLoad %47 %71
+ %73 = OpAccessChain %58 %57 %12 %12
+ %74 = OpLoad %47 %73
+ %75 = OpAccessChain %58 %57 %12 %12
+ %76 = OpLoad %47 %75
+ %77 = OpAccessChain %58 %57 %12 %12
+ %78 = OpLoad %47 %77
+ %79 = OpCompositeConstruct %49 %60 %62 %64 %66 %68 %70 %72 %74 %76 %78
+ %80 = OpCompositeConstruct %50 %79
+ OpStore %52 %80
+ %81 = OpLoad %6 %14
+ %83 = OpAccessChain %82 %52 %12 %81
+ %84 = OpLoad %47 %83
+ %85 = OpAccessChain %58 %57 %12 %21
+ %86 = OpLoad %47 %85
+ %87 = OpFOrdGreaterThan %34 %84 %86
+ OpSelectionMerge %89 None
+ OpBranchConditional %87 %88 %89
+ %88 = OpLabel
+ %90 = OpAccessChain %22 %20 %12 %12
+ %91 = OpLoad %6 %90
+ OpStore %14 %91
+ OpBranch %89
+ %89 = OpLabel
+ %93 = OpAccessChain %22 %20 %12 %21
+ %94 = OpLoad %6 %93
+ OpStore %92 %94
+ OpBranch %45
+ %45 = OpLabel
+ OpBranch %95
+ %95 = OpLabel
+ OpLoopMerge %97 %98 None
+ OpBranch %99
+ %99 = OpLabel
+ %100 = OpLoad %6 %92
+ %101 = OpAccessChain %22 %20 %12 %21
+ %102 = OpLoad %6 %101
+ %103 = OpSGreaterThan %34 %100 %102
+ %104 = OpLoad %6 %11
+ %105 = OpSLessThan %34 %104 %33
+ %106 = OpLogicalAnd %34 %103 %105
+ OpBranchConditional %106 %96 %97
+ %96 = OpLabel
+ %107 = OpLoad %6 %11
+ %108 = OpIAdd %6 %107 %21
+ OpStore %11 %108
+ OpBranch %98
+ %98 = OpLabel
+ OpBranch %95
+ %97 = OpLabel
+ %110 = OpAccessChain %58 %57 %12 %12
+ %111 = OpLoad %47 %110
+ %112 = OpAccessChain %58 %57 %12 %12
+ %113 = OpLoad %47 %112
+ %114 = OpAccessChain %58 %57 %12 %12
+ %115 = OpLoad %47 %114
+ %116 = OpAccessChain %58 %57 %12 %12
+ %117 = OpLoad %47 %116
+ %118 = OpAccessChain %58 %57 %12 %12
+ %119 = OpLoad %47 %118
+ %120 = OpAccessChain %58 %57 %12 %12
+ %121 = OpLoad %47 %120
+ %122 = OpAccessChain %58 %57 %12 %12
+ %123 = OpLoad %47 %122
+ %124 = OpAccessChain %58 %57 %12 %12
+ %125 = OpLoad %47 %124
+ %126 = OpAccessChain %58 %57 %12 %12
+ %127 = OpLoad %47 %126
+ %128 = OpAccessChain %58 %57 %12 %12
+ %129 = OpLoad %47 %128
+ %130 = OpCompositeConstruct %49 %111 %113 %115 %117 %119 %121 %123 %125 %127 %129
+ %131 = OpCompositeConstruct %50 %130
+ OpStore %109 %131
+ %132 = OpLoad %6 %14
+ %133 = OpAccessChain %82 %109 %12 %132
+ %134 = OpLoad %47 %133
+ %135 = OpAccessChain %58 %57 %12 %21
+ %136 = OpLoad %47 %135
+ %137 = OpFOrdGreaterThan %34 %134 %136
+ OpSelectionMerge %139 None
+ OpBranchConditional %137 %138 %139
+ %138 = OpLabel
+ %140 = OpAccessChain %22 %20 %12 %12
+ %141 = OpLoad %6 %140
+ OpStore %92 %141
+ OpBranch %139
+ %139 = OpLabel
+ OpBranch %46
+ %46 = OpLabel
+ OpBranch %30
+ %30 = OpLabel
+ %144 = OpAccessChain %22 %20 %12 %143
+ %145 = OpLoad %6 %144
+ OpStore %14 %145
+ OpBranch %27
+ %29 = OpLabel
+ %146 = OpLoad %6 %14
+ OpReturnValue %146
+ OpFunctionEnd
+END
+
+# uniforms for variant
+
+# zero
+BUFFER variant_zero DATA_TYPE int32 STD140 DATA
+ 0
+END
+# _GLF_uniform_float_values
+BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA
+ 1.0 0.0
+END
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 1 0 2
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+ ATTACH variant_vertex_shader
+ ATTACH variant_fragment_shader
+ FRAMEBUFFER_SIZE 256 256
+ BIND BUFFER variant_framebuffer AS color LOCATION 0
+ BIND BUFFER variant_zero AS push_constant
+ 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 256 256
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255
{ "cov-cast-float-to-int-and-back.amber", "cov-cast-float-to-int-and-back", "A fragment shader that covers specific NIR code paths" },
{ "cov-clamp-loop-limit-increment-float-array.amber", "cov-clamp-loop-limit-increment-float-array", "A fragment shader that covers specific NIR code paths" },
{ "cov-clamp-lower-limit-from-always-false.amber", "cov-clamp-lower-limit-from-always-false", "A fragment shader that covers specific BRW code paths" },
+{ "cov-clamp-vector-component-condition-using-matrix.amber", "cov-clamp-vector-component-condition-using-matrix", "A fragment shader that covers specific patch optimization code paths" },
{ "cov-clamp-vector-element-ceil-negative.amber", "cov-clamp-vector-element-ceil-negative", "A fragment shader that covers specific NIR code paths" },
{ "cov-clamp-vector-variable-negative-offset.amber", "cov-clamp-vector-variable-negative-offset", "A fragment shader that covers specific NIR code paths" },
{ "cov-clear-yz-inside-condition.amber", "cov-clear-yz-inside-condition", "A fragment shader that covers specific NIR code paths" },
+{ "cov-color-output-undefined-in-unexecuted-branch.amber", "cov-color-output-undefined-in-unexecuted-branch", "A fragment shader that covers specific LLVM code paths" },
{ "cov-combine-and-or-xor-gt-lt.amber", "cov-combine-and-or-xor-gt-lt", "A fragment shader that covers a specific bitwise operator cobmining code path" },
{ "cov-condition-loop-index-bitwise-not.amber", "cov-condition-loop-index-bitwise-not", "A fragment shader that covers specific BRW code paths" },
{ "cov-conditional-discard-inside-loop.amber", "cov-conditional-discard-inside-loop", "A fragment shader that covers specific NIR code paths" },
{ "cov-derivative-uniform-vector-global-loop-count.amber", "cov-derivative-uniform-vector-global-loop-count", "A fragment shader that covers specific BRW code paths" },
{ "cov-descending-loop-min-max-always-zero.amber", "cov-descending-loop-min-max-always-zero", "A fragment shader that covers specific BRW code paths" },
{ "cov-double-if-true-in-loop.amber", "cov-double-if-true-in-loop", "A fragment shader that covers specific NIR code paths" },
+{ "cov-empty-loop-minus-one-modulo-variable-one.amber", "cov-empty-loop-minus-one-modulo-variable-one", "A fragment shader that covers specific LLVM code paths" },
{ "cov-exp2-two.amber", "cov-exp2-two", "A fragment shader that covers specific NIR code paths" },
{ "cov-findlsb-division-by-zero.amber", "cov-findlsb-division-by-zero", "A fragment shader that covers a specific instruction simplify code path" },
+{ "cov-float-array-init-pow.amber", "cov-float-array-init-pow", "A fragment shader that covers specific arith builder code path" },
{ "cov-fold-and-in-for-loop-range.amber", "cov-fold-and-in-for-loop-range", "A fragment shader that covers a specific folding path" },
{ "cov-fold-bitwise-and-zero.amber", "cov-fold-bitwise-and-zero", "A fragment shader that covers a specific instruction folding path." },
{ "cov-fold-bitwise-or-full-mask.amber", "cov-fold-bitwise-or-full-mask", "A fragment shader that covers a specific instruction folding path." },
{ "cov-for-array-initializing-modulo.amber", "cov-for-array-initializing-modulo", "A fragment shader that covers a specific inst combine compares code path" },
{ "cov-for-loop-min-increment-array-element.amber", "cov-for-loop-min-increment-array-element", "A fragment shader that covers specific NIR code paths" },
{ "cov-for-switch-fallthrough.amber", "cov-for-switch-fallthrough", "A fragment shader that covers a specific inst combine and or xor code path" },
+{ "cov-fract-asin-undefined-never-used.amber", "cov-fract-asin-undefined-never-used", "A fragment shader that covers specific LLVM code paths" },
{ "cov-fract-smoothstep-undefined.amber", "cov-fract-smoothstep-undefined", "A fragment shader that covers a specific APFloat code path" },
{ "cov-fragcoord-clamp-array-access.amber", "cov-fragcoord-clamp-array-access", "A fragment shader that covers a specific instruction simplify path" },
{ "cov-fragcoord-multiply.amber", "cov-fragcoord-multiply", "A fragment shader that covers specific NIR 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-vec2-never-discard.amber", "cov-function-vec2-never-discard", "A fragment shader that covers specific BRW code paths" },
{ "cov-global-loop-bound-true-logical-or.amber", "cov-global-loop-bound-true-logical-or", "A fragment shader that covers specific NIR code paths" },
{ "cov-global-loop-counter-float-accumulate-matrix.amber", "cov-global-loop-counter-float-accumulate-matrix", "A fragment shader that covers specific BRW code paths" },
{ "cov-global-loop-counter-main-function-call.amber", "cov-global-loop-counter-main-function-call", "A fragment shader that covers specific NIR code paths" },
{ "cov-global-loop-counter-multiply-one-minus.amber", "cov-global-loop-counter-multiply-one-minus", "A fragment shader that covers specific BRW code paths" },
+{ "cov-global-loop-counter-squared-comparison.amber", "cov-global-loop-counter-squared-comparison", "A fragment shader that covers specific LLVM code paths" },
{ "cov-if-conversion-identical-branches.amber", "cov-if-conversion-identical-branches", "A fragment shader that covers a specific if condition conversion path." },
{ "cov-if-switch-fallthrough.amber", "cov-if-switch-fallthrough", "A fragment shader that covers a specific inst combine and or xor code path" },
{ "cov-if-true-continue.amber", "cov-if-true-continue", "A fragment shader that covers specific NIR code paths" },
{ "cov-intervalmap-set-stop.amber", "cov-intervalmap-set-stop", "A fragment shader that covers a specific interval map code path." },
{ "cov-ir-builder-constant-fold-inst-combine-calls-value-tracking-findmsb-incr-if.amber", "cov-ir-builder-constant-fold-inst-combine-calls-value-tracking-findmsb-incr-if", "Covers IR builder, constant fold, inst combine calls and value tracking code paths"},
{ "cov-irbuilder-matrix-cell-uniform.amber", "cov-irbuilder-matrix-cell-uniform", "A fragment shader that covers a specific IR builder path." },
+{ "cov-isnan-asinh-clamp-always-zero.amber", "cov-isnan-asinh-clamp-always-zero", "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-left-shift-right-shift-compare.amber", "cov-left-shift-right-shift-compare", "A fragment shader that covers a specific inst combine compares code path" },
{ "cov-loop-abs-multiply-offset.amber", "cov-loop-abs-multiply-offset", "A fragment shader that covers specific NIR code paths" },
{ "cov-loop-clamp-to-one-empty-condition.amber", "cov-loop-clamp-to-one-empty-condition", "A fragment shader that covers specific NIR code paths" },
{ "cov-loop-condition-double-negate.amber", "cov-loop-condition-double-negate", "A fragment shader that covers specific NIR code paths" },
+{ "cov-loop-dfdx-constant-divide.amber", "cov-loop-dfdx-constant-divide", "A fragment shader that covers specific patch optimization code paths" },
{ "cov-loop-findmsb-findlsb.amber", "cov-loop-findmsb-findlsb", "A fragment shader that covers specific simplification and value tracking paths" },
{ "cov-loop-increment-matrix-element-break-after-first-iteration.amber", "cov-loop-increment-matrix-element-break-after-first-iteration", "A fragment shader that covers specific NIR code paths" },
{ "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-integer-half-minus-one.amber", "cov-loop-integer-half-minus-one", "A fragment shader that covers specific LLVM code paths" },
{ "cov-loop-logical-xor.amber", "cov-loop-logical-xor", "A fragment shader that covers specific NIR 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-with-two-integers.amber", "cov-loop-with-two-integers", "A fragment shader that covers specific NIR code paths" },
{ "cov-mem-pass-sum-struct-members.amber", "cov-mem-pass-sum-struct-members", "A fragment shader that covers a specific mem pass code path." },
{ "cov-mem-pass-unused-component.amber", "cov-mem-pass-unused-component", "A fragment shader that covers a specific mem pass code path." },
{ "cov-merge-return-condition-twice.amber", "cov-merge-return-condition-twice", "A fragment shader that covers a specific return merge path." },
+{ "cov-min-intbitstofloat-undefined-never-used.amber", "cov-min-intbitstofloat-undefined-never-used", "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-mod-acosh.amber", "cov-mod-acosh", "A fragment shader that calculates modulo of an acosh result" },
{ "cov-mod-uint-bits-float.amber", "cov-mod-uint-bits-float", "A fragment shader that covers a specific APFloat path" },
{ "cov-pattern-match-signum.amber", "cov-pattern-match-signum", "A fragment shader that covers a specific pattern matching path." },
{ "cov-pattern-match-single-bit.amber", "cov-pattern-match-single-bit", "A fragment shader that covers a specific pattern matching path." },
{ "cov-peephole-optimizer-target-instr-info-for-if-if-if.amber", "cov-peephole-optimizer-target-instr-info-for-if-if-if", "Covers peephole optimizer and instr info code paths" },
+{ "cov-pow-identical-value-sqrt.amber", "cov-pow-identical-value-sqrt", "A fragment shader that covers specific SPIR-V lower math code paths" },
{ "cov-pow-undefined.amber", "cov-pow-undefined", "A fragment shader that covers specific constant fold and selection dag code paths" },
+{ "cov-pow-undefined-result-condition-with-always-true.amber", "cov-pow-undefined-result-condition-with-always-true", "A fragment shader that covers specific LLVM code paths" },
{ "cov-rcp-negative-int.amber", "cov-rcp-negative-int", "A fragment shader that covers specific NIR code paths" },
{ "cov-reciprocal-var-minus-one.amber", "cov-reciprocal-var-minus-one", "A fragment shader that covers specific NIR code paths" },
{ "cov-reduce-load-replace-extract.amber", "cov-reduce-load-replace-extract", "A fragment shader that covers a specific load size reduction path." },
{ "cov-sinh-ldexp.amber", "cov-sinh-ldexp", "A fragment shader that covers a specific inst combine compares code path" },
{ "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" },
{ "cov-sum-uniform-vector-components-round.amber", "cov-sum-uniform-vector-components-round", "A fragment shader that covers specific NIR code paths" },
+{ "cov-switch-fallthrough-variable-from-first-case.amber", "cov-switch-fallthrough-variable-from-first-case", "A fragment shader that covers specific LLVM code paths" },
{ "cov-tail-duplicator-for-for-for.amber", "cov-tail-duplicator-for-for-for", "A fragment shader that covers a specific tail duplicator code path" },
{ "cov-tail-duplicator-infinite-loops.amber", "cov-tail-duplicator-infinite-loops", "A fragment shader that covers a specific tail duplicator code path" },
{ "cov-target-lowering-dfdx-cos.amber", "cov-target-lowering-dfdx-cos", "A fragment shader that covers a specific target lowering code path." },
dEQP-VK.graphicsfuzz.cov-cast-float-to-int-and-back
dEQP-VK.graphicsfuzz.cov-clamp-loop-limit-increment-float-array
dEQP-VK.graphicsfuzz.cov-clamp-lower-limit-from-always-false
+dEQP-VK.graphicsfuzz.cov-clamp-vector-component-condition-using-matrix
dEQP-VK.graphicsfuzz.cov-clamp-vector-element-ceil-negative
dEQP-VK.graphicsfuzz.cov-clamp-vector-variable-negative-offset
dEQP-VK.graphicsfuzz.cov-clear-yz-inside-condition
+dEQP-VK.graphicsfuzz.cov-color-output-undefined-in-unexecuted-branch
dEQP-VK.graphicsfuzz.cov-combine-and-or-xor-gt-lt
dEQP-VK.graphicsfuzz.cov-condition-loop-index-bitwise-not
dEQP-VK.graphicsfuzz.cov-conditional-discard-inside-loop
dEQP-VK.graphicsfuzz.cov-derivative-uniform-vector-global-loop-count
dEQP-VK.graphicsfuzz.cov-descending-loop-min-max-always-zero
dEQP-VK.graphicsfuzz.cov-double-if-true-in-loop
+dEQP-VK.graphicsfuzz.cov-empty-loop-minus-one-modulo-variable-one
dEQP-VK.graphicsfuzz.cov-exp2-two
dEQP-VK.graphicsfuzz.cov-findlsb-division-by-zero
+dEQP-VK.graphicsfuzz.cov-float-array-init-pow
dEQP-VK.graphicsfuzz.cov-fold-and-in-for-loop-range
dEQP-VK.graphicsfuzz.cov-fold-bitwise-and-zero
dEQP-VK.graphicsfuzz.cov-fold-bitwise-or-full-mask
dEQP-VK.graphicsfuzz.cov-for-array-initializing-modulo
dEQP-VK.graphicsfuzz.cov-for-loop-min-increment-array-element
dEQP-VK.graphicsfuzz.cov-for-switch-fallthrough
+dEQP-VK.graphicsfuzz.cov-fract-asin-undefined-never-used
dEQP-VK.graphicsfuzz.cov-fract-smoothstep-undefined
dEQP-VK.graphicsfuzz.cov-fragcoord-clamp-array-access
dEQP-VK.graphicsfuzz.cov-fragcoord-multiply
+dEQP-VK.graphicsfuzz.cov-function-fragcoord-condition-always-return
dEQP-VK.graphicsfuzz.cov-function-vec2-never-discard
dEQP-VK.graphicsfuzz.cov-global-loop-bound-true-logical-or
dEQP-VK.graphicsfuzz.cov-global-loop-counter-float-accumulate-matrix
dEQP-VK.graphicsfuzz.cov-global-loop-counter-main-function-call
dEQP-VK.graphicsfuzz.cov-global-loop-counter-multiply-one-minus
+dEQP-VK.graphicsfuzz.cov-global-loop-counter-squared-comparison
dEQP-VK.graphicsfuzz.cov-if-conversion-identical-branches
dEQP-VK.graphicsfuzz.cov-if-switch-fallthrough
dEQP-VK.graphicsfuzz.cov-if-true-continue
dEQP-VK.graphicsfuzz.cov-intervalmap-set-stop
dEQP-VK.graphicsfuzz.cov-ir-builder-constant-fold-inst-combine-calls-value-tracking-findmsb-incr-if
dEQP-VK.graphicsfuzz.cov-irbuilder-matrix-cell-uniform
+dEQP-VK.graphicsfuzz.cov-isnan-asinh-clamp-always-zero
dEQP-VK.graphicsfuzz.cov-ldexp-undefined-mat-vec-multiply
dEQP-VK.graphicsfuzz.cov-left-shift-array-access
dEQP-VK.graphicsfuzz.cov-left-shift-right-shift-compare
dEQP-VK.graphicsfuzz.cov-loop-abs-multiply-offset
dEQP-VK.graphicsfuzz.cov-loop-clamp-to-one-empty-condition
dEQP-VK.graphicsfuzz.cov-loop-condition-double-negate
+dEQP-VK.graphicsfuzz.cov-loop-dfdx-constant-divide
dEQP-VK.graphicsfuzz.cov-loop-findmsb-findlsb
dEQP-VK.graphicsfuzz.cov-loop-increment-matrix-element-break-after-first-iteration
dEQP-VK.graphicsfuzz.cov-loop-increment-or-divide-by-loop-index
+dEQP-VK.graphicsfuzz.cov-loop-integer-half-minus-one
dEQP-VK.graphicsfuzz.cov-loop-logical-xor
dEQP-VK.graphicsfuzz.cov-loop-returns-behind-true-and-false
dEQP-VK.graphicsfuzz.cov-loop-with-two-integers
dEQP-VK.graphicsfuzz.cov-mem-pass-sum-struct-members
dEQP-VK.graphicsfuzz.cov-mem-pass-unused-component
dEQP-VK.graphicsfuzz.cov-merge-return-condition-twice
+dEQP-VK.graphicsfuzz.cov-min-intbitstofloat-undefined-never-used
dEQP-VK.graphicsfuzz.cov-min-nested-loop-same-value-for-variables
dEQP-VK.graphicsfuzz.cov-mod-acosh
dEQP-VK.graphicsfuzz.cov-mod-uint-bits-float
dEQP-VK.graphicsfuzz.cov-pattern-match-signum
dEQP-VK.graphicsfuzz.cov-pattern-match-single-bit
dEQP-VK.graphicsfuzz.cov-peephole-optimizer-target-instr-info-for-if-if-if
+dEQP-VK.graphicsfuzz.cov-pow-identical-value-sqrt
dEQP-VK.graphicsfuzz.cov-pow-undefined
+dEQP-VK.graphicsfuzz.cov-pow-undefined-result-condition-with-always-true
dEQP-VK.graphicsfuzz.cov-rcp-negative-int
dEQP-VK.graphicsfuzz.cov-reciprocal-var-minus-one
dEQP-VK.graphicsfuzz.cov-reduce-load-replace-extract
dEQP-VK.graphicsfuzz.cov-sinh-ldexp
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
dEQP-VK.graphicsfuzz.cov-sum-uniform-vector-components-round
+dEQP-VK.graphicsfuzz.cov-switch-fallthrough-variable-from-first-case
dEQP-VK.graphicsfuzz.cov-tail-duplicator-for-for-for
dEQP-VK.graphicsfuzz.cov-tail-duplicator-infinite-loops
dEQP-VK.graphicsfuzz.cov-target-lowering-dfdx-cos