Add a batch of GraphicsFuzz coverage tests
authorAntto Mäkinen <antto.makinen@siru.fi>
Mon, 7 Jun 2021 13:13:05 +0000 (16:13 +0300)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Thu, 1 Jul 2021 15:32:23 +0000 (15:32 +0000)
This commit adds a batch of GraphicsFuzz coverage tests.

Components: Vulkan

New Tests:

dEQP-VK.graphicsfuzz.cov-apfloat-module-small-number
dEQP-VK.graphicsfuzz.cov-determinant-uninitialized-matrix-never-chosen
dEQP-VK.graphicsfuzz.cov-divide-matrix-transpose-by-constant
dEQP-VK.graphicsfuzz.cov-fragcoord-bitwise-not
dEQP-VK.graphicsfuzz.cov-function-with-nested-loops-called-from-nested-loops
dEQP-VK.graphicsfuzz.cov-loop-break-floor-nan-never-executed
dEQP-VK.graphicsfuzz.cov-missing-return-value-function-never-called
dEQP-VK.graphicsfuzz.cov-modulo-zero-never-executed
dEQP-VK.graphicsfuzz.cov-read-matrix-push-constant
dEQP-VK.graphicsfuzz.cov-reinitialize-matrix-after-undefined-value
dEQP-VK.graphicsfuzz.cov-sampler-as-function-argument
dEQP-VK.graphicsfuzz.cov-transpose-multiply
dEQP-VK.graphicsfuzz.cov-trunc-fract-always-zero
dEQP-VK.graphicsfuzz.cov-uninitialized-values-passed-to-function-never-executed
dEQP-VK.graphicsfuzz.cov-unused-access-past-matrix-elements

Change-Id: I06f80169893fcc92d154d0da386568a177416426

19 files changed:
android/cts/master/vk-master-2021-03-01/graphicsfuzz.txt
android/cts/master/vk-master/graphicsfuzz.txt
external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-apfloat-module-small-number.amber [new file with mode: 0644]
external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-determinant-uninitialized-matrix-never-chosen.amber [new file with mode: 0644]
external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-divide-matrix-transpose-by-constant.amber [new file with mode: 0644]
external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-fragcoord-bitwise-not.amber [new file with mode: 0644]
external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-function-with-nested-loops-called-from-nested-loops.amber [new file with mode: 0644]
external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-loop-break-floor-nan-never-executed.amber [new file with mode: 0644]
external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-missing-return-value-function-never-called.amber [new file with mode: 0644]
external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-modulo-zero-never-executed.amber [new file with mode: 0644]
external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-read-matrix-push-constant.amber [new file with mode: 0644]
external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-reinitialize-matrix-after-undefined-value.amber [new file with mode: 0644]
external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-sampler-as-function-argument.amber [new file with mode: 0644]
external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-transpose-multiply.amber [new file with mode: 0644]
external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-trunc-fract-always-zero.amber [new file with mode: 0644]
external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-uninitialized-values-passed-to-function-never-executed.amber [new file with mode: 0644]
external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-unused-access-past-matrix-elements.amber [new file with mode: 0644]
external/vulkancts/data/vulkan/amber/graphicsfuzz/index.txt
external/vulkancts/mustpass/master/vk-default/graphicsfuzz.txt

index 7abc0f8..83210dc 100644 (file)
@@ -13,6 +13,7 @@ dEQP-VK.graphicsfuzz.cov-apfloat-acos-ldexp
 dEQP-VK.graphicsfuzz.cov-apfloat-determinant
 dEQP-VK.graphicsfuzz.cov-apfloat-mix-nan
 dEQP-VK.graphicsfuzz.cov-apfloat-mod-zero
+dEQP-VK.graphicsfuzz.cov-apfloat-module-small-number
 dEQP-VK.graphicsfuzz.cov-apfloat-negative-step-func
 dEQP-VK.graphicsfuzz.cov-apfloat-sinh-negative-log2
 dEQP-VK.graphicsfuzz.cov-apfloat-tanh
@@ -83,6 +84,8 @@ dEQP-VK.graphicsfuzz.cov-dead-branch-func-return-arg
 dEQP-VK.graphicsfuzz.cov-dead-code-unreachable-merge
 dEQP-VK.graphicsfuzz.cov-derivative-uniform-vector-global-loop-count
 dEQP-VK.graphicsfuzz.cov-descending-loop-min-max-always-zero
+dEQP-VK.graphicsfuzz.cov-determinant-uninitialized-matrix-never-chosen
+dEQP-VK.graphicsfuzz.cov-divide-matrix-transpose-by-constant
 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
@@ -125,10 +128,12 @@ 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-bitwise-not
 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-function-with-nested-loops-called-from-nested-loops
 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
@@ -202,6 +207,7 @@ dEQP-VK.graphicsfuzz.cov-left-shift-array-access
 dEQP-VK.graphicsfuzz.cov-left-shift-right-shift-compare
 dEQP-VK.graphicsfuzz.cov-liveinterval-different-dest
 dEQP-VK.graphicsfuzz.cov-loop-abs-multiply-offset
+dEQP-VK.graphicsfuzz.cov-loop-break-floor-nan-never-executed
 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
@@ -226,10 +232,12 @@ 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-missing-return-value-function-never-called
 dEQP-VK.graphicsfuzz.cov-mod-acosh
 dEQP-VK.graphicsfuzz.cov-mod-uint-bits-float
 dEQP-VK.graphicsfuzz.cov-modf-clamp-for
 dEQP-VK.graphicsfuzz.cov-modf-integer-to-private
+dEQP-VK.graphicsfuzz.cov-modulo-zero-never-executed
 dEQP-VK.graphicsfuzz.cov-multiple-one-iteration-loops-global-counter-write-matrices
 dEQP-VK.graphicsfuzz.cov-nested-functions-accumulate-global-matrix
 dEQP-VK.graphicsfuzz.cov-nested-loop-undefined-smoothstep-never-executed
@@ -249,14 +257,17 @@ 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-read-matrix-push-constant
 dEQP-VK.graphicsfuzz.cov-reciprocal-var-minus-one
 dEQP-VK.graphicsfuzz.cov-reduce-load-replace-extract
 dEQP-VK.graphicsfuzz.cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard
+dEQP-VK.graphicsfuzz.cov-reinitialize-matrix-after-undefined-value
 dEQP-VK.graphicsfuzz.cov-replace-copy-object
 dEQP-VK.graphicsfuzz.cov-return-after-do-while
 dEQP-VK.graphicsfuzz.cov-return-after-first-iteration
 dEQP-VK.graphicsfuzz.cov-return-partly-undefined-vector-from-array
 dEQP-VK.graphicsfuzz.cov-sample-texture-hundred-iterations
+dEQP-VK.graphicsfuzz.cov-sampler-as-function-argument
 dEQP-VK.graphicsfuzz.cov-scaled-number-nested-loops
 dEQP-VK.graphicsfuzz.cov-selection-dag-assign-back-and-forth
 dEQP-VK.graphicsfuzz.cov-selection-dag-lt-gt
@@ -297,10 +308,14 @@ dEQP-VK.graphicsfuzz.cov-tail-duplicator-infinite-loops
 dEQP-VK.graphicsfuzz.cov-target-lowering-dfdx-cos
 dEQP-VK.graphicsfuzz.cov-target-lowering-inst-combine-compares-struct-array-clamp-function-cal
 dEQP-VK.graphicsfuzz.cov-texel-double-negation
+dEQP-VK.graphicsfuzz.cov-transpose-multiply
+dEQP-VK.graphicsfuzz.cov-trunc-fract-always-zero
 dEQP-VK.graphicsfuzz.cov-types-return-in-main-never-hit
 dEQP-VK.graphicsfuzz.cov-undefined-inversesqrt-reflect
 dEQP-VK.graphicsfuzz.cov-uniform-vector-copy
+dEQP-VK.graphicsfuzz.cov-uninitialized-values-passed-to-function-never-executed
 dEQP-VK.graphicsfuzz.cov-unpack-unorm-mix-always-one
+dEQP-VK.graphicsfuzz.cov-unused-access-past-matrix-elements
 dEQP-VK.graphicsfuzz.cov-unused-matrix-copy-inside-loop
 dEQP-VK.graphicsfuzz.cov-val-cfg-case-fallthrough
 dEQP-VK.graphicsfuzz.cov-value-inst-combine-select-value-tracking-flip-bits
index 0865981..c3b13a5 100644 (file)
@@ -25,6 +25,7 @@ dEQP-VK.graphicsfuzz.cov-apfloat-acos-ldexp
 dEQP-VK.graphicsfuzz.cov-apfloat-determinant
 dEQP-VK.graphicsfuzz.cov-apfloat-mix-nan
 dEQP-VK.graphicsfuzz.cov-apfloat-mod-zero
+dEQP-VK.graphicsfuzz.cov-apfloat-module-small-number
 dEQP-VK.graphicsfuzz.cov-apfloat-negative-step-func
 dEQP-VK.graphicsfuzz.cov-apfloat-sinh-negative-log2
 dEQP-VK.graphicsfuzz.cov-apfloat-tanh
@@ -95,6 +96,8 @@ dEQP-VK.graphicsfuzz.cov-dead-branch-func-return-arg
 dEQP-VK.graphicsfuzz.cov-dead-code-unreachable-merge
 dEQP-VK.graphicsfuzz.cov-derivative-uniform-vector-global-loop-count
 dEQP-VK.graphicsfuzz.cov-descending-loop-min-max-always-zero
+dEQP-VK.graphicsfuzz.cov-determinant-uninitialized-matrix-never-chosen
+dEQP-VK.graphicsfuzz.cov-divide-matrix-transpose-by-constant
 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
@@ -137,10 +140,12 @@ 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-bitwise-not
 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-function-with-nested-loops-called-from-nested-loops
 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
@@ -214,6 +219,7 @@ dEQP-VK.graphicsfuzz.cov-left-shift-array-access
 dEQP-VK.graphicsfuzz.cov-left-shift-right-shift-compare
 dEQP-VK.graphicsfuzz.cov-liveinterval-different-dest
 dEQP-VK.graphicsfuzz.cov-loop-abs-multiply-offset
+dEQP-VK.graphicsfuzz.cov-loop-break-floor-nan-never-executed
 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
@@ -238,10 +244,12 @@ 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-missing-return-value-function-never-called
 dEQP-VK.graphicsfuzz.cov-mod-acosh
 dEQP-VK.graphicsfuzz.cov-mod-uint-bits-float
 dEQP-VK.graphicsfuzz.cov-modf-clamp-for
 dEQP-VK.graphicsfuzz.cov-modf-integer-to-private
+dEQP-VK.graphicsfuzz.cov-modulo-zero-never-executed
 dEQP-VK.graphicsfuzz.cov-multiple-one-iteration-loops-global-counter-write-matrices
 dEQP-VK.graphicsfuzz.cov-nested-functions-accumulate-global-matrix
 dEQP-VK.graphicsfuzz.cov-nested-loop-undefined-smoothstep-never-executed
@@ -261,14 +269,17 @@ 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-read-matrix-push-constant
 dEQP-VK.graphicsfuzz.cov-reciprocal-var-minus-one
 dEQP-VK.graphicsfuzz.cov-reduce-load-replace-extract
 dEQP-VK.graphicsfuzz.cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard
+dEQP-VK.graphicsfuzz.cov-reinitialize-matrix-after-undefined-value
 dEQP-VK.graphicsfuzz.cov-replace-copy-object
 dEQP-VK.graphicsfuzz.cov-return-after-do-while
 dEQP-VK.graphicsfuzz.cov-return-after-first-iteration
 dEQP-VK.graphicsfuzz.cov-return-partly-undefined-vector-from-array
 dEQP-VK.graphicsfuzz.cov-sample-texture-hundred-iterations
+dEQP-VK.graphicsfuzz.cov-sampler-as-function-argument
 dEQP-VK.graphicsfuzz.cov-scaled-number-nested-loops
 dEQP-VK.graphicsfuzz.cov-selection-dag-assign-back-and-forth
 dEQP-VK.graphicsfuzz.cov-selection-dag-lt-gt
@@ -309,10 +320,14 @@ dEQP-VK.graphicsfuzz.cov-tail-duplicator-infinite-loops
 dEQP-VK.graphicsfuzz.cov-target-lowering-dfdx-cos
 dEQP-VK.graphicsfuzz.cov-target-lowering-inst-combine-compares-struct-array-clamp-function-cal
 dEQP-VK.graphicsfuzz.cov-texel-double-negation
+dEQP-VK.graphicsfuzz.cov-transpose-multiply
+dEQP-VK.graphicsfuzz.cov-trunc-fract-always-zero
 dEQP-VK.graphicsfuzz.cov-types-return-in-main-never-hit
 dEQP-VK.graphicsfuzz.cov-undefined-inversesqrt-reflect
 dEQP-VK.graphicsfuzz.cov-uniform-vector-copy
+dEQP-VK.graphicsfuzz.cov-uninitialized-values-passed-to-function-never-executed
 dEQP-VK.graphicsfuzz.cov-unpack-unorm-mix-always-one
+dEQP-VK.graphicsfuzz.cov-unused-access-past-matrix-elements
 dEQP-VK.graphicsfuzz.cov-unused-matrix-copy-inside-loop
 dEQP-VK.graphicsfuzz.cov-val-cfg-case-fallthrough
 dEQP-VK.graphicsfuzz.cov-value-inst-combine-select-value-tracking-flip-bits
diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-apfloat-module-small-number.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-apfloat-module-small-number.amber
new file mode 100644 (file)
index 0000000..8a884ae
--- /dev/null
@@ -0,0 +1,256 @@
+#!amber
+
+# Copyright 2020 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 a specific floating point 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 310 es
+# #define _int_0 _GLF_uniform_int_values[0]
+# #define _int_1 _GLF_uniform_int_values[1]
+# #define _float_0_0 _GLF_uniform_float_values[0]
+#
+# precision highp float;
+# precision highp int;
+#
+# // Contents of _GLF_uniform_float_values: 0.0
+# layout(set = 0, binding = 0) uniform buf0
+# {
+#     float _GLF_uniform_float_values[1];
+# };
+#
+# // Contents of _GLF_uniform_int_values: [0, 1]
+# layout(set = 0, binding = 1) uniform buf1
+# {
+#     int _GLF_uniform_int_values[2];
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# void main()
+# {
+#     float f0 = mod(10.0, 0.000001);
+#
+#     float s1 = 0.00000000000000000000000000000000000001;
+#
+#     if (s1 == 0.0) {
+#         s1 = 1.0;
+#     }
+#
+#     float f1 = mod(10.0, s1);
+#
+#     // Always true. The first and the second disjunctions hold if the subnormal
+#     // value was flushed to zero, otherwise the third or the fourth disjunction holds.
+#     if (isinf(f1)
+#         || s1 == 1.0
+#         || (f0 == f1 || (f0 > 0.99 && f0 < 0.01) || (f1 > 0.99 && f1 < 0.01))
+#         || f1 == 10.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; 8
+; Bound: 97
+; Schema: 0
+               OpCapability Shader
+          %1 = OpExtInstImport "GLSL.std.450"
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %4 "main" %63
+               OpExecutionMode %4 OriginUpperLeft
+               OpSource ESSL 310
+               OpName %4 "main"
+               OpName %8 "f0"
+               OpName %12 "s1"
+               OpName %21 "f1"
+               OpName %63 "_GLF_color"
+               OpName %68 "buf1"
+               OpMemberName %68 0 "_GLF_uniform_int_values"
+               OpName %70 ""
+               OpName %94 "buf0"
+               OpMemberName %94 0 "_GLF_uniform_float_values"
+               OpName %96 ""
+               OpDecorate %63 Location 0
+               OpDecorate %67 ArrayStride 16
+               OpMemberDecorate %68 0 Offset 0
+               OpDecorate %68 Block
+               OpDecorate %70 DescriptorSet 0
+               OpDecorate %70 Binding 1
+               OpDecorate %93 ArrayStride 16
+               OpMemberDecorate %94 0 Offset 0
+               OpDecorate %94 Block
+               OpDecorate %96 DescriptorSet 0
+               OpDecorate %96 Binding 0
+          %2 = OpTypeVoid
+          %3 = OpTypeFunction %2
+          %6 = OpTypeFloat 32
+          %7 = OpTypePointer Function %6
+          %9 = OpConstant %6 10
+         %10 = OpConstant %6 9.99999997e-07
+         %13 = OpConstant %6 0x1.b38fb8p-127
+         %15 = OpConstant %6 0
+         %16 = OpTypeBool
+         %20 = OpConstant %6 1
+         %39 = OpConstant %6 0.99000001
+         %42 = OpConstant %6 0.00999999978
+         %61 = OpTypeVector %6 4
+         %62 = OpTypePointer Output %61
+         %63 = OpVariable %62 Output
+         %64 = OpTypeInt 32 1
+         %65 = OpTypeInt 32 0
+         %66 = OpConstant %65 2
+         %67 = OpTypeArray %64 %66
+         %68 = OpTypeStruct %67
+         %69 = OpTypePointer Uniform %68
+         %70 = OpVariable %69 Uniform
+         %71 = OpConstant %64 0
+         %72 = OpConstant %64 1
+         %73 = OpTypePointer Uniform %64
+         %92 = OpConstant %65 1
+         %93 = OpTypeArray %6 %92
+         %94 = OpTypeStruct %93
+         %95 = OpTypePointer Uniform %94
+         %96 = OpVariable %95 Uniform
+          %4 = OpFunction %2 None %3
+          %5 = OpLabel
+          %8 = OpVariable %7 Function
+         %12 = OpVariable %7 Function
+         %21 = OpVariable %7 Function
+         %11 = OpFMod %6 %9 %10
+               OpStore %8 %11
+               OpStore %12 %13
+         %14 = OpLoad %6 %12
+         %17 = OpFOrdEqual %16 %14 %15
+               OpSelectionMerge %19 None
+               OpBranchConditional %17 %18 %19
+         %18 = OpLabel
+               OpStore %12 %20
+               OpBranch %19
+         %19 = OpLabel
+         %22 = OpLoad %6 %12
+         %23 = OpFMod %6 %9 %22
+               OpStore %21 %23
+         %24 = OpLoad %6 %21
+         %25 = OpIsInf %16 %24
+         %26 = OpLoad %6 %12
+         %27 = OpFOrdEqual %16 %26 %20
+         %28 = OpLogicalOr %16 %25 %27
+         %29 = OpLogicalNot %16 %28
+               OpSelectionMerge %31 None
+               OpBranchConditional %29 %30 %31
+         %30 = OpLabel
+         %32 = OpLoad %6 %8
+         %33 = OpLoad %6 %21
+         %34 = OpFOrdEqual %16 %32 %33
+         %35 = OpLogicalNot %16 %34
+               OpSelectionMerge %37 None
+               OpBranchConditional %35 %36 %37
+         %36 = OpLabel
+         %38 = OpLoad %6 %8
+         %40 = OpFOrdGreaterThan %16 %38 %39
+         %41 = OpLoad %6 %8
+         %43 = OpFOrdLessThan %16 %41 %42
+         %44 = OpLogicalAnd %16 %40 %43
+               OpBranch %37
+         %37 = OpLabel
+         %45 = OpPhi %16 %34 %30 %44 %36
+         %46 = OpLogicalNot %16 %45
+               OpSelectionMerge %48 None
+               OpBranchConditional %46 %47 %48
+         %47 = OpLabel
+         %49 = OpLoad %6 %21
+         %50 = OpFOrdGreaterThan %16 %49 %39
+         %51 = OpLoad %6 %21
+         %52 = OpFOrdLessThan %16 %51 %42
+         %53 = OpLogicalAnd %16 %50 %52
+               OpBranch %48
+         %48 = OpLabel
+         %54 = OpPhi %16 %45 %37 %53 %47
+               OpBranch %31
+         %31 = OpLabel
+         %55 = OpPhi %16 %28 %19 %54 %48
+         %56 = OpLoad %6 %21
+         %57 = OpFOrdEqual %16 %56 %9
+         %58 = OpLogicalOr %16 %55 %57
+               OpSelectionMerge %60 None
+               OpBranchConditional %58 %59 %87
+         %59 = OpLabel
+         %74 = OpAccessChain %73 %70 %71 %72
+         %75 = OpLoad %64 %74
+         %76 = OpConvertSToF %6 %75
+         %77 = OpAccessChain %73 %70 %71 %71
+         %78 = OpLoad %64 %77
+         %79 = OpConvertSToF %6 %78
+         %80 = OpAccessChain %73 %70 %71 %71
+         %81 = OpLoad %64 %80
+         %82 = OpConvertSToF %6 %81
+         %83 = OpAccessChain %73 %70 %71 %72
+         %84 = OpLoad %64 %83
+         %85 = OpConvertSToF %6 %84
+         %86 = OpCompositeConstruct %61 %76 %79 %82 %85
+               OpStore %63 %86
+               OpBranch %60
+         %87 = OpLabel
+         %88 = OpAccessChain %73 %70 %71 %71
+         %89 = OpLoad %64 %88
+         %90 = OpConvertSToF %6 %89
+         %91 = OpCompositeConstruct %61 %90 %90 %90 %90
+               OpStore %63 %91
+               OpBranch %60
+         %60 = 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
diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-determinant-uninitialized-matrix-never-chosen.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-determinant-uninitialized-matrix-never-chosen.amber
new file mode 100644 (file)
index 0000000..3a17ae5
--- /dev/null
@@ -0,0 +1,238 @@
+#!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 BRW 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];
+# };
+#
+# // Contents of one: 1
+# layout(set = 0, binding = 1) uniform buf1
+# {
+#     int one;
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# void main()
+# {
+#     mat4 m0;
+#     // Initialize color to a wrong value.
+#     _GLF_color = vec4(_int_0);
+#
+#     for (int i = 0; i < 5; i++)
+#     {
+#         // m0 is uninitalized, but the identity matrix is always chosen.
+#         mat4 m1 = one == _int_1 ? mat4(1) : m0--;
+#
+#         // Always true.
+#         if (determinant(m1) == 1.0)
+#         {
+#             _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1);
+#         }
+#     }
+# }
+SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 10
+; Bound: 90
+; Schema: 0
+               OpCapability Shader
+          %1 = OpExtInstImport "GLSL.std.450"
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %4 "main" %9
+               OpExecutionMode %4 OriginUpperLeft
+               OpSource ESSL 320
+               OpName %4 "main"
+               OpName %9 "_GLF_color"
+               OpName %14 "buf0"
+               OpMemberName %14 0 "_GLF_uniform_int_values"
+               OpName %16 ""
+               OpName %25 "i"
+               OpName %37 "m1"
+               OpName %38 "buf1"
+               OpMemberName %38 0 "one"
+               OpName %40 ""
+               OpName %57 "m0"
+               OpDecorate %9 Location 0
+               OpDecorate %13 ArrayStride 16
+               OpMemberDecorate %14 0 Offset 0
+               OpDecorate %14 Block
+               OpDecorate %16 DescriptorSet 0
+               OpDecorate %16 Binding 0
+               OpMemberDecorate %38 0 Offset 0
+               OpDecorate %38 Block
+               OpDecorate %40 DescriptorSet 0
+               OpDecorate %40 Binding 1
+          %2 = OpTypeVoid
+          %3 = OpTypeFunction %2
+          %6 = OpTypeFloat 32
+          %7 = OpTypeVector %6 4
+          %8 = OpTypePointer Output %7
+          %9 = OpVariable %8 Output
+         %10 = OpTypeInt 32 1
+         %11 = OpTypeInt 32 0
+         %12 = OpConstant %11 2
+         %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
+         %24 = OpTypePointer Function %10
+         %32 = OpConstant %10 5
+         %33 = OpTypeBool
+         %35 = OpTypeMatrix %7 4
+         %36 = OpTypePointer Function %35
+         %38 = OpTypeStruct %10
+         %39 = OpTypePointer Uniform %38
+         %40 = OpVariable %39 Uniform
+         %49 = OpConstant %6 1
+         %50 = OpConstant %6 0
+         %51 = OpConstantComposite %7 %49 %50 %50 %50
+         %52 = OpConstantComposite %7 %50 %49 %50 %50
+         %53 = OpConstantComposite %7 %50 %50 %49 %50
+         %54 = OpConstantComposite %7 %50 %50 %50 %49
+         %55 = OpConstantComposite %35 %51 %52 %53 %54
+          %4 = OpFunction %2 None %3
+          %5 = OpLabel
+         %25 = OpVariable %24 Function
+         %37 = OpVariable %36 Function
+         %46 = OpVariable %36 Function
+         %57 = OpVariable %36 Function
+         %20 = OpAccessChain %19 %16 %17 %18
+         %21 = OpLoad %10 %20
+         %22 = OpConvertSToF %6 %21
+         %23 = OpCompositeConstruct %7 %22 %22 %22 %22
+               OpStore %9 %23
+               OpStore %25 %17
+               OpBranch %26
+         %26 = OpLabel
+               OpLoopMerge %28 %29 None
+               OpBranch %30
+         %30 = OpLabel
+         %31 = OpLoad %10 %25
+         %34 = OpSLessThan %33 %31 %32
+               OpBranchConditional %34 %27 %28
+         %27 = OpLabel
+         %41 = OpAccessChain %19 %40 %17
+         %42 = OpLoad %10 %41
+         %43 = OpAccessChain %19 %16 %17 %17
+         %44 = OpLoad %10 %43
+         %45 = OpIEqual %33 %42 %44
+               OpSelectionMerge %48 None
+               OpBranchConditional %45 %47 %56
+         %47 = OpLabel
+               OpStore %46 %55
+               OpBranch %48
+         %56 = OpLabel
+         %58 = OpLoad %35 %57
+         %59 = OpCompositeConstruct %7 %49 %49 %49 %49
+         %60 = OpCompositeExtract %7 %58 0
+         %61 = OpFSub %7 %60 %59
+         %62 = OpCompositeExtract %7 %58 1
+         %63 = OpFSub %7 %62 %59
+         %64 = OpCompositeExtract %7 %58 2
+         %65 = OpFSub %7 %64 %59
+         %66 = OpCompositeExtract %7 %58 3
+         %67 = OpFSub %7 %66 %59
+         %68 = OpCompositeConstruct %35 %61 %63 %65 %67
+               OpStore %57 %68
+               OpStore %46 %58
+               OpBranch %48
+         %48 = OpLabel
+         %69 = OpLoad %35 %46
+               OpStore %37 %69
+         %70 = OpLoad %35 %37
+         %71 = OpExtInst %6 %1 Determinant %70
+         %72 = OpFOrdEqual %33 %71 %49
+               OpSelectionMerge %74 None
+               OpBranchConditional %72 %73 %74
+         %73 = OpLabel
+         %75 = OpAccessChain %19 %16 %17 %17
+         %76 = OpLoad %10 %75
+         %77 = OpConvertSToF %6 %76
+         %78 = OpAccessChain %19 %16 %17 %18
+         %79 = OpLoad %10 %78
+         %80 = OpConvertSToF %6 %79
+         %81 = OpAccessChain %19 %16 %17 %18
+         %82 = OpLoad %10 %81
+         %83 = OpConvertSToF %6 %82
+         %84 = OpAccessChain %19 %16 %17 %17
+         %85 = OpLoad %10 %84
+         %86 = OpConvertSToF %6 %85
+         %87 = OpCompositeConstruct %7 %77 %80 %83 %86
+               OpStore %9 %87
+               OpBranch %74
+         %74 = OpLabel
+               OpBranch %29
+         %29 = OpLabel
+         %88 = OpLoad %10 %25
+         %89 = OpIAdd %10 %88 %18
+               OpStore %25 %89
+               OpBranch %26
+         %28 = OpLabel
+               OpReturn
+               OpFunctionEnd
+END
+
+# uniforms for variant
+
+# one
+BUFFER variant_one DATA_TYPE int32 STD140 DATA
+ 1
+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_one 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
diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-divide-matrix-transpose-by-constant.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-divide-matrix-transpose-by-constant.amber
new file mode 100644 (file)
index 0000000..6a18991
--- /dev/null
@@ -0,0 +1,128 @@
+#!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 VTN 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
+#
+# precision highp float;
+# precision highp int;
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# void main()
+# {
+#     mat2 m = transpose(mat2(1, 2, 3, 4)) / 2.0;
+#
+#     if (m == mat2(0.5, 1.5, 1.0, 2.0))
+#         _GLF_color = vec4(1, 0, 0, 1);
+#     else
+#         _GLF_color = vec4(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: 46
+; Schema: 0
+               OpCapability Shader
+          %1 = OpExtInstImport "GLSL.std.450"
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %4 "main" %41
+               OpExecutionMode %4 OriginUpperLeft
+               OpSource ESSL 320
+               OpName %4 "main"
+               OpName %10 "m"
+               OpName %41 "_GLF_color"
+               OpDecorate %41 Location 0
+          %2 = OpTypeVoid
+          %3 = OpTypeFunction %2
+          %6 = OpTypeFloat 32
+          %7 = OpTypeVector %6 2
+          %8 = OpTypeMatrix %7 2
+          %9 = OpTypePointer Function %8
+         %11 = OpConstant %6 1
+         %12 = OpConstant %6 2
+         %13 = OpConstantComposite %7 %11 %12
+         %14 = OpConstant %6 3
+         %15 = OpConstant %6 4
+         %16 = OpConstantComposite %7 %14 %15
+         %17 = OpConstantComposite %8 %13 %16
+         %22 = OpConstant %6 0.5
+         %23 = OpConstant %6 1.5
+         %24 = OpConstantComposite %7 %22 %23
+         %25 = OpConstantComposite %8 %24 %13
+         %26 = OpTypeBool
+         %29 = OpTypeVector %26 2
+         %39 = OpTypeVector %6 4
+         %40 = OpTypePointer Output %39
+         %41 = OpVariable %40 Output
+         %42 = OpConstant %6 0
+         %43 = OpConstantComposite %39 %11 %42 %42 %11
+         %45 = OpConstantComposite %39 %42 %42 %42 %42
+          %4 = OpFunction %2 None %3
+          %5 = OpLabel
+         %10 = OpVariable %9 Function
+         %18 = OpTranspose %8 %17
+         %19 = OpFDiv %6 %11 %12
+         %20 = OpMatrixTimesScalar %8 %18 %19
+               OpStore %10 %20
+         %21 = OpLoad %8 %10
+         %27 = OpCompositeExtract %7 %21 0
+         %28 = OpCompositeExtract %7 %25 0
+         %30 = OpFOrdEqual %29 %27 %28
+         %31 = OpAll %26 %30
+         %32 = OpCompositeExtract %7 %21 1
+         %33 = OpCompositeExtract %7 %25 1
+         %34 = OpFOrdEqual %29 %32 %33
+         %35 = OpAll %26 %34
+         %36 = OpLogicalAnd %26 %31 %35
+               OpSelectionMerge %38 None
+               OpBranchConditional %36 %37 %44
+         %37 = OpLabel
+               OpStore %41 %43
+               OpBranch %38
+         %44 = OpLabel
+               OpStore %41 %45
+               OpBranch %38
+         %38 = OpLabel
+               OpReturn
+               OpFunctionEnd
+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
+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
diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-fragcoord-bitwise-not.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-fragcoord-bitwise-not.amber
new file mode 100644 (file)
index 0000000..517dc30
--- /dev/null
@@ -0,0 +1,184 @@
+#!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 BRW code paths
+
+# The test passes because the shader always writes red.
+
+SHADER vertex variant_vertex_shader PASSTHROUGH
+
+# variant_fragment_shader is derived from the following GLSL:
+# #version 320 es
+# #define _int_0 _GLF_uniform_int_values[0]
+# #define _int_1 _GLF_uniform_int_values[1]
+#
+# precision highp float;
+# precision highp int;
+#
+# // Contents of _GLF_uniform_int_values: [0, 1]
+# layout(set = 0, binding = 0) uniform buf0
+# {
+#     int _GLF_uniform_int_values[2];
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# void main()
+# {
+#     // a is always positive.
+#     int a = int(gl_FragCoord.x);
+#
+#     // Always true because the bitwise not of a positive value of x is -x - 1.
+#     if (~a < 0)
+#     {
+#         a = _int_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" %12 %42
+               OpExecutionMode %4 OriginUpperLeft
+               OpSource ESSL 320
+               OpName %4 "main"
+               OpName %8 "a"
+               OpName %12 "gl_FragCoord"
+               OpName %28 "buf0"
+               OpMemberName %28 0 "_GLF_uniform_int_values"
+               OpName %30 ""
+               OpName %42 "_GLF_color"
+               OpDecorate %12 BuiltIn FragCoord
+               OpDecorate %27 ArrayStride 16
+               OpMemberDecorate %28 0 Offset 0
+               OpDecorate %28 Block
+               OpDecorate %30 DescriptorSet 0
+               OpDecorate %30 Binding 0
+               OpDecorate %42 Location 0
+          %2 = OpTypeVoid
+          %3 = OpTypeFunction %2
+          %6 = OpTypeInt 32 1
+          %7 = OpTypePointer Function %6
+          %9 = OpTypeFloat 32
+         %10 = OpTypeVector %9 4
+         %11 = OpTypePointer Input %10
+         %12 = OpVariable %11 Input
+         %13 = OpTypeInt 32 0
+         %14 = OpConstant %13 0
+         %15 = OpTypePointer Input %9
+         %21 = OpConstant %6 0
+         %22 = OpTypeBool
+         %26 = OpConstant %13 2
+         %27 = OpTypeArray %6 %26
+         %28 = OpTypeStruct %27
+         %29 = OpTypePointer Uniform %28
+         %30 = OpVariable %29 Uniform
+         %31 = OpConstant %6 1
+         %32 = OpTypePointer Uniform %6
+         %41 = OpTypePointer Output %10
+         %42 = OpVariable %41 Output
+          %4 = OpFunction %2 None %3
+          %5 = OpLabel
+          %8 = OpVariable %7 Function
+         %16 = OpAccessChain %15 %12 %14
+         %17 = OpLoad %9 %16
+         %18 = OpConvertFToS %6 %17
+               OpStore %8 %18
+         %19 = OpLoad %6 %8
+         %20 = OpNot %6 %19
+         %23 = OpSLessThan %22 %20 %21
+               OpSelectionMerge %25 None
+               OpBranchConditional %23 %24 %25
+         %24 = OpLabel
+         %33 = OpAccessChain %32 %30 %21 %31
+         %34 = OpLoad %6 %33
+               OpStore %8 %34
+               OpBranch %25
+         %25 = OpLabel
+         %35 = OpLoad %6 %8
+         %36 = OpAccessChain %32 %30 %21 %31
+         %37 = OpLoad %6 %36
+         %38 = OpIEqual %22 %35 %37
+               OpSelectionMerge %40 None
+               OpBranchConditional %38 %39 %56
+         %39 = OpLabel
+         %43 = OpAccessChain %32 %30 %21 %31
+         %44 = OpLoad %6 %43
+         %45 = OpConvertSToF %9 %44
+         %46 = OpAccessChain %32 %30 %21 %21
+         %47 = OpLoad %6 %46
+         %48 = OpConvertSToF %9 %47
+         %49 = OpAccessChain %32 %30 %21 %21
+         %50 = OpLoad %6 %49
+         %51 = OpConvertSToF %9 %50
+         %52 = OpAccessChain %32 %30 %21 %31
+         %53 = OpLoad %6 %52
+         %54 = OpConvertSToF %9 %53
+         %55 = OpCompositeConstruct %10 %45 %48 %51 %54
+               OpStore %42 %55
+               OpBranch %40
+         %56 = OpLabel
+         %57 = OpAccessChain %32 %30 %21 %21
+         %58 = OpLoad %6 %57
+         %59 = OpConvertSToF %9 %58
+         %60 = OpCompositeConstruct %10 %59 %59 %59 %59
+               OpStore %42 %60
+               OpBranch %40
+         %40 = 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
+
+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
diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-function-with-nested-loops-called-from-nested-loops.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-function-with-nested-loops-called-from-nested-loops.amber
new file mode 100644 (file)
index 0000000..e49e870
--- /dev/null
@@ -0,0 +1,792 @@
+#!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 BRW code paths
+
+# The test passes because the shader always writes red.
+
+# Optimized using spirv-opt with the following arguments:
+# '-O'
+# spirv-opt commit hash: a0370efd589be33d5d9a85cfde2f85841b3755af
+
+
+
+SHADER vertex variant_vertex_shader PASSTHROUGH
+
+# variant_fragment_shader is derived from the following GLSL:
+# #version 320 es
+#
+# #define LOOP for (int i = 0; i < 1; i++)
+#
+# precision highp float;
+# precision highp int;
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# layout(push_constant) uniform buf_push
+# {
+#     float five;
+# };
+#
+# // Function always returns 1.0.
+# float func(float x)
+# {
+#     float a = 1.0;
+#
+#     LOOP
+#     {
+#         LOOP
+#         {
+#             LOOP
+#             {
+#                 LOOP
+#                 {
+#                     LOOP
+#                     {
+#                         // Always false.
+#                         if (mod(1.0, x) < 0.0)
+#                         {
+#                             LOOP
+#                             {
+#                                 LOOP
+#                                 {
+#                                     LOOP
+#                                     {
+#                                         LOOP
+#                                         {
+#                                             LOOP
+#                                             {
+#                                                 LOOP
+#                                                 {
+#                                                     a += 1.0;
+#                                                 }
+#                                             }
+#                                         }
+#                                     }
+#                                 }
+#                             }
+#                         }
+#
+#                         // Always true.
+#                         if (x > 1.0)
+#                         {
+#                             return a;
+#                         }
+#                     }
+#                 }
+#             }
+#         }
+#     }
+#
+#     return 2.0;
+# }
+#
+# void main()
+# {
+#     float f = 0.0;
+#
+#     LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP {
+#     LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP {
+#     LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP
+#     {
+#         f = func(five);
+#     }
+#     } } } } } } } } } } } } } } } } } } } } } } } } } } }
+#
+#     // Always true.
+#     if (f == 1.0)
+#         _GLF_color = vec4(1, 0, 0, 1);
+#     else
+#         _GLF_color = vec4(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: 1659
+; Schema: 0
+               OpCapability Shader
+          %1 = OpExtInstImport "GLSL.std.450"
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %4 "main" %441
+               OpExecutionMode %4 OriginUpperLeft
+               OpSource ESSL 320
+               OpName %4 "main"
+               OpName %371 "buf_push"
+               OpMemberName %371 0 "five"
+               OpName %373 ""
+               OpName %441 "_GLF_color"
+               OpMemberDecorate %371 0 Offset 0
+               OpDecorate %371 Block
+               OpDecorate %441 Location 0
+          %2 = OpTypeVoid
+          %3 = OpTypeFunction %2
+          %6 = OpTypeFloat 32
+         %13 = OpConstant %6 1
+         %14 = OpTypeInt 32 1
+         %17 = OpConstant %14 0
+         %24 = OpConstant %14 1
+         %25 = OpTypeBool
+         %61 = OpConstant %6 0
+        %143 = OpConstant %6 2
+        %371 = OpTypeStruct %6
+        %372 = OpTypePointer PushConstant %371
+        %373 = OpVariable %372 PushConstant
+        %375 = OpTypePointer PushConstant %6
+        %439 = OpTypeVector %6 4
+        %440 = OpTypePointer Output %439
+        %441 = OpVariable %440 Output
+        %442 = OpConstantComposite %439 %13 %61 %61 %13
+        %444 = OpConstantComposite %439 %61 %61 %61 %61
+        %449 = OpTypeInt 32 0
+        %450 = OpConstant %449 0
+        %451 = OpConstantFalse %25
+        %454 = OpConstantTrue %25
+        %747 = OpUndef %6
+          %4 = OpFunction %2 None %3
+          %5 = OpLabel
+               OpBranch %148
+        %148 = OpLabel
+        %606 = OpPhi %6 %61 %5 %786 %151
+        %605 = OpPhi %14 %17 %5 %434 %151
+        %746 = OpPhi %6 %747 %5 %745 %151
+        %154 = OpSLessThan %25 %605 %24
+               OpLoopMerge %150 %151 None
+               OpBranchConditional %154 %149 %150
+        %149 = OpLabel
+               OpBranch %156
+        %156 = OpLabel
+        %607 = OpPhi %14 %17 %149 %432 %159
+        %786 = OpPhi %6 %606 %149 %787 %159
+        %745 = OpPhi %6 %746 %149 %744 %159
+        %162 = OpSLessThan %25 %607 %24
+               OpLoopMerge %158 %159 None
+               OpBranchConditional %162 %157 %158
+        %157 = OpLabel
+               OpBranch %164
+        %164 = OpLabel
+        %609 = OpPhi %14 %17 %157 %430 %167
+        %787 = OpPhi %6 %786 %157 %788 %167
+        %744 = OpPhi %6 %745 %157 %743 %167
+        %170 = OpSLessThan %25 %609 %24
+               OpLoopMerge %166 %167 None
+               OpBranchConditional %170 %165 %166
+        %165 = OpLabel
+               OpBranch %172
+        %172 = OpLabel
+        %611 = OpPhi %14 %17 %165 %428 %175
+        %788 = OpPhi %6 %787 %165 %789 %175
+        %743 = OpPhi %6 %744 %165 %742 %175
+        %178 = OpSLessThan %25 %611 %24
+               OpLoopMerge %174 %175 None
+               OpBranchConditional %178 %173 %174
+        %173 = OpLabel
+               OpBranch %180
+        %180 = OpLabel
+        %613 = OpPhi %14 %17 %173 %426 %183
+        %789 = OpPhi %6 %788 %173 %790 %183
+        %742 = OpPhi %6 %743 %173 %741 %183
+        %186 = OpSLessThan %25 %613 %24
+               OpLoopMerge %182 %183 None
+               OpBranchConditional %186 %181 %182
+        %181 = OpLabel
+               OpBranch %188
+        %188 = OpLabel
+        %615 = OpPhi %14 %17 %181 %424 %191
+        %790 = OpPhi %6 %789 %181 %791 %191
+        %741 = OpPhi %6 %742 %181 %740 %191
+        %194 = OpSLessThan %25 %615 %24
+               OpLoopMerge %190 %191 None
+               OpBranchConditional %194 %189 %190
+        %189 = OpLabel
+               OpBranch %196
+        %196 = OpLabel
+        %617 = OpPhi %14 %17 %189 %422 %199
+        %791 = OpPhi %6 %790 %189 %792 %199
+        %740 = OpPhi %6 %741 %189 %739 %199
+        %202 = OpSLessThan %25 %617 %24
+               OpLoopMerge %198 %199 None
+               OpBranchConditional %202 %197 %198
+        %197 = OpLabel
+               OpBranch %204
+        %204 = OpLabel
+        %619 = OpPhi %14 %17 %197 %420 %207
+        %792 = OpPhi %6 %791 %197 %793 %207
+        %739 = OpPhi %6 %740 %197 %738 %207
+        %210 = OpSLessThan %25 %619 %24
+               OpLoopMerge %206 %207 None
+               OpBranchConditional %210 %205 %206
+        %205 = OpLabel
+               OpBranch %212
+        %212 = OpLabel
+        %621 = OpPhi %14 %17 %205 %418 %215
+        %793 = OpPhi %6 %792 %205 %794 %215
+        %738 = OpPhi %6 %739 %205 %737 %215
+        %218 = OpSLessThan %25 %621 %24
+               OpLoopMerge %214 %215 None
+               OpBranchConditional %218 %213 %214
+        %213 = OpLabel
+               OpBranch %220
+        %220 = OpLabel
+        %623 = OpPhi %14 %17 %213 %416 %223
+        %794 = OpPhi %6 %793 %213 %795 %223
+        %737 = OpPhi %6 %738 %213 %736 %223
+        %226 = OpSLessThan %25 %623 %24
+               OpLoopMerge %222 %223 None
+               OpBranchConditional %226 %221 %222
+        %221 = OpLabel
+               OpBranch %228
+        %228 = OpLabel
+        %625 = OpPhi %14 %17 %221 %414 %231
+        %795 = OpPhi %6 %794 %221 %796 %231
+        %736 = OpPhi %6 %737 %221 %735 %231
+        %234 = OpSLessThan %25 %625 %24
+               OpLoopMerge %230 %231 None
+               OpBranchConditional %234 %229 %230
+        %229 = OpLabel
+               OpBranch %236
+        %236 = OpLabel
+        %627 = OpPhi %14 %17 %229 %412 %239
+        %796 = OpPhi %6 %795 %229 %797 %239
+        %735 = OpPhi %6 %736 %229 %734 %239
+        %242 = OpSLessThan %25 %627 %24
+               OpLoopMerge %238 %239 None
+               OpBranchConditional %242 %237 %238
+        %237 = OpLabel
+               OpBranch %244
+        %244 = OpLabel
+        %629 = OpPhi %14 %17 %237 %410 %247
+        %797 = OpPhi %6 %796 %237 %798 %247
+        %734 = OpPhi %6 %735 %237 %733 %247
+        %250 = OpSLessThan %25 %629 %24
+               OpLoopMerge %246 %247 None
+               OpBranchConditional %250 %245 %246
+        %245 = OpLabel
+               OpBranch %252
+        %252 = OpLabel
+        %631 = OpPhi %14 %17 %245 %408 %255
+        %798 = OpPhi %6 %797 %245 %799 %255
+        %733 = OpPhi %6 %734 %245 %732 %255
+        %258 = OpSLessThan %25 %631 %24
+               OpLoopMerge %254 %255 None
+               OpBranchConditional %258 %253 %254
+        %253 = OpLabel
+               OpBranch %260
+        %260 = OpLabel
+        %633 = OpPhi %14 %17 %253 %406 %263
+        %799 = OpPhi %6 %798 %253 %800 %263
+        %732 = OpPhi %6 %733 %253 %731 %263
+        %266 = OpSLessThan %25 %633 %24
+               OpLoopMerge %262 %263 None
+               OpBranchConditional %266 %261 %262
+        %261 = OpLabel
+               OpBranch %268
+        %268 = OpLabel
+        %635 = OpPhi %14 %17 %261 %404 %271
+        %800 = OpPhi %6 %799 %261 %801 %271
+        %731 = OpPhi %6 %732 %261 %730 %271
+        %274 = OpSLessThan %25 %635 %24
+               OpLoopMerge %270 %271 None
+               OpBranchConditional %274 %269 %270
+        %269 = OpLabel
+               OpBranch %276
+        %276 = OpLabel
+        %637 = OpPhi %14 %17 %269 %402 %279
+        %801 = OpPhi %6 %800 %269 %802 %279
+        %730 = OpPhi %6 %731 %269 %729 %279
+        %282 = OpSLessThan %25 %637 %24
+               OpLoopMerge %278 %279 None
+               OpBranchConditional %282 %277 %278
+        %277 = OpLabel
+               OpBranch %284
+        %284 = OpLabel
+        %639 = OpPhi %14 %17 %277 %400 %287
+        %802 = OpPhi %6 %801 %277 %803 %287
+        %729 = OpPhi %6 %730 %277 %728 %287
+        %290 = OpSLessThan %25 %639 %24
+               OpLoopMerge %286 %287 None
+               OpBranchConditional %290 %285 %286
+        %285 = OpLabel
+               OpBranch %292
+        %292 = OpLabel
+        %641 = OpPhi %14 %17 %285 %398 %295
+        %803 = OpPhi %6 %802 %285 %804 %295
+        %728 = OpPhi %6 %729 %285 %727 %295
+        %298 = OpSLessThan %25 %641 %24
+               OpLoopMerge %294 %295 None
+               OpBranchConditional %298 %293 %294
+        %293 = OpLabel
+               OpBranch %300
+        %300 = OpLabel
+        %643 = OpPhi %14 %17 %293 %396 %303
+        %804 = OpPhi %6 %803 %293 %805 %303
+        %727 = OpPhi %6 %728 %293 %726 %303
+        %306 = OpSLessThan %25 %643 %24
+               OpLoopMerge %302 %303 None
+               OpBranchConditional %306 %301 %302
+        %301 = OpLabel
+               OpBranch %308
+        %308 = OpLabel
+        %645 = OpPhi %14 %17 %301 %394 %311
+        %805 = OpPhi %6 %804 %301 %806 %311
+        %726 = OpPhi %6 %727 %301 %725 %311
+        %314 = OpSLessThan %25 %645 %24
+               OpLoopMerge %310 %311 None
+               OpBranchConditional %314 %309 %310
+        %309 = OpLabel
+               OpBranch %316
+        %316 = OpLabel
+        %647 = OpPhi %14 %17 %309 %392 %319
+        %806 = OpPhi %6 %805 %309 %807 %319
+        %725 = OpPhi %6 %726 %309 %724 %319
+        %322 = OpSLessThan %25 %647 %24
+               OpLoopMerge %318 %319 None
+               OpBranchConditional %322 %317 %318
+        %317 = OpLabel
+               OpBranch %324
+        %324 = OpLabel
+        %649 = OpPhi %14 %17 %317 %390 %327
+        %807 = OpPhi %6 %806 %317 %808 %327
+        %724 = OpPhi %6 %725 %317 %723 %327
+        %330 = OpSLessThan %25 %649 %24
+               OpLoopMerge %326 %327 None
+               OpBranchConditional %330 %325 %326
+        %325 = OpLabel
+               OpBranch %332
+        %332 = OpLabel
+        %651 = OpPhi %14 %17 %325 %388 %335
+        %808 = OpPhi %6 %807 %325 %809 %335
+        %723 = OpPhi %6 %724 %325 %722 %335
+        %338 = OpSLessThan %25 %651 %24
+               OpLoopMerge %334 %335 None
+               OpBranchConditional %338 %333 %334
+        %333 = OpLabel
+               OpBranch %340
+        %340 = OpLabel
+        %653 = OpPhi %14 %17 %333 %386 %343
+        %809 = OpPhi %6 %808 %333 %810 %343
+        %722 = OpPhi %6 %723 %333 %721 %343
+        %346 = OpSLessThan %25 %653 %24
+               OpLoopMerge %342 %343 None
+               OpBranchConditional %346 %341 %342
+        %341 = OpLabel
+               OpBranch %348
+        %348 = OpLabel
+        %655 = OpPhi %14 %17 %341 %384 %351
+        %810 = OpPhi %6 %809 %341 %811 %351
+        %721 = OpPhi %6 %722 %341 %720 %351
+        %354 = OpSLessThan %25 %655 %24
+               OpLoopMerge %350 %351 None
+               OpBranchConditional %354 %349 %350
+        %349 = OpLabel
+               OpBranch %356
+        %356 = OpLabel
+        %657 = OpPhi %14 %17 %349 %382 %359
+        %811 = OpPhi %6 %810 %349 %812 %359
+        %720 = OpPhi %6 %721 %349 %719 %359
+        %362 = OpSLessThan %25 %657 %24
+               OpLoopMerge %358 %359 None
+               OpBranchConditional %362 %357 %358
+        %357 = OpLabel
+               OpBranch %364
+        %364 = OpLabel
+        %719 = OpPhi %6 %720 %357 %716 %367
+        %659 = OpPhi %14 %17 %357 %380 %367
+        %812 = OpPhi %6 %811 %357 %716 %367
+        %370 = OpSLessThan %25 %659 %24
+               OpLoopMerge %366 %367 None
+               OpBranchConditional %370 %365 %366
+        %365 = OpLabel
+        %376 = OpAccessChain %375 %373 %17
+        %377 = OpLoad %6 %376
+               OpSelectionMerge %603 None
+               OpSwitch %450 %481
+        %481 = OpLabel
+               OpBranch %482
+        %482 = OpLabel
+        %681 = OpPhi %25 %451 %481 %704 %597
+        %674 = OpPhi %6 %13 %481 %1655 %597
+        %661 = OpPhi %14 %17 %481 %599 %597
+        %718 = OpPhi %6 %719 %481 %748 %597
+        %485 = OpSLessThan %25 %661 %24
+               OpLoopMerge %600 %597 None
+               OpBranchConditional %485 %486 %600
+        %486 = OpLabel
+               OpBranch %487
+        %487 = OpLabel
+        %680 = OpPhi %25 %681 %486 %695 %591
+        %673 = OpPhi %6 %674 %486 %1656 %591
+        %662 = OpPhi %14 %17 %486 %593 %591
+        %749 = OpPhi %6 %718 %486 %750 %591
+        %490 = OpSLessThan %25 %662 %24
+               OpLoopMerge %594 %591 None
+               OpBranchConditional %490 %491 %594
+        %491 = OpLabel
+               OpBranch %492
+        %492 = OpLabel
+        %679 = OpPhi %25 %680 %491 %688 %585
+        %672 = OpPhi %6 %673 %491 %1657 %585
+        %663 = OpPhi %14 %17 %491 %587 %585
+        %751 = OpPhi %6 %749 %491 %752 %585
+        %495 = OpSLessThan %25 %663 %24
+               OpLoopMerge %588 %585 None
+               OpBranchConditional %495 %496 %588
+        %496 = OpLabel
+               OpBranch %497
+        %497 = OpLabel
+        %678 = OpPhi %25 %679 %496 %676 %579
+        %671 = OpPhi %6 %672 %496 %1658 %579
+        %664 = OpPhi %14 %17 %496 %581 %579
+        %753 = OpPhi %6 %751 %496 %754 %579
+        %500 = OpSLessThan %25 %664 %24
+               OpLoopMerge %582 %579 None
+               OpBranchConditional %500 %501 %582
+        %501 = OpLabel
+               OpBranch %502
+        %502 = OpLabel
+        %665 = OpPhi %14 %17 %501 %575 %573
+        %670 = OpPhi %6 %671 %501 %669 %573
+        %505 = OpSLessThan %25 %665 %24
+               OpLoopMerge %576 %573 None
+               OpBranchConditional %505 %506 %576
+        %506 = OpLabel
+        %508 = OpFMod %6 %13 %377
+        %509 = OpFOrdLessThan %25 %508 %61
+               OpSelectionMerge %567 None
+               OpBranchConditional %509 %510 %567
+        %510 = OpLabel
+               OpBranch %511
+        %511 = OpLabel
+        %675 = OpPhi %6 %670 %510 %785 %563
+        %666 = OpPhi %14 %17 %510 %565 %563
+        %514 = OpSLessThan %25 %666 %24
+               OpLoopMerge %566 %563 None
+               OpBranchConditional %514 %515 %566
+        %515 = OpLabel
+               OpBranch %516
+        %516 = OpLabel
+        %771 = OpPhi %14 %17 %515 %561 %559
+        %785 = OpPhi %6 %675 %515 %784 %559
+        %519 = OpSLessThan %25 %771 %24
+               OpLoopMerge %562 %559 None
+               OpBranchConditional %519 %520 %562
+        %520 = OpLabel
+               OpBranch %521
+        %521 = OpLabel
+        %773 = OpPhi %14 %17 %520 %557 %555
+        %784 = OpPhi %6 %785 %520 %783 %555
+        %524 = OpSLessThan %25 %773 %24
+               OpLoopMerge %558 %555 None
+               OpBranchConditional %524 %525 %558
+        %525 = OpLabel
+               OpBranch %526
+        %526 = OpLabel
+        %775 = OpPhi %14 %17 %525 %553 %551
+        %783 = OpPhi %6 %784 %525 %782 %551
+        %529 = OpSLessThan %25 %775 %24
+               OpLoopMerge %554 %551 None
+               OpBranchConditional %529 %530 %554
+        %530 = OpLabel
+               OpBranch %531
+        %531 = OpLabel
+        %777 = OpPhi %14 %17 %530 %549 %547
+        %782 = OpPhi %6 %783 %530 %781 %547
+        %534 = OpSLessThan %25 %777 %24
+               OpLoopMerge %550 %547 None
+               OpBranchConditional %534 %535 %550
+        %535 = OpLabel
+               OpBranch %536
+        %536 = OpLabel
+        %781 = OpPhi %6 %782 %535 %542 %540
+        %779 = OpPhi %14 %17 %535 %545 %540
+        %539 = OpSLessThan %25 %779 %24
+               OpLoopMerge %546 %540 None
+               OpBranchConditional %539 %540 %546
+        %540 = OpLabel
+        %542 = OpFAdd %6 %781 %13
+        %545 = OpIAdd %14 %779 %24
+               OpBranch %536
+        %546 = OpLabel
+               OpBranch %547
+        %547 = OpLabel
+        %549 = OpIAdd %14 %777 %24
+               OpBranch %531
+        %550 = OpLabel
+               OpBranch %551
+        %551 = OpLabel
+        %553 = OpIAdd %14 %775 %24
+               OpBranch %526
+        %554 = OpLabel
+               OpBranch %555
+        %555 = OpLabel
+        %557 = OpIAdd %14 %773 %24
+               OpBranch %521
+        %558 = OpLabel
+               OpBranch %559
+        %559 = OpLabel
+        %561 = OpIAdd %14 %771 %24
+               OpBranch %516
+        %562 = OpLabel
+               OpBranch %563
+        %563 = OpLabel
+        %565 = OpIAdd %14 %666 %24
+               OpBranch %511
+        %566 = OpLabel
+               OpBranch %567
+        %567 = OpLabel
+        %669 = OpPhi %6 %670 %506 %675 %566
+        %569 = OpFOrdGreaterThan %25 %377 %13
+               OpSelectionMerge %572 None
+               OpBranchConditional %569 %570 %572
+        %570 = OpLabel
+               OpBranch %576
+        %572 = OpLabel
+               OpBranch %573
+        %573 = OpLabel
+        %575 = OpIAdd %14 %665 %24
+               OpBranch %502
+        %576 = OpLabel
+       %1658 = OpPhi %6 %670 %502 %669 %570
+        %754 = OpPhi %6 %753 %502 %669 %570
+        %676 = OpPhi %25 %678 %502 %454 %570
+               OpSelectionMerge %578 None
+               OpBranchConditional %676 %582 %578
+        %578 = OpLabel
+               OpBranch %579
+        %579 = OpLabel
+        %581 = OpIAdd %14 %664 %24
+               OpBranch %497
+        %582 = OpLabel
+       %1657 = OpPhi %6 %671 %497 %1658 %576
+        %752 = OpPhi %6 %753 %497 %754 %576
+        %688 = OpPhi %25 %678 %497 %676 %576
+               OpSelectionMerge %584 None
+               OpBranchConditional %688 %588 %584
+        %584 = OpLabel
+               OpBranch %585
+        %585 = OpLabel
+        %587 = OpIAdd %14 %663 %24
+               OpBranch %492
+        %588 = OpLabel
+       %1656 = OpPhi %6 %672 %492 %1657 %582
+        %750 = OpPhi %6 %751 %492 %752 %582
+        %695 = OpPhi %25 %679 %492 %688 %582
+               OpSelectionMerge %590 None
+               OpBranchConditional %695 %594 %590
+        %590 = OpLabel
+               OpBranch %591
+        %591 = OpLabel
+        %593 = OpIAdd %14 %662 %24
+               OpBranch %487
+        %594 = OpLabel
+       %1655 = OpPhi %6 %673 %487 %1656 %588
+        %748 = OpPhi %6 %749 %487 %750 %588
+        %704 = OpPhi %25 %680 %487 %695 %588
+               OpSelectionMerge %596 None
+               OpBranchConditional %704 %600 %596
+        %596 = OpLabel
+               OpBranch %597
+        %597 = OpLabel
+        %599 = OpIAdd %14 %661 %24
+               OpBranch %482
+        %600 = OpLabel
+        %717 = OpPhi %6 %718 %482 %748 %594
+        %715 = OpPhi %25 %681 %482 %704 %594
+               OpSelectionMerge %602 None
+               OpBranchConditional %715 %603 %602
+        %602 = OpLabel
+               OpBranch %603
+        %603 = OpLabel
+        %716 = OpPhi %6 %717 %600 %143 %602
+               OpBranch %367
+        %367 = OpLabel
+        %380 = OpIAdd %14 %659 %24
+               OpBranch %364
+        %366 = OpLabel
+               OpBranch %359
+        %359 = OpLabel
+        %382 = OpIAdd %14 %657 %24
+               OpBranch %356
+        %358 = OpLabel
+               OpBranch %351
+        %351 = OpLabel
+        %384 = OpIAdd %14 %655 %24
+               OpBranch %348
+        %350 = OpLabel
+               OpBranch %343
+        %343 = OpLabel
+        %386 = OpIAdd %14 %653 %24
+               OpBranch %340
+        %342 = OpLabel
+               OpBranch %335
+        %335 = OpLabel
+        %388 = OpIAdd %14 %651 %24
+               OpBranch %332
+        %334 = OpLabel
+               OpBranch %327
+        %327 = OpLabel
+        %390 = OpIAdd %14 %649 %24
+               OpBranch %324
+        %326 = OpLabel
+               OpBranch %319
+        %319 = OpLabel
+        %392 = OpIAdd %14 %647 %24
+               OpBranch %316
+        %318 = OpLabel
+               OpBranch %311
+        %311 = OpLabel
+        %394 = OpIAdd %14 %645 %24
+               OpBranch %308
+        %310 = OpLabel
+               OpBranch %303
+        %303 = OpLabel
+        %396 = OpIAdd %14 %643 %24
+               OpBranch %300
+        %302 = OpLabel
+               OpBranch %295
+        %295 = OpLabel
+        %398 = OpIAdd %14 %641 %24
+               OpBranch %292
+        %294 = OpLabel
+               OpBranch %287
+        %287 = OpLabel
+        %400 = OpIAdd %14 %639 %24
+               OpBranch %284
+        %286 = OpLabel
+               OpBranch %279
+        %279 = OpLabel
+        %402 = OpIAdd %14 %637 %24
+               OpBranch %276
+        %278 = OpLabel
+               OpBranch %271
+        %271 = OpLabel
+        %404 = OpIAdd %14 %635 %24
+               OpBranch %268
+        %270 = OpLabel
+               OpBranch %263
+        %263 = OpLabel
+        %406 = OpIAdd %14 %633 %24
+               OpBranch %260
+        %262 = OpLabel
+               OpBranch %255
+        %255 = OpLabel
+        %408 = OpIAdd %14 %631 %24
+               OpBranch %252
+        %254 = OpLabel
+               OpBranch %247
+        %247 = OpLabel
+        %410 = OpIAdd %14 %629 %24
+               OpBranch %244
+        %246 = OpLabel
+               OpBranch %239
+        %239 = OpLabel
+        %412 = OpIAdd %14 %627 %24
+               OpBranch %236
+        %238 = OpLabel
+               OpBranch %231
+        %231 = OpLabel
+        %414 = OpIAdd %14 %625 %24
+               OpBranch %228
+        %230 = OpLabel
+               OpBranch %223
+        %223 = OpLabel
+        %416 = OpIAdd %14 %623 %24
+               OpBranch %220
+        %222 = OpLabel
+               OpBranch %215
+        %215 = OpLabel
+        %418 = OpIAdd %14 %621 %24
+               OpBranch %212
+        %214 = OpLabel
+               OpBranch %207
+        %207 = OpLabel
+        %420 = OpIAdd %14 %619 %24
+               OpBranch %204
+        %206 = OpLabel
+               OpBranch %199
+        %199 = OpLabel
+        %422 = OpIAdd %14 %617 %24
+               OpBranch %196
+        %198 = OpLabel
+               OpBranch %191
+        %191 = OpLabel
+        %424 = OpIAdd %14 %615 %24
+               OpBranch %188
+        %190 = OpLabel
+               OpBranch %183
+        %183 = OpLabel
+        %426 = OpIAdd %14 %613 %24
+               OpBranch %180
+        %182 = OpLabel
+               OpBranch %175
+        %175 = OpLabel
+        %428 = OpIAdd %14 %611 %24
+               OpBranch %172
+        %174 = OpLabel
+               OpBranch %167
+        %167 = OpLabel
+        %430 = OpIAdd %14 %609 %24
+               OpBranch %164
+        %166 = OpLabel
+               OpBranch %159
+        %159 = OpLabel
+        %432 = OpIAdd %14 %607 %24
+               OpBranch %156
+        %158 = OpLabel
+               OpBranch %151
+        %151 = OpLabel
+        %434 = OpIAdd %14 %605 %24
+               OpBranch %148
+        %150 = OpLabel
+        %436 = OpFOrdEqual %25 %606 %13
+               OpSelectionMerge %438 None
+               OpBranchConditional %436 %437 %443
+        %437 = OpLabel
+               OpStore %441 %442
+               OpBranch %438
+        %443 = OpLabel
+               OpStore %441 %444
+               OpBranch %438
+        %438 = OpLabel
+               OpReturn
+               OpFunctionEnd
+END
+
+# uniforms for variant
+
+# five
+BUFFER variant_five DATA_TYPE float STD140 DATA
+ 5.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_five AS push_constant
+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
diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-loop-break-floor-nan-never-executed.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-loop-break-floor-nan-never-executed.amber
new file mode 100644 (file)
index 0000000..2ac7be0
--- /dev/null
@@ -0,0 +1,191 @@
+#!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 NIR 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
+# precision highp float;
+# precision highp int;
+#
+# layout(set = 0, binding = 0) uniform buf0
+# {
+#     int one;
+# };
+#
+# layout(location = 0) out highp vec4 _GLF_color;
+#
+# void main()
+# {
+#
+#     int a = 0;
+#
+#     for (int i = 0; i < 5; i++)
+#     {
+#         // Always false.
+#         if (one == 0)
+#         {
+#             // intBitsToFloat produces NaN. Floor of NaN is undefined, but this
+#             // code is never executed.
+#             if (floor(intBitsToFloat(0xffc00000)) > 0.0)
+#             {
+#                 a = -1;
+#                 break;
+#             }
+#         }
+#
+#         a++;
+#     }
+#
+#     // Always true.
+#     if (a == 5)
+#         _GLF_color = vec4(1, 0, 0, 1);
+#     else
+#         _GLF_color = vec4(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: 55
+; Schema: 0
+               OpCapability Shader
+          %1 = OpExtInstImport "GLSL.std.450"
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %4 "main" %50
+               OpExecutionMode %4 OriginUpperLeft
+               OpSource ESSL 320
+               OpName %4 "main"
+               OpName %8 "a"
+               OpName %10 "i"
+               OpName %20 "buf0"
+               OpMemberName %20 0 "one"
+               OpName %22 ""
+               OpName %50 "_GLF_color"
+               OpMemberDecorate %20 0 Offset 0
+               OpDecorate %20 Block
+               OpDecorate %22 DescriptorSet 0
+               OpDecorate %22 Binding 0
+               OpDecorate %50 Location 0
+          %2 = OpTypeVoid
+          %3 = OpTypeFunction %2
+          %6 = OpTypeInt 32 1
+          %7 = OpTypePointer Function %6
+          %9 = OpConstant %6 0
+         %17 = OpConstant %6 5
+         %18 = OpTypeBool
+         %20 = OpTypeStruct %6
+         %21 = OpTypePointer Uniform %20
+         %22 = OpVariable %21 Uniform
+         %23 = OpTypePointer Uniform %6
+         %29 = OpConstant %6 -4194304
+         %30 = OpTypeFloat 32
+         %33 = OpConstant %30 0
+         %37 = OpConstant %6 -1
+         %40 = OpConstant %6 1
+         %48 = OpTypeVector %30 4
+         %49 = OpTypePointer Output %48
+         %50 = OpVariable %49 Output
+         %51 = OpConstant %30 1
+         %52 = OpConstantComposite %48 %51 %33 %33 %51
+         %54 = OpConstantComposite %48 %33 %33 %33 %33
+          %4 = OpFunction %2 None %3
+          %5 = OpLabel
+          %8 = OpVariable %7 Function
+         %10 = OpVariable %7 Function
+               OpStore %8 %9
+               OpStore %10 %9
+               OpBranch %11
+         %11 = OpLabel
+               OpLoopMerge %13 %14 None
+               OpBranch %15
+         %15 = OpLabel
+         %16 = OpLoad %6 %10
+         %19 = OpSLessThan %18 %16 %17
+               OpBranchConditional %19 %12 %13
+         %12 = OpLabel
+         %24 = OpAccessChain %23 %22 %9
+         %25 = OpLoad %6 %24
+         %26 = OpIEqual %18 %25 %9
+               OpSelectionMerge %28 None
+               OpBranchConditional %26 %27 %28
+         %27 = OpLabel
+         %31 = OpBitcast %30 %29
+         %32 = OpExtInst %30 %1 Floor %31
+         %34 = OpFOrdGreaterThan %18 %32 %33
+               OpSelectionMerge %36 None
+               OpBranchConditional %34 %35 %36
+         %35 = OpLabel
+               OpStore %8 %37
+               OpBranch %13
+         %36 = OpLabel
+               OpBranch %28
+         %28 = OpLabel
+         %39 = OpLoad %6 %8
+         %41 = OpIAdd %6 %39 %40
+               OpStore %8 %41
+               OpBranch %14
+         %14 = OpLabel
+         %42 = OpLoad %6 %10
+         %43 = OpIAdd %6 %42 %40
+               OpStore %10 %43
+               OpBranch %11
+         %13 = OpLabel
+         %44 = OpLoad %6 %8
+         %45 = OpIEqual %18 %44 %17
+               OpSelectionMerge %47 None
+               OpBranchConditional %45 %46 %53
+         %46 = OpLabel
+               OpStore %50 %52
+               OpBranch %47
+         %53 = OpLabel
+               OpStore %50 %54
+               OpBranch %47
+         %47 = OpLabel
+               OpReturn
+               OpFunctionEnd
+END
+
+# uniforms for variant
+
+# one
+BUFFER variant_one DATA_TYPE int32 STD140 DATA
+ 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_one 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
diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-missing-return-value-function-never-called.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-missing-return-value-function-never-called.amber
new file mode 100644 (file)
index 0000000..6eba6b1
--- /dev/null
@@ -0,0 +1,230 @@
+#!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 BRW 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]
+#
+# precision highp int;
+# precision highp float;
+#
+# // Contents of _GLF_uniform_int_values: 0
+# layout(set = 0, binding = 0) uniform buf0
+# {
+#     int _GLF_uniform_int_values[1];
+# };
+#
+# // Contents of one: 1
+# layout(set = 0, binding = 1) uniform buf1
+# {
+#     uint one;
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# // Function is missing return value at the end,
+# // but this function is never called.
+# float func()
+# {
+#     switch(1)
+#     {
+#         case 0:
+#             return 1.0;
+#     }
+# }
+#
+# void main()
+# {
+#     vec4 v = vec4(1.0);
+#
+#     // Always false.
+#     if (gl_FragCoord.y < 0.0)
+#     {
+#         v = vec4(func());
+#     }
+#
+#     // Always false.
+#     if (packUnorm4x8(v) == 1u)
+#     {
+#         return;
+#     }
+#
+#     // Always true.
+#     if ((1u << one) == 2u)
+#     {
+#         _GLF_color = vec4(1, 0, 0, 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: 67
+; Schema: 0
+               OpCapability Shader
+          %1 = OpExtInstImport "GLSL.std.450"
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %4 "main" %23 %55
+               OpExecutionMode %4 OriginUpperLeft
+               OpSource ESSL 320
+               OpName %4 "main"
+               OpName %8 "func("
+               OpName %20 "v"
+               OpName %23 "gl_FragCoord"
+               OpName %42 "buf1"
+               OpMemberName %42 0 "one"
+               OpName %44 ""
+               OpName %55 "_GLF_color"
+               OpName %59 "buf0"
+               OpMemberName %59 0 "_GLF_uniform_int_values"
+               OpName %61 ""
+               OpDecorate %23 BuiltIn FragCoord
+               OpMemberDecorate %42 0 Offset 0
+               OpDecorate %42 Block
+               OpDecorate %44 DescriptorSet 0
+               OpDecorate %44 Binding 1
+               OpDecorate %55 Location 0
+               OpDecorate %58 ArrayStride 16
+               OpMemberDecorate %59 0 Offset 0
+               OpDecorate %59 Block
+               OpDecorate %61 DescriptorSet 0
+               OpDecorate %61 Binding 0
+          %2 = OpTypeVoid
+          %3 = OpTypeFunction %2
+          %6 = OpTypeFloat 32
+          %7 = OpTypeFunction %6
+         %10 = OpTypeInt 32 1
+         %11 = OpConstant %10 1
+         %14 = OpConstant %6 1
+         %18 = OpTypeVector %6 4
+         %19 = OpTypePointer Function %18
+         %21 = OpConstantComposite %18 %14 %14 %14 %14
+         %22 = OpTypePointer Input %18
+         %23 = OpVariable %22 Input
+         %24 = OpTypeInt 32 0
+         %25 = OpConstant %24 1
+         %26 = OpTypePointer Input %6
+         %29 = OpConstant %6 0
+         %30 = OpTypeBool
+         %42 = OpTypeStruct %24
+         %43 = OpTypePointer Uniform %42
+         %44 = OpVariable %43 Uniform
+         %45 = OpConstant %10 0
+         %46 = OpTypePointer Uniform %24
+         %50 = OpConstant %24 2
+         %54 = OpTypePointer Output %18
+         %55 = OpVariable %54 Output
+         %56 = OpConstantComposite %18 %14 %29 %29 %14
+         %58 = OpTypeArray %10 %25
+         %59 = OpTypeStruct %58
+         %60 = OpTypePointer Uniform %59
+         %61 = OpVariable %60 Uniform
+         %62 = OpTypePointer Uniform %10
+          %4 = OpFunction %2 None %3
+          %5 = OpLabel
+         %20 = OpVariable %19 Function
+               OpStore %20 %21
+         %27 = OpAccessChain %26 %23 %25
+         %28 = OpLoad %6 %27
+         %31 = OpFOrdLessThan %30 %28 %29
+               OpSelectionMerge %33 None
+               OpBranchConditional %31 %32 %33
+         %32 = OpLabel
+         %34 = OpFunctionCall %6 %8
+         %35 = OpCompositeConstruct %18 %34 %34 %34 %34
+               OpStore %20 %35
+               OpBranch %33
+         %33 = OpLabel
+         %36 = OpLoad %18 %20
+         %37 = OpExtInst %24 %1 PackUnorm4x8 %36
+         %38 = OpIEqual %30 %37 %25
+               OpSelectionMerge %40 None
+               OpBranchConditional %38 %39 %40
+         %39 = OpLabel
+               OpReturn
+         %40 = OpLabel
+         %47 = OpAccessChain %46 %44 %45
+         %48 = OpLoad %24 %47
+         %49 = OpShiftLeftLogical %24 %25 %48
+         %51 = OpIEqual %30 %49 %50
+               OpSelectionMerge %53 None
+               OpBranchConditional %51 %52 %57
+         %52 = OpLabel
+               OpStore %55 %56
+               OpBranch %53
+         %57 = OpLabel
+         %63 = OpAccessChain %62 %61 %45 %45
+         %64 = OpLoad %10 %63
+         %65 = OpConvertSToF %6 %64
+         %66 = OpCompositeConstruct %18 %65 %65 %65 %65
+               OpStore %55 %66
+               OpBranch %53
+         %53 = OpLabel
+               OpReturn
+               OpFunctionEnd
+          %8 = OpFunction %6 None %7
+          %9 = OpLabel
+               OpSelectionMerge %13 None
+               OpSwitch %11 %13 0 %12
+         %12 = OpLabel
+               OpReturnValue %14
+         %13 = OpLabel
+         %17 = OpUndef %6
+               OpReturnValue %17
+               OpFunctionEnd
+END
+
+# uniforms for variant
+
+# one
+BUFFER variant_one DATA_TYPE uint32 STD140 DATA
+ 1
+END
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 0
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+  ATTACH variant_vertex_shader
+  ATTACH variant_fragment_shader
+  FRAMEBUFFER_SIZE 256 256
+  BIND BUFFER variant_framebuffer AS color LOCATION 0
+  BIND BUFFER variant_one 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
diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-modulo-zero-never-executed.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-modulo-zero-never-executed.amber
new file mode 100644 (file)
index 0000000..1aaeed5
--- /dev/null
@@ -0,0 +1,244 @@
+#!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 NIR 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 _uint_5 _GLF_uniform_uint_values[0]
+# #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_uint_values: 5
+# layout(set = 0, binding = 1) uniform buf1
+# {
+#     uint _GLF_uniform_uint_values[1];
+# };
+#
+# // Contents of _GLF_uniform_int_values: [0, 1]
+# layout(set = 0, binding = 2) uniform buf2
+# {
+#     int _GLF_uniform_int_values[2];
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# void main()
+# {
+#     uint a = 0u;
+#     int b = _int_1;
+#
+#     // Always false.
+#     if (gl_FragCoord.x < _float_0_0)
+#     {
+#         // Modulo of zero is undefined, but this is never executed.
+#         b = int(_uint_5 % a);
+#     }
+#
+#     // Always true.
+#     if (b == _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: 78
+; Schema: 0
+               OpCapability Shader
+          %1 = OpExtInstImport "GLSL.std.450"
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %4 "main" %26 %59
+               OpExecutionMode %4 OriginUpperLeft
+               OpSource ESSL 320
+               OpName %4 "main"
+               OpName %8 "a"
+               OpName %12 "b"
+               OpName %15 "buf2"
+               OpMemberName %15 0 "_GLF_uniform_int_values"
+               OpName %17 ""
+               OpName %26 "gl_FragCoord"
+               OpName %32 "buf0"
+               OpMemberName %32 0 "_GLF_uniform_float_values"
+               OpName %34 ""
+               OpName %43 "buf1"
+               OpMemberName %43 0 "_GLF_uniform_uint_values"
+               OpName %45 ""
+               OpName %59 "_GLF_color"
+               OpDecorate %14 ArrayStride 16
+               OpMemberDecorate %15 0 Offset 0
+               OpDecorate %15 Block
+               OpDecorate %17 DescriptorSet 0
+               OpDecorate %17 Binding 2
+               OpDecorate %26 BuiltIn FragCoord
+               OpDecorate %31 ArrayStride 16
+               OpMemberDecorate %32 0 Offset 0
+               OpDecorate %32 Block
+               OpDecorate %34 DescriptorSet 0
+               OpDecorate %34 Binding 0
+               OpDecorate %42 ArrayStride 16
+               OpMemberDecorate %43 0 Offset 0
+               OpDecorate %43 Block
+               OpDecorate %45 DescriptorSet 0
+               OpDecorate %45 Binding 1
+               OpDecorate %59 Location 0
+          %2 = OpTypeVoid
+          %3 = OpTypeFunction %2
+          %6 = OpTypeInt 32 0
+          %7 = OpTypePointer Function %6
+          %9 = OpConstant %6 0
+         %10 = OpTypeInt 32 1
+         %11 = OpTypePointer Function %10
+         %13 = OpConstant %6 2
+         %14 = OpTypeArray %10 %13
+         %15 = OpTypeStruct %14
+         %16 = OpTypePointer Uniform %15
+         %17 = OpVariable %16 Uniform
+         %18 = OpConstant %10 0
+         %19 = OpConstant %10 1
+         %20 = OpTypePointer Uniform %10
+         %23 = OpTypeFloat 32
+         %24 = OpTypeVector %23 4
+         %25 = OpTypePointer Input %24
+         %26 = OpVariable %25 Input
+         %27 = OpTypePointer Input %23
+         %30 = OpConstant %6 1
+         %31 = OpTypeArray %23 %30
+         %32 = OpTypeStruct %31
+         %33 = OpTypePointer Uniform %32
+         %34 = OpVariable %33 Uniform
+         %35 = OpTypePointer Uniform %23
+         %38 = OpTypeBool
+         %42 = OpTypeArray %6 %30
+         %43 = OpTypeStruct %42
+         %44 = OpTypePointer Uniform %43
+         %45 = OpVariable %44 Uniform
+         %46 = OpTypePointer Uniform %6
+         %58 = OpTypePointer Output %24
+         %59 = OpVariable %58 Output
+          %4 = OpFunction %2 None %3
+          %5 = OpLabel
+          %8 = OpVariable %7 Function
+         %12 = OpVariable %11 Function
+               OpStore %8 %9
+         %21 = OpAccessChain %20 %17 %18 %19
+         %22 = OpLoad %10 %21
+               OpStore %12 %22
+         %28 = OpAccessChain %27 %26 %9
+         %29 = OpLoad %23 %28
+         %36 = OpAccessChain %35 %34 %18 %18
+         %37 = OpLoad %23 %36
+         %39 = OpFOrdLessThan %38 %29 %37
+               OpSelectionMerge %41 None
+               OpBranchConditional %39 %40 %41
+         %40 = OpLabel
+         %47 = OpAccessChain %46 %45 %18 %18
+         %48 = OpLoad %6 %47
+         %49 = OpLoad %6 %8
+         %50 = OpUMod %6 %48 %49
+         %51 = OpBitcast %10 %50
+               OpStore %12 %51
+               OpBranch %41
+         %41 = OpLabel
+         %52 = OpLoad %10 %12
+         %53 = OpAccessChain %20 %17 %18 %19
+         %54 = OpLoad %10 %53
+         %55 = OpIEqual %38 %52 %54
+               OpSelectionMerge %57 None
+               OpBranchConditional %55 %56 %73
+         %56 = OpLabel
+         %60 = OpAccessChain %20 %17 %18 %19
+         %61 = OpLoad %10 %60
+         %62 = OpConvertSToF %23 %61
+         %63 = OpAccessChain %20 %17 %18 %18
+         %64 = OpLoad %10 %63
+         %65 = OpConvertSToF %23 %64
+         %66 = OpAccessChain %20 %17 %18 %18
+         %67 = OpLoad %10 %66
+         %68 = OpConvertSToF %23 %67
+         %69 = OpAccessChain %20 %17 %18 %19
+         %70 = OpLoad %10 %69
+         %71 = OpConvertSToF %23 %70
+         %72 = OpCompositeConstruct %24 %62 %65 %68 %71
+               OpStore %59 %72
+               OpBranch %57
+         %73 = OpLabel
+         %74 = OpAccessChain %20 %17 %18 %18
+         %75 = OpLoad %10 %74
+         %76 = OpConvertSToF %23 %75
+         %77 = OpCompositeConstruct %24 %76 %76 %76 %76
+               OpStore %59 %77
+               OpBranch %57
+         %57 = 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_uint_values
+BUFFER variant__GLF_uniform_uint_values DATA_TYPE int32[] STD140 DATA
+ 5
+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 2
+  BIND BUFFER variant__GLF_uniform_uint_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
diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-read-matrix-push-constant.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-read-matrix-push-constant.amber
new file mode 100644 (file)
index 0000000..fe713eb
--- /dev/null
@@ -0,0 +1,204 @@
+#!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 reader 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_1_0 _GLF_uniform_float_values[0]
+#
+# precision highp int;
+# precision highp float;
+#
+# // 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: 1.0
+# layout(set = 0, binding = 1) uniform buf1
+# {
+#     float _GLF_uniform_float_values[1];
+# };
+# layout(location = 0) out vec4 _GLF_color;
+#
+# // Contents of m: [1.0, 5.0, 3.0, 7.0, 9.0, 6.0, 7.0, 8.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0]
+# layout(push_constant) uniform buf_push
+# {
+#     mat4 m;
+# };
+#
+# void main()
+# {
+#     // Always true.
+#     if(m[_int_0][_int_0] == _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: 61
+; Schema: 0
+               OpCapability Shader
+          %1 = OpExtInstImport "GLSL.std.450"
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %4 "main" %41
+               OpExecutionMode %4 OriginUpperLeft
+               OpSource ESSL 320
+               OpName %4 "main"
+               OpName %9 "buf_push"
+               OpMemberName %9 0 "m"
+               OpName %11 ""
+               OpName %17 "buf0"
+               OpMemberName %17 0 "_GLF_uniform_int_values"
+               OpName %19 ""
+               OpName %30 "buf1"
+               OpMemberName %30 0 "_GLF_uniform_float_values"
+               OpName %32 ""
+               OpName %41 "_GLF_color"
+               OpMemberDecorate %9 0 ColMajor
+               OpMemberDecorate %9 0 Offset 0
+               OpMemberDecorate %9 0 MatrixStride 16
+               OpDecorate %9 Block
+               OpDecorate %16 ArrayStride 16
+               OpMemberDecorate %17 0 Offset 0
+               OpDecorate %17 Block
+               OpDecorate %19 DescriptorSet 0
+               OpDecorate %19 Binding 0
+               OpDecorate %29 ArrayStride 16
+               OpMemberDecorate %30 0 Offset 0
+               OpDecorate %30 Block
+               OpDecorate %32 DescriptorSet 0
+               OpDecorate %32 Binding 1
+               OpDecorate %41 Location 0
+          %2 = OpTypeVoid
+          %3 = OpTypeFunction %2
+          %6 = OpTypeFloat 32
+          %7 = OpTypeVector %6 4
+          %8 = OpTypeMatrix %7 4
+          %9 = OpTypeStruct %8
+         %10 = OpTypePointer PushConstant %9
+         %11 = OpVariable %10 PushConstant
+         %12 = OpTypeInt 32 1
+         %13 = OpConstant %12 0
+         %14 = OpTypeInt 32 0
+         %15 = OpConstant %14 2
+         %16 = OpTypeArray %12 %15
+         %17 = OpTypeStruct %16
+         %18 = OpTypePointer Uniform %17
+         %19 = OpVariable %18 Uniform
+         %20 = OpTypePointer Uniform %12
+         %25 = OpTypePointer PushConstant %6
+         %28 = OpConstant %14 1
+         %29 = OpTypeArray %6 %28
+         %30 = OpTypeStruct %29
+         %31 = OpTypePointer Uniform %30
+         %32 = OpVariable %31 Uniform
+         %33 = OpTypePointer Uniform %6
+         %36 = OpTypeBool
+         %40 = OpTypePointer Output %7
+         %41 = OpVariable %40 Output
+         %42 = OpConstant %12 1
+          %4 = OpFunction %2 None %3
+          %5 = OpLabel
+         %21 = OpAccessChain %20 %19 %13 %13
+         %22 = OpLoad %12 %21
+         %23 = OpAccessChain %20 %19 %13 %13
+         %24 = OpLoad %12 %23
+         %26 = OpAccessChain %25 %11 %13 %22 %24
+         %27 = OpLoad %6 %26
+         %34 = OpAccessChain %33 %32 %13 %13
+         %35 = OpLoad %6 %34
+         %37 = OpFOrdEqual %36 %27 %35
+               OpSelectionMerge %39 None
+               OpBranchConditional %37 %38 %56
+         %38 = OpLabel
+         %43 = OpAccessChain %20 %19 %13 %42
+         %44 = OpLoad %12 %43
+         %45 = OpConvertSToF %6 %44
+         %46 = OpAccessChain %20 %19 %13 %13
+         %47 = OpLoad %12 %46
+         %48 = OpConvertSToF %6 %47
+         %49 = OpAccessChain %20 %19 %13 %13
+         %50 = OpLoad %12 %49
+         %51 = OpConvertSToF %6 %50
+         %52 = OpAccessChain %20 %19 %13 %42
+         %53 = OpLoad %12 %52
+         %54 = OpConvertSToF %6 %53
+         %55 = OpCompositeConstruct %7 %45 %48 %51 %54
+               OpStore %41 %55
+               OpBranch %39
+         %56 = OpLabel
+         %57 = OpAccessChain %20 %19 %13 %13
+         %58 = OpLoad %12 %57
+         %59 = OpConvertSToF %6 %58
+         %60 = OpCompositeConstruct %7 %59 %59 %59 %59
+               OpStore %41 %60
+               OpBranch %39
+         %39 = OpLabel
+               OpReturn
+               OpFunctionEnd
+END
+
+# uniforms for variant
+
+# m
+BUFFER variant_m DATA_TYPE mat4x4<float>[] STD140 DATA
+ 1.0 5.0 3.0 7.0 9.0 6.0 7.0 8.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0
+END
+# _GLF_uniform_float_values
+BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA
+ 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_m 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
diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-reinitialize-matrix-after-undefined-value.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-reinitialize-matrix-after-undefined-value.amber
new file mode 100644 (file)
index 0000000..8ecbcb8
--- /dev/null
@@ -0,0 +1,278 @@
+#!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 NIR code paths
+
+# The test passes because the shader always writes red.
+
+SHADER vertex variant_vertex_shader PASSTHROUGH
+
+# variant_fragment_shader is derived from the following GLSL:
+# #version 320 es
+#
+# #define _int_2 _GLF_uniform_int_values[0]
+# #define _int_0 _GLF_uniform_int_values[1]
+# #define _int_1 _GLF_uniform_int_values[2]
+# #define _int_3 _GLF_uniform_int_values[3]
+#
+# precision highp int;
+# precision highp float;
+#
+# // Contents of _GLF_uniform_int_values: [2, 0, 1, 3]
+# layout(set = 0, binding = 0) uniform buf0
+# {
+#     int _GLF_uniform_int_values[4];
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# void main()
+# {
+#     float f;
+#     mat2 m;
+#
+#     // Always false.
+#     if (_int_0 == 1)
+#     {
+#         // Uses an undefined value, but this is never executed.
+#         m = mat2(f);
+#     }
+#
+#     // Initialize all matrix elements in a loop.
+#     for(int i = _int_0; i < _int_2; i++)
+#     {
+#         for(int j = _int_0; j < _int_2; j++)
+#         {
+#             m[i][j] = float(i * _int_2 + j);
+#         }
+#     }
+#
+#     // Always true.
+#     if(m == mat2(_int_0, _int_1, _int_2, _int_3))
+#     {
+#         _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: 125
+; Schema: 0
+               OpCapability Shader
+          %1 = OpExtInstImport "GLSL.std.450"
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %4 "main" %106
+               OpExecutionMode %4 OriginUpperLeft
+               OpSource ESSL 320
+               OpName %4 "main"
+               OpName %10 "buf0"
+               OpMemberName %10 0 "_GLF_uniform_int_values"
+               OpName %12 ""
+               OpName %26 "m"
+               OpName %28 "f"
+               OpName %36 "i"
+               OpName %48 "j"
+               OpName %106 "_GLF_color"
+               OpDecorate %9 ArrayStride 16
+               OpMemberDecorate %10 0 Offset 0
+               OpDecorate %10 Block
+               OpDecorate %12 DescriptorSet 0
+               OpDecorate %12 Binding 0
+               OpDecorate %106 Location 0
+          %2 = OpTypeVoid
+          %3 = OpTypeFunction %2
+          %6 = OpTypeInt 32 1
+          %7 = OpTypeInt 32 0
+          %8 = OpConstant %7 4
+          %9 = OpTypeArray %6 %8
+         %10 = OpTypeStruct %9
+         %11 = OpTypePointer Uniform %10
+         %12 = OpVariable %11 Uniform
+         %13 = OpConstant %6 0
+         %14 = OpConstant %6 1
+         %15 = OpTypePointer Uniform %6
+         %18 = OpTypeBool
+         %22 = OpTypeFloat 32
+         %23 = OpTypeVector %22 2
+         %24 = OpTypeMatrix %23 2
+         %25 = OpTypePointer Function %24
+         %27 = OpTypePointer Function %22
+         %30 = OpConstant %22 1
+         %31 = OpConstant %22 0
+         %35 = OpTypePointer Function %6
+         %78 = OpConstant %6 2
+         %85 = OpConstant %6 3
+         %94 = OpTypeVector %18 2
+        %104 = OpTypeVector %22 4
+        %105 = OpTypePointer Output %104
+        %106 = OpVariable %105 Output
+          %4 = OpFunction %2 None %3
+          %5 = OpLabel
+         %26 = OpVariable %25 Function
+         %28 = OpVariable %27 Function
+         %36 = OpVariable %35 Function
+         %48 = OpVariable %35 Function
+         %16 = OpAccessChain %15 %12 %13 %14
+         %17 = OpLoad %6 %16
+         %19 = OpIEqual %18 %17 %14
+               OpSelectionMerge %21 None
+               OpBranchConditional %19 %20 %21
+         %20 = OpLabel
+         %29 = OpLoad %22 %28
+         %32 = OpCompositeConstruct %23 %29 %31
+         %33 = OpCompositeConstruct %23 %31 %29
+         %34 = OpCompositeConstruct %24 %32 %33
+               OpStore %26 %34
+               OpBranch %21
+         %21 = OpLabel
+         %37 = OpAccessChain %15 %12 %13 %14
+         %38 = OpLoad %6 %37
+               OpStore %36 %38
+               OpBranch %39
+         %39 = OpLabel
+               OpLoopMerge %41 %42 None
+               OpBranch %43
+         %43 = OpLabel
+         %44 = OpLoad %6 %36
+         %45 = OpAccessChain %15 %12 %13 %13
+         %46 = OpLoad %6 %45
+         %47 = OpSLessThan %18 %44 %46
+               OpBranchConditional %47 %40 %41
+         %40 = OpLabel
+         %49 = OpAccessChain %15 %12 %13 %14
+         %50 = OpLoad %6 %49
+               OpStore %48 %50
+               OpBranch %51
+         %51 = OpLabel
+               OpLoopMerge %53 %54 None
+               OpBranch %55
+         %55 = OpLabel
+         %56 = OpLoad %6 %48
+         %57 = OpAccessChain %15 %12 %13 %13
+         %58 = OpLoad %6 %57
+         %59 = OpSLessThan %18 %56 %58
+               OpBranchConditional %59 %52 %53
+         %52 = OpLabel
+         %60 = OpLoad %6 %36
+         %61 = OpLoad %6 %48
+         %62 = OpLoad %6 %36
+         %63 = OpAccessChain %15 %12 %13 %13
+         %64 = OpLoad %6 %63
+         %65 = OpIMul %6 %62 %64
+         %66 = OpLoad %6 %48
+         %67 = OpIAdd %6 %65 %66
+         %68 = OpConvertSToF %22 %67
+         %69 = OpAccessChain %27 %26 %60 %61
+               OpStore %69 %68
+               OpBranch %54
+         %54 = OpLabel
+         %70 = OpLoad %6 %48
+         %71 = OpIAdd %6 %70 %14
+               OpStore %48 %71
+               OpBranch %51
+         %53 = OpLabel
+               OpBranch %42
+         %42 = OpLabel
+         %72 = OpLoad %6 %36
+         %73 = OpIAdd %6 %72 %14
+               OpStore %36 %73
+               OpBranch %39
+         %41 = OpLabel
+         %74 = OpLoad %24 %26
+         %75 = OpAccessChain %15 %12 %13 %14
+         %76 = OpLoad %6 %75
+         %77 = OpConvertSToF %22 %76
+         %79 = OpAccessChain %15 %12 %13 %78
+         %80 = OpLoad %6 %79
+         %81 = OpConvertSToF %22 %80
+         %82 = OpAccessChain %15 %12 %13 %13
+         %83 = OpLoad %6 %82
+         %84 = OpConvertSToF %22 %83
+         %86 = OpAccessChain %15 %12 %13 %85
+         %87 = OpLoad %6 %86
+         %88 = OpConvertSToF %22 %87
+         %89 = OpCompositeConstruct %23 %77 %81
+         %90 = OpCompositeConstruct %23 %84 %88
+         %91 = OpCompositeConstruct %24 %89 %90
+         %92 = OpCompositeExtract %23 %74 0
+         %93 = OpCompositeExtract %23 %91 0
+         %95 = OpFOrdEqual %94 %92 %93
+         %96 = OpAll %18 %95
+         %97 = OpCompositeExtract %23 %74 1
+         %98 = OpCompositeExtract %23 %91 1
+         %99 = OpFOrdEqual %94 %97 %98
+        %100 = OpAll %18 %99
+        %101 = OpLogicalAnd %18 %96 %100
+               OpSelectionMerge %103 None
+               OpBranchConditional %101 %102 %120
+        %102 = OpLabel
+        %107 = OpAccessChain %15 %12 %13 %78
+        %108 = OpLoad %6 %107
+        %109 = OpConvertSToF %22 %108
+        %110 = OpAccessChain %15 %12 %13 %14
+        %111 = OpLoad %6 %110
+        %112 = OpConvertSToF %22 %111
+        %113 = OpAccessChain %15 %12 %13 %14
+        %114 = OpLoad %6 %113
+        %115 = OpConvertSToF %22 %114
+        %116 = OpAccessChain %15 %12 %13 %78
+        %117 = OpLoad %6 %116
+        %118 = OpConvertSToF %22 %117
+        %119 = OpCompositeConstruct %104 %109 %112 %115 %118
+               OpStore %106 %119
+               OpBranch %103
+        %120 = OpLabel
+        %121 = OpAccessChain %15 %12 %13 %14
+        %122 = OpLoad %6 %121
+        %123 = OpConvertSToF %22 %122
+        %124 = OpCompositeConstruct %104 %123 %123 %123 %123
+               OpStore %106 %124
+               OpBranch %103
+        %103 = OpLabel
+               OpReturn
+               OpFunctionEnd
+END
+
+# uniforms for variant
+
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 2 0 1 3
+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
diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-sampler-as-function-argument.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-sampler-as-function-argument.amber
new file mode 100644 (file)
index 0000000..e670d53
--- /dev/null
@@ -0,0 +1,236 @@
+#!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 reader code paths
+
+# The test passes because the shader always writes red.
+
+SHADER vertex texgen_vert PASSTHROUGH
+
+SHADER fragment texgen_frag GLSL
+#version 430
+precision highp float;
+
+layout(location = 0) out vec4 _GLF_color;
+
+void main()
+{
+ _GLF_color = vec4(
+ gl_FragCoord.x * (1.0 / 256.0),
+ (int(gl_FragCoord.x) ^ int(gl_FragCoord.y)) * (1.0 / 256.0),
+ gl_FragCoord.y * (1.0 / 256.0),
+ 1.0);
+}
+END
+BUFFER default_texture FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics texgen_pipeline
+  ATTACH texgen_vert
+  ATTACH texgen_frag
+  FRAMEBUFFER_SIZE 256 256
+  BIND BUFFER default_texture AS color LOCATION 0
+END
+
+CLEAR_COLOR texgen_pipeline 0 0 0 255
+CLEAR texgen_pipeline
+RUN texgen_pipeline DRAW_RECT POS 0 0  SIZE 256 256
+
+SHADER vertex variant_vertex_shader PASSTHROUGH
+
+# variant_fragment_shader is derived from the following GLSL:
+# #version 320 es
+# #define _int_0 _GLF_uniform_int_values[0]
+# #define _int_1 _GLF_uniform_int_values[1]
+#
+# precision highp int;
+# precision highp float;
+#
+# // Contents of _GLF_uniform_int_values: [0, 1]
+# layout(set = 0, binding = 0) uniform buf0
+# {
+#     int _GLF_uniform_int_values[2];
+# };
+#
+# layout(set = 0, binding = 1) uniform sampler2D tex;
+# layout(location = 0) out vec4 _GLF_color;
+#
+# vec4 func(sampler2D s)
+# {
+#     return texture(s, vec2(_int_0));
+# }
+#
+# void main()
+# {
+#     // Always true.
+#     if (func(tex) == vec4(_int_0, _int_0, _int_0, _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: 78
+; Schema: 0
+               OpCapability Shader
+          %1 = OpExtInstImport "GLSL.std.450"
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %4 "main" %59
+               OpExecutionMode %4 OriginUpperLeft
+               OpSource ESSL 320
+               OpName %4 "main"
+               OpName %13 "func(s21;"
+               OpName %12 "s"
+               OpName %20 "buf0"
+               OpMemberName %20 0 "_GLF_uniform_int_values"
+               OpName %22 ""
+               OpName %36 "tex"
+               OpName %59 "_GLF_color"
+               OpDecorate %12 RelaxedPrecision
+               OpDecorate %15 RelaxedPrecision
+               OpDecorate %19 ArrayStride 16
+               OpMemberDecorate %20 0 Offset 0
+               OpDecorate %20 Block
+               OpDecorate %22 DescriptorSet 0
+               OpDecorate %22 Binding 0
+               OpDecorate %27 RelaxedPrecision
+               OpDecorate %29 RelaxedPrecision
+               OpDecorate %30 RelaxedPrecision
+               OpDecorate %36 RelaxedPrecision
+               OpDecorate %36 DescriptorSet 0
+               OpDecorate %36 Binding 1
+               OpDecorate %59 Location 0
+          %2 = OpTypeVoid
+          %3 = OpTypeFunction %2
+          %6 = OpTypeFloat 32
+          %7 = OpTypeImage %6 2D 0 0 0 1 Unknown
+          %8 = OpTypeSampledImage %7
+          %9 = OpTypePointer UniformConstant %8
+         %10 = OpTypeVector %6 4
+         %11 = OpTypeFunction %10 %9
+         %16 = OpTypeInt 32 1
+         %17 = OpTypeInt 32 0
+         %18 = OpConstant %17 2
+         %19 = OpTypeArray %16 %18
+         %20 = OpTypeStruct %19
+         %21 = OpTypePointer Uniform %20
+         %22 = OpVariable %21 Uniform
+         %23 = OpConstant %16 0
+         %24 = OpTypePointer Uniform %16
+         %28 = OpTypeVector %6 2
+         %31 = OpTypePointer Function %10
+         %36 = OpVariable %9 UniformConstant
+         %47 = OpConstant %16 1
+         %52 = OpTypeBool
+         %53 = OpTypeVector %52 4
+         %58 = OpTypePointer Output %10
+         %59 = OpVariable %58 Output
+          %4 = OpFunction %2 None %3
+          %5 = OpLabel
+         %37 = OpFunctionCall %10 %13 %36
+         %38 = OpAccessChain %24 %22 %23 %23
+         %39 = OpLoad %16 %38
+         %40 = OpConvertSToF %6 %39
+         %41 = OpAccessChain %24 %22 %23 %23
+         %42 = OpLoad %16 %41
+         %43 = OpConvertSToF %6 %42
+         %44 = OpAccessChain %24 %22 %23 %23
+         %45 = OpLoad %16 %44
+         %46 = OpConvertSToF %6 %45
+         %48 = OpAccessChain %24 %22 %23 %47
+         %49 = OpLoad %16 %48
+         %50 = OpConvertSToF %6 %49
+         %51 = OpCompositeConstruct %10 %40 %43 %46 %50
+         %54 = OpFOrdEqual %53 %37 %51
+         %55 = OpAll %52 %54
+               OpSelectionMerge %57 None
+               OpBranchConditional %55 %56 %73
+         %56 = OpLabel
+         %60 = OpAccessChain %24 %22 %23 %47
+         %61 = OpLoad %16 %60
+         %62 = OpConvertSToF %6 %61
+         %63 = OpAccessChain %24 %22 %23 %23
+         %64 = OpLoad %16 %63
+         %65 = OpConvertSToF %6 %64
+         %66 = OpAccessChain %24 %22 %23 %23
+         %67 = OpLoad %16 %66
+         %68 = OpConvertSToF %6 %67
+         %69 = OpAccessChain %24 %22 %23 %47
+         %70 = OpLoad %16 %69
+         %71 = OpConvertSToF %6 %70
+         %72 = OpCompositeConstruct %10 %62 %65 %68 %71
+               OpStore %59 %72
+               OpBranch %57
+         %73 = OpLabel
+         %74 = OpAccessChain %24 %22 %23 %23
+         %75 = OpLoad %16 %74
+         %76 = OpConvertSToF %6 %75
+         %77 = OpCompositeConstruct %10 %76 %76 %76 %76
+               OpStore %59 %77
+               OpBranch %57
+         %57 = OpLabel
+               OpReturn
+               OpFunctionEnd
+         %13 = OpFunction %10 None %11
+         %12 = OpFunctionParameter %9
+         %14 = OpLabel
+         %32 = OpVariable %31 Function
+         %15 = OpLoad %8 %12
+         %25 = OpAccessChain %24 %22 %23 %23
+         %26 = OpLoad %16 %25
+         %27 = OpConvertSToF %6 %26
+         %29 = OpCompositeConstruct %28 %27 %27
+         %30 = OpImageSampleImplicitLod %10 %15 %29
+               OpStore %32 %30
+         %33 = OpLoad %10 %32
+               OpReturnValue %33
+               OpFunctionEnd
+END
+
+# uniforms for variant
+
+# tex
+SAMPLER variant_tex
+
+# _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 default_texture AS combined_image_sampler SAMPLER variant_tex 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
diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-transpose-multiply.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-transpose-multiply.amber
new file mode 100644 (file)
index 0000000..92998ac
--- /dev/null
@@ -0,0 +1,129 @@
+#!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 NIR 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
+#
+# precision highp int;
+# precision highp float;
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# void main()
+# {
+#     mat2 m = mat2(1, 2, 3, 4);
+#
+#     if (transpose(m) * transpose(m) == transpose(m * m))
+#         _GLF_color = vec4(1, 0, 0, 1);
+#     else
+#         _GLF_color = vec4(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: 47
+; 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 %10 "m"
+               OpName %42 "_GLF_color"
+               OpDecorate %42 Location 0
+          %2 = OpTypeVoid
+          %3 = OpTypeFunction %2
+          %6 = OpTypeFloat 32
+          %7 = OpTypeVector %6 2
+          %8 = OpTypeMatrix %7 2
+          %9 = OpTypePointer Function %8
+         %11 = OpConstant %6 1
+         %12 = OpConstant %6 2
+         %13 = OpConstantComposite %7 %11 %12
+         %14 = OpConstant %6 3
+         %15 = OpConstant %6 4
+         %16 = OpConstantComposite %7 %14 %15
+         %17 = OpConstantComposite %8 %13 %16
+         %27 = OpTypeBool
+         %30 = OpTypeVector %27 2
+         %40 = OpTypeVector %6 4
+         %41 = OpTypePointer Output %40
+         %42 = OpVariable %41 Output
+         %43 = OpConstant %6 0
+         %44 = OpConstantComposite %40 %11 %43 %43 %11
+         %46 = OpConstantComposite %40 %43 %43 %43 %43
+          %4 = OpFunction %2 None %3
+          %5 = OpLabel
+         %10 = OpVariable %9 Function
+               OpStore %10 %17
+         %18 = OpLoad %8 %10
+         %19 = OpTranspose %8 %18
+         %20 = OpLoad %8 %10
+         %21 = OpTranspose %8 %20
+         %22 = OpMatrixTimesMatrix %8 %19 %21
+         %23 = OpLoad %8 %10
+         %24 = OpLoad %8 %10
+         %25 = OpMatrixTimesMatrix %8 %23 %24
+         %26 = OpTranspose %8 %25
+         %28 = OpCompositeExtract %7 %22 0
+         %29 = OpCompositeExtract %7 %26 0
+         %31 = OpFOrdEqual %30 %28 %29
+         %32 = OpAll %27 %31
+         %33 = OpCompositeExtract %7 %22 1
+         %34 = OpCompositeExtract %7 %26 1
+         %35 = OpFOrdEqual %30 %33 %34
+         %36 = OpAll %27 %35
+         %37 = OpLogicalAnd %27 %32 %36
+               OpSelectionMerge %39 None
+               OpBranchConditional %37 %38 %45
+         %38 = OpLabel
+               OpStore %42 %44
+               OpBranch %39
+         %45 = OpLabel
+               OpStore %42 %46
+               OpBranch %39
+         %39 = OpLabel
+               OpReturn
+               OpFunctionEnd
+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
+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
diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-trunc-fract-always-zero.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-trunc-fract-always-zero.amber
new file mode 100644 (file)
index 0000000..5c89fd4
--- /dev/null
@@ -0,0 +1,200 @@
+#!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 NIR 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_5_0 _GLF_uniform_float_values[1]
+#
+# precision highp int;
+# precision highp float;
+#
+# // Contents of _GLF_uniform_int_values: [1, 0]
+# layout(set = 0, binding = 0) uniform buf0
+# {
+#     int _GLF_uniform_int_values[2];
+# };
+#
+# // Contents of _GLF_uniform_float_values: [0.0, 5.0]
+# layout(set = 0, binding = 1) uniform buf1
+# {
+#     float _GLF_uniform_float_values[2];
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# void main()
+# {
+#     // Trunc returns either 0.0 or 1.0. Fract will return zero for both.
+#     float f = fract(trunc(gl_FragCoord.y < _float_5_0 ? 0.1 : 1.0));
+#
+#     // Always true.
+#     if(f == _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: 66
+; Schema: 0
+               OpCapability Shader
+          %1 = OpExtInstImport "GLSL.std.450"
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %4 "main" %11 %42
+               OpExecutionMode %4 OriginUpperLeft
+               OpSource ESSL 320
+               OpName %4 "main"
+               OpName %8 "f"
+               OpName %11 "gl_FragCoord"
+               OpName %19 "buf1"
+               OpMemberName %19 0 "_GLF_uniform_float_values"
+               OpName %21 ""
+               OpName %42 "_GLF_color"
+               OpName %44 "buf0"
+               OpMemberName %44 0 "_GLF_uniform_int_values"
+               OpName %46 ""
+               OpDecorate %11 BuiltIn FragCoord
+               OpDecorate %18 ArrayStride 16
+               OpMemberDecorate %19 0 Offset 0
+               OpDecorate %19 Block
+               OpDecorate %21 DescriptorSet 0
+               OpDecorate %21 Binding 1
+               OpDecorate %42 Location 0
+               OpDecorate %43 ArrayStride 16
+               OpMemberDecorate %44 0 Offset 0
+               OpDecorate %44 Block
+               OpDecorate %46 DescriptorSet 0
+               OpDecorate %46 Binding 0
+          %2 = OpTypeVoid
+          %3 = OpTypeFunction %2
+          %6 = OpTypeFloat 32
+          %7 = OpTypePointer Function %6
+          %9 = OpTypeVector %6 4
+         %10 = OpTypePointer Input %9
+         %11 = OpVariable %10 Input
+         %12 = OpTypeInt 32 0
+         %13 = OpConstant %12 1
+         %14 = OpTypePointer Input %6
+         %17 = OpConstant %12 2
+         %18 = OpTypeArray %6 %17
+         %19 = OpTypeStruct %18
+         %20 = OpTypePointer Uniform %19
+         %21 = OpVariable %20 Uniform
+         %22 = OpTypeInt 32 1
+         %23 = OpConstant %22 0
+         %24 = OpConstant %22 1
+         %25 = OpTypePointer Uniform %6
+         %28 = OpTypeBool
+         %30 = OpConstant %6 0.100000001
+         %31 = OpConstant %6 1
+         %41 = OpTypePointer Output %9
+         %42 = OpVariable %41 Output
+         %43 = OpTypeArray %22 %17
+         %44 = OpTypeStruct %43
+         %45 = OpTypePointer Uniform %44
+         %46 = OpVariable %45 Uniform
+         %47 = OpTypePointer Uniform %22
+          %4 = OpFunction %2 None %3
+          %5 = OpLabel
+          %8 = OpVariable %7 Function
+         %15 = OpAccessChain %14 %11 %13
+         %16 = OpLoad %6 %15
+         %26 = OpAccessChain %25 %21 %23 %24
+         %27 = OpLoad %6 %26
+         %29 = OpFOrdLessThan %28 %16 %27
+         %32 = OpSelect %6 %29 %30 %31
+         %33 = OpExtInst %6 %1 Trunc %32
+         %34 = OpExtInst %6 %1 Fract %33
+               OpStore %8 %34
+         %35 = OpLoad %6 %8
+         %36 = OpAccessChain %25 %21 %23 %23
+         %37 = OpLoad %6 %36
+         %38 = OpFOrdEqual %28 %35 %37
+               OpSelectionMerge %40 None
+               OpBranchConditional %38 %39 %61
+         %39 = OpLabel
+         %48 = OpAccessChain %47 %46 %23 %23
+         %49 = OpLoad %22 %48
+         %50 = OpConvertSToF %6 %49
+         %51 = OpAccessChain %47 %46 %23 %24
+         %52 = OpLoad %22 %51
+         %53 = OpConvertSToF %6 %52
+         %54 = OpAccessChain %47 %46 %23 %24
+         %55 = OpLoad %22 %54
+         %56 = OpConvertSToF %6 %55
+         %57 = OpAccessChain %47 %46 %23 %23
+         %58 = OpLoad %22 %57
+         %59 = OpConvertSToF %6 %58
+         %60 = OpCompositeConstruct %9 %50 %53 %56 %59
+               OpStore %42 %60
+               OpBranch %40
+         %61 = OpLabel
+         %62 = OpAccessChain %47 %46 %23 %24
+         %63 = OpLoad %22 %62
+         %64 = OpConvertSToF %6 %63
+         %65 = OpCompositeConstruct %9 %64 %64 %64 %64
+               OpStore %42 %65
+               OpBranch %40
+         %40 = OpLabel
+               OpReturn
+               OpFunctionEnd
+END
+
+# uniforms for variant
+
+# _GLF_uniform_float_values
+BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA
+ 0.0 5.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
diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-uninitialized-values-passed-to-function-never-executed.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-uninitialized-values-passed-to-function-never-executed.amber
new file mode 100644 (file)
index 0000000..af41535
--- /dev/null
@@ -0,0 +1,291 @@
+#!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 NIR 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 _int_10 _GLF_uniform_int_values[2]
+#
+# precision highp float;
+# precision highp int;
+#
+# // Contents of _GLF_uniform_int_values: [0, 1, 10]
+# layout(set = 0, binding = 0) uniform buf0
+# {
+#     int _GLF_uniform_int_values[3];
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# struct S
+# {
+#     int data;
+# };
+#
+# void func(inout S s, int x)
+# {
+#     // Always false.
+#     if (_int_1 == _int_0)
+#     {
+#         return;
+#     }
+#
+#     s.data = x;
+# }
+#
+# void main()
+# {
+#     // This variable needs to be uninitialized to hit the coverage point.
+#     // However, the uninitialized values are never read.
+#     int index;
+#
+#     S arr[10];
+#     for (int i = 0; i < 10; i++)
+#         arr[i].data = 0;
+#
+#     // Always false.
+#     if (_int_1 == _int_0)
+#     {
+#         // Uninitialized value access that is never executed.
+#         func(arr[index], index);
+#     }
+#     else
+#     {
+#         func(arr[_int_0], _int_1);
+#     }
+#
+#     // Always true.
+#     if (arr[_int_0].data == _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: 112
+; Schema: 0
+               OpCapability Shader
+          %1 = OpExtInstImport "GLSL.std.450"
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %4 "main" %93
+               OpExecutionMode %4 OriginUpperLeft
+               OpSource ESSL 320
+               OpName %4 "main"
+               OpName %7 "S"
+               OpMemberName %7 0 "data"
+               OpName %13 "func(struct-S-i11;i1;"
+               OpName %11 "s"
+               OpName %12 "x"
+               OpName %18 "buf0"
+               OpMemberName %18 0 "_GLF_uniform_int_values"
+               OpName %20 ""
+               OpName %35 "i"
+               OpName %47 "arr"
+               OpName %59 "index"
+               OpName %61 "param"
+               OpName %64 "param"
+               OpName %72 "param"
+               OpName %75 "param"
+               OpName %93 "_GLF_color"
+               OpDecorate %17 ArrayStride 16
+               OpMemberDecorate %18 0 Offset 0
+               OpDecorate %18 Block
+               OpDecorate %20 DescriptorSet 0
+               OpDecorate %20 Binding 0
+               OpDecorate %93 Location 0
+          %2 = OpTypeVoid
+          %3 = OpTypeFunction %2
+          %6 = OpTypeInt 32 1
+          %7 = OpTypeStruct %6
+          %8 = OpTypePointer Function %7
+          %9 = OpTypePointer Function %6
+         %10 = OpTypeFunction %2 %8 %9
+         %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 0
+         %22 = OpConstant %6 1
+         %23 = OpTypePointer Uniform %6
+         %28 = OpTypeBool
+         %42 = OpConstant %6 10
+         %44 = OpConstant %15 10
+         %45 = OpTypeArray %7 %44
+         %46 = OpTypePointer Function %45
+         %90 = OpTypeFloat 32
+         %91 = OpTypeVector %90 4
+         %92 = OpTypePointer Output %91
+         %93 = OpVariable %92 Output
+          %4 = OpFunction %2 None %3
+          %5 = OpLabel
+         %35 = OpVariable %9 Function
+         %47 = OpVariable %46 Function
+         %59 = OpVariable %9 Function
+         %61 = OpVariable %8 Function
+         %64 = OpVariable %9 Function
+         %72 = OpVariable %8 Function
+         %75 = OpVariable %9 Function
+               OpStore %35 %21
+               OpBranch %36
+         %36 = OpLabel
+               OpLoopMerge %38 %39 None
+               OpBranch %40
+         %40 = OpLabel
+         %41 = OpLoad %6 %35
+         %43 = OpSLessThan %28 %41 %42
+               OpBranchConditional %43 %37 %38
+         %37 = OpLabel
+         %48 = OpLoad %6 %35
+         %49 = OpAccessChain %9 %47 %48 %21
+               OpStore %49 %21
+               OpBranch %39
+         %39 = OpLabel
+         %50 = OpLoad %6 %35
+         %51 = OpIAdd %6 %50 %22
+               OpStore %35 %51
+               OpBranch %36
+         %38 = OpLabel
+         %52 = OpAccessChain %23 %20 %21 %22
+         %53 = OpLoad %6 %52
+         %54 = OpAccessChain %23 %20 %21 %21
+         %55 = OpLoad %6 %54
+         %56 = OpIEqual %28 %53 %55
+               OpSelectionMerge %58 None
+               OpBranchConditional %56 %57 %69
+         %57 = OpLabel
+         %60 = OpLoad %6 %59
+         %62 = OpAccessChain %8 %47 %60
+         %63 = OpLoad %7 %62
+               OpStore %61 %63
+         %65 = OpLoad %6 %59
+               OpStore %64 %65
+         %66 = OpFunctionCall %2 %13 %61 %64
+         %67 = OpLoad %7 %61
+         %68 = OpAccessChain %8 %47 %60
+               OpStore %68 %67
+               OpBranch %58
+         %69 = OpLabel
+         %70 = OpAccessChain %23 %20 %21 %21
+         %71 = OpLoad %6 %70
+         %73 = OpAccessChain %8 %47 %71
+         %74 = OpLoad %7 %73
+               OpStore %72 %74
+         %76 = OpAccessChain %23 %20 %21 %22
+         %77 = OpLoad %6 %76
+               OpStore %75 %77
+         %78 = OpFunctionCall %2 %13 %72 %75
+         %79 = OpLoad %7 %72
+         %80 = OpAccessChain %8 %47 %71
+               OpStore %80 %79
+               OpBranch %58
+         %58 = OpLabel
+         %81 = OpAccessChain %23 %20 %21 %21
+         %82 = OpLoad %6 %81
+         %83 = OpAccessChain %9 %47 %82 %21
+         %84 = OpLoad %6 %83
+         %85 = OpAccessChain %23 %20 %21 %22
+         %86 = OpLoad %6 %85
+         %87 = OpIEqual %28 %84 %86
+               OpSelectionMerge %89 None
+               OpBranchConditional %87 %88 %107
+         %88 = OpLabel
+         %94 = OpAccessChain %23 %20 %21 %22
+         %95 = OpLoad %6 %94
+         %96 = OpConvertSToF %90 %95
+         %97 = OpAccessChain %23 %20 %21 %21
+         %98 = OpLoad %6 %97
+         %99 = OpConvertSToF %90 %98
+        %100 = OpAccessChain %23 %20 %21 %21
+        %101 = OpLoad %6 %100
+        %102 = OpConvertSToF %90 %101
+        %103 = OpAccessChain %23 %20 %21 %22
+        %104 = OpLoad %6 %103
+        %105 = OpConvertSToF %90 %104
+        %106 = OpCompositeConstruct %91 %96 %99 %102 %105
+               OpStore %93 %106
+               OpBranch %89
+        %107 = OpLabel
+        %108 = OpAccessChain %23 %20 %21 %21
+        %109 = OpLoad %6 %108
+        %110 = OpConvertSToF %90 %109
+        %111 = OpCompositeConstruct %91 %110 %110 %110 %110
+               OpStore %93 %111
+               OpBranch %89
+         %89 = OpLabel
+               OpReturn
+               OpFunctionEnd
+         %13 = OpFunction %2 None %10
+         %11 = OpFunctionParameter %8
+         %12 = OpFunctionParameter %9
+         %14 = OpLabel
+         %24 = OpAccessChain %23 %20 %21 %22
+         %25 = OpLoad %6 %24
+         %26 = OpAccessChain %23 %20 %21 %21
+         %27 = OpLoad %6 %26
+         %29 = OpIEqual %28 %25 %27
+               OpSelectionMerge %31 None
+               OpBranchConditional %29 %30 %31
+         %30 = OpLabel
+               OpReturn
+         %31 = OpLabel
+         %33 = OpLoad %6 %12
+         %34 = OpAccessChain %9 %11 %21
+               OpStore %34 %33
+               OpReturn
+               OpFunctionEnd
+END
+
+# uniforms for variant
+
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 0 1 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_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
diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-unused-access-past-matrix-elements.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-unused-access-past-matrix-elements.amber
new file mode 100644 (file)
index 0000000..37e7910
--- /dev/null
@@ -0,0 +1,315 @@
+#!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 NIR code paths
+
+# The test passes because the shader always writes red.
+
+# Optimized using spirv-opt with the following arguments:
+# '--vector-dce'
+# '--scalar-replacement=100'
+# '--eliminate-local-multi-store'
+# '--copy-propagate-arrays'
+# '--convert-local-access-chains'
+# '--reduce-load-size'
+# '--eliminate-dead-inserts'
+# '--eliminate-dead-inserts'
+# '--ccp'
+# spirv-opt commit hash: a0370efd589be33d5d9a85cfde2f85841b3755af
+
+
+
+SHADER vertex variant_vertex_shader PASSTHROUGH
+
+# variant_fragment_shader is derived from the following GLSL:
+# #version 320 es
+# #define _int_1 _GLF_uniform_int_values[0]
+# #define _int_0 _GLF_uniform_int_values[1]
+# #define _int_2 _GLF_uniform_int_values[2]
+# #define _int_4 _GLF_uniform_int_values[3]
+# #define _float_1_0 _GLF_uniform_float_values[0]
+# #define _float_0_0 _GLF_uniform_float_values[1]
+# #define _float_3_0 _GLF_uniform_float_values[2]
+#
+# precision highp int;
+# precision highp float;
+#
+# // Contents of _GLF_uniform_int_values: [1, 0, 2, 4]
+# layout(set = 0, binding = 0) uniform buf0
+# {
+#     int _GLF_uniform_int_values[4];
+# };
+# // Contents of _GLF_uniform_float_values: [1.0, 0.0, 3.0]
+# layout(set = 0, binding = 1) uniform buf1
+# {
+#     float _GLF_uniform_float_values[3];
+# };
+# layout(location = 0) out vec4 _GLF_color;
+#
+# void main()
+# {
+#     mat4x3 m43 = mat4x3(_float_0_0);
+#     m43[_int_1][_int_1] = _float_1_0;
+#     float sums[3] = float[3](_float_1_0, _float_1_0, _float_1_0);
+#
+#     // Increases sums[1] by one, picking it from m43[1][1].
+#     for(int i = _int_1; i < _int_4; i++)
+#     {
+#         sums[_int_1] += m43[i][_int_1];
+#     }
+#
+#     // Always false.
+#     if (_int_0 == 1)
+#     {
+#         // Static out of bound access is required
+#         // to hit the coverage point. Still, this
+#         // is never executed.
+#         int a = 4;
+#         sums[_int_2] += m43[a][_int_1];
+#     }
+#
+#     if(sums[_int_0] + sums[_int_1] == _float_3_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: 137
+; Schema: 0
+               OpCapability Shader
+          %1 = OpExtInstImport "GLSL.std.450"
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %4 "main" %116
+               OpExecutionMode %4 OriginUpperLeft
+               OpSource ESSL 320
+               OpName %4 "main"
+               OpName %10 "m43"
+               OpName %14 "buf1"
+               OpMemberName %14 0 "_GLF_uniform_float_values"
+               OpName %16 ""
+               OpName %32 "buf0"
+               OpMemberName %32 0 "_GLF_uniform_int_values"
+               OpName %34 ""
+               OpName %45 "sums"
+               OpName %54 "i"
+               OpName %86 "a"
+               OpName %116 "_GLF_color"
+               OpDecorate %13 ArrayStride 16
+               OpMemberDecorate %14 0 Offset 0
+               OpDecorate %14 Block
+               OpDecorate %16 DescriptorSet 0
+               OpDecorate %16 Binding 1
+               OpDecorate %31 ArrayStride 16
+               OpMemberDecorate %32 0 Offset 0
+               OpDecorate %32 Block
+               OpDecorate %34 DescriptorSet 0
+               OpDecorate %34 Binding 0
+               OpDecorate %116 Location 0
+          %2 = OpTypeVoid
+          %3 = OpTypeFunction %2
+          %6 = OpTypeFloat 32
+          %7 = OpTypeVector %6 3
+          %8 = OpTypeMatrix %7 4
+          %9 = OpTypePointer Function %8
+         %11 = OpTypeInt 32 0
+         %12 = OpConstant %11 3
+         %13 = OpTypeArray %6 %12
+         %14 = OpTypeStruct %13
+         %15 = OpTypePointer Uniform %14
+         %16 = OpVariable %15 Uniform
+         %17 = OpTypeInt 32 1
+         %18 = OpConstant %17 0
+         %19 = OpConstant %17 1
+         %20 = OpTypePointer Uniform %6
+         %23 = OpConstant %6 1
+         %24 = OpConstant %6 0
+         %30 = OpConstant %11 4
+         %31 = OpTypeArray %17 %30
+         %32 = OpTypeStruct %31
+         %33 = OpTypePointer Uniform %32
+         %34 = OpVariable %33 Uniform
+         %35 = OpTypePointer Uniform %17
+         %42 = OpTypePointer Function %6
+         %44 = OpTypePointer Function %13
+         %53 = OpTypePointer Function %17
+         %63 = OpConstant %17 3
+         %66 = OpTypeBool
+         %87 = OpConstant %17 4
+         %88 = OpConstant %17 2
+        %114 = OpTypeVector %6 4
+        %115 = OpTypePointer Output %114
+        %116 = OpVariable %115 Output
+        %136 = OpConstantComposite %7 %24 %24 %24
+          %4 = OpFunction %2 None %3
+          %5 = OpLabel
+         %10 = OpVariable %9 Function
+         %45 = OpVariable %44 Function
+         %54 = OpVariable %53 Function
+         %86 = OpVariable %53 Function
+         %21 = OpAccessChain %20 %16 %18 %19
+         %22 = OpLoad %6 %21
+         %25 = OpCompositeConstruct %7 %22 %24 %24
+         %26 = OpCompositeConstruct %7 %24 %22 %24
+         %27 = OpCompositeConstruct %7 %24 %24 %22
+         %28 = OpCompositeConstruct %7 %24 %24 %24
+         %29 = OpCompositeConstruct %8 %25 %26 %27 %136
+               OpStore %10 %29
+         %36 = OpAccessChain %35 %34 %18 %18
+         %37 = OpLoad %17 %36
+         %38 = OpAccessChain %35 %34 %18 %18
+         %39 = OpLoad %17 %38
+         %40 = OpAccessChain %20 %16 %18 %18
+         %41 = OpLoad %6 %40
+         %43 = OpAccessChain %42 %10 %37 %39
+               OpStore %43 %41
+         %46 = OpAccessChain %20 %16 %18 %18
+         %47 = OpLoad %6 %46
+         %48 = OpAccessChain %20 %16 %18 %18
+         %49 = OpLoad %6 %48
+         %50 = OpAccessChain %20 %16 %18 %18
+         %51 = OpLoad %6 %50
+         %52 = OpCompositeConstruct %13 %47 %49 %51
+               OpStore %45 %52
+         %55 = OpAccessChain %35 %34 %18 %18
+         %56 = OpLoad %17 %55
+               OpStore %54 %56
+               OpBranch %57
+         %57 = OpLabel
+        %135 = OpPhi %17 %56 %5 %80 %60
+               OpLoopMerge %59 %60 None
+               OpBranch %61
+         %61 = OpLabel
+         %64 = OpAccessChain %35 %34 %18 %63
+         %65 = OpLoad %17 %64
+         %67 = OpSLessThan %66 %135 %65
+               OpBranchConditional %67 %58 %59
+         %58 = OpLabel
+         %68 = OpAccessChain %35 %34 %18 %18
+         %69 = OpLoad %17 %68
+         %71 = OpAccessChain %35 %34 %18 %18
+         %72 = OpLoad %17 %71
+         %73 = OpAccessChain %42 %10 %135 %72
+         %74 = OpLoad %6 %73
+         %75 = OpAccessChain %42 %45 %69
+         %76 = OpLoad %6 %75
+         %77 = OpFAdd %6 %76 %74
+         %78 = OpAccessChain %42 %45 %69
+               OpStore %78 %77
+               OpBranch %60
+         %60 = OpLabel
+         %80 = OpIAdd %17 %135 %19
+               OpStore %54 %80
+               OpBranch %57
+         %59 = OpLabel
+         %81 = OpAccessChain %35 %34 %18 %19
+         %82 = OpLoad %17 %81
+         %83 = OpIEqual %66 %82 %19
+               OpSelectionMerge %85 None
+               OpBranchConditional %83 %84 %85
+         %84 = OpLabel
+               OpStore %86 %87
+         %89 = OpAccessChain %35 %34 %18 %88
+         %90 = OpLoad %17 %89
+         %92 = OpAccessChain %35 %34 %18 %18
+         %93 = OpLoad %17 %92
+         %94 = OpAccessChain %42 %10 %87 %93
+         %95 = OpLoad %6 %94
+         %96 = OpAccessChain %42 %45 %90
+         %97 = OpLoad %6 %96
+         %98 = OpFAdd %6 %97 %95
+         %99 = OpAccessChain %42 %45 %90
+               OpStore %99 %98
+               OpBranch %85
+         %85 = OpLabel
+        %100 = OpAccessChain %35 %34 %18 %19
+        %101 = OpLoad %17 %100
+        %102 = OpAccessChain %42 %45 %101
+        %103 = OpLoad %6 %102
+        %104 = OpAccessChain %35 %34 %18 %18
+        %105 = OpLoad %17 %104
+        %106 = OpAccessChain %42 %45 %105
+        %107 = OpLoad %6 %106
+        %108 = OpFAdd %6 %103 %107
+        %109 = OpAccessChain %20 %16 %18 %88
+        %110 = OpLoad %6 %109
+        %111 = OpFOrdEqual %66 %108 %110
+               OpSelectionMerge %113 None
+               OpBranchConditional %111 %112 %130
+        %112 = OpLabel
+        %117 = OpAccessChain %35 %34 %18 %18
+        %118 = OpLoad %17 %117
+        %119 = OpConvertSToF %6 %118
+        %120 = OpAccessChain %35 %34 %18 %19
+        %121 = OpLoad %17 %120
+        %122 = OpConvertSToF %6 %121
+        %123 = OpAccessChain %35 %34 %18 %19
+        %124 = OpLoad %17 %123
+        %125 = OpConvertSToF %6 %124
+        %126 = OpAccessChain %35 %34 %18 %18
+        %127 = OpLoad %17 %126
+        %128 = OpConvertSToF %6 %127
+        %129 = OpCompositeConstruct %114 %119 %122 %125 %128
+               OpStore %116 %129
+               OpBranch %113
+        %130 = OpLabel
+        %131 = OpAccessChain %35 %34 %18 %19
+        %132 = OpLoad %17 %131
+        %133 = OpConvertSToF %6 %132
+        %134 = OpCompositeConstruct %114 %133 %133 %133 %133
+               OpStore %116 %134
+               OpBranch %113
+        %113 = OpLabel
+               OpReturn
+               OpFunctionEnd
+END
+
+# uniforms for variant
+
+# _GLF_uniform_float_values
+BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA
+ 1.0 0.0 3.0
+END
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 1 0 2 4
+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
index 0256d96..1b5110c 100644 (file)
@@ -25,6 +25,7 @@
 {      "cov-apfloat-determinant.amber",                                                                                                                        "cov-apfloat-determinant",                                                                                                                      "A fragment shader that covers a specific arbitrary precision float usage."                     },
 {      "cov-apfloat-mix-nan.amber",                                                                                                                            "cov-apfloat-mix-nan",                                                                                                                          "A fragment shader that covers a specific floating point code path"                                     },
 {      "cov-apfloat-mod-zero.amber",                                                                                                                           "cov-apfloat-mod-zero",                                                                                                                         "A fragment shader that covers a specific floating point code path"                                     },
+{      "cov-apfloat-module-small-number.amber",                                                                                                        "cov-apfloat-module-small-number",                                                                                                      "A fragment shader that covers a specific floating point code path"                                     },
 {      "cov-apfloat-negative-step-func.amber",                                                                                                         "cov-apfloat-negative-step-func",                                                                                                       "A fragment shader that covers a specific floating point code path"                                     },
 {      "cov-apfloat-sinh-negative-log2.amber",                                                                                                         "cov-apfloat-sinh-negative-log2",                                                                                                       "A fragment shader that covers a specific floating point code path"                                     },
 {      "cov-apfloat-tanh.amber",                                                                                                                                       "cov-apfloat-tanh",                                                                                                                                     "A fragment shader that covers a specific arbitrary precision float usage."                     },
@@ -95,6 +96,8 @@
 {      "cov-dead-code-unreachable-merge.amber",                                                                                                        "cov-dead-code-unreachable-merge",                                                                                                      "A fragment shader that covers a specific dead code elimination path."                          },
 {      "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-determinant-uninitialized-matrix-never-chosen.amber",                                                                      "cov-determinant-uninitialized-matrix-never-chosen",                                                            "A fragment shader that covers specific BRW code paths"                                                         },
+{      "cov-divide-matrix-transpose-by-constant.amber",                                                                                        "cov-divide-matrix-transpose-by-constant",                                                                                      "A fragment shader that covers specific VTN code path"                                                          },
 {      "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-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-bitwise-not.amber",                                                                                                                      "cov-fragcoord-bitwise-not",                                                                                                            "A fragment shader that covers specific BRW code paths"                                                         },
 {      "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-function-with-nested-loops-called-from-nested-loops.amber",                                                        "cov-function-with-nested-loops-called-from-nested-loops",                                                      "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-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-liveinterval-different-dest.amber",                                                                                                        "cov-liveinterval-different-dest",                                                                                                      "A fragment shader that covers a specific live interval code path."                                     },
 {      "cov-loop-abs-multiply-offset.amber",                                                                                                           "cov-loop-abs-multiply-offset",                                                                                                         "A fragment shader that covers specific NIR code paths"                                                         },
+{      "cov-loop-break-floor-nan-never-executed.amber",                                                                                        "cov-loop-break-floor-nan-never-executed",                                                                                      "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-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-missing-return-value-function-never-called.amber",                                                                         "cov-missing-return-value-function-never-called",                                                                       "A fragment shader that covers specific BRW 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-modf-clamp-for.amber",                                                                                                                                     "cov-modf-clamp-for",                                                                                                                           "A fragment shader that covers a specific live intervals code path"                                     },
 {      "cov-modf-integer-to-private.amber",                                                                                                            "cov-modf-integer-to-private",                                                                                                          "A fragment shader that covers a specific private to local path."                                       },
+{      "cov-modulo-zero-never-executed.amber",                                                                                                         "cov-modulo-zero-never-executed",                                                                                                       "A fragment shader that covers specific NIR code paths"                                                         },
 {      "cov-multiple-one-iteration-loops-global-counter-write-matrices.amber",                                         "cov-multiple-one-iteration-loops-global-counter-write-matrices",                                       "A fragment shader that covers specific BRW code paths"                                                         },
 {      "cov-nested-functions-accumulate-global-matrix.amber",                                                                          "cov-nested-functions-accumulate-global-matrix",                                                                        "A fragment shader that covers specific NIR code paths"                                                         },
 {      "cov-nested-loop-undefined-smoothstep-never-executed.amber",                                                            "cov-nested-loop-undefined-smoothstep-never-executed",                                                          "A fragment shader that covers specific BRW code paths"                                                         },
 {      "cov-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-read-matrix-push-constant.amber",                                                                                                          "cov-read-matrix-push-constant",                                                                                                        "A fragment shader that covers specific SPIR-V reader 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-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard.amber",        "cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard",      "Covers register coalescer, live intervals and target instr info code paths"            },
+{      "cov-reinitialize-matrix-after-undefined-value.amber",                                                                          "cov-reinitialize-matrix-after-undefined-value",                                                                        "A fragment shader that covers specific NIR code paths"                                                         },
 {      "cov-replace-copy-object.amber",                                                                                                                        "cov-replace-copy-object",                                                                                                                      "A fragment shader that covers a specific shader simplification path."                          },
 {      "cov-return-after-do-while.amber",                                                                                                                      "cov-return-after-do-while",                                                                                                            "A fragment shader that covers a specific simplify cfg code path"                                       },
 {      "cov-return-after-first-iteration.amber",                                                                                                       "cov-return-after-first-iteration",                                                                                                     "A fragment shader that covers specific BRW code paths"                                                         },
 {      "cov-return-partly-undefined-vector-from-array.amber",                                                                          "cov-return-partly-undefined-vector-from-array",                                                                        "A fragment shader that covers specific NIR code paths"                                                         },
 {      "cov-sample-texture-hundred-iterations.amber",                                                                                          "cov-sample-texture-hundred-iterations",                                                                                        "A fragment shader that covers specific NIR code paths"                                                         },
+{      "cov-sampler-as-function-argument.amber",                                                                                                       "cov-sampler-as-function-argument",                                                                                                     "A fragment shader that covers specific SPIR-V reader code paths"                                       },
 {      "cov-scaled-number-nested-loops.amber",                                                                                                         "cov-scaled-number-nested-loops",                                                                                                       "A fragment shader that covers a specific scaled number code path."                                     },
 {      "cov-selection-dag-assign-back-and-forth.amber",                                                                                        "cov-selection-dag-assign-back-and-forth",                                                                                      "A fragment shader that covers a specific selection DAG code path"                                      },
 {      "cov-selection-dag-lt-gt.amber",                                                                                                                        "cov-selection-dag-lt-gt",                                                                                                                      "A fragment shader that covers a specific selection DAG code path"                                      },
 {      "cov-target-lowering-dfdx-cos.amber",                                                                                                           "cov-target-lowering-dfdx-cos",                                                                                                         "A fragment shader that covers a specific target lowering code path."                           },
 {      "cov-target-lowering-inst-combine-compares-struct-array-clamp-function-cal.amber",                      "cov-target-lowering-inst-combine-compares-struct-array-clamp-function-cal",            "Covers target lowering and compare combining code paths"                                                       },
 {      "cov-texel-double-negation.amber",                                                                                                                      "cov-texel-double-negation",                                                                                                            "A fragment shader that covers specific NIR code paths"                                                         },
+{      "cov-transpose-multiply.amber",                                                                                                                         "cov-transpose-multiply",                                                                                                                       "A fragment shader that covers specific NIR code paths"                                                         },
+{      "cov-trunc-fract-always-zero.amber",                                                                                                            "cov-trunc-fract-always-zero",                                                                                                          "A fragment shader that covers specific NIR code paths"                                                         },
 {      "cov-types-return-in-main-never-hit.amber",                                                                                                     "cov-types-return-in-main-never-hit",                                                                                           "A fragment shader that covers a specific types optimization path."                                     },
 {      "cov-undefined-inversesqrt-reflect.amber",                                                                                                      "cov-undefined-inversesqrt-reflect",                                                                                            "A fragment shader that covers a specific APFloat code path"                                            },
 {      "cov-uniform-vector-copy.amber",                                                                                                                        "cov-uniform-vector-copy",                                                                                                                      "A fragment shader that covers specific NIR code paths"                                                         },
+{      "cov-uninitialized-values-passed-to-function-never-executed.amber",                                                     "cov-uninitialized-values-passed-to-function-never-executed",                                           "A fragment shader that covers specific NIR code paths"                                                         },
 {      "cov-unpack-unorm-mix-always-one.amber",                                                                                                        "cov-unpack-unorm-mix-always-one",                                                                                                      "A fragment shader that covers specific NIR code paths"                                                         },
+{      "cov-unused-access-past-matrix-elements.amber",                                                                                         "cov-unused-access-past-matrix-elements",                                                                                       "A fragment shader that covers specific NIR code paths"                                                         },
 {      "cov-unused-matrix-copy-inside-loop.amber",                                                                                                     "cov-unused-matrix-copy-inside-loop",                                                                                           "A fragment shader that covers specific NIR code paths"                                                         },
 {      "cov-val-cfg-case-fallthrough.amber",                                                                                                           "cov-val-cfg-case-fallthrough",                                                                                                         "A fragment shader that covers a specific shader validation path."                                      },
 {      "cov-value-inst-combine-select-value-tracking-flip-bits.amber",                                                         "cov-value-inst-combine-select-value-tracking-flip-bits",                                                       "Covers value, inst combine select and value tracking code paths"                                       },
index 0865981..c3b13a5 100644 (file)
@@ -25,6 +25,7 @@ dEQP-VK.graphicsfuzz.cov-apfloat-acos-ldexp
 dEQP-VK.graphicsfuzz.cov-apfloat-determinant
 dEQP-VK.graphicsfuzz.cov-apfloat-mix-nan
 dEQP-VK.graphicsfuzz.cov-apfloat-mod-zero
+dEQP-VK.graphicsfuzz.cov-apfloat-module-small-number
 dEQP-VK.graphicsfuzz.cov-apfloat-negative-step-func
 dEQP-VK.graphicsfuzz.cov-apfloat-sinh-negative-log2
 dEQP-VK.graphicsfuzz.cov-apfloat-tanh
@@ -95,6 +96,8 @@ dEQP-VK.graphicsfuzz.cov-dead-branch-func-return-arg
 dEQP-VK.graphicsfuzz.cov-dead-code-unreachable-merge
 dEQP-VK.graphicsfuzz.cov-derivative-uniform-vector-global-loop-count
 dEQP-VK.graphicsfuzz.cov-descending-loop-min-max-always-zero
+dEQP-VK.graphicsfuzz.cov-determinant-uninitialized-matrix-never-chosen
+dEQP-VK.graphicsfuzz.cov-divide-matrix-transpose-by-constant
 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
@@ -137,10 +140,12 @@ 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-bitwise-not
 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-function-with-nested-loops-called-from-nested-loops
 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
@@ -214,6 +219,7 @@ dEQP-VK.graphicsfuzz.cov-left-shift-array-access
 dEQP-VK.graphicsfuzz.cov-left-shift-right-shift-compare
 dEQP-VK.graphicsfuzz.cov-liveinterval-different-dest
 dEQP-VK.graphicsfuzz.cov-loop-abs-multiply-offset
+dEQP-VK.graphicsfuzz.cov-loop-break-floor-nan-never-executed
 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
@@ -238,10 +244,12 @@ 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-missing-return-value-function-never-called
 dEQP-VK.graphicsfuzz.cov-mod-acosh
 dEQP-VK.graphicsfuzz.cov-mod-uint-bits-float
 dEQP-VK.graphicsfuzz.cov-modf-clamp-for
 dEQP-VK.graphicsfuzz.cov-modf-integer-to-private
+dEQP-VK.graphicsfuzz.cov-modulo-zero-never-executed
 dEQP-VK.graphicsfuzz.cov-multiple-one-iteration-loops-global-counter-write-matrices
 dEQP-VK.graphicsfuzz.cov-nested-functions-accumulate-global-matrix
 dEQP-VK.graphicsfuzz.cov-nested-loop-undefined-smoothstep-never-executed
@@ -261,14 +269,17 @@ 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-read-matrix-push-constant
 dEQP-VK.graphicsfuzz.cov-reciprocal-var-minus-one
 dEQP-VK.graphicsfuzz.cov-reduce-load-replace-extract
 dEQP-VK.graphicsfuzz.cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard
+dEQP-VK.graphicsfuzz.cov-reinitialize-matrix-after-undefined-value
 dEQP-VK.graphicsfuzz.cov-replace-copy-object
 dEQP-VK.graphicsfuzz.cov-return-after-do-while
 dEQP-VK.graphicsfuzz.cov-return-after-first-iteration
 dEQP-VK.graphicsfuzz.cov-return-partly-undefined-vector-from-array
 dEQP-VK.graphicsfuzz.cov-sample-texture-hundred-iterations
+dEQP-VK.graphicsfuzz.cov-sampler-as-function-argument
 dEQP-VK.graphicsfuzz.cov-scaled-number-nested-loops
 dEQP-VK.graphicsfuzz.cov-selection-dag-assign-back-and-forth
 dEQP-VK.graphicsfuzz.cov-selection-dag-lt-gt
@@ -309,10 +320,14 @@ dEQP-VK.graphicsfuzz.cov-tail-duplicator-infinite-loops
 dEQP-VK.graphicsfuzz.cov-target-lowering-dfdx-cos
 dEQP-VK.graphicsfuzz.cov-target-lowering-inst-combine-compares-struct-array-clamp-function-cal
 dEQP-VK.graphicsfuzz.cov-texel-double-negation
+dEQP-VK.graphicsfuzz.cov-transpose-multiply
+dEQP-VK.graphicsfuzz.cov-trunc-fract-always-zero
 dEQP-VK.graphicsfuzz.cov-types-return-in-main-never-hit
 dEQP-VK.graphicsfuzz.cov-undefined-inversesqrt-reflect
 dEQP-VK.graphicsfuzz.cov-uniform-vector-copy
+dEQP-VK.graphicsfuzz.cov-uninitialized-values-passed-to-function-never-executed
 dEQP-VK.graphicsfuzz.cov-unpack-unorm-mix-always-one
+dEQP-VK.graphicsfuzz.cov-unused-access-past-matrix-elements
 dEQP-VK.graphicsfuzz.cov-unused-matrix-copy-inside-loop
 dEQP-VK.graphicsfuzz.cov-val-cfg-case-fallthrough
 dEQP-VK.graphicsfuzz.cov-value-inst-combine-select-value-tracking-flip-bits