From: Ari Suonpaa Date: Mon, 16 Mar 2020 12:46:58 +0000 (+0200) Subject: Added a third batch of coverage tests found by GraphicsFuzz X-Git-Tag: upstream/1.3.5~1488 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d8a4d8cf1729650b19741d88a6127fc9eea25cb9;p=platform%2Fupstream%2FVK-GL-CTS.git Added a third batch of coverage tests found by GraphicsFuzz New tests: dEQP-VK.graphicsfuzz.cov-analysis-reachable-from-many dEQP-VK.graphicsfuzz.cov-apfloat-acos-ldexp dEQP-VK.graphicsfuzz.cov-const-folding-gte-const-first dEQP-VK.graphicsfuzz.cov-fold-negate-min-int-value dEQP-VK.graphicsfuzz.cov-folding-merge-add-sub-uniform dEQP-VK.graphicsfuzz.cov-folding-rules-merge-var-sub dEQP-VK.graphicsfuzz.cov-folding-rules-mix-uniform-weight dEQP-VK.graphicsfuzz.cov-folding-rules-negate-sub dEQP-VK.graphicsfuzz.cov-folding-rules-vec-mix-uniform dEQP-VK.graphicsfuzz.cov-inc-inside-switch-and-for dEQP-VK.graphicsfuzz.cov-irbuilder-matrix-cell-uniform dEQP-VK.graphicsfuzz.cov-mem-pass-sum-struct-members dEQP-VK.graphicsfuzz.cov-mem-pass-unused-component dEQP-VK.graphicsfuzz.cov-pattern-match-signum dEQP-VK.graphicsfuzz.cov-pattern-match-single-bit dEQP-VK.graphicsfuzz.cov-replace-copy-object dEQP-VK.graphicsfuzz.cov-scaled-number-nested-loops dEQP-VK.graphicsfuzz.cov-set-vector-cos-fragcoord dEQP-VK.graphicsfuzz.cov-simplification-unused-struct dEQP-VK.graphicsfuzz.cov-single-store-elim-assume-store dEQP-VK.graphicsfuzz.cov-target-lowering-dfdx-cos dEQP-VK.graphicsfuzz.cov-val-cfg-case-fallthrough dEQP-VK.graphicsfuzz.cov-wrap-op-kill-for-loop dEQP-VK.graphicsfuzz.cov-wrap-op-kill-two-branches Components: Vulkan Change-Id: I50b2813f9d7810151dbfe23170648c32db8c397c --- diff --git a/android/cts/master/vk-master-2020-03-01.txt b/android/cts/master/vk-master-2020-03-01.txt index b317265..f907e99 100644 --- a/android/cts/master/vk-master-2020-03-01.txt +++ b/android/cts/master/vk-master-2020-03-01.txt @@ -187144,6 +187144,8 @@ dEQP-VK.graphicsfuzz.conditional-return-in-infinite-while dEQP-VK.graphicsfuzz.continue-and-merge dEQP-VK.graphicsfuzz.control-flow-in-function dEQP-VK.graphicsfuzz.control-flow-switch +dEQP-VK.graphicsfuzz.cov-analysis-reachable-from-many +dEQP-VK.graphicsfuzz.cov-apfloat-acos-ldexp dEQP-VK.graphicsfuzz.cov-apfloat-determinant dEQP-VK.graphicsfuzz.cov-apfloat-tanh dEQP-VK.graphicsfuzz.cov-basic-block-discard-in-function @@ -187155,6 +187157,7 @@ dEQP-VK.graphicsfuzz.cov-const-folding-clamp-min dEQP-VK.graphicsfuzz.cov-const-folding-clamp-vs-original dEQP-VK.graphicsfuzz.cov-const-folding-dot-condition-true dEQP-VK.graphicsfuzz.cov-const-folding-dot-determinant +dEQP-VK.graphicsfuzz.cov-const-folding-gte-const-first dEQP-VK.graphicsfuzz.cov-const-folding-min-as-loop-range dEQP-VK.graphicsfuzz.cov-const-folding-vector-shuffle dEQP-VK.graphicsfuzz.cov-constant-folding-atan-over-tanh @@ -187173,11 +187176,13 @@ dEQP-VK.graphicsfuzz.cov-fold-div-variable-by-zero dEQP-VK.graphicsfuzz.cov-fold-logical-and-const-variable dEQP-VK.graphicsfuzz.cov-fold-logical-and-constant dEQP-VK.graphicsfuzz.cov-fold-logical-or-constant +dEQP-VK.graphicsfuzz.cov-fold-negate-min-int-value dEQP-VK.graphicsfuzz.cov-fold-negate-variable dEQP-VK.graphicsfuzz.cov-fold-shift-gte32 dEQP-VK.graphicsfuzz.cov-fold-shift-right-arithmetic dEQP-VK.graphicsfuzz.cov-fold-switch-udiv dEQP-VK.graphicsfuzz.cov-folding-clamp-cmp-const-first +dEQP-VK.graphicsfuzz.cov-folding-merge-add-sub-uniform dEQP-VK.graphicsfuzz.cov-folding-rules-construct-extract dEQP-VK.graphicsfuzz.cov-folding-rules-dot-extract dEQP-VK.graphicsfuzz.cov-folding-rules-dot-no-extract @@ -187187,29 +187192,48 @@ dEQP-VK.graphicsfuzz.cov-folding-rules-merge-divs dEQP-VK.graphicsfuzz.cov-folding-rules-merge-mul-div dEQP-VK.graphicsfuzz.cov-folding-rules-merge-sub-add dEQP-VK.graphicsfuzz.cov-folding-rules-merge-sub-sub +dEQP-VK.graphicsfuzz.cov-folding-rules-merge-var-sub +dEQP-VK.graphicsfuzz.cov-folding-rules-mix-uniform-weight dEQP-VK.graphicsfuzz.cov-folding-rules-negate-div +dEQP-VK.graphicsfuzz.cov-folding-rules-negate-sub dEQP-VK.graphicsfuzz.cov-folding-rules-redundant-mix dEQP-VK.graphicsfuzz.cov-folding-rules-shuffle-extract dEQP-VK.graphicsfuzz.cov-folding-rules-shuffle-mix dEQP-VK.graphicsfuzz.cov-folding-rules-split-vector-init +dEQP-VK.graphicsfuzz.cov-folding-rules-vec-mix-uniform dEQP-VK.graphicsfuzz.cov-if-conversion-identical-branches +dEQP-VK.graphicsfuzz.cov-inc-inside-switch-and-for dEQP-VK.graphicsfuzz.cov-inline-pass-empty-block dEQP-VK.graphicsfuzz.cov-inline-pass-nested-loops dEQP-VK.graphicsfuzz.cov-inline-pass-return-in-loop dEQP-VK.graphicsfuzz.cov-inline-pass-unreachable-func dEQP-VK.graphicsfuzz.cov-intervalmap-set-stop +dEQP-VK.graphicsfuzz.cov-irbuilder-matrix-cell-uniform dEQP-VK.graphicsfuzz.cov-liveinterval-different-dest dEQP-VK.graphicsfuzz.cov-machinevaluetype-one-iter-loop +dEQP-VK.graphicsfuzz.cov-mem-pass-sum-struct-members +dEQP-VK.graphicsfuzz.cov-mem-pass-unused-component dEQP-VK.graphicsfuzz.cov-merge-return-condition-twice dEQP-VK.graphicsfuzz.cov-modf-integer-to-private +dEQP-VK.graphicsfuzz.cov-pattern-match-signum +dEQP-VK.graphicsfuzz.cov-pattern-match-single-bit dEQP-VK.graphicsfuzz.cov-reduce-load-replace-extract +dEQP-VK.graphicsfuzz.cov-replace-copy-object +dEQP-VK.graphicsfuzz.cov-scaled-number-nested-loops +dEQP-VK.graphicsfuzz.cov-set-vector-cos-fragcoord +dEQP-VK.graphicsfuzz.cov-simplification-unused-struct dEQP-VK.graphicsfuzz.cov-simplification-while-inside-for dEQP-VK.graphicsfuzz.cov-single-block-elim-self-assign +dEQP-VK.graphicsfuzz.cov-single-store-elim-assume-store dEQP-VK.graphicsfuzz.cov-ssa-rewrite-case-with-default +dEQP-VK.graphicsfuzz.cov-target-lowering-dfdx-cos dEQP-VK.graphicsfuzz.cov-types-return-in-main-never-hit +dEQP-VK.graphicsfuzz.cov-val-cfg-case-fallthrough dEQP-VK.graphicsfuzz.cov-vector-dce-inc-unused-comp dEQP-VK.graphicsfuzz.cov-vector-dce-unused-component dEQP-VK.graphicsfuzz.cov-vector-log2-cosh +dEQP-VK.graphicsfuzz.cov-wrap-op-kill-for-loop +dEQP-VK.graphicsfuzz.cov-wrap-op-kill-two-branches dEQP-VK.graphicsfuzz.dead-barriers-in-loops dEQP-VK.graphicsfuzz.dead-struct-init dEQP-VK.graphicsfuzz.disc-and-add-in-func-in-loop diff --git a/android/cts/master/vk-master.txt b/android/cts/master/vk-master.txt index c0ff573..a14996c 100644 --- a/android/cts/master/vk-master.txt +++ b/android/cts/master/vk-master.txt @@ -583558,6 +583558,8 @@ dEQP-VK.graphicsfuzz.conditional-return-in-infinite-while dEQP-VK.graphicsfuzz.continue-and-merge dEQP-VK.graphicsfuzz.control-flow-in-function dEQP-VK.graphicsfuzz.control-flow-switch +dEQP-VK.graphicsfuzz.cov-analysis-reachable-from-many +dEQP-VK.graphicsfuzz.cov-apfloat-acos-ldexp dEQP-VK.graphicsfuzz.cov-apfloat-determinant dEQP-VK.graphicsfuzz.cov-apfloat-tanh dEQP-VK.graphicsfuzz.cov-basic-block-discard-in-function @@ -583569,6 +583571,7 @@ dEQP-VK.graphicsfuzz.cov-const-folding-clamp-min dEQP-VK.graphicsfuzz.cov-const-folding-clamp-vs-original dEQP-VK.graphicsfuzz.cov-const-folding-dot-condition-true dEQP-VK.graphicsfuzz.cov-const-folding-dot-determinant +dEQP-VK.graphicsfuzz.cov-const-folding-gte-const-first dEQP-VK.graphicsfuzz.cov-const-folding-min-as-loop-range dEQP-VK.graphicsfuzz.cov-const-folding-vector-shuffle dEQP-VK.graphicsfuzz.cov-constant-folding-atan-over-tanh @@ -583587,11 +583590,13 @@ dEQP-VK.graphicsfuzz.cov-fold-div-variable-by-zero dEQP-VK.graphicsfuzz.cov-fold-logical-and-const-variable dEQP-VK.graphicsfuzz.cov-fold-logical-and-constant dEQP-VK.graphicsfuzz.cov-fold-logical-or-constant +dEQP-VK.graphicsfuzz.cov-fold-negate-min-int-value dEQP-VK.graphicsfuzz.cov-fold-negate-variable dEQP-VK.graphicsfuzz.cov-fold-shift-gte32 dEQP-VK.graphicsfuzz.cov-fold-shift-right-arithmetic dEQP-VK.graphicsfuzz.cov-fold-switch-udiv dEQP-VK.graphicsfuzz.cov-folding-clamp-cmp-const-first +dEQP-VK.graphicsfuzz.cov-folding-merge-add-sub-uniform dEQP-VK.graphicsfuzz.cov-folding-rules-construct-extract dEQP-VK.graphicsfuzz.cov-folding-rules-dot-extract dEQP-VK.graphicsfuzz.cov-folding-rules-dot-no-extract @@ -583601,29 +583606,48 @@ dEQP-VK.graphicsfuzz.cov-folding-rules-merge-divs dEQP-VK.graphicsfuzz.cov-folding-rules-merge-mul-div dEQP-VK.graphicsfuzz.cov-folding-rules-merge-sub-add dEQP-VK.graphicsfuzz.cov-folding-rules-merge-sub-sub +dEQP-VK.graphicsfuzz.cov-folding-rules-merge-var-sub +dEQP-VK.graphicsfuzz.cov-folding-rules-mix-uniform-weight dEQP-VK.graphicsfuzz.cov-folding-rules-negate-div +dEQP-VK.graphicsfuzz.cov-folding-rules-negate-sub dEQP-VK.graphicsfuzz.cov-folding-rules-redundant-mix dEQP-VK.graphicsfuzz.cov-folding-rules-shuffle-extract dEQP-VK.graphicsfuzz.cov-folding-rules-shuffle-mix dEQP-VK.graphicsfuzz.cov-folding-rules-split-vector-init +dEQP-VK.graphicsfuzz.cov-folding-rules-vec-mix-uniform dEQP-VK.graphicsfuzz.cov-if-conversion-identical-branches +dEQP-VK.graphicsfuzz.cov-inc-inside-switch-and-for dEQP-VK.graphicsfuzz.cov-inline-pass-empty-block dEQP-VK.graphicsfuzz.cov-inline-pass-nested-loops dEQP-VK.graphicsfuzz.cov-inline-pass-return-in-loop dEQP-VK.graphicsfuzz.cov-inline-pass-unreachable-func dEQP-VK.graphicsfuzz.cov-intervalmap-set-stop +dEQP-VK.graphicsfuzz.cov-irbuilder-matrix-cell-uniform dEQP-VK.graphicsfuzz.cov-liveinterval-different-dest dEQP-VK.graphicsfuzz.cov-machinevaluetype-one-iter-loop +dEQP-VK.graphicsfuzz.cov-mem-pass-sum-struct-members +dEQP-VK.graphicsfuzz.cov-mem-pass-unused-component dEQP-VK.graphicsfuzz.cov-merge-return-condition-twice dEQP-VK.graphicsfuzz.cov-modf-integer-to-private +dEQP-VK.graphicsfuzz.cov-pattern-match-signum +dEQP-VK.graphicsfuzz.cov-pattern-match-single-bit dEQP-VK.graphicsfuzz.cov-reduce-load-replace-extract +dEQP-VK.graphicsfuzz.cov-replace-copy-object +dEQP-VK.graphicsfuzz.cov-scaled-number-nested-loops +dEQP-VK.graphicsfuzz.cov-set-vector-cos-fragcoord +dEQP-VK.graphicsfuzz.cov-simplification-unused-struct dEQP-VK.graphicsfuzz.cov-simplification-while-inside-for dEQP-VK.graphicsfuzz.cov-single-block-elim-self-assign +dEQP-VK.graphicsfuzz.cov-single-store-elim-assume-store dEQP-VK.graphicsfuzz.cov-ssa-rewrite-case-with-default +dEQP-VK.graphicsfuzz.cov-target-lowering-dfdx-cos dEQP-VK.graphicsfuzz.cov-types-return-in-main-never-hit +dEQP-VK.graphicsfuzz.cov-val-cfg-case-fallthrough dEQP-VK.graphicsfuzz.cov-vector-dce-inc-unused-comp dEQP-VK.graphicsfuzz.cov-vector-dce-unused-component dEQP-VK.graphicsfuzz.cov-vector-log2-cosh +dEQP-VK.graphicsfuzz.cov-wrap-op-kill-for-loop +dEQP-VK.graphicsfuzz.cov-wrap-op-kill-two-branches dEQP-VK.graphicsfuzz.dead-barriers-in-loops dEQP-VK.graphicsfuzz.dead-struct-init dEQP-VK.graphicsfuzz.disc-and-add-in-func-in-loop diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-analysis-reachable-from-many.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-analysis-reachable-from-many.amber new file mode 100644 index 0000000..ec66f10 --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-analysis-reachable-from-many.amber @@ -0,0 +1,217 @@ +#!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 GraphicsFuzz. + +# Short description: A fragment shader that covers a specific LLVM analysis code path. + +# The test passes because shader always writes red. + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 310 es +# precision highp float; +# precision highp int; +# +# layout(location = 0) out vec4 _GLF_color; +# layout(set = 0, binding = 0) uniform buf0 +# { +# int zero; +# }; +# +# // Always returns 5.0. +# float func() +# { +# float s = 2.0; +# +# for(int i = 0; i < (zero + 1); i++) +# { +# s += 3.0; +# +# for (int j = 0; j < 10; j++) +# { +# if (zero == 1) // Always false. +# discard; +# } +# } +# +# return s; +# } +# +# void main() +# { +# vec4 c = vec4(func(), 0, 0, 1); +# +# if (func() == 5.0) +# _GLF_color = c; +# else +# _GLF_color = vec4(0); +# } +SHADER fragment variant_fragment_shader SPIRV-ASM +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 8 +; Bound: 75 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %71 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 310 + OpName %4 "main" + OpName %8 "func(" + OpName %11 "s" + OpName %15 "i" + OpName %23 "buf0" + OpMemberName %23 0 "zero" + OpName %25 "" + OpName %36 "j" + OpName %60 "c" + OpName %71 "_GLF_color" + OpMemberDecorate %23 0 Offset 0 + OpDecorate %23 Block + OpDecorate %25 DescriptorSet 0 + OpDecorate %25 Binding 0 + OpDecorate %71 Location 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeFloat 32 + %7 = OpTypeFunction %6 + %10 = OpTypePointer Function %6 + %12 = OpConstant %6 2 + %13 = OpTypeInt 32 1 + %14 = OpTypePointer Function %13 + %16 = OpConstant %13 0 + %23 = OpTypeStruct %13 + %24 = OpTypePointer Uniform %23 + %25 = OpVariable %24 Uniform + %26 = OpTypePointer Uniform %13 + %29 = OpConstant %13 1 + %31 = OpTypeBool + %33 = OpConstant %6 3 + %43 = OpConstant %13 10 + %58 = OpTypeVector %6 4 + %59 = OpTypePointer Function %58 + %62 = OpConstant %6 0 + %63 = OpConstant %6 1 + %66 = OpConstant %6 5 + %70 = OpTypePointer Output %58 + %71 = OpVariable %70 Output + %74 = OpConstantComposite %58 %62 %62 %62 %62 + %4 = OpFunction %2 None %3 + %5 = OpLabel + %60 = OpVariable %59 Function + %61 = OpFunctionCall %6 %8 + %64 = OpCompositeConstruct %58 %61 %62 %62 %63 + OpStore %60 %64 + %65 = OpFunctionCall %6 %8 + %67 = OpFOrdEqual %31 %65 %66 + OpSelectionMerge %69 None + OpBranchConditional %67 %68 %73 + %68 = OpLabel + %72 = OpLoad %58 %60 + OpStore %71 %72 + OpBranch %69 + %73 = OpLabel + OpStore %71 %74 + OpBranch %69 + %69 = OpLabel + OpReturn + OpFunctionEnd + %8 = OpFunction %6 None %7 + %9 = OpLabel + %11 = OpVariable %10 Function + %15 = OpVariable %14 Function + %36 = OpVariable %14 Function + OpStore %11 %12 + OpStore %15 %16 + OpBranch %17 + %17 = OpLabel + OpLoopMerge %19 %20 None + OpBranch %21 + %21 = OpLabel + %22 = OpLoad %13 %15 + %27 = OpAccessChain %26 %25 %16 + %28 = OpLoad %13 %27 + %30 = OpIAdd %13 %28 %29 + %32 = OpSLessThan %31 %22 %30 + OpBranchConditional %32 %18 %19 + %18 = OpLabel + %34 = OpLoad %6 %11 + %35 = OpFAdd %6 %34 %33 + OpStore %11 %35 + OpStore %36 %16 + OpBranch %37 + %37 = OpLabel + OpLoopMerge %39 %40 None + OpBranch %41 + %41 = OpLabel + %42 = OpLoad %13 %36 + %44 = OpSLessThan %31 %42 %43 + OpBranchConditional %44 %38 %39 + %38 = OpLabel + %45 = OpAccessChain %26 %25 %16 + %46 = OpLoad %13 %45 + %47 = OpIEqual %31 %46 %29 + OpSelectionMerge %49 None + OpBranchConditional %47 %48 %49 + %48 = OpLabel + OpKill + %49 = OpLabel + OpBranch %40 + %40 = OpLabel + %51 = OpLoad %13 %36 + %52 = OpIAdd %13 %51 %29 + OpStore %36 %52 + OpBranch %37 + %39 = OpLabel + OpBranch %20 + %20 = OpLabel + %53 = OpLoad %13 %15 + %54 = OpIAdd %13 %53 %29 + OpStore %15 %54 + OpBranch %17 + %19 = OpLabel + %55 = OpLoad %6 %11 + OpReturnValue %55 + OpFunctionEnd +END + +# uniforms for variant + +# zero +BUFFER variant_zero DATA_TYPE int32 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_zero 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-apfloat-acos-ldexp.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-apfloat-acos-ldexp.amber new file mode 100644 index 0000000..51f4758 --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-apfloat-acos-ldexp.amber @@ -0,0 +1,148 @@ +#!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 GraphicsFuzz. + +# Short description: A fragment shader that covers a specific AP float code path. + +# The test passes because shader always writes red. + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 310 es +# precision highp float; +# precision highp int; +# +# layout(location = 0) out vec4 _GLF_color; +# layout(set = 0, binding = 0) uniform buf0 +# { +# int two; +# }; +# +# void main() +# { +# vec2 v = acos(ldexp(vec2(0.1), ivec2(two, 3))); +# float d = distance(v, vec2(1.15928, 0.64350)); +# +# if (d < 0.01) +# _GLF_color = vec4(1, 0, 0, 1); +# else +# _GLF_color = vec4(0); +# } +SHADER fragment variant_fragment_shader SPIRV-ASM +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 8 +; Bound: 46 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %40 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 310 + OpName %4 "main" + OpName %9 "v" + OpName %13 "buf0" + OpMemberName %13 0 "two" + OpName %15 "" + OpName %26 "d" + OpName %40 "_GLF_color" + OpMemberDecorate %13 0 Offset 0 + OpDecorate %13 Block + OpDecorate %15 DescriptorSet 0 + OpDecorate %15 Binding 0 + OpDecorate %40 Location 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeFloat 32 + %7 = OpTypeVector %6 2 + %8 = OpTypePointer Function %7 + %10 = OpConstant %6 0.100000001 + %11 = OpConstantComposite %7 %10 %10 + %12 = OpTypeInt 32 1 + %13 = OpTypeStruct %12 + %14 = OpTypePointer Uniform %13 + %15 = OpVariable %14 Uniform + %16 = OpConstant %12 0 + %17 = OpTypePointer Uniform %12 + %20 = OpConstant %12 3 + %21 = OpTypeVector %12 2 + %25 = OpTypePointer Function %6 + %28 = OpConstant %6 1.15927994 + %29 = OpConstant %6 0.64349997 + %30 = OpConstantComposite %7 %28 %29 + %33 = OpConstant %6 0.00999999978 + %34 = OpTypeBool + %38 = OpTypeVector %6 4 + %39 = OpTypePointer Output %38 + %40 = OpVariable %39 Output + %41 = OpConstant %6 1 + %42 = OpConstant %6 0 + %43 = OpConstantComposite %38 %41 %42 %42 %41 + %45 = OpConstantComposite %38 %42 %42 %42 %42 + %4 = OpFunction %2 None %3 + %5 = OpLabel + %9 = OpVariable %8 Function + %26 = OpVariable %25 Function + %18 = OpAccessChain %17 %15 %16 + %19 = OpLoad %12 %18 + %22 = OpCompositeConstruct %21 %19 %20 + %23 = OpExtInst %7 %1 Ldexp %11 %22 + %24 = OpExtInst %7 %1 Acos %23 + OpStore %9 %24 + %27 = OpLoad %7 %9 + %31 = OpExtInst %6 %1 Distance %27 %30 + OpStore %26 %31 + %32 = OpLoad %6 %26 + %35 = OpFOrdLessThan %34 %32 %33 + OpSelectionMerge %37 None + OpBranchConditional %35 %36 %44 + %36 = OpLabel + OpStore %40 %43 + OpBranch %37 + %44 = OpLabel + OpStore %40 %45 + OpBranch %37 + %37 = OpLabel + OpReturn + OpFunctionEnd +END + +# uniforms for variant + +# two +BUFFER variant_two DATA_TYPE int32 DATA + 2 +END + +BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM + +PIPELINE graphics variant_pipeline + ATTACH variant_vertex_shader + ATTACH variant_fragment_shader + FRAMEBUFFER_SIZE 256 256 + BIND BUFFER variant_framebuffer AS color LOCATION 0 + BIND BUFFER variant_two 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-const-folding-gte-const-first.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-const-folding-gte-const-first.amber new file mode 100644 index 0000000..f4a8ff0 --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-const-folding-gte-const-first.amber @@ -0,0 +1,134 @@ +#!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 GraphicsFuzz. + +# Short description: A fragment shader that covers a specific constant folding path + +# The test passes because shader always writes red. + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 310 es +# precision highp float; +# +# layout(location = 0) out vec4 _GLF_color; +# layout(set = 0, binding = 0) uniform buf0 +# { +# float one; +# }; +# +# void main() +# { +# if(3.0 >= clamp(gl_FragCoord.x, 1.0, 2.0 + one)) +# _GLF_color = vec4(1, 0, 0, 1); +# else +# _GLF_color = vec4(0); +# } +SHADER fragment variant_fragment_shader SPIRV-ASM +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 8 +; Bound: 38 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %10 %33 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 310 + OpName %4 "main" + OpName %10 "gl_FragCoord" + OpName %18 "buf0" + OpMemberName %18 0 "one" + OpName %20 "" + OpName %33 "_GLF_color" + OpDecorate %10 BuiltIn FragCoord + OpMemberDecorate %18 0 Offset 0 + OpDecorate %18 Block + OpDecorate %20 DescriptorSet 0 + OpDecorate %20 Binding 0 + OpDecorate %33 Location 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeFloat 32 + %7 = OpConstant %6 3 + %8 = OpTypeVector %6 4 + %9 = OpTypePointer Input %8 + %10 = OpVariable %9 Input + %11 = OpTypeInt 32 0 + %12 = OpConstant %11 0 + %13 = OpTypePointer Input %6 + %16 = OpConstant %6 1 + %17 = OpConstant %6 2 + %18 = OpTypeStruct %6 + %19 = OpTypePointer Uniform %18 + %20 = OpVariable %19 Uniform + %21 = OpTypeInt 32 1 + %22 = OpConstant %21 0 + %23 = OpTypePointer Uniform %6 + %28 = OpTypeBool + %32 = OpTypePointer Output %8 + %33 = OpVariable %32 Output + %34 = OpConstant %6 0 + %35 = OpConstantComposite %8 %16 %34 %34 %16 + %37 = OpConstantComposite %8 %34 %34 %34 %34 + %4 = OpFunction %2 None %3 + %5 = OpLabel + %14 = OpAccessChain %13 %10 %12 + %15 = OpLoad %6 %14 + %24 = OpAccessChain %23 %20 %22 + %25 = OpLoad %6 %24 + %26 = OpFAdd %6 %17 %25 + %27 = OpExtInst %6 %1 FClamp %15 %16 %26 + %29 = OpFOrdGreaterThanEqual %28 %7 %27 + OpSelectionMerge %31 None + OpBranchConditional %29 %30 %36 + %30 = OpLabel + OpStore %33 %35 + OpBranch %31 + %36 = OpLabel + OpStore %33 %37 + OpBranch %31 + %31 = OpLabel + OpReturn + OpFunctionEnd +END + +# uniforms for variant + +# one +BUFFER variant_one DATA_TYPE float 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 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-fold-negate-min-int-value.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-fold-negate-min-int-value.amber new file mode 100644 index 0000000..ec63002 --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-fold-negate-min-int-value.amber @@ -0,0 +1,139 @@ +#!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 GraphicsFuzz. + +# Short description: A fragment shader that covers a specific instruction folding path. + +# The test passes because shader always writes red. + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 310 es +# precision highp float; +# precision highp int; +# +# layout(location = 0) out vec4 _GLF_color; +# +# layout(set = 0, binding = 0) uniform buf0 +# { +# int minusOne; +# }; +# +# void main() +# { +# int minValue = -2147483648; +# int negMinValue = -minValue; +# +# if (negMinValue == minValue * minusOne) +# _GLF_color = vec4(1, 0, 0, 1); +# else +# _GLF_color = vec4(0); +# } +SHADER fragment variant_fragment_shader SPIRV-ASM +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 8 +; Bound: 36 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %30 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 310 + OpName %4 "main" + OpName %8 "minValue" + OpName %10 "negMinValue" + OpName %15 "buf0" + OpMemberName %15 0 "minusOne" + OpName %17 "" + OpName %30 "_GLF_color" + OpMemberDecorate %15 0 Offset 0 + OpDecorate %15 Block + OpDecorate %17 DescriptorSet 0 + OpDecorate %17 Binding 0 + OpDecorate %30 Location 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeInt 32 1 + %7 = OpTypePointer Function %6 + %9 = OpConstant %6 -2147483648 + %15 = OpTypeStruct %6 + %16 = OpTypePointer Uniform %15 + %17 = OpVariable %16 Uniform + %18 = OpConstant %6 0 + %19 = OpTypePointer Uniform %6 + %23 = OpTypeBool + %27 = OpTypeFloat 32 + %28 = OpTypeVector %27 4 + %29 = OpTypePointer Output %28 + %30 = OpVariable %29 Output + %31 = OpConstant %27 1 + %32 = OpConstant %27 0 + %33 = OpConstantComposite %28 %31 %32 %32 %31 + %35 = OpConstantComposite %28 %32 %32 %32 %32 + %4 = OpFunction %2 None %3 + %5 = OpLabel + %8 = OpVariable %7 Function + %10 = OpVariable %7 Function + OpStore %8 %9 + %11 = OpLoad %6 %8 + %12 = OpSNegate %6 %11 + OpStore %10 %12 + %13 = OpLoad %6 %10 + %14 = OpLoad %6 %8 + %20 = OpAccessChain %19 %17 %18 + %21 = OpLoad %6 %20 + %22 = OpIMul %6 %14 %21 + %24 = OpIEqual %23 %13 %22 + OpSelectionMerge %26 None + OpBranchConditional %24 %25 %34 + %25 = OpLabel + OpStore %30 %33 + OpBranch %26 + %34 = OpLabel + OpStore %30 %35 + OpBranch %26 + %26 = OpLabel + OpReturn + OpFunctionEnd +END + +# uniforms for variant + +# minusOne +BUFFER variant_minusOne DATA_TYPE int32 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_minusOne 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-folding-merge-add-sub-uniform.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-folding-merge-add-sub-uniform.amber new file mode 100644 index 0000000..b8177d9 --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-folding-merge-add-sub-uniform.amber @@ -0,0 +1,127 @@ +#!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 GraphicsFuzz. + +# Short description: A fragment shader that covers a specific instruction folding path. + +# The test passes because shader always writes red. + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 310 es +# precision highp float; +# precision highp int; +# +# layout(location = 0) out vec4 _GLF_color; +# +# layout(set = 0, binding = 0) uniform buf0 +# { +# int one; +# }; +# +# void main() +# { +# if (1 + (3 - one) == 3) +# _GLF_color = vec4(1, 0, 0, 1); +# else +# _GLF_color = vec4(0); +# } +SHADER fragment variant_fragment_shader SPIRV-ASM +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 8 +; Bound: 31 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %25 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 310 + OpName %4 "main" + OpName %9 "buf0" + OpMemberName %9 0 "one" + OpName %11 "" + OpName %25 "_GLF_color" + OpMemberDecorate %9 0 Offset 0 + OpDecorate %9 Block + OpDecorate %11 DescriptorSet 0 + OpDecorate %11 Binding 0 + OpDecorate %25 Location 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeInt 32 1 + %7 = OpConstant %6 1 + %8 = OpConstant %6 3 + %9 = OpTypeStruct %6 + %10 = OpTypePointer Uniform %9 + %11 = OpVariable %10 Uniform + %12 = OpConstant %6 0 + %13 = OpTypePointer Uniform %6 + %18 = OpTypeBool + %22 = OpTypeFloat 32 + %23 = OpTypeVector %22 4 + %24 = OpTypePointer Output %23 + %25 = OpVariable %24 Output + %26 = OpConstant %22 1 + %27 = OpConstant %22 0 + %28 = OpConstantComposite %23 %26 %27 %27 %26 + %30 = OpConstantComposite %23 %27 %27 %27 %27 + %4 = OpFunction %2 None %3 + %5 = OpLabel + %14 = OpAccessChain %13 %11 %12 + %15 = OpLoad %6 %14 + %16 = OpISub %6 %8 %15 + %17 = OpIAdd %6 %7 %16 + %19 = OpIEqual %18 %17 %8 + OpSelectionMerge %21 None + OpBranchConditional %19 %20 %29 + %20 = OpLabel + OpStore %25 %28 + OpBranch %21 + %29 = OpLabel + OpStore %25 %30 + OpBranch %21 + %21 = OpLabel + OpReturn + OpFunctionEnd +END + +# uniforms for variant + +# one +BUFFER variant_one DATA_TYPE int32 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-folding-rules-merge-var-sub.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-folding-rules-merge-var-sub.amber new file mode 100644 index 0000000..054a1d9 --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-folding-rules-merge-var-sub.amber @@ -0,0 +1,156 @@ +#!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 GraphicsFuzz. + +# Short description: A fragment shader that covers a specific instruction folding path. + +# The test passes because shader always writes red. + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 310 es +# precision highp float; +# precision highp int; +# +# layout(location = 0) out vec4 _GLF_color; +# layout(set = 0, binding = 0) uniform buf0 +# { +# int five; +# }; +# +# void main() +# { +# int i = five; +# +# while(i > 0) +# { +# i--; +# i--; +# } +# +# if (i == -1) +# _GLF_color = vec4(1, 0, 0, 1); +# else +# _GLF_color = vec4(0); +# } +SHADER fragment variant_fragment_shader SPIRV-ASM +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 8 +; Bound: 43 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %37 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 310 + OpName %4 "main" + OpName %8 "i" + OpName %9 "buf0" + OpMemberName %9 0 "five" + OpName %11 "" + OpName %37 "_GLF_color" + OpMemberDecorate %9 0 Offset 0 + OpDecorate %9 Block + OpDecorate %11 DescriptorSet 0 + OpDecorate %11 Binding 0 + OpDecorate %37 Location 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeInt 32 1 + %7 = OpTypePointer Function %6 + %9 = OpTypeStruct %6 + %10 = OpTypePointer Uniform %9 + %11 = OpVariable %10 Uniform + %12 = OpConstant %6 0 + %13 = OpTypePointer Uniform %6 + %22 = OpTypeBool + %25 = OpConstant %6 1 + %30 = OpConstant %6 -1 + %34 = OpTypeFloat 32 + %35 = OpTypeVector %34 4 + %36 = OpTypePointer Output %35 + %37 = OpVariable %36 Output + %38 = OpConstant %34 1 + %39 = OpConstant %34 0 + %40 = OpConstantComposite %35 %38 %39 %39 %38 + %42 = OpConstantComposite %35 %39 %39 %39 %39 + %4 = OpFunction %2 None %3 + %5 = OpLabel + %8 = OpVariable %7 Function + %14 = OpAccessChain %13 %11 %12 + %15 = OpLoad %6 %14 + OpStore %8 %15 + OpBranch %16 + %16 = OpLabel + OpLoopMerge %18 %19 None + OpBranch %20 + %20 = OpLabel + %21 = OpLoad %6 %8 + %23 = OpSGreaterThan %22 %21 %12 + OpBranchConditional %23 %17 %18 + %17 = OpLabel + %24 = OpLoad %6 %8 + %26 = OpISub %6 %24 %25 + OpStore %8 %26 + %27 = OpLoad %6 %8 + %28 = OpISub %6 %27 %25 + OpStore %8 %28 + OpBranch %19 + %19 = OpLabel + OpBranch %16 + %18 = OpLabel + %29 = OpLoad %6 %8 + %31 = OpIEqual %22 %29 %30 + OpSelectionMerge %33 None + OpBranchConditional %31 %32 %41 + %32 = OpLabel + OpStore %37 %40 + OpBranch %33 + %41 = OpLabel + OpStore %37 %42 + OpBranch %33 + %33 = OpLabel + OpReturn + OpFunctionEnd +END + +# uniforms for variant + +# five +BUFFER variant_five DATA_TYPE int32 DATA + 5 +END + +BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM + +PIPELINE graphics variant_pipeline + ATTACH variant_vertex_shader + ATTACH variant_fragment_shader + FRAMEBUFFER_SIZE 256 256 + BIND BUFFER variant_framebuffer AS color LOCATION 0 + BIND BUFFER variant_five 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-folding-rules-mix-uniform-weight.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-folding-rules-mix-uniform-weight.amber new file mode 100644 index 0000000..dff4137 --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-folding-rules-mix-uniform-weight.amber @@ -0,0 +1,152 @@ +#!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 GraphicsFuzz. + +# Short description: A fragment shader that covers a specific instruction folding path. + +# The test passes because shader always writes red. + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 310 es +# precision highp float; +# +# layout(location = 0) out vec4 _GLF_color; +# layout(set = 0, binding = 0) uniform buf0 +# { +# float one; +# }; +# +# void main() +# { +# // This selects the second vector because one == 1. +# vec3 v = mix(vec3(5, 8, -12.2), vec3(1, 4.9, -2.1), one); +# +# float d = distance(v, vec3(1, 4.9, -2.1)); +# +# if (d < 0.1) +# _GLF_color = vec4(v.x, 0, 0, 1); +# else +# _GLF_color = vec4(0); +# } +SHADER fragment variant_fragment_shader SPIRV-ASM +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 8 +; Bound: 49 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %40 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 310 + OpName %4 "main" + OpName %9 "v" + OpName %18 "buf0" + OpMemberName %18 0 "one" + OpName %20 "" + OpName %29 "d" + OpName %40 "_GLF_color" + OpMemberDecorate %18 0 Offset 0 + OpDecorate %18 Block + OpDecorate %20 DescriptorSet 0 + OpDecorate %20 Binding 0 + OpDecorate %40 Location 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeFloat 32 + %7 = OpTypeVector %6 3 + %8 = OpTypePointer Function %7 + %10 = OpConstant %6 5 + %11 = OpConstant %6 8 + %12 = OpConstant %6 -12.1999998 + %13 = OpConstantComposite %7 %10 %11 %12 + %14 = OpConstant %6 1 + %15 = OpConstant %6 4.9000001 + %16 = OpConstant %6 -2.0999999 + %17 = OpConstantComposite %7 %14 %15 %16 + %18 = OpTypeStruct %6 + %19 = OpTypePointer Uniform %18 + %20 = OpVariable %19 Uniform + %21 = OpTypeInt 32 1 + %22 = OpConstant %21 0 + %23 = OpTypePointer Uniform %6 + %28 = OpTypePointer Function %6 + %33 = OpConstant %6 0.100000001 + %34 = OpTypeBool + %38 = OpTypeVector %6 4 + %39 = OpTypePointer Output %38 + %40 = OpVariable %39 Output + %41 = OpTypeInt 32 0 + %42 = OpConstant %41 0 + %45 = OpConstant %6 0 + %48 = OpConstantComposite %38 %45 %45 %45 %45 + %4 = OpFunction %2 None %3 + %5 = OpLabel + %9 = OpVariable %8 Function + %29 = OpVariable %28 Function + %24 = OpAccessChain %23 %20 %22 + %25 = OpLoad %6 %24 + %26 = OpCompositeConstruct %7 %25 %25 %25 + %27 = OpExtInst %7 %1 FMix %13 %17 %26 + OpStore %9 %27 + %30 = OpLoad %7 %9 + %31 = OpExtInst %6 %1 Distance %30 %17 + OpStore %29 %31 + %32 = OpLoad %6 %29 + %35 = OpFOrdLessThan %34 %32 %33 + OpSelectionMerge %37 None + OpBranchConditional %35 %36 %47 + %36 = OpLabel + %43 = OpAccessChain %28 %9 %42 + %44 = OpLoad %6 %43 + %46 = OpCompositeConstruct %38 %44 %45 %45 %14 + OpStore %40 %46 + OpBranch %37 + %47 = OpLabel + OpStore %40 %48 + OpBranch %37 + %37 = OpLabel + OpReturn + OpFunctionEnd +END + +# uniforms for variant + +# one +BUFFER variant_one DATA_TYPE float 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 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-folding-rules-negate-sub.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-folding-rules-negate-sub.amber new file mode 100644 index 0000000..fe5c90a --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-folding-rules-negate-sub.amber @@ -0,0 +1,134 @@ +#!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 GraphicsFuzz. + +# Short description: A fragment shader that covers a specific instruction folding path. + +# The test passes because shader always writes red. + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 310 es +# precision highp float; +# precision highp int; +# +# layout(location = 0) out vec4 _GLF_color; +# +# layout(set = 0, binding = 0) uniform buf0 +# { +# int one; +# }; +# +# void main() +# { +# int x = -(5 - one); +# +# if (x == -4) +# _GLF_color = vec4(1, 0, 0, 1); +# else +# _GLF_color = vec4(0); +# } +SHADER fragment variant_fragment_shader SPIRV-ASM +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 8 +; Bound: 34 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %28 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 310 + OpName %4 "main" + OpName %8 "x" + OpName %10 "buf0" + OpMemberName %10 0 "one" + OpName %12 "" + OpName %28 "_GLF_color" + OpMemberDecorate %10 0 Offset 0 + OpDecorate %10 Block + OpDecorate %12 DescriptorSet 0 + OpDecorate %12 Binding 0 + OpDecorate %28 Location 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeInt 32 1 + %7 = OpTypePointer Function %6 + %9 = OpConstant %6 5 + %10 = OpTypeStruct %6 + %11 = OpTypePointer Uniform %10 + %12 = OpVariable %11 Uniform + %13 = OpConstant %6 0 + %14 = OpTypePointer Uniform %6 + %20 = OpConstant %6 -4 + %21 = OpTypeBool + %25 = OpTypeFloat 32 + %26 = OpTypeVector %25 4 + %27 = OpTypePointer Output %26 + %28 = OpVariable %27 Output + %29 = OpConstant %25 1 + %30 = OpConstant %25 0 + %31 = OpConstantComposite %26 %29 %30 %30 %29 + %33 = OpConstantComposite %26 %30 %30 %30 %30 + %4 = OpFunction %2 None %3 + %5 = OpLabel + %8 = OpVariable %7 Function + %15 = OpAccessChain %14 %12 %13 + %16 = OpLoad %6 %15 + %17 = OpISub %6 %9 %16 + %18 = OpSNegate %6 %17 + OpStore %8 %18 + %19 = OpLoad %6 %8 + %22 = OpIEqual %21 %19 %20 + OpSelectionMerge %24 None + OpBranchConditional %22 %23 %32 + %23 = OpLabel + OpStore %28 %31 + OpBranch %24 + %32 = OpLabel + OpStore %28 %33 + OpBranch %24 + %24 = OpLabel + OpReturn + OpFunctionEnd +END + +# uniforms for variant + +# one +BUFFER variant_one DATA_TYPE int32 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-folding-rules-vec-mix-uniform.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-folding-rules-vec-mix-uniform.amber new file mode 100644 index 0000000..6cd9341 --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-folding-rules-vec-mix-uniform.amber @@ -0,0 +1,155 @@ +#!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 GraphicsFuzz. + +# Short description: A fragment shader that covers a specific instruction folding path. + +# The test passes because shader always writes red. + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 310 es +# precision highp float; +# +# layout(location = 0) out vec4 _GLF_color; +# layout(set = 0, binding = 0) uniform buf0 +# { +# vec2 zeroOne; +# }; +# +# void main() +# { +# // Since zeroOne is (0, 1) the results will be (2, 5). +# vec2 v = mix(vec2(2, 3), vec2(4, 5), zeroOne); +# float d = distance(v, vec2(2, 5)); +# +# if (d < 0.1) +# _GLF_color = vec4(v.x - 1.0, v.y - 5.0, 0, 1); +# else +# _GLF_color = vec4(0); +# } +SHADER fragment variant_fragment_shader SPIRV-ASM +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 8 +; Bound: 53 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %38 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 310 + OpName %4 "main" + OpName %9 "v" + OpName %16 "buf0" + OpMemberName %16 0 "zeroOne" + OpName %18 "" + OpName %26 "d" + OpName %38 "_GLF_color" + OpMemberDecorate %16 0 Offset 0 + OpDecorate %16 Block + OpDecorate %18 DescriptorSet 0 + OpDecorate %18 Binding 0 + OpDecorate %38 Location 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeFloat 32 + %7 = OpTypeVector %6 2 + %8 = OpTypePointer Function %7 + %10 = OpConstant %6 2 + %11 = OpConstant %6 3 + %12 = OpConstantComposite %7 %10 %11 + %13 = OpConstant %6 4 + %14 = OpConstant %6 5 + %15 = OpConstantComposite %7 %13 %14 + %16 = OpTypeStruct %7 + %17 = OpTypePointer Uniform %16 + %18 = OpVariable %17 Uniform + %19 = OpTypeInt 32 1 + %20 = OpConstant %19 0 + %21 = OpTypePointer Uniform %7 + %25 = OpTypePointer Function %6 + %28 = OpConstantComposite %7 %10 %14 + %31 = OpConstant %6 0.100000001 + %32 = OpTypeBool + %36 = OpTypeVector %6 4 + %37 = OpTypePointer Output %36 + %38 = OpVariable %37 Output + %39 = OpTypeInt 32 0 + %40 = OpConstant %39 0 + %43 = OpConstant %6 1 + %45 = OpConstant %39 1 + %49 = OpConstant %6 0 + %52 = OpConstantComposite %36 %49 %49 %49 %49 + %4 = OpFunction %2 None %3 + %5 = OpLabel + %9 = OpVariable %8 Function + %26 = OpVariable %25 Function + %22 = OpAccessChain %21 %18 %20 + %23 = OpLoad %7 %22 + %24 = OpExtInst %7 %1 FMix %12 %15 %23 + OpStore %9 %24 + %27 = OpLoad %7 %9 + %29 = OpExtInst %6 %1 Distance %27 %28 + OpStore %26 %29 + %30 = OpLoad %6 %26 + %33 = OpFOrdLessThan %32 %30 %31 + OpSelectionMerge %35 None + OpBranchConditional %33 %34 %51 + %34 = OpLabel + %41 = OpAccessChain %25 %9 %40 + %42 = OpLoad %6 %41 + %44 = OpFSub %6 %42 %43 + %46 = OpAccessChain %25 %9 %45 + %47 = OpLoad %6 %46 + %48 = OpFSub %6 %47 %14 + %50 = OpCompositeConstruct %36 %44 %48 %49 %43 + OpStore %38 %50 + OpBranch %35 + %51 = OpLabel + OpStore %38 %52 + OpBranch %35 + %35 = OpLabel + OpReturn + OpFunctionEnd +END + +# uniforms for variant + +# zeroOne +BUFFER variant_zeroOne DATA_TYPE vec2 DATA + 0.0 1.0 +END + +BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM + +PIPELINE graphics variant_pipeline + ATTACH variant_vertex_shader + ATTACH variant_fragment_shader + FRAMEBUFFER_SIZE 256 256 + BIND BUFFER variant_framebuffer AS color LOCATION 0 + BIND BUFFER variant_zeroOne 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-inc-inside-switch-and-for.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-inc-inside-switch-and-for.amber new file mode 100644 index 0000000..cb458de --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-inc-inside-switch-and-for.amber @@ -0,0 +1,172 @@ +#!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 GraphicsFuzz. + +# Short description: A fragment shader that covers a specific LLVM analysis code path. + +# The test passes because shader always writes red. + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 310 es +# precision highp float; +# precision highp int; +# +# layout(location = 0) out vec4 _GLF_color; +# +# layout(set = 0, binding = 0) uniform buf0 +# { +# int three; +# }; +# +# void main() +# { +# int a = 0; +# for(int i = 0; i < 7 + three; i++) +# { +# switch(i) +# { +# case 7: +# case 8: +# a++; +# break; +# } +# } +# +# if (a == 2) // Always true. +# _GLF_color = vec4(1, 0, 0, 1); +# else +# _GLF_color = vec4(0); +# } +SHADER fragment variant_fragment_shader SPIRV-ASM +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 8 +; Bound: 51 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %45 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 310 + OpName %4 "main" + OpName %8 "a" + OpName %10 "i" + OpName %18 "buf0" + OpMemberName %18 0 "three" + OpName %20 "" + OpName %45 "_GLF_color" + OpMemberDecorate %18 0 Offset 0 + OpDecorate %18 Block + OpDecorate %20 DescriptorSet 0 + OpDecorate %20 Binding 0 + OpDecorate %45 Location 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeInt 32 1 + %7 = OpTypePointer Function %6 + %9 = OpConstant %6 0 + %17 = OpConstant %6 7 + %18 = OpTypeStruct %6 + %19 = OpTypePointer Uniform %18 + %20 = OpVariable %19 Uniform + %21 = OpTypePointer Uniform %6 + %25 = OpTypeBool + %31 = OpConstant %6 1 + %38 = OpConstant %6 2 + %42 = OpTypeFloat 32 + %43 = OpTypeVector %42 4 + %44 = OpTypePointer Output %43 + %45 = OpVariable %44 Output + %46 = OpConstant %42 1 + %47 = OpConstant %42 0 + %48 = OpConstantComposite %43 %46 %47 %47 %46 + %50 = OpConstantComposite %43 %47 %47 %47 %47 + %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 + %22 = OpAccessChain %21 %20 %9 + %23 = OpLoad %6 %22 + %24 = OpIAdd %6 %17 %23 + %26 = OpSLessThan %25 %16 %24 + OpBranchConditional %26 %12 %13 + %12 = OpLabel + %27 = OpLoad %6 %10 + OpSelectionMerge %29 None + OpSwitch %27 %29 7 %28 8 %28 + %28 = OpLabel + %30 = OpLoad %6 %8 + %32 = OpIAdd %6 %30 %31 + OpStore %8 %32 + OpBranch %29 + %29 = OpLabel + OpBranch %14 + %14 = OpLabel + %35 = OpLoad %6 %10 + %36 = OpIAdd %6 %35 %31 + OpStore %10 %36 + OpBranch %11 + %13 = OpLabel + %37 = OpLoad %6 %8 + %39 = OpIEqual %25 %37 %38 + OpSelectionMerge %41 None + OpBranchConditional %39 %40 %49 + %40 = OpLabel + OpStore %45 %48 + OpBranch %41 + %49 = OpLabel + OpStore %45 %50 + OpBranch %41 + %41 = OpLabel + OpReturn + OpFunctionEnd +END + +# uniforms for variant + +# three +BUFFER variant_three DATA_TYPE int32 DATA + 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_three 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-irbuilder-matrix-cell-uniform.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-irbuilder-matrix-cell-uniform.amber new file mode 100644 index 0000000..bf0ca86 --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-irbuilder-matrix-cell-uniform.amber @@ -0,0 +1,141 @@ +#!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 GraphicsFuzz. + +# Short description: A fragment shader that covers a specific IR builder path. + +# The test passes because shader always writes red. + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 310 es +# precision highp float; +# +# layout(location = 0) out vec4 _GLF_color; +# +# layout(set = 0, binding = 0) uniform buf0 +# { +# float one; +# }; +# +# void main() +# { +# mat4 m = mat4(1.0, 1.0, 0.0, 1.0, +# 0.0, 0.0, 1.0, 1.0, +# 0.0, 0.0, one, 0.0, +# 0.0, 0.0, 0.0, 0.0); +# +# if(abs(determinant(m)) < 0.01) +# _GLF_color = vec4(1, 0, 0, 1); +# else +# _GLF_color = vec4(0); +# } +SHADER fragment variant_fragment_shader SPIRV-ASM +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 8 +; Bound: 39 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %35 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 310 + OpName %4 "main" + OpName %10 "m" + OpName %13 "buf0" + OpMemberName %13 0 "one" + OpName %15 "" + OpName %35 "_GLF_color" + OpMemberDecorate %13 0 Offset 0 + OpDecorate %13 Block + OpDecorate %15 DescriptorSet 0 + OpDecorate %15 Binding 0 + OpDecorate %35 Location 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeFloat 32 + %7 = OpTypeVector %6 4 + %8 = OpTypeMatrix %7 4 + %9 = OpTypePointer Function %8 + %11 = OpConstant %6 1 + %12 = OpConstant %6 0 + %13 = OpTypeStruct %6 + %14 = OpTypePointer Uniform %13 + %15 = OpVariable %14 Uniform + %16 = OpTypeInt 32 1 + %17 = OpConstant %16 0 + %18 = OpTypePointer Uniform %6 + %29 = OpConstant %6 0.00999999978 + %30 = OpTypeBool + %34 = OpTypePointer Output %7 + %35 = OpVariable %34 Output + %36 = OpConstantComposite %7 %11 %12 %12 %11 + %38 = OpConstantComposite %7 %12 %12 %12 %12 + %4 = OpFunction %2 None %3 + %5 = OpLabel + %10 = OpVariable %9 Function + %19 = OpAccessChain %18 %15 %17 + %20 = OpLoad %6 %19 + %21 = OpCompositeConstruct %7 %11 %11 %12 %11 + %22 = OpCompositeConstruct %7 %12 %12 %11 %11 + %23 = OpCompositeConstruct %7 %12 %12 %20 %12 + %24 = OpCompositeConstruct %7 %12 %12 %12 %12 + %25 = OpCompositeConstruct %8 %21 %22 %23 %24 + OpStore %10 %25 + %26 = OpLoad %8 %10 + %27 = OpExtInst %6 %1 Determinant %26 + %28 = OpExtInst %6 %1 FAbs %27 + %31 = OpFOrdLessThan %30 %28 %29 + OpSelectionMerge %33 None + OpBranchConditional %31 %32 %37 + %32 = OpLabel + OpStore %35 %36 + OpBranch %33 + %37 = OpLabel + OpStore %35 %38 + OpBranch %33 + %33 = OpLabel + OpReturn + OpFunctionEnd +END + +# uniforms for variant + +# one +BUFFER variant_one DATA_TYPE float 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 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-mem-pass-sum-struct-members.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-mem-pass-sum-struct-members.amber new file mode 100644 index 0000000..6039491 --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-mem-pass-sum-struct-members.amber @@ -0,0 +1,330 @@ +#!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 GraphicsFuzz. + +# Short description: A fragment shader that covers a specific mem pass code path. + +# The test passes because shader always writes red. + +# Optimized using spirv-opt with the following arguments: +# '--redundancy-elimination' +# '--eliminate-dead-inserts' +# '--private-to-local' +# '--redundancy-elimination' +# '--eliminate-local-multi-store' +# '--if-conversion' +# '--scalar-replacement=100' +# '--combine-access-chains' +# '--reduce-load-size' +# '--eliminate-dead-branches' +# '--merge-return' +# '--eliminate-local-single-block' +# '--if-conversion' +# '--private-to-local' +# '--eliminate-dead-inserts' +# '--copy-propagate-arrays' +# '--inline-entry-points-exhaustive' +# '--copy-propagate-arrays' +# '--convert-local-access-chains' +# spirv-opt commit hash: 9215c1b7df0029f27807e8c8d7ec80532ce90a87 + + + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 310 es +# precision highp float; +# precision highp int; +# +# layout(location = 0) out vec4 _GLF_color; +# layout(set = 0, binding = 0) uniform buf0 +# { +# int one; +# }; +# +# struct S +# { +# int a; +# int b; +# int c; +# }; +# +# int func(S s, int x) +# { +# s.a = x; +# +# // Always false. +# if(s.a == 2) +# s.a = 9; +# +# s.b = x + 1; +# s.c = x + 2; +# +# // Always false. +# if(s.b == 2) +# s.b = 7; +# +# return s.a + s.b + s.c; +# } +# +# void main() +# { +# S arr[2]; +# arr[one].a = 2; +# +# // Always false. +# if(arr[1].a < 1) +# { +# _GLF_color = vec4(0); +# return; +# } +# else +# { +# if (func(arr[1], 2 + one) == 12) +# _GLF_color = vec4(1, 0, 0, 1); +# else +# _GLF_color = vec4(0); +# } +# } +SHADER fragment variant_fragment_shader SPIRV-ASM +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 8 +; Bound: 136 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %71 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 310 + OpName %4 "main" + OpName %7 "S" + OpMemberName %7 0 "a" + OpMemberName %7 1 "b" + OpMemberName %7 2 "c" + OpName %13 "func(struct-S-i1-i1-i11;i1;" + OpName %11 "s" + OpName %12 "x" + OpName %55 "arr" + OpName %56 "buf0" + OpMemberName %56 0 "one" + OpName %58 "" + OpName %71 "_GLF_color" + OpName %79 "param" + OpName %82 "param" + OpMemberDecorate %56 0 Offset 0 + OpDecorate %56 Block + OpDecorate %58 DescriptorSet 0 + OpDecorate %58 Binding 0 + OpDecorate %71 Location 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeInt 32 1 + %7 = OpTypeStruct %6 %6 %6 + %8 = OpTypePointer Function %7 + %9 = OpTypePointer Function %6 + %10 = OpTypeFunction %6 %8 %9 + %15 = OpConstant %6 0 + %20 = OpConstant %6 2 + %21 = OpTypeBool + %25 = OpConstant %6 9 + %27 = OpConstant %6 1 + %39 = OpConstant %6 7 + %51 = OpTypeInt 32 0 + %52 = OpConstant %51 2 + %53 = OpTypeArray %7 %52 + %54 = OpTypePointer Function %53 + %56 = OpTypeStruct %6 + %57 = OpTypePointer Uniform %56 + %58 = OpVariable %57 Uniform + %59 = OpTypePointer Uniform %6 + %68 = OpTypeFloat 32 + %69 = OpTypeVector %68 4 + %70 = OpTypePointer Output %69 + %71 = OpVariable %70 Output + %72 = OpConstant %68 0 + %73 = OpConstantComposite %69 %72 %72 %72 %72 + %84 = OpConstant %6 12 + %88 = OpConstant %68 1 + %89 = OpConstantComposite %69 %88 %72 %72 %88 + %95 = OpConstantFalse %21 + %96 = OpTypePointer Function %21 + %98 = OpConstantTrue %21 + %4 = OpFunction %2 None %3 + %5 = OpLabel + %99 = OpVariable %9 Function + %97 = OpVariable %96 Function %95 + %55 = OpVariable %54 Function + %79 = OpVariable %8 Function + %82 = OpVariable %9 Function + OpBranch %92 + %92 = OpLabel + OpLoopMerge %91 %94 None + OpBranch %93 + %93 = OpLabel + %60 = OpAccessChain %59 %58 %15 + %61 = OpLoad %6 %60 + %62 = OpAccessChain %9 %55 %61 %15 + OpStore %62 %20 + %63 = OpAccessChain %9 %55 %27 %15 + %64 = OpLoad %6 %63 + %65 = OpSLessThan %21 %64 %27 + OpSelectionMerge %67 None + OpBranchConditional %65 %66 %75 + %66 = OpLabel + OpStore %71 %73 + OpStore %97 %98 + OpBranch %91 + %75 = OpLabel + %78 = OpIAdd %6 %20 %61 + %80 = OpAccessChain %8 %55 %27 + %81 = OpLoad %7 %80 + OpStore %79 %81 + OpStore %82 %78 + %100 = OpLoad %6 %82 + %101 = OpAccessChain %9 %79 %15 + %121 = OpLoad %7 %79 + %122 = OpCompositeInsert %7 %100 %121 0 + OpStore %79 %122 + %123 = OpLoad %7 %79 + %102 = OpCompositeExtract %6 %123 0 + %103 = OpIEqual %21 %102 %20 + OpSelectionMerge %104 None + OpBranchConditional %103 %105 %104 + %105 = OpLabel + %124 = OpLoad %7 %79 + %125 = OpCompositeInsert %7 %25 %124 0 + OpStore %79 %125 + OpBranch %104 + %104 = OpLabel + %106 = OpLoad %6 %82 + %107 = OpIAdd %6 %106 %27 + %108 = OpAccessChain %9 %79 %27 + %126 = OpLoad %7 %79 + %127 = OpCompositeInsert %7 %107 %126 1 + OpStore %79 %127 + %109 = OpLoad %6 %82 + %110 = OpIAdd %6 %109 %20 + %111 = OpAccessChain %9 %79 %20 + %128 = OpLoad %7 %79 + %129 = OpCompositeInsert %7 %110 %128 2 + OpStore %79 %129 + %130 = OpLoad %7 %79 + %112 = OpCompositeExtract %6 %130 1 + %113 = OpIEqual %21 %112 %20 + OpSelectionMerge %114 None + OpBranchConditional %113 %115 %114 + %115 = OpLabel + %131 = OpLoad %7 %79 + %132 = OpCompositeInsert %7 %39 %131 1 + OpStore %79 %132 + OpBranch %114 + %114 = OpLabel + %133 = OpLoad %7 %79 + %116 = OpCompositeExtract %6 %133 0 + %134 = OpLoad %7 %79 + %117 = OpCompositeExtract %6 %134 1 + %118 = OpIAdd %6 %116 %117 + %135 = OpLoad %7 %79 + %119 = OpCompositeExtract %6 %135 2 + %120 = OpIAdd %6 %118 %119 + OpStore %99 %120 + %83 = OpLoad %6 %99 + %85 = OpIEqual %21 %83 %84 + OpSelectionMerge %87 None + OpBranchConditional %85 %86 %90 + %86 = OpLabel + OpStore %71 %89 + OpBranch %87 + %90 = OpLabel + OpStore %71 %73 + OpBranch %87 + %87 = OpLabel + OpBranch %67 + %67 = OpLabel + OpStore %97 %98 + OpBranch %91 + %94 = OpLabel + OpBranch %92 + %91 = OpLabel + OpReturn + OpFunctionEnd + %13 = OpFunction %6 None %10 + %11 = OpFunctionParameter %8 + %12 = OpFunctionParameter %9 + %14 = OpLabel + %16 = OpLoad %6 %12 + %17 = OpAccessChain %9 %11 %15 + OpStore %17 %16 + %19 = OpLoad %6 %17 + %22 = OpIEqual %21 %19 %20 + OpSelectionMerge %24 None + OpBranchConditional %22 %23 %24 + %23 = OpLabel + OpStore %17 %25 + OpBranch %24 + %24 = OpLabel + %28 = OpLoad %6 %12 + %29 = OpIAdd %6 %28 %27 + %30 = OpAccessChain %9 %11 %27 + OpStore %30 %29 + %31 = OpLoad %6 %12 + %32 = OpIAdd %6 %31 %20 + %33 = OpAccessChain %9 %11 %20 + OpStore %33 %32 + %35 = OpLoad %6 %30 + %36 = OpIEqual %21 %35 %20 + OpSelectionMerge %38 None + OpBranchConditional %36 %37 %38 + %37 = OpLabel + OpStore %30 %39 + OpBranch %38 + %38 = OpLabel + %42 = OpLoad %6 %17 + %44 = OpLoad %6 %30 + %45 = OpIAdd %6 %42 %44 + %47 = OpLoad %6 %33 + %48 = OpIAdd %6 %45 %47 + OpReturnValue %48 + OpFunctionEnd +END + +# uniforms for variant + +# one +BUFFER variant_one DATA_TYPE int32 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-mem-pass-unused-component.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-mem-pass-unused-component.amber new file mode 100644 index 0000000..0b53bba --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-mem-pass-unused-component.amber @@ -0,0 +1,169 @@ +#!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 GraphicsFuzz. + +# Short description: A fragment shader that covers a specific mem pass code path. + +# The test passes because shader always writes red. + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 310 es +# precision highp float; +# +# layout(location = 0) out vec4 _GLF_color; +# layout(set = 0, binding = 0) uniform buf0 +# { +# float two; +# }; +# +# float func(vec2 v) +# { +# // Never used in this function. +# v.x = two; +# +# // Always false. +# if(v.y < 1.0) +# return 1.0; +# +# return 5.0; +# } +# +# void main() +# { +# float f = func(vec2(1)); +# +# if (f == 5.0) +# _GLF_color = vec4(1, 0, 0, 1); +# else +# _GLF_color = vec4(0); +# } +SHADER fragment variant_fragment_shader SPIRV-ASM +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 8 +; Bound: 52 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %47 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 310 + OpName %4 "main" + OpName %11 "func(vf2;" + OpName %10 "v" + OpName %13 "buf0" + OpMemberName %13 0 "two" + OpName %15 "" + OpName %37 "f" + OpName %39 "param" + OpName %47 "_GLF_color" + OpMemberDecorate %13 0 Offset 0 + OpDecorate %13 Block + OpDecorate %15 DescriptorSet 0 + OpDecorate %15 Binding 0 + OpDecorate %47 Location 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeFloat 32 + %7 = OpTypeVector %6 2 + %8 = OpTypePointer Function %7 + %9 = OpTypeFunction %6 %8 + %13 = OpTypeStruct %6 + %14 = OpTypePointer Uniform %13 + %15 = OpVariable %14 Uniform + %16 = OpTypeInt 32 1 + %17 = OpConstant %16 0 + %18 = OpTypePointer Uniform %6 + %21 = OpTypeInt 32 0 + %22 = OpConstant %21 0 + %23 = OpTypePointer Function %6 + %25 = OpConstant %21 1 + %28 = OpConstant %6 1 + %29 = OpTypeBool + %34 = OpConstant %6 5 + %38 = OpConstantComposite %7 %28 %28 + %45 = OpTypeVector %6 4 + %46 = OpTypePointer Output %45 + %47 = OpVariable %46 Output + %48 = OpConstant %6 0 + %49 = OpConstantComposite %45 %28 %48 %48 %28 + %51 = OpConstantComposite %45 %48 %48 %48 %48 + %4 = OpFunction %2 None %3 + %5 = OpLabel + %37 = OpVariable %23 Function + %39 = OpVariable %8 Function + OpStore %39 %38 + %40 = OpFunctionCall %6 %11 %39 + OpStore %37 %40 + %41 = OpLoad %6 %37 + %42 = OpFOrdEqual %29 %41 %34 + OpSelectionMerge %44 None + OpBranchConditional %42 %43 %50 + %43 = OpLabel + OpStore %47 %49 + OpBranch %44 + %50 = OpLabel + OpStore %47 %51 + OpBranch %44 + %44 = OpLabel + OpReturn + OpFunctionEnd + %11 = OpFunction %6 None %9 + %10 = OpFunctionParameter %8 + %12 = OpLabel + %19 = OpAccessChain %18 %15 %17 + %20 = OpLoad %6 %19 + %24 = OpAccessChain %23 %10 %22 + OpStore %24 %20 + %26 = OpAccessChain %23 %10 %25 + %27 = OpLoad %6 %26 + %30 = OpFOrdLessThan %29 %27 %28 + OpSelectionMerge %32 None + OpBranchConditional %30 %31 %32 + %31 = OpLabel + OpReturnValue %28 + %32 = OpLabel + OpReturnValue %34 + OpFunctionEnd +END + +# uniforms for variant + +# two +BUFFER variant_two DATA_TYPE float DATA + 2.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_two 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-pattern-match-signum.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-pattern-match-signum.amber new file mode 100644 index 0000000..a2a1662 --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-pattern-match-signum.amber @@ -0,0 +1,156 @@ +#!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 GraphicsFuzz. + +# Short description: A fragment shader that covers a specific pattern matching path. + +# The test passes because shader always writes red. + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 310 es +# precision highp float; +# precision highp int; +# +# layout(location = 0) out vec4 _GLF_color; +# +# layout(set = 0, binding = 0) uniform buf0 +# { +# int one; +# }; +# +# int func(int x) +# { +# // Always true. +# if (one == 1) +# return x; +# +# return one; +# } +# +# void main() +# { +# if(func(-1) <= 0) +# _GLF_color = vec4(1, 0, 0, 1); +# else +# _GLF_color = vec4(0); +# } +SHADER fragment variant_fragment_shader SPIRV-ASM +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 8 +; Bound: 45 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %39 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 310 + OpName %4 "main" + OpName %10 "func(i1;" + OpName %9 "x" + OpName %12 "buf0" + OpMemberName %12 0 "one" + OpName %14 "" + OpName %31 "param" + OpName %39 "_GLF_color" + OpMemberDecorate %12 0 Offset 0 + OpDecorate %12 Block + OpDecorate %14 DescriptorSet 0 + OpDecorate %14 Binding 0 + OpDecorate %39 Location 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeInt 32 1 + %7 = OpTypePointer Function %6 + %8 = OpTypeFunction %6 %7 + %12 = OpTypeStruct %6 + %13 = OpTypePointer Uniform %12 + %14 = OpVariable %13 Uniform + %15 = OpConstant %6 0 + %16 = OpTypePointer Uniform %6 + %19 = OpConstant %6 1 + %20 = OpTypeBool + %30 = OpConstant %6 -1 + %36 = OpTypeFloat 32 + %37 = OpTypeVector %36 4 + %38 = OpTypePointer Output %37 + %39 = OpVariable %38 Output + %40 = OpConstant %36 1 + %41 = OpConstant %36 0 + %42 = OpConstantComposite %37 %40 %41 %41 %40 + %44 = OpConstantComposite %37 %41 %41 %41 %41 + %4 = OpFunction %2 None %3 + %5 = OpLabel + %31 = OpVariable %7 Function + OpStore %31 %30 + %32 = OpFunctionCall %6 %10 %31 + %33 = OpSLessThanEqual %20 %32 %15 + OpSelectionMerge %35 None + OpBranchConditional %33 %34 %43 + %34 = OpLabel + OpStore %39 %42 + OpBranch %35 + %43 = OpLabel + OpStore %39 %44 + OpBranch %35 + %35 = OpLabel + OpReturn + OpFunctionEnd + %10 = OpFunction %6 None %8 + %9 = OpFunctionParameter %7 + %11 = OpLabel + %17 = OpAccessChain %16 %14 %15 + %18 = OpLoad %6 %17 + %21 = OpIEqual %20 %18 %19 + OpSelectionMerge %23 None + OpBranchConditional %21 %22 %23 + %22 = OpLabel + %24 = OpLoad %6 %9 + OpReturnValue %24 + %23 = OpLabel + %26 = OpAccessChain %16 %14 %15 + %27 = OpLoad %6 %26 + OpReturnValue %27 + OpFunctionEnd +END + +# uniforms for variant + +# one +BUFFER variant_one DATA_TYPE int32 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-pattern-match-single-bit.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-pattern-match-single-bit.amber new file mode 100644 index 0000000..38564aa --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-pattern-match-single-bit.amber @@ -0,0 +1,128 @@ +#!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 GraphicsFuzz. + +# Short description: A fragment shader that covers a specific pattern matching path. + +# The test passes because shader always writes red. + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 310 es +# precision highp float; +# precision highp int; +# +# layout(set = 0, binding = 0) uniform buf0 +# { +# int three; +# }; +# +# layout(location = 0) out vec4 _GLF_color; +# +# void main() +# { +# if(10 / (2 & three) == 5) +# _GLF_color = vec4(1, 0, 0, 1); +# else +# _GLF_color = vec4(0); +# } +SHADER fragment variant_fragment_shader SPIRV-ASM +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 8 +; Bound: 32 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %26 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 310 + OpName %4 "main" + OpName %9 "buf0" + OpMemberName %9 0 "three" + OpName %11 "" + OpName %26 "_GLF_color" + OpMemberDecorate %9 0 Offset 0 + OpDecorate %9 Block + OpDecorate %11 DescriptorSet 0 + OpDecorate %11 Binding 0 + OpDecorate %26 Location 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeInt 32 1 + %7 = OpConstant %6 10 + %8 = OpConstant %6 2 + %9 = OpTypeStruct %6 + %10 = OpTypePointer Uniform %9 + %11 = OpVariable %10 Uniform + %12 = OpConstant %6 0 + %13 = OpTypePointer Uniform %6 + %18 = OpConstant %6 5 + %19 = OpTypeBool + %23 = OpTypeFloat 32 + %24 = OpTypeVector %23 4 + %25 = OpTypePointer Output %24 + %26 = OpVariable %25 Output + %27 = OpConstant %23 1 + %28 = OpConstant %23 0 + %29 = OpConstantComposite %24 %27 %28 %28 %27 + %31 = OpConstantComposite %24 %28 %28 %28 %28 + %4 = OpFunction %2 None %3 + %5 = OpLabel + %14 = OpAccessChain %13 %11 %12 + %15 = OpLoad %6 %14 + %16 = OpBitwiseAnd %6 %8 %15 + %17 = OpSDiv %6 %7 %16 + %20 = OpIEqual %19 %17 %18 + OpSelectionMerge %22 None + OpBranchConditional %20 %21 %30 + %21 = OpLabel + OpStore %26 %29 + OpBranch %22 + %30 = OpLabel + OpStore %26 %31 + OpBranch %22 + %22 = OpLabel + OpReturn + OpFunctionEnd +END + +# uniforms for variant + +# three +BUFFER variant_three DATA_TYPE int32 DATA + 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_three 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-replace-copy-object.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-replace-copy-object.amber new file mode 100644 index 0000000..8ff1d1e --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-replace-copy-object.amber @@ -0,0 +1,276 @@ +#!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 GraphicsFuzz. + +# Short description: A fragment shader that covers a specific shader simplification path. + +# The test passes because shader always writes red. + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 310 es +# precision highp float; +# precision lowp int; +# +# layout(location = 0) out vec4 _GLF_color; +# layout(set = 0, binding = 0) uniform buf0 +# { +# int one; +# }; +# +# struct S +# { +# int data; +# }; +# +# int func(inout S s, int x) +# { +# if (s.data == 1) +# return x + s.data; +# else +# return x; +# } +# +# void main() +# { +# int a = 0; +# S arr[1]; +# +# arr[0].data = one; +# +# for(int i = 0; i < 5 + one; i++) +# { +# if (i % 2 != 0) +# a = func(arr[0], i); +# else +# a = func(arr[0], 1); +# } +# +# if (a == 6) +# _GLF_color = vec4(1, 0, 0, 1); +# else +# _GLF_color = vec4(0); +# } +SHADER fragment variant_fragment_shader SPIRV-ASM +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 8 +; Bound: 95 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %89 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 310 + OpName %4 "main" + OpName %7 "S" + OpMemberName %7 0 "data" + OpName %13 "func(struct-S-i11;i1;" + OpName %11 "s" + OpName %12 "x" + OpName %32 "a" + OpName %37 "arr" + OpName %38 "buf0" + OpMemberName %38 0 "one" + OpName %40 "" + OpName %45 "i" + OpName %63 "param" + OpName %66 "param" + OpName %72 "param" + OpName %75 "param" + OpName %89 "_GLF_color" + OpMemberDecorate %7 0 RelaxedPrecision + OpDecorate %13 RelaxedPrecision + OpDecorate %12 RelaxedPrecision + OpDecorate %17 RelaxedPrecision + OpDecorate %23 RelaxedPrecision + OpDecorate %25 RelaxedPrecision + OpDecorate %26 RelaxedPrecision + OpDecorate %29 RelaxedPrecision + OpDecorate %32 RelaxedPrecision + OpMemberDecorate %38 0 RelaxedPrecision + OpMemberDecorate %38 0 Offset 0 + OpDecorate %38 Block + OpDecorate %40 DescriptorSet 0 + OpDecorate %40 Binding 0 + OpDecorate %43 RelaxedPrecision + OpDecorate %45 RelaxedPrecision + OpDecorate %51 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %55 RelaxedPrecision + OpDecorate %57 RelaxedPrecision + OpDecorate %59 RelaxedPrecision + OpDecorate %67 RelaxedPrecision + OpDecorate %68 RelaxedPrecision + OpDecorate %76 RelaxedPrecision + OpDecorate %79 RelaxedPrecision + OpDecorate %80 RelaxedPrecision + OpDecorate %81 RelaxedPrecision + OpDecorate %89 Location 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeInt 32 1 + %7 = OpTypeStruct %6 + %8 = OpTypePointer Function %7 + %9 = OpTypePointer Function %6 + %10 = OpTypeFunction %6 %8 %9 + %15 = OpConstant %6 0 + %18 = OpConstant %6 1 + %19 = OpTypeBool + %33 = OpTypeInt 32 0 + %34 = OpConstant %33 1 + %35 = OpTypeArray %7 %34 + %36 = OpTypePointer Function %35 + %38 = OpTypeStruct %6 + %39 = OpTypePointer Uniform %38 + %40 = OpVariable %39 Uniform + %41 = OpTypePointer Uniform %6 + %52 = OpConstant %6 5 + %58 = OpConstant %6 2 + %82 = OpConstant %6 6 + %86 = OpTypeFloat 32 + %87 = OpTypeVector %86 4 + %88 = OpTypePointer Output %87 + %89 = OpVariable %88 Output + %90 = OpConstant %86 1 + %91 = OpConstant %86 0 + %92 = OpConstantComposite %87 %90 %91 %91 %90 + %94 = OpConstantComposite %87 %91 %91 %91 %91 + %4 = OpFunction %2 None %3 + %5 = OpLabel + %32 = OpVariable %9 Function + %37 = OpVariable %36 Function + %45 = OpVariable %9 Function + %63 = OpVariable %8 Function + %66 = OpVariable %9 Function + %72 = OpVariable %8 Function + %75 = OpVariable %9 Function + OpStore %32 %15 + %42 = OpAccessChain %41 %40 %15 + %43 = OpLoad %6 %42 + %44 = OpAccessChain %9 %37 %15 %15 + OpStore %44 %43 + OpStore %45 %15 + OpBranch %46 + %46 = OpLabel + OpLoopMerge %48 %49 None + OpBranch %50 + %50 = OpLabel + %51 = OpLoad %6 %45 + %53 = OpAccessChain %41 %40 %15 + %54 = OpLoad %6 %53 + %55 = OpIAdd %6 %52 %54 + %56 = OpSLessThan %19 %51 %55 + OpBranchConditional %56 %47 %48 + %47 = OpLabel + %57 = OpLoad %6 %45 + %59 = OpSMod %6 %57 %58 + %60 = OpINotEqual %19 %59 %15 + OpSelectionMerge %62 None + OpBranchConditional %60 %61 %71 + %61 = OpLabel + %64 = OpAccessChain %8 %37 %15 + %65 = OpLoad %7 %64 + OpStore %63 %65 + %67 = OpLoad %6 %45 + OpStore %66 %67 + %68 = OpFunctionCall %6 %13 %63 %66 + %69 = OpLoad %7 %63 + %70 = OpAccessChain %8 %37 %15 + OpStore %70 %69 + OpStore %32 %68 + OpBranch %62 + %71 = OpLabel + %73 = OpAccessChain %8 %37 %15 + %74 = OpLoad %7 %73 + OpStore %72 %74 + OpStore %75 %18 + %76 = OpFunctionCall %6 %13 %72 %75 + %77 = OpLoad %7 %72 + %78 = OpAccessChain %8 %37 %15 + OpStore %78 %77 + OpStore %32 %76 + OpBranch %62 + %62 = OpLabel + OpBranch %49 + %49 = OpLabel + %79 = OpLoad %6 %45 + %80 = OpIAdd %6 %79 %18 + OpStore %45 %80 + OpBranch %46 + %48 = OpLabel + %81 = OpLoad %6 %32 + %83 = OpIEqual %19 %81 %82 + OpSelectionMerge %85 None + OpBranchConditional %83 %84 %93 + %84 = OpLabel + OpStore %89 %92 + OpBranch %85 + %93 = OpLabel + OpStore %89 %94 + OpBranch %85 + %85 = OpLabel + OpReturn + OpFunctionEnd + %13 = OpFunction %6 None %10 + %11 = OpFunctionParameter %8 + %12 = OpFunctionParameter %9 + %14 = OpLabel + %16 = OpAccessChain %9 %11 %15 + %17 = OpLoad %6 %16 + %20 = OpIEqual %19 %17 %18 + OpSelectionMerge %22 None + OpBranchConditional %20 %21 %28 + %21 = OpLabel + %23 = OpLoad %6 %12 + %24 = OpAccessChain %9 %11 %15 + %25 = OpLoad %6 %24 + %26 = OpIAdd %6 %23 %25 + OpReturnValue %26 + %28 = OpLabel + %29 = OpLoad %6 %12 + OpReturnValue %29 + %22 = OpLabel + OpUnreachable + OpFunctionEnd +END + +# uniforms for variant + +# one +BUFFER variant_one DATA_TYPE int32 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-scaled-number-nested-loops.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-scaled-number-nested-loops.amber new file mode 100644 index 0000000..09a1e5d --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-scaled-number-nested-loops.amber @@ -0,0 +1,381 @@ +#!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 GraphicsFuzz. + +# Short description: A fragment shader that covers a specific scaled number code path. + +# The test passes because shader always writes red. + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 310 es +# precision highp float; +# precision highp int; +# +# layout(location = 0) out vec4 _GLF_color; +# +# layout(set = 0, binding = 0) uniform buf0 +# { +# int one; +# }; +# +# void main() +# { +# int a = 0; +# +# for(int i0 = 0; i0 < one; i0++) +# for( int i1 = 0; i1 < one; i1++) +# for(int i2 = 0; i2 < one; i2++) +# // While other loops iterate only once, this one +# // does three iterations. +# for(int i3 = 0; i3 < one + 2; i3++) +# for(int i4 = 0; i4 < one; i4++) +# for(int i5 = 0; i5 < one; i5++) +# { +# // Always true, but will break at the end of the loop. +# while(one > 0) +# { +# for( int i6 = 0; i6 < one; i6++) +# for( int i7 = 0; i7 < one; i7++) +# for( int i8 = 0; i8 < one; i8++) +# for( int i9 = 0; i9 < one; i9++) +# a++; +# +# break; +# } +# } +# +# if (a == 3) +# _GLF_color = vec4(1, 0, 0, 1); +# else +# _GLF_color = vec4(0); +# } +SHADER fragment variant_fragment_shader SPIRV-ASM +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 8 +; Bound: 163 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %157 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 310 + OpName %4 "main" + OpName %8 "a" + OpName %10 "i0" + OpName %17 "buf0" + OpMemberName %17 0 "one" + OpName %19 "" + OpName %25 "i1" + OpName %35 "i2" + OpName %45 "i3" + OpName %57 "i4" + OpName %67 "i5" + OpName %85 "i6" + OpName %95 "i7" + OpName %105 "i8" + OpName %115 "i9" + OpName %157 "_GLF_color" + OpMemberDecorate %17 0 Offset 0 + OpDecorate %17 Block + OpDecorate %19 DescriptorSet 0 + OpDecorate %19 Binding 0 + OpDecorate %157 Location 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeInt 32 1 + %7 = OpTypePointer Function %6 + %9 = OpConstant %6 0 + %17 = OpTypeStruct %6 + %18 = OpTypePointer Uniform %17 + %19 = OpVariable %18 Uniform + %20 = OpTypePointer Uniform %6 + %23 = OpTypeBool + %54 = OpConstant %6 2 + %126 = OpConstant %6 1 + %150 = OpConstant %6 3 + %154 = OpTypeFloat 32 + %155 = OpTypeVector %154 4 + %156 = OpTypePointer Output %155 + %157 = OpVariable %156 Output + %158 = OpConstant %154 1 + %159 = OpConstant %154 0 + %160 = OpConstantComposite %155 %158 %159 %159 %158 + %162 = OpConstantComposite %155 %159 %159 %159 %159 + %4 = OpFunction %2 None %3 + %5 = OpLabel + %8 = OpVariable %7 Function + %10 = OpVariable %7 Function + %25 = OpVariable %7 Function + %35 = OpVariable %7 Function + %45 = OpVariable %7 Function + %57 = OpVariable %7 Function + %67 = OpVariable %7 Function + %85 = OpVariable %7 Function + %95 = OpVariable %7 Function + %105 = OpVariable %7 Function + %115 = 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 + %21 = OpAccessChain %20 %19 %9 + %22 = OpLoad %6 %21 + %24 = OpSLessThan %23 %16 %22 + OpBranchConditional %24 %12 %13 + %12 = OpLabel + OpStore %25 %9 + OpBranch %26 + %26 = OpLabel + OpLoopMerge %28 %29 None + OpBranch %30 + %30 = OpLabel + %31 = OpLoad %6 %25 + %32 = OpAccessChain %20 %19 %9 + %33 = OpLoad %6 %32 + %34 = OpSLessThan %23 %31 %33 + OpBranchConditional %34 %27 %28 + %27 = OpLabel + OpStore %35 %9 + OpBranch %36 + %36 = OpLabel + OpLoopMerge %38 %39 None + OpBranch %40 + %40 = OpLabel + %41 = OpLoad %6 %35 + %42 = OpAccessChain %20 %19 %9 + %43 = OpLoad %6 %42 + %44 = OpSLessThan %23 %41 %43 + OpBranchConditional %44 %37 %38 + %37 = OpLabel + OpStore %45 %9 + OpBranch %46 + %46 = OpLabel + OpLoopMerge %48 %49 None + OpBranch %50 + %50 = OpLabel + %51 = OpLoad %6 %45 + %52 = OpAccessChain %20 %19 %9 + %53 = OpLoad %6 %52 + %55 = OpIAdd %6 %53 %54 + %56 = OpSLessThan %23 %51 %55 + OpBranchConditional %56 %47 %48 + %47 = OpLabel + OpStore %57 %9 + OpBranch %58 + %58 = OpLabel + OpLoopMerge %60 %61 None + OpBranch %62 + %62 = OpLabel + %63 = OpLoad %6 %57 + %64 = OpAccessChain %20 %19 %9 + %65 = OpLoad %6 %64 + %66 = OpSLessThan %23 %63 %65 + OpBranchConditional %66 %59 %60 + %59 = OpLabel + OpStore %67 %9 + OpBranch %68 + %68 = OpLabel + OpLoopMerge %70 %71 None + OpBranch %72 + %72 = OpLabel + %73 = OpLoad %6 %67 + %74 = OpAccessChain %20 %19 %9 + %75 = OpLoad %6 %74 + %76 = OpSLessThan %23 %73 %75 + OpBranchConditional %76 %69 %70 + %69 = OpLabel + OpBranch %77 + %77 = OpLabel + OpLoopMerge %79 %80 None + OpBranch %81 + %81 = OpLabel + %82 = OpAccessChain %20 %19 %9 + %83 = OpLoad %6 %82 + %84 = OpSGreaterThan %23 %83 %9 + OpBranchConditional %84 %78 %79 + %78 = OpLabel + OpStore %85 %9 + OpBranch %86 + %86 = OpLabel + OpLoopMerge %88 %89 None + OpBranch %90 + %90 = OpLabel + %91 = OpLoad %6 %85 + %92 = OpAccessChain %20 %19 %9 + %93 = OpLoad %6 %92 + %94 = OpSLessThan %23 %91 %93 + OpBranchConditional %94 %87 %88 + %87 = OpLabel + OpStore %95 %9 + OpBranch %96 + %96 = OpLabel + OpLoopMerge %98 %99 None + OpBranch %100 + %100 = OpLabel + %101 = OpLoad %6 %95 + %102 = OpAccessChain %20 %19 %9 + %103 = OpLoad %6 %102 + %104 = OpSLessThan %23 %101 %103 + OpBranchConditional %104 %97 %98 + %97 = OpLabel + OpStore %105 %9 + OpBranch %106 + %106 = OpLabel + OpLoopMerge %108 %109 None + OpBranch %110 + %110 = OpLabel + %111 = OpLoad %6 %105 + %112 = OpAccessChain %20 %19 %9 + %113 = OpLoad %6 %112 + %114 = OpSLessThan %23 %111 %113 + OpBranchConditional %114 %107 %108 + %107 = OpLabel + OpStore %115 %9 + OpBranch %116 + %116 = OpLabel + OpLoopMerge %118 %119 None + OpBranch %120 + %120 = OpLabel + %121 = OpLoad %6 %115 + %122 = OpAccessChain %20 %19 %9 + %123 = OpLoad %6 %122 + %124 = OpSLessThan %23 %121 %123 + OpBranchConditional %124 %117 %118 + %117 = OpLabel + %125 = OpLoad %6 %8 + %127 = OpIAdd %6 %125 %126 + OpStore %8 %127 + OpBranch %119 + %119 = OpLabel + %128 = OpLoad %6 %115 + %129 = OpIAdd %6 %128 %126 + OpStore %115 %129 + OpBranch %116 + %118 = OpLabel + OpBranch %109 + %109 = OpLabel + %130 = OpLoad %6 %105 + %131 = OpIAdd %6 %130 %126 + OpStore %105 %131 + OpBranch %106 + %108 = OpLabel + OpBranch %99 + %99 = OpLabel + %132 = OpLoad %6 %95 + %133 = OpIAdd %6 %132 %126 + OpStore %95 %133 + OpBranch %96 + %98 = OpLabel + OpBranch %89 + %89 = OpLabel + %134 = OpLoad %6 %85 + %135 = OpIAdd %6 %134 %126 + OpStore %85 %135 + OpBranch %86 + %88 = OpLabel + OpBranch %79 + %80 = OpLabel + OpBranch %77 + %79 = OpLabel + OpBranch %71 + %71 = OpLabel + %137 = OpLoad %6 %67 + %138 = OpIAdd %6 %137 %126 + OpStore %67 %138 + OpBranch %68 + %70 = OpLabel + OpBranch %61 + %61 = OpLabel + %139 = OpLoad %6 %57 + %140 = OpIAdd %6 %139 %126 + OpStore %57 %140 + OpBranch %58 + %60 = OpLabel + OpBranch %49 + %49 = OpLabel + %141 = OpLoad %6 %45 + %142 = OpIAdd %6 %141 %126 + OpStore %45 %142 + OpBranch %46 + %48 = OpLabel + OpBranch %39 + %39 = OpLabel + %143 = OpLoad %6 %35 + %144 = OpIAdd %6 %143 %126 + OpStore %35 %144 + OpBranch %36 + %38 = OpLabel + OpBranch %29 + %29 = OpLabel + %145 = OpLoad %6 %25 + %146 = OpIAdd %6 %145 %126 + OpStore %25 %146 + OpBranch %26 + %28 = OpLabel + OpBranch %14 + %14 = OpLabel + %147 = OpLoad %6 %10 + %148 = OpIAdd %6 %147 %126 + OpStore %10 %148 + OpBranch %11 + %13 = OpLabel + %149 = OpLoad %6 %8 + %151 = OpIEqual %23 %149 %150 + OpSelectionMerge %153 None + OpBranchConditional %151 %152 %161 + %152 = OpLabel + OpStore %157 %160 + OpBranch %153 + %161 = OpLabel + OpStore %157 %162 + OpBranch %153 + %153 = OpLabel + OpReturn + OpFunctionEnd +END + +# uniforms for variant + +# one +BUFFER variant_one DATA_TYPE int32 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-set-vector-cos-fragcoord.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-set-vector-cos-fragcoord.amber new file mode 100644 index 0000000..8903293 --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-set-vector-cos-fragcoord.amber @@ -0,0 +1,273 @@ +#!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 GraphicsFuzz. + +# Short description: A fragment shader that covers a specific set vector code path. + +# The test passes because shader always writes red. + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 310 es +# precision highp float; +# precision highp int; +# +# layout(location = 0) out vec4 _GLF_color; +# +# layout(set = 0, binding = 0) uniform buf0 +# { +# float one; +# }; +# +# void main() +# { +# vec2 a = vec2(1); +# vec3 b = vec3(0); +# +# if(int(gl_FragCoord.y) < 40) +# { +# b = vec3(0.1); +# } +# else if(int(gl_FragCoord.y) < 60) +# { +# b = vec3(0.2); +# } +# else if(gl_FragCoord.y < 80.0) +# { +# b = cos(a.x + vec3(one)) + 0.01; +# } +# else if(int(gl_FragCoord.y) < 100) +# { +# b = cos(vec3(one)); +# } +# else if(int(gl_FragCoord.y) < 500) +# { +# b = cos(vec3(1.0, 1.0, 22.0)); +# } +# +# // Always true. +# if (b.x < 1.02 && b.y < 1.02 && b.z < 1.02) +# _GLF_color = vec4(1, 0, 0, 1); +# else +# _GLF_color = vec4(0); +# } +SHADER fragment variant_fragment_shader SPIRV-ASM +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 8 +; Bound: 116 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %19 %112 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 310 + OpName %4 "main" + OpName %9 "a" + OpName %14 "b" + OpName %19 "gl_FragCoord" + OpName %55 "buf0" + OpMemberName %55 0 "one" + OpName %57 "" + OpName %112 "_GLF_color" + OpDecorate %19 BuiltIn FragCoord + OpMemberDecorate %55 0 Offset 0 + OpDecorate %55 Block + OpDecorate %57 DescriptorSet 0 + OpDecorate %57 Binding 0 + OpDecorate %112 Location 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeFloat 32 + %7 = OpTypeVector %6 2 + %8 = OpTypePointer Function %7 + %10 = OpConstant %6 1 + %11 = OpConstantComposite %7 %10 %10 + %12 = OpTypeVector %6 3 + %13 = OpTypePointer Function %12 + %15 = OpConstant %6 0 + %16 = OpConstantComposite %12 %15 %15 %15 + %17 = OpTypeVector %6 4 + %18 = OpTypePointer Input %17 + %19 = OpVariable %18 Input + %20 = OpTypeInt 32 0 + %21 = OpConstant %20 1 + %22 = OpTypePointer Input %6 + %25 = OpTypeInt 32 1 + %27 = OpConstant %25 40 + %28 = OpTypeBool + %32 = OpConstant %6 0.100000001 + %33 = OpConstantComposite %12 %32 %32 %32 + %38 = OpConstant %25 60 + %42 = OpConstant %6 0.200000003 + %43 = OpConstantComposite %12 %42 %42 %42 + %47 = OpConstant %6 80 + %51 = OpConstant %20 0 + %52 = OpTypePointer Function %6 + %55 = OpTypeStruct %6 + %56 = OpTypePointer Uniform %55 + %57 = OpVariable %56 Uniform + %58 = OpConstant %25 0 + %59 = OpTypePointer Uniform %6 + %66 = OpConstant %6 0.00999999978 + %73 = OpConstant %25 100 + %85 = OpConstant %25 500 + %89 = OpConstant %6 0.540302277 + %90 = OpConstant %6 -0.99996084 + %91 = OpConstantComposite %12 %89 %89 %90 + %94 = OpConstant %6 1.01999998 + %104 = OpConstant %20 2 + %111 = OpTypePointer Output %17 + %112 = OpVariable %111 Output + %113 = OpConstantComposite %17 %10 %15 %15 %10 + %115 = OpConstantComposite %17 %15 %15 %15 %15 + %4 = OpFunction %2 None %3 + %5 = OpLabel + %9 = OpVariable %8 Function + %14 = OpVariable %13 Function + OpStore %9 %11 + OpStore %14 %16 + %23 = OpAccessChain %22 %19 %21 + %24 = OpLoad %6 %23 + %26 = OpConvertFToS %25 %24 + %29 = OpSLessThan %28 %26 %27 + OpSelectionMerge %31 None + OpBranchConditional %29 %30 %34 + %30 = OpLabel + OpStore %14 %33 + OpBranch %31 + %34 = OpLabel + %35 = OpAccessChain %22 %19 %21 + %36 = OpLoad %6 %35 + %37 = OpConvertFToS %25 %36 + %39 = OpSLessThan %28 %37 %38 + OpSelectionMerge %41 None + OpBranchConditional %39 %40 %44 + %40 = OpLabel + OpStore %14 %43 + OpBranch %41 + %44 = OpLabel + %45 = OpAccessChain %22 %19 %21 + %46 = OpLoad %6 %45 + %48 = OpFOrdLessThan %28 %46 %47 + OpSelectionMerge %50 None + OpBranchConditional %48 %49 %69 + %49 = OpLabel + %53 = OpAccessChain %52 %9 %51 + %54 = OpLoad %6 %53 + %60 = OpAccessChain %59 %57 %58 + %61 = OpLoad %6 %60 + %62 = OpCompositeConstruct %12 %61 %61 %61 + %63 = OpCompositeConstruct %12 %54 %54 %54 + %64 = OpFAdd %12 %63 %62 + %65 = OpExtInst %12 %1 Cos %64 + %67 = OpCompositeConstruct %12 %66 %66 %66 + %68 = OpFAdd %12 %65 %67 + OpStore %14 %68 + OpBranch %50 + %69 = OpLabel + %70 = OpAccessChain %22 %19 %21 + %71 = OpLoad %6 %70 + %72 = OpConvertFToS %25 %71 + %74 = OpSLessThan %28 %72 %73 + OpSelectionMerge %76 None + OpBranchConditional %74 %75 %81 + %75 = OpLabel + %77 = OpAccessChain %59 %57 %58 + %78 = OpLoad %6 %77 + %79 = OpCompositeConstruct %12 %78 %78 %78 + %80 = OpExtInst %12 %1 Cos %79 + OpStore %14 %80 + OpBranch %76 + %81 = OpLabel + %82 = OpAccessChain %22 %19 %21 + %83 = OpLoad %6 %82 + %84 = OpConvertFToS %25 %83 + %86 = OpSLessThan %28 %84 %85 + OpSelectionMerge %88 None + OpBranchConditional %86 %87 %88 + %87 = OpLabel + OpStore %14 %91 + OpBranch %88 + %88 = OpLabel + OpBranch %76 + %76 = OpLabel + OpBranch %50 + %50 = OpLabel + OpBranch %41 + %41 = OpLabel + OpBranch %31 + %31 = OpLabel + %92 = OpAccessChain %52 %14 %51 + %93 = OpLoad %6 %92 + %95 = OpFOrdLessThan %28 %93 %94 + OpSelectionMerge %97 None + OpBranchConditional %95 %96 %97 + %96 = OpLabel + %98 = OpAccessChain %52 %14 %21 + %99 = OpLoad %6 %98 + %100 = OpFOrdLessThan %28 %99 %94 + OpBranch %97 + %97 = OpLabel + %101 = OpPhi %28 %95 %31 %100 %96 + OpSelectionMerge %103 None + OpBranchConditional %101 %102 %103 + %102 = OpLabel + %105 = OpAccessChain %52 %14 %104 + %106 = OpLoad %6 %105 + %107 = OpFOrdLessThan %28 %106 %94 + OpBranch %103 + %103 = OpLabel + %108 = OpPhi %28 %101 %97 %107 %102 + OpSelectionMerge %110 None + OpBranchConditional %108 %109 %114 + %109 = OpLabel + OpStore %112 %113 + OpBranch %110 + %114 = OpLabel + OpStore %112 %115 + OpBranch %110 + %110 = OpLabel + OpReturn + OpFunctionEnd +END + +# uniforms for variant + +# one +BUFFER variant_one DATA_TYPE float 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 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-simplification-unused-struct.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-simplification-unused-struct.amber new file mode 100644 index 0000000..fd13d0a --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-simplification-unused-struct.amber @@ -0,0 +1,283 @@ +#!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 GraphicsFuzz. + +# Short description: A fragment shader that covers a specific shader simplification path. + +# The test passes because shader always writes red. + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 310 es +# precision highp float; +# precision lowp int; +# +# struct S +# { +# int arr[2]; +# }; +# +# layout(location = 0) out vec4 _GLF_color; +# layout(set = 0, binding = 0) uniform buf0 +# { +# int one; +# }; +# +# int func(S s, int x) +# { +# s.arr[1] = x + 1; +# +# // Always false. +# if(s.arr[one] == x) +# return -1; +# +# return x; +# } +# +# void main() +# { +# S s; +# int a = 0; +# +# for(int i = 0; i < 2 + one; i++) +# { +# for( int j = 0; j < 3 + one; j++) +# { +# // a is incremented with the following values: +# // (0 + 1 + 2 + 3) + (1 + 2 + 3 + 4) + (2 + 3 + 4 + 5) +# a += func(s, i + j); +# } +# } +# +# // Always true. +# if (a == 30) +# _GLF_color = vec4(1, 0, 0, 1); +# else +# _GLF_color = vec4(0); +# } +SHADER fragment variant_fragment_shader SPIRV-ASM +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 8 +; Bound: 94 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %88 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 310 + OpName %4 "main" + OpName %10 "S" + OpMemberName %10 0 "arr" + OpName %16 "func(struct-S-i1[2]1;i1;" + OpName %14 "s" + OpName %15 "x" + OpName %23 "buf0" + OpMemberName %23 0 "one" + OpName %25 "" + OpName %41 "a" + OpName %42 "i" + OpName %54 "j" + OpName %66 "s" + OpName %70 "param" + OpName %72 "param" + OpName %88 "_GLF_color" + OpMemberDecorate %10 0 RelaxedPrecision + OpDecorate %16 RelaxedPrecision + OpDecorate %15 RelaxedPrecision + OpDecorate %20 RelaxedPrecision + OpDecorate %21 RelaxedPrecision + OpMemberDecorate %23 0 RelaxedPrecision + OpMemberDecorate %23 0 Offset 0 + OpDecorate %23 Block + OpDecorate %25 DescriptorSet 0 + OpDecorate %25 Binding 0 + OpDecorate %28 RelaxedPrecision + OpDecorate %30 RelaxedPrecision + OpDecorate %31 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %42 RelaxedPrecision + OpDecorate %48 RelaxedPrecision + OpDecorate %51 RelaxedPrecision + OpDecorate %52 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %60 RelaxedPrecision + OpDecorate %63 RelaxedPrecision + OpDecorate %64 RelaxedPrecision + OpDecorate %67 RelaxedPrecision + OpDecorate %68 RelaxedPrecision + OpDecorate %69 RelaxedPrecision + OpDecorate %73 RelaxedPrecision + OpDecorate %74 RelaxedPrecision + OpDecorate %75 RelaxedPrecision + OpDecorate %76 RelaxedPrecision + OpDecorate %77 RelaxedPrecision + OpDecorate %78 RelaxedPrecision + OpDecorate %79 RelaxedPrecision + OpDecorate %80 RelaxedPrecision + OpDecorate %88 Location 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeInt 32 1 + %7 = OpTypeInt 32 0 + %8 = OpConstant %7 2 + %9 = OpTypeArray %6 %8 + %10 = OpTypeStruct %9 + %11 = OpTypePointer Function %10 + %12 = OpTypePointer Function %6 + %13 = OpTypeFunction %6 %11 %12 + %18 = OpConstant %6 0 + %19 = OpConstant %6 1 + %23 = OpTypeStruct %6 + %24 = OpTypePointer Uniform %23 + %25 = OpVariable %24 Uniform + %26 = OpTypePointer Uniform %6 + %32 = OpTypeBool + %36 = OpConstant %6 -1 + %49 = OpConstant %6 2 + %61 = OpConstant %6 3 + %81 = OpConstant %6 30 + %85 = OpTypeFloat 32 + %86 = OpTypeVector %85 4 + %87 = OpTypePointer Output %86 + %88 = OpVariable %87 Output + %89 = OpConstant %85 1 + %90 = OpConstant %85 0 + %91 = OpConstantComposite %86 %89 %90 %90 %89 + %93 = OpConstantComposite %86 %90 %90 %90 %90 + %4 = OpFunction %2 None %3 + %5 = OpLabel + %41 = OpVariable %12 Function + %42 = OpVariable %12 Function + %54 = OpVariable %12 Function + %66 = OpVariable %11 Function + %70 = OpVariable %11 Function + %72 = OpVariable %12 Function + OpStore %41 %18 + OpStore %42 %18 + OpBranch %43 + %43 = OpLabel + OpLoopMerge %45 %46 None + OpBranch %47 + %47 = OpLabel + %48 = OpLoad %6 %42 + %50 = OpAccessChain %26 %25 %18 + %51 = OpLoad %6 %50 + %52 = OpIAdd %6 %49 %51 + %53 = OpSLessThan %32 %48 %52 + OpBranchConditional %53 %44 %45 + %44 = OpLabel + OpStore %54 %18 + OpBranch %55 + %55 = OpLabel + OpLoopMerge %57 %58 None + OpBranch %59 + %59 = OpLabel + %60 = OpLoad %6 %54 + %62 = OpAccessChain %26 %25 %18 + %63 = OpLoad %6 %62 + %64 = OpIAdd %6 %61 %63 + %65 = OpSLessThan %32 %60 %64 + OpBranchConditional %65 %56 %57 + %56 = OpLabel + %67 = OpLoad %6 %42 + %68 = OpLoad %6 %54 + %69 = OpIAdd %6 %67 %68 + %71 = OpLoad %10 %66 + OpStore %70 %71 + OpStore %72 %69 + %73 = OpFunctionCall %6 %16 %70 %72 + %74 = OpLoad %6 %41 + %75 = OpIAdd %6 %74 %73 + OpStore %41 %75 + OpBranch %58 + %58 = OpLabel + %76 = OpLoad %6 %54 + %77 = OpIAdd %6 %76 %19 + OpStore %54 %77 + OpBranch %55 + %57 = OpLabel + OpBranch %46 + %46 = OpLabel + %78 = OpLoad %6 %42 + %79 = OpIAdd %6 %78 %19 + OpStore %42 %79 + OpBranch %43 + %45 = OpLabel + %80 = OpLoad %6 %41 + %82 = OpIEqual %32 %80 %81 + OpSelectionMerge %84 None + OpBranchConditional %82 %83 %92 + %83 = OpLabel + OpStore %88 %91 + OpBranch %84 + %92 = OpLabel + OpStore %88 %93 + OpBranch %84 + %84 = OpLabel + OpReturn + OpFunctionEnd + %16 = OpFunction %6 None %13 + %14 = OpFunctionParameter %11 + %15 = OpFunctionParameter %12 + %17 = OpLabel + %20 = OpLoad %6 %15 + %21 = OpIAdd %6 %20 %19 + %22 = OpAccessChain %12 %14 %18 %19 + OpStore %22 %21 + %27 = OpAccessChain %26 %25 %18 + %28 = OpLoad %6 %27 + %29 = OpAccessChain %12 %14 %18 %28 + %30 = OpLoad %6 %29 + %31 = OpLoad %6 %15 + %33 = OpIEqual %32 %30 %31 + OpSelectionMerge %35 None + OpBranchConditional %33 %34 %35 + %34 = OpLabel + OpReturnValue %36 + %35 = OpLabel + %38 = OpLoad %6 %15 + OpReturnValue %38 + OpFunctionEnd +END + +# uniforms for variant + +# one +BUFFER variant_one DATA_TYPE int32 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-single-store-elim-assume-store.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-single-store-elim-assume-store.amber new file mode 100644 index 0000000..ecd2d49 --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-single-store-elim-assume-store.amber @@ -0,0 +1,215 @@ +#!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 GraphicsFuzz. + +# Short description: A fragment shader that covers a specific single store elimination path. + +# The test passes because shader always writes red. + +# Optimized using spirv-opt with the following arguments: +# '--if-conversion' +# '--eliminate-local-single-block' +# '--redundancy-elimination' +# '--reduce-load-size' +# spirv-opt commit hash: 9215c1b7df0029f27807e8c8d7ec80532ce90a87 + + + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 310 es +# precision highp float; +# precision highp int; +# +# layout(location = 0) out vec4 _GLF_color; +# layout(set = 0, binding = 0) uniform buf0 +# { +# int one; +# }; +# +# void main() +# { +# ivec2 v0 = ivec2(0); +# ivec2 v1 = ivec2(2); +# int a = one; +# +# do +# { +# // Always false. +# if (a > 10) +# { +# _GLF_color = vec4(0); +# return; +# } +# +# v0 = v1.x > a ? ivec2(0) : ivec2(1); +# a++; +# } while(a < 9); +# +# // After the loop v0 == (1, 1). +# +# if(v1.x > 1) +# v0 += ivec2(1); +# +# if (v0 == ivec2(2)) +# _GLF_color = vec4(1, 0, 0, 1); +# else +# _GLF_color = vec4(0); +# } +SHADER fragment variant_fragment_shader SPIRV-ASM +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 8 +; Bound: 71 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %36 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 310 + OpName %4 "main" + OpName %9 "v0" + OpName %12 "v1" + OpName %16 "a" + OpName %17 "buf0" + OpMemberName %17 0 "one" + OpName %19 "" + OpName %36 "_GLF_color" + OpMemberDecorate %17 0 Offset 0 + OpDecorate %17 Block + OpDecorate %19 DescriptorSet 0 + OpDecorate %19 Binding 0 + OpDecorate %36 Location 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeInt 32 1 + %7 = OpTypeVector %6 2 + %8 = OpTypePointer Function %7 + %10 = OpConstant %6 0 + %11 = OpConstantComposite %7 %10 %10 + %13 = OpConstant %6 2 + %14 = OpConstantComposite %7 %13 %13 + %15 = OpTypePointer Function %6 + %17 = OpTypeStruct %6 + %18 = OpTypePointer Uniform %17 + %19 = OpVariable %18 Uniform + %20 = OpTypePointer Uniform %6 + %28 = OpConstant %6 10 + %29 = OpTypeBool + %33 = OpTypeFloat 32 + %34 = OpTypeVector %33 4 + %35 = OpTypePointer Output %34 + %36 = OpVariable %35 Output + %37 = OpConstant %33 0 + %38 = OpConstantComposite %34 %37 %37 %37 %37 + %40 = OpTypeInt 32 0 + %41 = OpConstant %40 0 + %46 = OpConstant %6 1 + %47 = OpConstantComposite %7 %46 %46 + %48 = OpTypeVector %29 2 + %54 = OpConstant %6 9 + %68 = OpConstant %33 1 + %69 = OpConstantComposite %34 %68 %37 %37 %68 + %4 = OpFunction %2 None %3 + %5 = OpLabel + %9 = OpVariable %8 Function + %12 = OpVariable %8 Function + %16 = OpVariable %15 Function + OpStore %9 %11 + OpStore %12 %14 + %21 = OpAccessChain %20 %19 %10 + %22 = OpLoad %6 %21 + OpStore %16 %22 + OpBranch %23 + %23 = OpLabel + OpLoopMerge %25 %26 None + OpBranch %24 + %24 = OpLabel + %27 = OpLoad %6 %16 + %30 = OpSGreaterThan %29 %27 %28 + OpSelectionMerge %32 None + OpBranchConditional %30 %31 %32 + %31 = OpLabel + OpStore %36 %38 + OpReturn + %32 = OpLabel + %42 = OpAccessChain %15 %12 %41 + %43 = OpLoad %6 %42 + %44 = OpLoad %6 %16 + %45 = OpSGreaterThan %29 %43 %44 + %49 = OpCompositeConstruct %48 %45 %45 + %50 = OpSelect %7 %49 %11 %47 + OpStore %9 %50 + %52 = OpIAdd %6 %44 %46 + OpStore %16 %52 + OpBranch %26 + %26 = OpLabel + %53 = OpLoad %6 %16 + %55 = OpSLessThan %29 %53 %54 + OpBranchConditional %55 %23 %25 + %25 = OpLabel + %57 = OpLoad %6 %42 + %58 = OpSGreaterThan %29 %57 %46 + OpSelectionMerge %60 None + OpBranchConditional %58 %59 %60 + %59 = OpLabel + %61 = OpLoad %7 %9 + %62 = OpIAdd %7 %61 %47 + OpStore %9 %62 + OpBranch %60 + %60 = OpLabel + %63 = OpLoad %7 %9 + %64 = OpIEqual %48 %63 %14 + %65 = OpAll %29 %64 + OpSelectionMerge %67 None + OpBranchConditional %65 %66 %70 + %66 = OpLabel + OpStore %36 %69 + OpBranch %67 + %70 = OpLabel + OpStore %36 %38 + OpBranch %67 + %67 = OpLabel + OpReturn + OpFunctionEnd +END + +# uniforms for variant + +# one +BUFFER variant_one DATA_TYPE int32 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-target-lowering-dfdx-cos.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-target-lowering-dfdx-cos.amber new file mode 100644 index 0000000..79c58c5 --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-target-lowering-dfdx-cos.amber @@ -0,0 +1,154 @@ +#!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 GraphicsFuzz. + +# Short description: A fragment shader that covers a specific target lowering code path. + +# The test passes because shader always writes red. + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 310 es +# precision highp float; +# +# layout(location = 0) out vec4 _GLF_color; +# layout(set = 0, binding = 0) uniform buf0 +# { +# float two; +# }; +# +# void main() +# { +# float a = dFdx(cos(gl_FragCoord.x)); +# +# // The weight value doesn't matter since two equals 2. +# float b = mix(2.0, two, a); +# +# // Always true. +# if (b >= 1.9 && b <= 2.1) +# _GLF_color = vec4(1, 0, 0, 1); +# else +# _GLF_color = vec4(0); +# } +SHADER fragment variant_fragment_shader SPIRV-ASM +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 8 +; Bound: 48 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %11 %42 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 310 + OpName %4 "main" + OpName %8 "a" + OpName %11 "gl_FragCoord" + OpName %19 "b" + OpName %21 "buf0" + OpMemberName %21 0 "two" + OpName %23 "" + OpName %42 "_GLF_color" + OpDecorate %11 BuiltIn FragCoord + OpMemberDecorate %21 0 Offset 0 + OpDecorate %21 Block + OpDecorate %23 DescriptorSet 0 + OpDecorate %23 Binding 0 + OpDecorate %42 Location 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 0 + %14 = OpTypePointer Input %6 + %20 = OpConstant %6 2 + %21 = OpTypeStruct %6 + %22 = OpTypePointer Uniform %21 + %23 = OpVariable %22 Uniform + %24 = OpTypeInt 32 1 + %25 = OpConstant %24 0 + %26 = OpTypePointer Uniform %6 + %32 = OpConstant %6 1.89999998 + %33 = OpTypeBool + %36 = OpConstant %6 2.0999999 + %41 = OpTypePointer Output %9 + %42 = OpVariable %41 Output + %43 = OpConstant %6 1 + %44 = OpConstant %6 0 + %45 = OpConstantComposite %9 %43 %44 %44 %43 + %47 = OpConstantComposite %9 %44 %44 %44 %44 + %4 = OpFunction %2 None %3 + %5 = OpLabel + %8 = OpVariable %7 Function + %19 = OpVariable %7 Function + %15 = OpAccessChain %14 %11 %13 + %16 = OpLoad %6 %15 + %17 = OpExtInst %6 %1 Cos %16 + %18 = OpDPdx %6 %17 + OpStore %8 %18 + %27 = OpAccessChain %26 %23 %25 + %28 = OpLoad %6 %27 + %29 = OpLoad %6 %8 + %30 = OpExtInst %6 %1 FMix %20 %28 %29 + OpStore %19 %30 + %31 = OpLoad %6 %19 + %34 = OpFOrdGreaterThanEqual %33 %31 %32 + %35 = OpLoad %6 %19 + %37 = OpFOrdLessThanEqual %33 %35 %36 + %38 = OpLogicalAnd %33 %34 %37 + OpSelectionMerge %40 None + OpBranchConditional %38 %39 %46 + %39 = OpLabel + OpStore %42 %45 + OpBranch %40 + %46 = OpLabel + OpStore %42 %47 + OpBranch %40 + %40 = OpLabel + OpReturn + OpFunctionEnd +END + +# uniforms for variant + +# two +BUFFER variant_two DATA_TYPE float DATA + 2.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_two 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-val-cfg-case-fallthrough.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-val-cfg-case-fallthrough.amber new file mode 100644 index 0000000..898cad0 --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-val-cfg-case-fallthrough.amber @@ -0,0 +1,154 @@ +#!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 GraphicsFuzz. + +# Short description: A fragment shader that covers a specific shader validation path. + +# The test passes because shader always writes red. + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 310 es +# precision highp float; +# precision highp int; +# +# layout(location = 0) out vec4 _GLF_color; +# layout(set = 0, binding = 0) uniform buf0 +# { +# int one; +# }; +# +# void main() +# { +# int a = 0; +# +# switch(one) +# { +# case 2: +# case 3: +# a = 1; +# case 4: +# break; +# default: +# a = 2; +# break; +# } +# +# if (a == 2) +# _GLF_color = vec4(1, 0, 0, 1); +# else +# _GLF_color = vec4(0); +# } +SHADER fragment variant_fragment_shader SPIRV-ASM +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 8 +; Bound: 39 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %33 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 310 + OpName %4 "main" + OpName %8 "a" + OpName %10 "buf0" + OpMemberName %10 0 "one" + OpName %12 "" + OpName %33 "_GLF_color" + OpMemberDecorate %10 0 Offset 0 + OpDecorate %10 Block + OpDecorate %12 DescriptorSet 0 + OpDecorate %12 Binding 0 + OpDecorate %33 Location 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeInt 32 1 + %7 = OpTypePointer Function %6 + %9 = OpConstant %6 0 + %10 = OpTypeStruct %6 + %11 = OpTypePointer Uniform %10 + %12 = OpVariable %11 Uniform + %13 = OpTypePointer Uniform %6 + %20 = OpConstant %6 1 + %22 = OpConstant %6 2 + %26 = OpTypeBool + %30 = OpTypeFloat 32 + %31 = OpTypeVector %30 4 + %32 = OpTypePointer Output %31 + %33 = OpVariable %32 Output + %34 = OpConstant %30 1 + %35 = OpConstant %30 0 + %36 = OpConstantComposite %31 %34 %35 %35 %34 + %38 = OpConstantComposite %31 %35 %35 %35 %35 + %4 = OpFunction %2 None %3 + %5 = OpLabel + %8 = OpVariable %7 Function + OpStore %8 %9 + %14 = OpAccessChain %13 %12 %9 + %15 = OpLoad %6 %14 + OpSelectionMerge %19 None + OpSwitch %15 %18 2 %16 3 %16 4 %17 + %18 = OpLabel + OpStore %8 %22 + OpBranch %19 + %16 = OpLabel + OpStore %8 %20 + OpBranch %17 + %17 = OpLabel + OpBranch %19 + %19 = OpLabel + %25 = OpLoad %6 %8 + %27 = OpIEqual %26 %25 %22 + OpSelectionMerge %29 None + OpBranchConditional %27 %28 %37 + %28 = OpLabel + OpStore %33 %36 + OpBranch %29 + %37 = OpLabel + OpStore %33 %38 + OpBranch %29 + %29 = OpLabel + OpReturn + OpFunctionEnd +END + +# uniforms for variant + +# one +BUFFER variant_one DATA_TYPE int32 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-wrap-op-kill-for-loop.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-wrap-op-kill-for-loop.amber new file mode 100644 index 0000000..2b5233d --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-wrap-op-kill-for-loop.amber @@ -0,0 +1,193 @@ +#!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 GraphicsFuzz. + +# Short description: A fragment shader that covers a specific OpKill wrapping code path + +# The test passes because shader always writes red. + +# Optimized using spirv-opt with the following arguments: +# '--vector-dce' +# '--combine-access-chains' +# '--eliminate-local-multi-store' +# '--scalar-replacement=100' +# '--simplify-instructions' +# '--eliminate-dead-branches' +# '--merge-return' +# '--combine-access-chains' +# '--simplify-instructions' +# '--eliminate-dead-branches' +# '--merge-blocks' +# spirv-opt commit hash: 9215c1b7df0029f27807e8c8d7ec80532ce90a87 + + + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 310 es +# precision highp float; +# precision highp int; +# +# layout(location = 0) out vec4 _GLF_color; +# +# layout(set = 0, binding = 0) uniform buf0 +# { +# int zero; +# }; +# +# void func(int x) +# { +# // Always false. +# if (x < zero) +# discard; +# +# if (x > 8) +# _GLF_color = vec4(1, 0, 0, 1); +# else +# _GLF_color = vec4(0); +# } +# +# void main() +# { +# _GLF_color = vec4(0); +# +# for (int i = 0; i < 10 + zero; i++) +# func(i); +# } +SHADER fragment variant_fragment_shader SPIRV-ASM +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 8 +; Bound: 58 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %33 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 310 + OpName %4 "main" + OpName %10 "func(i1;" + OpName %9 "x" + OpName %13 "buf0" + OpMemberName %13 0 "zero" + OpName %15 "" + OpName %33 "_GLF_color" + OpName %39 "i" + OpName %51 "param" + OpMemberDecorate %13 0 Offset 0 + OpDecorate %13 Block + OpDecorate %15 DescriptorSet 0 + OpDecorate %15 Binding 0 + OpDecorate %33 Location 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeInt 32 1 + %7 = OpTypePointer Function %6 + %8 = OpTypeFunction %2 %7 + %13 = OpTypeStruct %6 + %14 = OpTypePointer Uniform %13 + %15 = OpVariable %14 Uniform + %16 = OpConstant %6 0 + %17 = OpTypePointer Uniform %6 + %20 = OpTypeBool + %26 = OpConstant %6 8 + %30 = OpTypeFloat 32 + %31 = OpTypeVector %30 4 + %32 = OpTypePointer Output %31 + %33 = OpVariable %32 Output + %34 = OpConstant %30 1 + %35 = OpConstant %30 0 + %36 = OpConstantComposite %31 %34 %35 %35 %34 + %38 = OpConstantComposite %31 %35 %35 %35 %35 + %46 = OpConstant %6 10 + %55 = OpConstant %6 1 + %4 = OpFunction %2 None %3 + %5 = OpLabel + %39 = OpVariable %7 Function + %51 = OpVariable %7 Function + OpStore %33 %38 + OpStore %39 %16 + OpBranch %40 + %40 = OpLabel + %57 = OpPhi %6 %16 %5 %56 %41 + %47 = OpAccessChain %17 %15 %16 + %48 = OpLoad %6 %47 + %49 = OpIAdd %6 %46 %48 + %50 = OpSLessThan %20 %57 %49 + OpLoopMerge %42 %41 None + OpBranchConditional %50 %41 %42 + %41 = OpLabel + OpStore %51 %57 + %53 = OpFunctionCall %2 %10 %51 + %56 = OpIAdd %6 %57 %55 + OpStore %39 %56 + OpBranch %40 + %42 = OpLabel + OpReturn + OpFunctionEnd + %10 = OpFunction %2 None %8 + %9 = OpFunctionParameter %7 + %11 = OpLabel + %12 = OpLoad %6 %9 + %18 = OpAccessChain %17 %15 %16 + %19 = OpLoad %6 %18 + %21 = OpSLessThan %20 %12 %19 + OpSelectionMerge %23 None + OpBranchConditional %21 %22 %23 + %22 = OpLabel + OpKill + %23 = OpLabel + %25 = OpLoad %6 %9 + %27 = OpSGreaterThan %20 %25 %26 + OpSelectionMerge %29 None + OpBranchConditional %27 %28 %37 + %28 = OpLabel + OpStore %33 %36 + OpBranch %29 + %37 = OpLabel + OpStore %33 %38 + OpBranch %29 + %29 = OpLabel + OpReturn + OpFunctionEnd +END + +# uniforms for variant + +# zero +BUFFER variant_zero DATA_TYPE int32 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_zero 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-wrap-op-kill-two-branches.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-wrap-op-kill-two-branches.amber new file mode 100644 index 0000000..a3ded97 --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-wrap-op-kill-two-branches.amber @@ -0,0 +1,240 @@ +#!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 GraphicsFuzz. + +# Short description: A fragment shader that covers a specific OpKill wrapping path. + +# The test passes because shader always writes red. + +# Optimized using spirv-opt with the following arguments: +# '--convert-local-access-chains' +# '--eliminate-dead-branches' +# '--merge-blocks' +# '--eliminate-local-single-store' +# '--eliminate-dead-branches' +# '--merge-return' +# '--inline-entry-points-exhaustive' +# '--copy-propagate-arrays' +# '--if-conversion' +# '--reduce-load-size' +# '--convert-local-access-chains' +# '--if-conversion' +# '--redundancy-elimination' +# '--if-conversion' +# '--simplify-instructions' +# '--scalar-replacement=100' +# '--simplify-instructions' +# '--if-conversion' +# '--eliminate-dead-inserts' +# '--eliminate-dead-branches' +# '--eliminate-dead-code-aggressive' +# spirv-opt commit hash: 9215c1b7df0029f27807e8c8d7ec80532ce90a87 + + + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 310 es +# precision highp float; +# precision highp int; +# +# layout(location = 0) out vec4 _GLF_color; +# layout(set = 0, binding = 0) uniform buf0 +# { +# int five; +# }; +# +# float func(float x) +# { +# if (x > 5.0) +# { +# if (gl_FragCoord.x < 0.5) +# discard; +# else if (gl_FragCoord.y < 0.5) +# discard; +# } +# +# return x + 1.0; +# } +# +# void main() +# { +# float f = 0.0; +# +# for(int i = 0; i < five; i++) +# f = func(float(i)); +# +# if (f == 5.0) +# _GLF_color = vec4(1, 0, 0, 1); +# else +# _GLF_color = vec4(0); +# } +SHADER fragment variant_fragment_shader SPIRV-ASM +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 8 +; Bound: 79 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %20 %75 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 310 + OpName %4 "main" + OpName %10 "func(f1;" + OpName %9 "x" + OpName %20 "gl_FragCoord" + OpName %44 "f" + OpName %48 "i" + OpName %56 "buf0" + OpMemberName %56 0 "five" + OpName %58 "" + OpName %65 "param" + OpName %75 "_GLF_color" + OpDecorate %20 BuiltIn FragCoord + OpMemberDecorate %56 0 Offset 0 + OpDecorate %56 Block + OpDecorate %58 DescriptorSet 0 + OpDecorate %58 Binding 0 + OpDecorate %75 Location 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeFloat 32 + %7 = OpTypePointer Function %6 + %8 = OpTypeFunction %6 %7 + %13 = OpConstant %6 5 + %14 = OpTypeBool + %18 = OpTypeVector %6 4 + %19 = OpTypePointer Input %18 + %20 = OpVariable %19 Input + %21 = OpTypeInt 32 0 + %22 = OpConstant %21 0 + %23 = OpTypePointer Input %6 + %26 = OpConstant %6 0.5 + %32 = OpConstant %21 1 + %40 = OpConstant %6 1 + %45 = OpConstant %6 0 + %46 = OpTypeInt 32 1 + %47 = OpTypePointer Function %46 + %49 = OpConstant %46 0 + %56 = OpTypeStruct %46 + %57 = OpTypePointer Uniform %56 + %58 = OpVariable %57 Uniform + %59 = OpTypePointer Uniform %46 + %68 = OpConstant %46 1 + %74 = OpTypePointer Output %18 + %75 = OpVariable %74 Output + %76 = OpConstantComposite %18 %40 %45 %45 %40 + %78 = OpConstantComposite %18 %45 %45 %45 %45 + %4 = OpFunction %2 None %3 + %5 = OpLabel + %44 = OpVariable %7 Function + %48 = OpVariable %47 Function + %65 = OpVariable %7 Function + OpStore %44 %45 + OpStore %48 %49 + OpBranch %50 + %50 = OpLabel + %55 = OpLoad %46 %48 + %60 = OpAccessChain %59 %58 %49 + %61 = OpLoad %46 %60 + %62 = OpSLessThan %14 %55 %61 + OpLoopMerge %52 %51 None + OpBranchConditional %62 %51 %52 + %51 = OpLabel + %63 = OpLoad %46 %48 + %64 = OpConvertSToF %6 %63 + OpStore %65 %64 + %66 = OpFunctionCall %6 %10 %65 + OpStore %44 %66 + %67 = OpLoad %46 %48 + %69 = OpIAdd %46 %67 %68 + OpStore %48 %69 + OpBranch %50 + %52 = OpLabel + %70 = OpLoad %6 %44 + %71 = OpFOrdEqual %14 %70 %13 + OpSelectionMerge %73 None + OpBranchConditional %71 %72 %77 + %72 = OpLabel + OpStore %75 %76 + OpBranch %73 + %77 = OpLabel + OpStore %75 %78 + OpBranch %73 + %73 = OpLabel + OpReturn + OpFunctionEnd + %10 = OpFunction %6 None %8 + %9 = OpFunctionParameter %7 + %11 = OpLabel + %12 = OpLoad %6 %9 + %15 = OpFOrdGreaterThan %14 %12 %13 + OpSelectionMerge %17 None + OpBranchConditional %15 %16 %17 + %16 = OpLabel + %24 = OpAccessChain %23 %20 %22 + %25 = OpLoad %6 %24 + %27 = OpFOrdLessThan %14 %25 %26 + OpSelectionMerge %29 None + OpBranchConditional %27 %28 %31 + %28 = OpLabel + OpKill + %31 = OpLabel + %33 = OpAccessChain %23 %20 %32 + %34 = OpLoad %6 %33 + %35 = OpFOrdLessThan %14 %34 %26 + OpSelectionMerge %37 None + OpBranchConditional %35 %36 %37 + %36 = OpLabel + OpKill + %37 = OpLabel + OpBranch %29 + %29 = OpLabel + OpBranch %17 + %17 = OpLabel + %39 = OpLoad %6 %9 + %41 = OpFAdd %6 %39 %40 + OpReturnValue %41 + OpFunctionEnd +END + +# uniforms for variant + +# five +BUFFER variant_five DATA_TYPE int32 DATA + 5 +END + +BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM + +PIPELINE graphics variant_pipeline + ATTACH variant_vertex_shader + ATTACH variant_fragment_shader + FRAMEBUFFER_SIZE 256 256 + BIND BUFFER variant_framebuffer AS color LOCATION 0 + BIND BUFFER variant_five 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/index.txt b/external/vulkancts/data/vulkan/amber/graphicsfuzz/index.txt index 60d55fd..f7d0832 100644 --- a/external/vulkancts/data/vulkan/amber/graphicsfuzz/index.txt +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/index.txt @@ -13,6 +13,8 @@ { "continue-and-merge.amber", "continue-and-merge", "A fragment shader with two nested loops" }, { "control-flow-in-function.amber", "control-flow-in-function", "A fragment shader with a lot of control flow" }, { "control-flow-switch.amber", "control-flow-switch", "A fragment shader with somewhat complex control flow and a switch" }, +{ "cov-analysis-reachable-from-many.amber", "cov-analysis-reachable-from-many", "A fragment shader that covers a specific LLVM analysis code path." }, +{ "cov-apfloat-acos-ldexp.amber", "cov-apfloat-acos-ldexp", "A fragment shader that covers a specific AP float code path." }, { "cov-apfloat-determinant.amber", "cov-apfloat-determinant", "A fragment shader that covers a specific arbitrary precision float usage." }, { "cov-apfloat-tanh.amber", "cov-apfloat-tanh", "A fragment shader that covers a specific arbitrary precision float usage." }, { "cov-basic-block-discard-in-function.amber", "cov-basic-block-discard-in-function", "A fragment shader that covers a specific basic block code path" }, @@ -24,6 +26,7 @@ { "cov-const-folding-clamp-vs-original.amber", "cov-const-folding-clamp-vs-original", "A fragment shader that covers a specific constant folding path" }, { "cov-const-folding-dot-condition-true.amber", "cov-const-folding-dot-condition-true", "A fragment shader that covers a specific const folding rule path." }, { "cov-const-folding-dot-determinant.amber", "cov-const-folding-dot-determinant", "A fragment shader that covers a specific const folding rule path." }, +{ "cov-const-folding-gte-const-first.amber", "cov-const-folding-gte-const-first", "A fragment shader that covers a specific constant folding path" }, { "cov-const-folding-min-as-loop-range.amber", "cov-const-folding-min-as-loop-range", "A fragment shader that covers a specific constant folding path" }, { "cov-const-folding-vector-shuffle.amber", "cov-const-folding-vector-shuffle", "A fragment shader that covers a specific const folding rule path." }, { "cov-constant-folding-atan-over-tanh.amber", "cov-constant-folding-atan-over-tanh", "A fragment shader that covers a specific constant folding code path." }, @@ -42,11 +45,13 @@ { "cov-fold-logical-and-const-variable.amber", "cov-fold-logical-and-const-variable", "A fragment shader that covers a specific instruction folding path." }, { "cov-fold-logical-and-constant.amber", "cov-fold-logical-and-constant", "A fragment shader that covers a specific instruction folding path." }, { "cov-fold-logical-or-constant.amber", "cov-fold-logical-or-constant", "A fragment shader that covers a specific instruction folding path." }, +{ "cov-fold-negate-min-int-value.amber", "cov-fold-negate-min-int-value", "A fragment shader that covers a specific instruction folding path." }, { "cov-fold-negate-variable.amber", "cov-fold-negate-variable", "A fragment shader that covers a specific instruction folding path." }, { "cov-fold-shift-gte32.amber", "cov-fold-shift-gte32", "A fragment shader that covers a specific instruction folding path." }, { "cov-fold-shift-right-arithmetic.amber", "cov-fold-shift-right-arithmetic", "A fragment shader that covers a specific instruction folding path." }, { "cov-fold-switch-udiv.amber", "cov-fold-switch-udiv", "A fragment shader that covers a specific instruction folding path." }, { "cov-folding-clamp-cmp-const-first.amber", "cov-folding-clamp-cmp-const-first", "A fragment shader that covers a specific constant folding path" }, +{ "cov-folding-merge-add-sub-uniform.amber", "cov-folding-merge-add-sub-uniform", "A fragment shader that covers a specific instruction folding path." }, { "cov-folding-rules-construct-extract.amber", "cov-folding-rules-construct-extract", "A fragment shader that covers a specific instruction folding path." }, { "cov-folding-rules-dot-extract.amber", "cov-folding-rules-dot-extract", "A fragment shader that covers a specific instruction folding path." }, { "cov-folding-rules-dot-no-extract.amber", "cov-folding-rules-dot-no-extract", "A fragment shader that covers a specific instruction folding path." }, @@ -56,29 +61,48 @@ { "cov-folding-rules-merge-mul-div.amber", "cov-folding-rules-merge-mul-div", "A fragment shader that covers a specific instruction folding path." }, { "cov-folding-rules-merge-sub-add.amber", "cov-folding-rules-merge-sub-add", "A fragment shader that covers a specific instruction folding path." }, { "cov-folding-rules-merge-sub-sub.amber", "cov-folding-rules-merge-sub-sub", "A fragment shader that covers a specific instruction folding path." }, +{ "cov-folding-rules-merge-var-sub.amber", "cov-folding-rules-merge-var-sub", "A fragment shader that covers a specific instruction folding path." }, +{ "cov-folding-rules-mix-uniform-weight.amber", "cov-folding-rules-mix-uniform-weight", "A fragment shader that covers a specific instruction folding path." }, { "cov-folding-rules-negate-div.amber", "cov-folding-rules-negate-div", "A fragment shader that covers a specific instruction folding path." }, +{ "cov-folding-rules-negate-sub.amber", "cov-folding-rules-negate-sub", "A fragment shader that covers a specific instruction folding path." }, { "cov-folding-rules-redundant-mix.amber", "cov-folding-rules-redundant-mix", "A fragment shader that covers a specific instruction folding path." }, { "cov-folding-rules-shuffle-extract.amber", "cov-folding-rules-shuffle-extract", "A fragment shader that covers a specific instruction folding path." }, { "cov-folding-rules-shuffle-mix.amber", "cov-folding-rules-shuffle-mix", "A fragment shader that covers a specific instruction folding path." }, { "cov-folding-rules-split-vector-init.amber", "cov-folding-rules-split-vector-init", "A fragment shader that covers a specific instruction folding path." }, +{ "cov-folding-rules-vec-mix-uniform.amber", "cov-folding-rules-vec-mix-uniform", "A fragment shader that covers a specific instruction folding path." }, { "cov-if-conversion-identical-branches.amber", "cov-if-conversion-identical-branches", "A fragment shader that covers a specific if condition conversion path." }, +{ "cov-inc-inside-switch-and-for.amber", "cov-inc-inside-switch-and-for", "A fragment shader that covers a specific LLVM analysis code path." }, { "cov-inline-pass-empty-block.amber", "cov-inline-pass-empty-block", "A fragment shader that covers a specific inlining optimization path." }, { "cov-inline-pass-nested-loops.amber", "cov-inline-pass-nested-loops", "A fragment shader that covers a specific inlining optimization path." }, { "cov-inline-pass-return-in-loop.amber", "cov-inline-pass-return-in-loop", "A fragment shader that covers a specific inlining optimization path." }, { "cov-inline-pass-unreachable-func.amber", "cov-inline-pass-unreachable-func", "A fragment shader that covers a specific inlining optimization path." }, { "cov-intervalmap-set-stop.amber", "cov-intervalmap-set-stop", "A fragment shader that covers a specific interval map code path." }, +{ "cov-irbuilder-matrix-cell-uniform.amber", "cov-irbuilder-matrix-cell-uniform", "A fragment shader that covers a specific IR builder path." }, { "cov-liveinterval-different-dest.amber", "cov-liveinterval-different-dest", "A fragment shader that covers a specific live interval code path." }, { "cov-machinevaluetype-one-iter-loop.amber", "cov-machinevaluetype-one-iter-loop", "A fragment shader that covers a specific machine value type code path" }, +{ "cov-mem-pass-sum-struct-members.amber", "cov-mem-pass-sum-struct-members", "A fragment shader that covers a specific mem pass code path." }, +{ "cov-mem-pass-unused-component.amber", "cov-mem-pass-unused-component", "A fragment shader that covers a specific mem pass code path." }, { "cov-merge-return-condition-twice.amber", "cov-merge-return-condition-twice", "A fragment shader that covers a specific return merge path." }, { "cov-modf-integer-to-private.amber", "cov-modf-integer-to-private", "A fragment shader that covers a specific private to local path." }, +{ "cov-pattern-match-signum.amber", "cov-pattern-match-signum", "A fragment shader that covers a specific pattern matching path." }, +{ "cov-pattern-match-single-bit.amber", "cov-pattern-match-single-bit", "A fragment shader that covers a specific pattern matching path." }, { "cov-reduce-load-replace-extract.amber", "cov-reduce-load-replace-extract", "A fragment shader that covers a specific load size reduction path." }, +{ "cov-replace-copy-object.amber", "cov-replace-copy-object", "A fragment shader that covers a specific shader simplification path." }, +{ "cov-scaled-number-nested-loops.amber", "cov-scaled-number-nested-loops", "A fragment shader that covers a specific scaled number code path." }, +{ "cov-set-vector-cos-fragcoord.amber", "cov-set-vector-cos-fragcoord", "A fragment shader that covers a specific set vector code path." }, +{ "cov-simplification-unused-struct.amber", "cov-simplification-unused-struct", "A fragment shader that covers a specific shader simplification path." }, { "cov-simplification-while-inside-for.amber", "cov-simplification-while-inside-for", "A fragment shader that covers a specific code simplification path." }, { "cov-single-block-elim-self-assign.amber", "cov-single-block-elim-self-assign", "A fragment shader that covers a specific single block elimination path." }, +{ "cov-single-store-elim-assume-store.amber", "cov-single-store-elim-assume-store", "A fragment shader that covers a specific single store elimination path." }, { "cov-ssa-rewrite-case-with-default.amber", "cov-ssa-rewrite-case-with-default", "A fragment shader that covers a specific SSA rewrite path." }, +{ "cov-target-lowering-dfdx-cos.amber", "cov-target-lowering-dfdx-cos", "A fragment shader that covers a specific target lowering code path." }, { "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-val-cfg-case-fallthrough.amber", "cov-val-cfg-case-fallthrough", "A fragment shader that covers a specific shader validation path." }, { "cov-vector-dce-inc-unused-comp.amber", "cov-vector-dce-inc-unused-comp", "A fragment shader that covers a specific vector DCE path." }, { "cov-vector-dce-unused-component.amber", "cov-vector-dce-unused-component", "A fragment shader that covers a specific vector DCE path." }, { "cov-vector-log2-cosh.amber", "cov-vector-log2-cosh", "A fragment shader that covers a specific vector log2 and cosh code path." }, +{ "cov-wrap-op-kill-for-loop.amber", "cov-wrap-op-kill-for-loop", "A fragment shader that covers a specific OpKill wrapping code path" }, +{ "cov-wrap-op-kill-two-branches.amber", "cov-wrap-op-kill-two-branches", "A fragment shader that covers a specific OpKill wrapping path." }, { "dead-barriers-in-loops.amber", "dead-barriers-in-loops", "A compute shader with dead barriers" }, { "dead-struct-init.amber", "dead-struct-init", "A fragment shader that uses struct initializers" }, { "disc-and-add-in-func-in-loop.amber", "disc-and-add-in-func-in-loop", "A fragment shader with discard and add in function in loop" }, diff --git a/external/vulkancts/mustpass/master/vk-default-no-waivers.txt b/external/vulkancts/mustpass/master/vk-default-no-waivers.txt index 367f133..6eab2a4 100644 --- a/external/vulkancts/mustpass/master/vk-default-no-waivers.txt +++ b/external/vulkancts/mustpass/master/vk-default-no-waivers.txt @@ -585825,6 +585825,8 @@ dEQP-VK.graphicsfuzz.conditional-return-in-infinite-while dEQP-VK.graphicsfuzz.continue-and-merge dEQP-VK.graphicsfuzz.control-flow-in-function dEQP-VK.graphicsfuzz.control-flow-switch +dEQP-VK.graphicsfuzz.cov-analysis-reachable-from-many +dEQP-VK.graphicsfuzz.cov-apfloat-acos-ldexp dEQP-VK.graphicsfuzz.cov-apfloat-determinant dEQP-VK.graphicsfuzz.cov-apfloat-tanh dEQP-VK.graphicsfuzz.cov-basic-block-discard-in-function @@ -585836,6 +585838,7 @@ dEQP-VK.graphicsfuzz.cov-const-folding-clamp-min dEQP-VK.graphicsfuzz.cov-const-folding-clamp-vs-original dEQP-VK.graphicsfuzz.cov-const-folding-dot-condition-true dEQP-VK.graphicsfuzz.cov-const-folding-dot-determinant +dEQP-VK.graphicsfuzz.cov-const-folding-gte-const-first dEQP-VK.graphicsfuzz.cov-const-folding-min-as-loop-range dEQP-VK.graphicsfuzz.cov-const-folding-vector-shuffle dEQP-VK.graphicsfuzz.cov-constant-folding-atan-over-tanh @@ -585854,11 +585857,13 @@ dEQP-VK.graphicsfuzz.cov-fold-div-variable-by-zero dEQP-VK.graphicsfuzz.cov-fold-logical-and-const-variable dEQP-VK.graphicsfuzz.cov-fold-logical-and-constant dEQP-VK.graphicsfuzz.cov-fold-logical-or-constant +dEQP-VK.graphicsfuzz.cov-fold-negate-min-int-value dEQP-VK.graphicsfuzz.cov-fold-negate-variable dEQP-VK.graphicsfuzz.cov-fold-shift-gte32 dEQP-VK.graphicsfuzz.cov-fold-shift-right-arithmetic dEQP-VK.graphicsfuzz.cov-fold-switch-udiv dEQP-VK.graphicsfuzz.cov-folding-clamp-cmp-const-first +dEQP-VK.graphicsfuzz.cov-folding-merge-add-sub-uniform dEQP-VK.graphicsfuzz.cov-folding-rules-construct-extract dEQP-VK.graphicsfuzz.cov-folding-rules-dot-extract dEQP-VK.graphicsfuzz.cov-folding-rules-dot-no-extract @@ -585868,29 +585873,48 @@ dEQP-VK.graphicsfuzz.cov-folding-rules-merge-divs dEQP-VK.graphicsfuzz.cov-folding-rules-merge-mul-div dEQP-VK.graphicsfuzz.cov-folding-rules-merge-sub-add dEQP-VK.graphicsfuzz.cov-folding-rules-merge-sub-sub +dEQP-VK.graphicsfuzz.cov-folding-rules-merge-var-sub +dEQP-VK.graphicsfuzz.cov-folding-rules-mix-uniform-weight dEQP-VK.graphicsfuzz.cov-folding-rules-negate-div +dEQP-VK.graphicsfuzz.cov-folding-rules-negate-sub dEQP-VK.graphicsfuzz.cov-folding-rules-redundant-mix dEQP-VK.graphicsfuzz.cov-folding-rules-shuffle-extract dEQP-VK.graphicsfuzz.cov-folding-rules-shuffle-mix dEQP-VK.graphicsfuzz.cov-folding-rules-split-vector-init +dEQP-VK.graphicsfuzz.cov-folding-rules-vec-mix-uniform dEQP-VK.graphicsfuzz.cov-if-conversion-identical-branches +dEQP-VK.graphicsfuzz.cov-inc-inside-switch-and-for dEQP-VK.graphicsfuzz.cov-inline-pass-empty-block dEQP-VK.graphicsfuzz.cov-inline-pass-nested-loops dEQP-VK.graphicsfuzz.cov-inline-pass-return-in-loop dEQP-VK.graphicsfuzz.cov-inline-pass-unreachable-func dEQP-VK.graphicsfuzz.cov-intervalmap-set-stop +dEQP-VK.graphicsfuzz.cov-irbuilder-matrix-cell-uniform dEQP-VK.graphicsfuzz.cov-liveinterval-different-dest dEQP-VK.graphicsfuzz.cov-machinevaluetype-one-iter-loop +dEQP-VK.graphicsfuzz.cov-mem-pass-sum-struct-members +dEQP-VK.graphicsfuzz.cov-mem-pass-unused-component dEQP-VK.graphicsfuzz.cov-merge-return-condition-twice dEQP-VK.graphicsfuzz.cov-modf-integer-to-private +dEQP-VK.graphicsfuzz.cov-pattern-match-signum +dEQP-VK.graphicsfuzz.cov-pattern-match-single-bit dEQP-VK.graphicsfuzz.cov-reduce-load-replace-extract +dEQP-VK.graphicsfuzz.cov-replace-copy-object +dEQP-VK.graphicsfuzz.cov-scaled-number-nested-loops +dEQP-VK.graphicsfuzz.cov-set-vector-cos-fragcoord +dEQP-VK.graphicsfuzz.cov-simplification-unused-struct dEQP-VK.graphicsfuzz.cov-simplification-while-inside-for dEQP-VK.graphicsfuzz.cov-single-block-elim-self-assign +dEQP-VK.graphicsfuzz.cov-single-store-elim-assume-store dEQP-VK.graphicsfuzz.cov-ssa-rewrite-case-with-default +dEQP-VK.graphicsfuzz.cov-target-lowering-dfdx-cos dEQP-VK.graphicsfuzz.cov-types-return-in-main-never-hit +dEQP-VK.graphicsfuzz.cov-val-cfg-case-fallthrough dEQP-VK.graphicsfuzz.cov-vector-dce-inc-unused-comp dEQP-VK.graphicsfuzz.cov-vector-dce-unused-component dEQP-VK.graphicsfuzz.cov-vector-log2-cosh +dEQP-VK.graphicsfuzz.cov-wrap-op-kill-for-loop +dEQP-VK.graphicsfuzz.cov-wrap-op-kill-two-branches dEQP-VK.graphicsfuzz.dead-barriers-in-loops dEQP-VK.graphicsfuzz.dead-struct-init dEQP-VK.graphicsfuzz.disc-and-add-in-func-in-loop diff --git a/external/vulkancts/mustpass/master/vk-default.txt b/external/vulkancts/mustpass/master/vk-default.txt index 6d28ffa..f3d8512 100644 --- a/external/vulkancts/mustpass/master/vk-default.txt +++ b/external/vulkancts/mustpass/master/vk-default.txt @@ -585672,6 +585672,8 @@ dEQP-VK.graphicsfuzz.conditional-return-in-infinite-while dEQP-VK.graphicsfuzz.continue-and-merge dEQP-VK.graphicsfuzz.control-flow-in-function dEQP-VK.graphicsfuzz.control-flow-switch +dEQP-VK.graphicsfuzz.cov-analysis-reachable-from-many +dEQP-VK.graphicsfuzz.cov-apfloat-acos-ldexp dEQP-VK.graphicsfuzz.cov-apfloat-determinant dEQP-VK.graphicsfuzz.cov-apfloat-tanh dEQP-VK.graphicsfuzz.cov-basic-block-discard-in-function @@ -585683,6 +585685,7 @@ dEQP-VK.graphicsfuzz.cov-const-folding-clamp-min dEQP-VK.graphicsfuzz.cov-const-folding-clamp-vs-original dEQP-VK.graphicsfuzz.cov-const-folding-dot-condition-true dEQP-VK.graphicsfuzz.cov-const-folding-dot-determinant +dEQP-VK.graphicsfuzz.cov-const-folding-gte-const-first dEQP-VK.graphicsfuzz.cov-const-folding-min-as-loop-range dEQP-VK.graphicsfuzz.cov-const-folding-vector-shuffle dEQP-VK.graphicsfuzz.cov-constant-folding-atan-over-tanh @@ -585701,11 +585704,13 @@ dEQP-VK.graphicsfuzz.cov-fold-div-variable-by-zero dEQP-VK.graphicsfuzz.cov-fold-logical-and-const-variable dEQP-VK.graphicsfuzz.cov-fold-logical-and-constant dEQP-VK.graphicsfuzz.cov-fold-logical-or-constant +dEQP-VK.graphicsfuzz.cov-fold-negate-min-int-value dEQP-VK.graphicsfuzz.cov-fold-negate-variable dEQP-VK.graphicsfuzz.cov-fold-shift-gte32 dEQP-VK.graphicsfuzz.cov-fold-shift-right-arithmetic dEQP-VK.graphicsfuzz.cov-fold-switch-udiv dEQP-VK.graphicsfuzz.cov-folding-clamp-cmp-const-first +dEQP-VK.graphicsfuzz.cov-folding-merge-add-sub-uniform dEQP-VK.graphicsfuzz.cov-folding-rules-construct-extract dEQP-VK.graphicsfuzz.cov-folding-rules-dot-extract dEQP-VK.graphicsfuzz.cov-folding-rules-dot-no-extract @@ -585715,29 +585720,48 @@ dEQP-VK.graphicsfuzz.cov-folding-rules-merge-divs dEQP-VK.graphicsfuzz.cov-folding-rules-merge-mul-div dEQP-VK.graphicsfuzz.cov-folding-rules-merge-sub-add dEQP-VK.graphicsfuzz.cov-folding-rules-merge-sub-sub +dEQP-VK.graphicsfuzz.cov-folding-rules-merge-var-sub +dEQP-VK.graphicsfuzz.cov-folding-rules-mix-uniform-weight dEQP-VK.graphicsfuzz.cov-folding-rules-negate-div +dEQP-VK.graphicsfuzz.cov-folding-rules-negate-sub dEQP-VK.graphicsfuzz.cov-folding-rules-redundant-mix dEQP-VK.graphicsfuzz.cov-folding-rules-shuffle-extract dEQP-VK.graphicsfuzz.cov-folding-rules-shuffle-mix dEQP-VK.graphicsfuzz.cov-folding-rules-split-vector-init +dEQP-VK.graphicsfuzz.cov-folding-rules-vec-mix-uniform dEQP-VK.graphicsfuzz.cov-if-conversion-identical-branches +dEQP-VK.graphicsfuzz.cov-inc-inside-switch-and-for dEQP-VK.graphicsfuzz.cov-inline-pass-empty-block dEQP-VK.graphicsfuzz.cov-inline-pass-nested-loops dEQP-VK.graphicsfuzz.cov-inline-pass-return-in-loop dEQP-VK.graphicsfuzz.cov-inline-pass-unreachable-func dEQP-VK.graphicsfuzz.cov-intervalmap-set-stop +dEQP-VK.graphicsfuzz.cov-irbuilder-matrix-cell-uniform dEQP-VK.graphicsfuzz.cov-liveinterval-different-dest dEQP-VK.graphicsfuzz.cov-machinevaluetype-one-iter-loop +dEQP-VK.graphicsfuzz.cov-mem-pass-sum-struct-members +dEQP-VK.graphicsfuzz.cov-mem-pass-unused-component dEQP-VK.graphicsfuzz.cov-merge-return-condition-twice dEQP-VK.graphicsfuzz.cov-modf-integer-to-private +dEQP-VK.graphicsfuzz.cov-pattern-match-signum +dEQP-VK.graphicsfuzz.cov-pattern-match-single-bit dEQP-VK.graphicsfuzz.cov-reduce-load-replace-extract +dEQP-VK.graphicsfuzz.cov-replace-copy-object +dEQP-VK.graphicsfuzz.cov-scaled-number-nested-loops +dEQP-VK.graphicsfuzz.cov-set-vector-cos-fragcoord +dEQP-VK.graphicsfuzz.cov-simplification-unused-struct dEQP-VK.graphicsfuzz.cov-simplification-while-inside-for dEQP-VK.graphicsfuzz.cov-single-block-elim-self-assign +dEQP-VK.graphicsfuzz.cov-single-store-elim-assume-store dEQP-VK.graphicsfuzz.cov-ssa-rewrite-case-with-default +dEQP-VK.graphicsfuzz.cov-target-lowering-dfdx-cos dEQP-VK.graphicsfuzz.cov-types-return-in-main-never-hit +dEQP-VK.graphicsfuzz.cov-val-cfg-case-fallthrough dEQP-VK.graphicsfuzz.cov-vector-dce-inc-unused-comp dEQP-VK.graphicsfuzz.cov-vector-dce-unused-component dEQP-VK.graphicsfuzz.cov-vector-log2-cosh +dEQP-VK.graphicsfuzz.cov-wrap-op-kill-for-loop +dEQP-VK.graphicsfuzz.cov-wrap-op-kill-two-branches dEQP-VK.graphicsfuzz.dead-barriers-in-loops dEQP-VK.graphicsfuzz.dead-struct-init dEQP-VK.graphicsfuzz.disc-and-add-in-func-in-loop