From: Antto Mäkinen Date: Mon, 12 Apr 2021 11:26:09 +0000 (+0300) Subject: Add a batch of GraphicsFuzz coverage tests X-Git-Tag: upstream/1.3.5~759 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b1789dcbdd6e8d78144aaa3ffd63d58fb7edec5f;p=platform%2Fupstream%2FVK-GL-CTS.git Add a batch of GraphicsFuzz coverage tests This commit adds a batch of GraphicsFuzz coverage tests. Components: Vulkan New Tests: dEQP-VK.graphicsfuzz.cov-cast-float-to-int-and-back dEQP-VK.graphicsfuzz.cov-clamp-vector-element-ceil-negative dEQP-VK.graphicsfuzz.cov-clear-yz-inside-condition dEQP-VK.graphicsfuzz.cov-conditional-discard-inside-loop dEQP-VK.graphicsfuzz.cov-continue-break-discard-return-in-loop dEQP-VK.graphicsfuzz.cov-cosh-clamped-to-one dEQP-VK.graphicsfuzz.cov-double-if-true-in-loop dEQP-VK.graphicsfuzz.cov-for-loop-min-increment-array-element dEQP-VK.graphicsfuzz.cov-if-true-discard-in-do-while-never-reached dEQP-VK.graphicsfuzz.cov-increment-float-in-loop-abs dEQP-VK.graphicsfuzz.cov-increment-vector-component-with-matrix-copy dEQP-VK.graphicsfuzz.cov-matching-conditions-break dEQP-VK.graphicsfuzz.cov-matching-if-always-true-inside-loop dEQP-VK.graphicsfuzz.cov-rcp-negative-int dEQP-VK.graphicsfuzz.cov-return-after-first-iteration Change-Id: I0dd986b855b4ce4c14fe653cfb069f1d038f6cdc --- diff --git a/android/cts/master/vk-master-2021-03-01/graphicsfuzz.txt b/android/cts/master/vk-master-2021-03-01/graphicsfuzz.txt index 41f1e43..469d6c2 100644 --- a/android/cts/master/vk-master-2021-03-01/graphicsfuzz.txt +++ b/android/cts/master/vk-master-2021-03-01/graphicsfuzz.txt @@ -31,10 +31,14 @@ dEQP-VK.graphicsfuzz.cov-bitfieldreverse-left-shift-findmsb dEQP-VK.graphicsfuzz.cov-bitwise-inverse-uniform-condition dEQP-VK.graphicsfuzz.cov-blockfrequency-several-for-loops dEQP-VK.graphicsfuzz.cov-branch-probability-identity-matrix +dEQP-VK.graphicsfuzz.cov-cast-float-to-int-and-back dEQP-VK.graphicsfuzz.cov-clamp-loop-limit-increment-float-array dEQP-VK.graphicsfuzz.cov-clamp-lower-limit-from-always-false +dEQP-VK.graphicsfuzz.cov-clamp-vector-element-ceil-negative dEQP-VK.graphicsfuzz.cov-clamp-vector-variable-negative-offset +dEQP-VK.graphicsfuzz.cov-clear-yz-inside-condition dEQP-VK.graphicsfuzz.cov-combine-and-or-xor-gt-lt +dEQP-VK.graphicsfuzz.cov-conditional-discard-inside-loop dEQP-VK.graphicsfuzz.cov-const-folding-bitfieldinsert-div-one dEQP-VK.graphicsfuzz.cov-color-overwrite-identity-matrix-multiply dEQP-VK.graphicsfuzz.cov-const-folding-ceil-vec4 @@ -56,9 +60,11 @@ dEQP-VK.graphicsfuzz.cov-const-folding-vector-shuffle dEQP-VK.graphicsfuzz.cov-constant-folding-atan-over-tanh dEQP-VK.graphicsfuzz.cov-constants-combine-add-sub dEQP-VK.graphicsfuzz.cov-constants-mix-uniform +dEQP-VK.graphicsfuzz.cov-continue-break-discard-return-in-loop dEQP-VK.graphicsfuzz.cov-copy-prop-arrays-func-argument dEQP-VK.graphicsfuzz.cov-copy-prop-arrays-no-stores dEQP-VK.graphicsfuzz.cov-copy-prop-arrays-param-uniform +dEQP-VK.graphicsfuzz.cov-cosh-clamped-to-one dEQP-VK.graphicsfuzz.cov-cumulate-loops-unreachable dEQP-VK.graphicsfuzz.cov-dag-combiner-clamp-undefined-access-array dEQP-VK.graphicsfuzz.cov-dag-combiner-combine-casts-legalize-vector-types-xyz-swizzle-for-loop @@ -71,6 +77,7 @@ dEQP-VK.graphicsfuzz.cov-dag-combiner-same-cond-nested dEQP-VK.graphicsfuzz.cov-dead-branch-func-return-arg dEQP-VK.graphicsfuzz.cov-dead-code-unreachable-merge dEQP-VK.graphicsfuzz.cov-derivative-uniform-vector-global-loop-count +dEQP-VK.graphicsfuzz.cov-double-if-true-in-loop dEQP-VK.graphicsfuzz.cov-exp2-two dEQP-VK.graphicsfuzz.cov-findlsb-division-by-zero dEQP-VK.graphicsfuzz.cov-fold-and-in-for-loop-range @@ -106,6 +113,7 @@ 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-for-array-initializing-modulo +dEQP-VK.graphicsfuzz.cov-for-loop-min-increment-array-element dEQP-VK.graphicsfuzz.cov-for-switch-fallthrough dEQP-VK.graphicsfuzz.cov-fract-smoothstep-undefined dEQP-VK.graphicsfuzz.cov-fragcoord-clamp-array-access @@ -116,14 +124,17 @@ dEQP-VK.graphicsfuzz.cov-global-loop-counter-main-function-call dEQP-VK.graphicsfuzz.cov-if-conversion-identical-branches dEQP-VK.graphicsfuzz.cov-if-switch-fallthrough dEQP-VK.graphicsfuzz.cov-if-true-continue +dEQP-VK.graphicsfuzz.cov-if-true-discard-in-do-while-never-reached dEQP-VK.graphicsfuzz.cov-inc-array-element-loop-lsb dEQP-VK.graphicsfuzz.cov-inc-inside-switch-and-for dEQP-VK.graphicsfuzz.cov-increment-array-element-in-loop +dEQP-VK.graphicsfuzz.cov-increment-float-in-loop-abs dEQP-VK.graphicsfuzz.cov-increment-global-counter-loop-function dEQP-VK.graphicsfuzz.cov-increment-inside-clamp dEQP-VK.graphicsfuzz.cov-increment-int-loop-counter-mod-array dEQP-VK.graphicsfuzz.cov-increment-multiple-integers dEQP-VK.graphicsfuzz.cov-increment-vector-array-matrix-element +dEQP-VK.graphicsfuzz.cov-increment-vector-component-with-matrix-copy 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 @@ -185,6 +196,8 @@ dEQP-VK.graphicsfuzz.cov-loop-with-two-integers dEQP-VK.graphicsfuzz.cov-machine-scheduler-for-if-pow dEQP-VK.graphicsfuzz.cov-machine-basic-block-for-for-for-less-than dEQP-VK.graphicsfuzz.cov-machinevaluetype-one-iter-loop +dEQP-VK.graphicsfuzz.cov-matching-conditions-break +dEQP-VK.graphicsfuzz.cov-matching-if-always-true-inside-loop dEQP-VK.graphicsfuzz.cov-matrix-double-transpose dEQP-VK.graphicsfuzz.cov-matrix-square-mul-with-vector dEQP-VK.graphicsfuzz.cov-max-clamp-same-minval @@ -210,11 +223,13 @@ dEQP-VK.graphicsfuzz.cov-pattern-match-signum dEQP-VK.graphicsfuzz.cov-pattern-match-single-bit dEQP-VK.graphicsfuzz.cov-peephole-optimizer-target-instr-info-for-if-if-if dEQP-VK.graphicsfuzz.cov-pow-undefined +dEQP-VK.graphicsfuzz.cov-rcp-negative-int dEQP-VK.graphicsfuzz.cov-reciprocal-var-minus-one dEQP-VK.graphicsfuzz.cov-reduce-load-replace-extract dEQP-VK.graphicsfuzz.cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard dEQP-VK.graphicsfuzz.cov-replace-copy-object dEQP-VK.graphicsfuzz.cov-return-after-do-while +dEQP-VK.graphicsfuzz.cov-return-after-first-iteration dEQP-VK.graphicsfuzz.cov-return-partly-undefined-vector-from-array dEQP-VK.graphicsfuzz.cov-sample-texture-hundred-iterations dEQP-VK.graphicsfuzz.cov-scaled-number-nested-loops diff --git a/android/cts/master/vk-master/graphicsfuzz.txt b/android/cts/master/vk-master/graphicsfuzz.txt index ea64ab1..13d4215 100644 --- a/android/cts/master/vk-master/graphicsfuzz.txt +++ b/android/cts/master/vk-master/graphicsfuzz.txt @@ -43,10 +43,14 @@ dEQP-VK.graphicsfuzz.cov-bitfieldreverse-left-shift-findmsb dEQP-VK.graphicsfuzz.cov-bitwise-inverse-uniform-condition dEQP-VK.graphicsfuzz.cov-blockfrequency-several-for-loops dEQP-VK.graphicsfuzz.cov-branch-probability-identity-matrix +dEQP-VK.graphicsfuzz.cov-cast-float-to-int-and-back dEQP-VK.graphicsfuzz.cov-clamp-loop-limit-increment-float-array dEQP-VK.graphicsfuzz.cov-clamp-lower-limit-from-always-false +dEQP-VK.graphicsfuzz.cov-clamp-vector-element-ceil-negative dEQP-VK.graphicsfuzz.cov-clamp-vector-variable-negative-offset +dEQP-VK.graphicsfuzz.cov-clear-yz-inside-condition dEQP-VK.graphicsfuzz.cov-combine-and-or-xor-gt-lt +dEQP-VK.graphicsfuzz.cov-conditional-discard-inside-loop dEQP-VK.graphicsfuzz.cov-const-folding-bitfieldinsert-div-one dEQP-VK.graphicsfuzz.cov-color-overwrite-identity-matrix-multiply dEQP-VK.graphicsfuzz.cov-const-folding-ceil-vec4 @@ -68,9 +72,11 @@ dEQP-VK.graphicsfuzz.cov-const-folding-vector-shuffle dEQP-VK.graphicsfuzz.cov-constant-folding-atan-over-tanh dEQP-VK.graphicsfuzz.cov-constants-combine-add-sub dEQP-VK.graphicsfuzz.cov-constants-mix-uniform +dEQP-VK.graphicsfuzz.cov-continue-break-discard-return-in-loop dEQP-VK.graphicsfuzz.cov-copy-prop-arrays-func-argument dEQP-VK.graphicsfuzz.cov-copy-prop-arrays-no-stores dEQP-VK.graphicsfuzz.cov-copy-prop-arrays-param-uniform +dEQP-VK.graphicsfuzz.cov-cosh-clamped-to-one dEQP-VK.graphicsfuzz.cov-cumulate-loops-unreachable dEQP-VK.graphicsfuzz.cov-dag-combiner-clamp-undefined-access-array dEQP-VK.graphicsfuzz.cov-dag-combiner-combine-casts-legalize-vector-types-xyz-swizzle-for-loop @@ -83,6 +89,7 @@ dEQP-VK.graphicsfuzz.cov-dag-combiner-same-cond-nested dEQP-VK.graphicsfuzz.cov-dead-branch-func-return-arg dEQP-VK.graphicsfuzz.cov-dead-code-unreachable-merge dEQP-VK.graphicsfuzz.cov-derivative-uniform-vector-global-loop-count +dEQP-VK.graphicsfuzz.cov-double-if-true-in-loop dEQP-VK.graphicsfuzz.cov-exp2-two dEQP-VK.graphicsfuzz.cov-findlsb-division-by-zero dEQP-VK.graphicsfuzz.cov-fold-and-in-for-loop-range @@ -118,6 +125,7 @@ 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-for-array-initializing-modulo +dEQP-VK.graphicsfuzz.cov-for-loop-min-increment-array-element dEQP-VK.graphicsfuzz.cov-for-switch-fallthrough dEQP-VK.graphicsfuzz.cov-fract-smoothstep-undefined dEQP-VK.graphicsfuzz.cov-fragcoord-clamp-array-access @@ -128,14 +136,17 @@ dEQP-VK.graphicsfuzz.cov-global-loop-counter-main-function-call dEQP-VK.graphicsfuzz.cov-if-conversion-identical-branches dEQP-VK.graphicsfuzz.cov-if-switch-fallthrough dEQP-VK.graphicsfuzz.cov-if-true-continue +dEQP-VK.graphicsfuzz.cov-if-true-discard-in-do-while-never-reached dEQP-VK.graphicsfuzz.cov-inc-array-element-loop-lsb dEQP-VK.graphicsfuzz.cov-inc-inside-switch-and-for dEQP-VK.graphicsfuzz.cov-increment-array-element-in-loop +dEQP-VK.graphicsfuzz.cov-increment-float-in-loop-abs dEQP-VK.graphicsfuzz.cov-increment-global-counter-loop-function dEQP-VK.graphicsfuzz.cov-increment-inside-clamp dEQP-VK.graphicsfuzz.cov-increment-int-loop-counter-mod-array dEQP-VK.graphicsfuzz.cov-increment-multiple-integers dEQP-VK.graphicsfuzz.cov-increment-vector-array-matrix-element +dEQP-VK.graphicsfuzz.cov-increment-vector-component-with-matrix-copy 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 @@ -197,6 +208,8 @@ dEQP-VK.graphicsfuzz.cov-loop-with-two-integers dEQP-VK.graphicsfuzz.cov-machine-scheduler-for-if-pow dEQP-VK.graphicsfuzz.cov-machine-basic-block-for-for-for-less-than dEQP-VK.graphicsfuzz.cov-machinevaluetype-one-iter-loop +dEQP-VK.graphicsfuzz.cov-matching-conditions-break +dEQP-VK.graphicsfuzz.cov-matching-if-always-true-inside-loop dEQP-VK.graphicsfuzz.cov-matrix-double-transpose dEQP-VK.graphicsfuzz.cov-matrix-square-mul-with-vector dEQP-VK.graphicsfuzz.cov-max-clamp-same-minval @@ -222,11 +235,13 @@ dEQP-VK.graphicsfuzz.cov-pattern-match-signum dEQP-VK.graphicsfuzz.cov-pattern-match-single-bit dEQP-VK.graphicsfuzz.cov-peephole-optimizer-target-instr-info-for-if-if-if dEQP-VK.graphicsfuzz.cov-pow-undefined +dEQP-VK.graphicsfuzz.cov-rcp-negative-int dEQP-VK.graphicsfuzz.cov-reciprocal-var-minus-one dEQP-VK.graphicsfuzz.cov-reduce-load-replace-extract dEQP-VK.graphicsfuzz.cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard dEQP-VK.graphicsfuzz.cov-replace-copy-object dEQP-VK.graphicsfuzz.cov-return-after-do-while +dEQP-VK.graphicsfuzz.cov-return-after-first-iteration dEQP-VK.graphicsfuzz.cov-return-partly-undefined-vector-from-array dEQP-VK.graphicsfuzz.cov-sample-texture-hundred-iterations dEQP-VK.graphicsfuzz.cov-scaled-number-nested-loops diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-cast-float-to-int-and-back.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-cast-float-to-int-and-back.amber new file mode 100644 index 0000000..7108c13 --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-cast-float-to-int-and-back.amber @@ -0,0 +1,157 @@ +#!amber + +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# A test for a coverage-gap found by the GraphicsFuzz project. + +# Short description: A fragment shader that covers specific NIR code paths + +# The test passes because the shader always writes red. + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 320 es +# #define _int_0 _GLF_uniform_int_values[0] +# #define _int_1 _GLF_uniform_int_values[1] +# +# precision highp int; +# precision highp float; +# +# // Contents of _GLF_uniform_int_values: [0, 1] +# layout(set = 0, binding = 0) uniform buf0 +# { +# int _GLF_uniform_int_values[2]; +# }; +# layout(location = 0) out vec4 _GLF_color; +# +# void main() +# { +# float f = 142.7; +# +# if(float(int(f)) > 100.0) +# { +# _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1); +# } +# else +# { +# _GLF_color = vec4(_int_0); +# } +# } +SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0 +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 10 +; Bound: 49 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %21 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 320 + OpName %4 "main" + OpName %8 "f" + OpName %21 "_GLF_color" + OpName %25 "buf0" + OpMemberName %25 0 "_GLF_uniform_int_values" + OpName %27 "" + OpDecorate %21 Location 0 + OpDecorate %24 ArrayStride 16 + OpMemberDecorate %25 0 Offset 0 + OpDecorate %25 Block + OpDecorate %27 DescriptorSet 0 + OpDecorate %27 Binding 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeFloat 32 + %7 = OpTypePointer Function %6 + %9 = OpConstant %6 142.699997 + %11 = OpTypeInt 32 1 + %14 = OpConstant %6 100 + %15 = OpTypeBool + %19 = OpTypeVector %6 4 + %20 = OpTypePointer Output %19 + %21 = OpVariable %20 Output + %22 = OpTypeInt 32 0 + %23 = OpConstant %22 2 + %24 = OpTypeArray %11 %23 + %25 = OpTypeStruct %24 + %26 = OpTypePointer Uniform %25 + %27 = OpVariable %26 Uniform + %28 = OpConstant %11 0 + %29 = OpConstant %11 1 + %30 = OpTypePointer Uniform %11 + %4 = OpFunction %2 None %3 + %5 = OpLabel + %8 = OpVariable %7 Function + OpStore %8 %9 + %10 = OpLoad %6 %8 + %12 = OpConvertFToS %11 %10 + %13 = OpConvertSToF %6 %12 + %16 = OpFOrdGreaterThan %15 %13 %14 + OpSelectionMerge %18 None + OpBranchConditional %16 %17 %44 + %17 = OpLabel + %31 = OpAccessChain %30 %27 %28 %29 + %32 = OpLoad %11 %31 + %33 = OpConvertSToF %6 %32 + %34 = OpAccessChain %30 %27 %28 %28 + %35 = OpLoad %11 %34 + %36 = OpConvertSToF %6 %35 + %37 = OpAccessChain %30 %27 %28 %28 + %38 = OpLoad %11 %37 + %39 = OpConvertSToF %6 %38 + %40 = OpAccessChain %30 %27 %28 %29 + %41 = OpLoad %11 %40 + %42 = OpConvertSToF %6 %41 + %43 = OpCompositeConstruct %19 %33 %36 %39 %42 + OpStore %21 %43 + OpBranch %18 + %44 = OpLabel + %45 = OpAccessChain %30 %27 %28 %28 + %46 = OpLoad %11 %45 + %47 = OpConvertSToF %6 %46 + %48 = OpCompositeConstruct %19 %47 %47 %47 %47 + OpStore %21 %48 + OpBranch %18 + %18 = OpLabel + OpReturn + OpFunctionEnd +END + +# uniforms for variant + +# _GLF_uniform_int_values +BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA + 0 1 +END + +BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM + +PIPELINE graphics variant_pipeline + ATTACH variant_vertex_shader + ATTACH variant_fragment_shader + FRAMEBUFFER_SIZE 256 256 + BIND BUFFER variant_framebuffer AS color LOCATION 0 + BIND BUFFER variant__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 0 +END +CLEAR_COLOR variant_pipeline 0 0 0 255 + +CLEAR variant_pipeline +RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 256 256 + +EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255 diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-clamp-vector-element-ceil-negative.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-clamp-vector-element-ceil-negative.amber new file mode 100644 index 0000000..4f7b5aa --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-clamp-vector-element-ceil-negative.amber @@ -0,0 +1,202 @@ +#!amber + +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# A test for a coverage-gap found by the GraphicsFuzz project. + +# Short description: A fragment shader that covers specific NIR code paths + +# The test passes because the shader always writes red. + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 320 es +# #define _int_1 _GLF_uniform_int_values[0] +# #define _int_0 _GLF_uniform_int_values[1] +# #define _float_100_0 _GLF_uniform_float_values[0] +# #define _float_1_0 _GLF_uniform_float_values[1] +# +# precision highp int; +# precision highp float; +# +# // Contents of _GLF_uniform_int_values: [1, 0] +# layout(set = 0, binding = 0) uniform buf0 +# { +# int _GLF_uniform_int_values[2]; +# }; +# // Contents of _GLF_uniform_float_values: [100.0, 1.0] +# layout(set = 0, binding = 1) uniform buf1 +# { +# float _GLF_uniform_float_values[2]; +# }; +# layout(location = 0) out vec4 _GLF_color; +# +# void main() +# { +# vec2 v0 = vec2(_float_1_0, -580.015); +# vec2 v1 = clamp(ceil(v0), vec2(-_float_100_0), vec2(100.0)); +# +# if(v1.y == -_float_100_0) +# { +# _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1); +# } +# else +# { +# _GLF_color = vec4(_int_0); +# } +# } +SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0 +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 10 +; Bound: 71 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %47 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 320 + OpName %4 "main" + OpName %9 "v0" + OpName %13 "buf1" + OpMemberName %13 0 "_GLF_uniform_float_values" + OpName %15 "" + OpName %24 "v1" + OpName %47 "_GLF_color" + OpName %49 "buf0" + OpMemberName %49 0 "_GLF_uniform_int_values" + OpName %51 "" + OpDecorate %12 ArrayStride 16 + OpMemberDecorate %13 0 Offset 0 + OpDecorate %13 Block + OpDecorate %15 DescriptorSet 0 + OpDecorate %15 Binding 1 + OpDecorate %47 Location 0 + OpDecorate %48 ArrayStride 16 + OpMemberDecorate %49 0 Offset 0 + OpDecorate %49 Block + OpDecorate %51 DescriptorSet 0 + OpDecorate %51 Binding 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeFloat 32 + %7 = OpTypeVector %6 2 + %8 = OpTypePointer Function %7 + %10 = OpTypeInt 32 0 + %11 = OpConstant %10 2 + %12 = OpTypeArray %6 %11 + %13 = OpTypeStruct %12 + %14 = OpTypePointer Uniform %13 + %15 = OpVariable %14 Uniform + %16 = OpTypeInt 32 1 + %17 = OpConstant %16 0 + %18 = OpConstant %16 1 + %19 = OpTypePointer Uniform %6 + %22 = OpConstant %6 -580.015015 + %31 = OpConstant %6 100 + %32 = OpConstantComposite %7 %31 %31 + %34 = OpConstant %10 1 + %35 = OpTypePointer Function %6 + %41 = OpTypeBool + %45 = OpTypeVector %6 4 + %46 = OpTypePointer Output %45 + %47 = OpVariable %46 Output + %48 = OpTypeArray %16 %11 + %49 = OpTypeStruct %48 + %50 = OpTypePointer Uniform %49 + %51 = OpVariable %50 Uniform + %52 = OpTypePointer Uniform %16 + %4 = OpFunction %2 None %3 + %5 = OpLabel + %9 = OpVariable %8 Function + %24 = OpVariable %8 Function + %20 = OpAccessChain %19 %15 %17 %18 + %21 = OpLoad %6 %20 + %23 = OpCompositeConstruct %7 %21 %22 + OpStore %9 %23 + %25 = OpLoad %7 %9 + %26 = OpExtInst %7 %1 Ceil %25 + %27 = OpAccessChain %19 %15 %17 %17 + %28 = OpLoad %6 %27 + %29 = OpFNegate %6 %28 + %30 = OpCompositeConstruct %7 %29 %29 + %33 = OpExtInst %7 %1 FClamp %26 %30 %32 + OpStore %24 %33 + %36 = OpAccessChain %35 %24 %34 + %37 = OpLoad %6 %36 + %38 = OpAccessChain %19 %15 %17 %17 + %39 = OpLoad %6 %38 + %40 = OpFNegate %6 %39 + %42 = OpFOrdEqual %41 %37 %40 + OpSelectionMerge %44 None + OpBranchConditional %42 %43 %66 + %43 = OpLabel + %53 = OpAccessChain %52 %51 %17 %17 + %54 = OpLoad %16 %53 + %55 = OpConvertSToF %6 %54 + %56 = OpAccessChain %52 %51 %17 %18 + %57 = OpLoad %16 %56 + %58 = OpConvertSToF %6 %57 + %59 = OpAccessChain %52 %51 %17 %18 + %60 = OpLoad %16 %59 + %61 = OpConvertSToF %6 %60 + %62 = OpAccessChain %52 %51 %17 %17 + %63 = OpLoad %16 %62 + %64 = OpConvertSToF %6 %63 + %65 = OpCompositeConstruct %45 %55 %58 %61 %64 + OpStore %47 %65 + OpBranch %44 + %66 = OpLabel + %67 = OpAccessChain %52 %51 %17 %18 + %68 = OpLoad %16 %67 + %69 = OpConvertSToF %6 %68 + %70 = OpCompositeConstruct %45 %69 %69 %69 %69 + OpStore %47 %70 + OpBranch %44 + %44 = OpLabel + OpReturn + OpFunctionEnd +END + +# uniforms for variant + +# _GLF_uniform_float_values +BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA + 100.0 1.0 +END +# _GLF_uniform_int_values +BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA + 1 0 +END + +BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM + +PIPELINE graphics variant_pipeline + ATTACH variant_vertex_shader + ATTACH variant_fragment_shader + FRAMEBUFFER_SIZE 256 256 + BIND BUFFER variant_framebuffer AS color LOCATION 0 + BIND BUFFER variant__GLF_uniform_float_values AS uniform DESCRIPTOR_SET 0 BINDING 1 + BIND BUFFER variant__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 0 +END +CLEAR_COLOR variant_pipeline 0 0 0 255 + +CLEAR variant_pipeline +RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 256 256 + +EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255 diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-clear-yz-inside-condition.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-clear-yz-inside-condition.amber new file mode 100644 index 0000000..2d96fbe --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-clear-yz-inside-condition.amber @@ -0,0 +1,228 @@ +#!amber + +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# A test for a coverage-gap found by the GraphicsFuzz project. + +# Short description: A fragment shader that covers specific NIR code paths + +# The test passes because the shader always writes red. + +# Optimized using spirv-opt with the following arguments: +# '--eliminate-dead-branches' +# '--eliminate-local-multi-store' +# '--eliminate-local-single-store' +# '--simplify-instructions' +# '--eliminate-dead-branches' +# '--copy-propagate-arrays' +# '--copy-propagate-arrays' +# '--eliminate-dead-inserts' +# '--vector-dce' +# '--vector-dce' +# '--inline-entry-points-exhaustive' +# '--eliminate-local-single-store' +# '--eliminate-local-single-store' +# '--simplify-instructions' +# '--eliminate-local-single-block' +# '--ccp' +# '--private-to-local' +# '--scalar-replacement=100' +# '--eliminate-local-single-block' +# '--private-to-local' +# '--scalar-replacement=100' +# '--simplify-instructions' +# '--eliminate-dead-branches' +# '--merge-blocks' +# spirv-opt commit hash: a0370efd589be33d5d9a85cfde2f85841b3755af + + + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 320 es +# #define _float_1_0 _GLF_uniform_float_values[0] +# #define _float_2_0 _GLF_uniform_float_values[1] +# +# precision highp float; +# precision highp int; +# +# // Contents of _GLF_uniform_float_values: [1.0, 2.0] +# layout(set = 0, binding = 0) uniform buf0 +# { +# float _GLF_uniform_float_values[2]; +# }; +# +# layout(location = 0) out vec4 _GLF_color; +# +# // Contents of zero: 0.0 +# layout(set = 0, binding = 1) uniform buf1 +# { +# float zero; +# }; +# +# void main() +# { +# vec2 v0 = vec2(_float_1_0); +# vec4 v1 = vec4(v0.x); +# +# // Always true. +# if(zero != _float_1_0) +# { +# // Always false. +# if(zero == _float_2_0) +# { +# return; +# } +# v1.yz -= _float_1_0; +# } +# else +# { +# discard; +# } +# +# _GLF_color = v1; +# } +SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0 +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 10 +; Bound: 62 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %61 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 320 + OpName %4 "main" + OpName %9 "v0" + OpName %13 "buf0" + OpMemberName %13 0 "_GLF_uniform_float_values" + OpName %15 "" + OpName %24 "v1" + OpName %30 "buf1" + OpMemberName %30 0 "zero" + OpName %32 "" + OpName %61 "_GLF_color" + OpDecorate %12 ArrayStride 16 + OpMemberDecorate %13 0 Offset 0 + OpDecorate %13 Block + OpDecorate %15 DescriptorSet 0 + OpDecorate %15 Binding 0 + OpMemberDecorate %30 0 Offset 0 + OpDecorate %30 Block + OpDecorate %32 DescriptorSet 0 + OpDecorate %32 Binding 1 + OpDecorate %61 Location 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeFloat 32 + %7 = OpTypeVector %6 2 + %8 = OpTypePointer Function %7 + %10 = OpTypeInt 32 0 + %11 = OpConstant %10 2 + %12 = OpTypeArray %6 %11 + %13 = OpTypeStruct %12 + %14 = OpTypePointer Uniform %13 + %15 = OpVariable %14 Uniform + %16 = OpTypeInt 32 1 + %17 = OpConstant %16 0 + %18 = OpTypePointer Uniform %6 + %22 = OpTypeVector %6 4 + %23 = OpTypePointer Function %22 + %25 = OpConstant %10 0 + %26 = OpTypePointer Function %6 + %30 = OpTypeStruct %6 + %31 = OpTypePointer Uniform %30 + %32 = OpVariable %31 Uniform + %37 = OpTypeBool + %43 = OpConstant %16 1 + %60 = OpTypePointer Output %22 + %61 = OpVariable %60 Output + %4 = OpFunction %2 None %3 + %5 = OpLabel + %9 = OpVariable %8 Function + %24 = OpVariable %23 Function + %19 = OpAccessChain %18 %15 %17 %17 + %20 = OpLoad %6 %19 + %21 = OpCompositeConstruct %7 %20 %20 + OpStore %9 %21 + %27 = OpAccessChain %26 %9 %25 + %28 = OpLoad %6 %27 + %29 = OpCompositeConstruct %22 %28 %28 %28 %28 + OpStore %24 %29 + %33 = OpAccessChain %18 %32 %17 + %34 = OpLoad %6 %33 + %35 = OpAccessChain %18 %15 %17 %17 + %36 = OpLoad %6 %35 + %38 = OpFUnordNotEqual %37 %34 %36 + OpSelectionMerge %40 None + OpBranchConditional %38 %39 %58 + %39 = OpLabel + %41 = OpAccessChain %18 %32 %17 + %42 = OpLoad %6 %41 + %44 = OpAccessChain %18 %15 %17 %43 + %45 = OpLoad %6 %44 + %46 = OpFOrdEqual %37 %42 %45 + OpSelectionMerge %48 None + OpBranchConditional %46 %47 %48 + %47 = OpLabel + OpReturn + %48 = OpLabel + %50 = OpAccessChain %18 %15 %17 %17 + %51 = OpLoad %6 %50 + %53 = OpVectorShuffle %7 %29 %29 1 2 + %54 = OpCompositeConstruct %7 %51 %51 + %55 = OpFSub %7 %53 %54 + %57 = OpVectorShuffle %22 %29 %55 0 4 5 3 + OpStore %24 %57 + OpBranch %40 + %58 = OpLabel + OpKill + %40 = OpLabel + OpStore %61 %57 + OpReturn + OpFunctionEnd +END + +# uniforms for variant + +# zero +BUFFER variant_zero DATA_TYPE float STD140 DATA + 0.0 +END +# _GLF_uniform_float_values +BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA + 1.0 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_zero AS uniform DESCRIPTOR_SET 0 BINDING 1 + BIND BUFFER variant__GLF_uniform_float_values AS uniform DESCRIPTOR_SET 0 BINDING 0 +END +CLEAR_COLOR variant_pipeline 0 0 0 255 + +CLEAR variant_pipeline +RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 256 256 + +EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255 diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-conditional-discard-inside-loop.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-conditional-discard-inside-loop.amber new file mode 100644 index 0000000..8a2d496 --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-conditional-discard-inside-loop.amber @@ -0,0 +1,239 @@ +#!amber + +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# A test for a coverage-gap found by the GraphicsFuzz project. + +# Short description: A fragment shader that covers specific NIR code paths + +# The test passes because the shader always writes red. + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 320 es +# #define _int_1 _GLF_uniform_int_values[0] +# #define _int_0 _GLF_uniform_int_values[1] +# #define _int_4 _GLF_uniform_int_values[2] +# #define _float_1_0 _GLF_uniform_float_values[0] +# +# precision highp int; +# precision highp float; +# +# // Contents of _GLF_uniform_int_values: [1, 0, 4] +# layout(set = 0, binding = 0) uniform buf0 +# { +# int _GLF_uniform_int_values[3]; +# }; +# // Contents of _GLF_uniform_float_values: 1.0 +# layout(set = 0, binding = 1) uniform buf1 +# { +# float _GLF_uniform_float_values[1]; +# }; +# // Contents of injectionSwitch: [0.0, 1.0] +# layout(set = 0, binding = 2) uniform buf2 +# { +# vec2 injectionSwitch; +# }; +# layout(location = 0) out vec4 _GLF_color; +# +# void main() +# { +# int a = 1; +# // The color value cannot be changed later without losing +# // the coverage point we are after. +# _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1); +# +# for(int i = _int_0; i < _int_4; i++) +# { +# if(a++ > 3) +# { +# break; +# } +# +# // Always false. +# if(injectionSwitch.x > _float_1_0) +# { +# discard; +# } +# } +# } +SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0 +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 10 +; Bound: 77 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %13 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 320 + OpName %4 "main" + OpName %8 "a" + OpName %13 "_GLF_color" + OpName %17 "buf0" + OpMemberName %17 0 "_GLF_uniform_int_values" + OpName %19 "" + OpName %35 "i" + OpName %57 "buf2" + OpMemberName %57 0 "injectionSwitch" + OpName %59 "" + OpName %66 "buf1" + OpMemberName %66 0 "_GLF_uniform_float_values" + OpName %68 "" + OpDecorate %13 Location 0 + OpDecorate %16 ArrayStride 16 + OpMemberDecorate %17 0 Offset 0 + OpDecorate %17 Block + OpDecorate %19 DescriptorSet 0 + OpDecorate %19 Binding 0 + OpMemberDecorate %57 0 Offset 0 + OpDecorate %57 Block + OpDecorate %59 DescriptorSet 0 + OpDecorate %59 Binding 2 + OpDecorate %65 ArrayStride 16 + OpMemberDecorate %66 0 Offset 0 + OpDecorate %66 Block + OpDecorate %68 DescriptorSet 0 + OpDecorate %68 Binding 1 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeInt 32 1 + %7 = OpTypePointer Function %6 + %9 = OpConstant %6 1 + %10 = OpTypeFloat 32 + %11 = OpTypeVector %10 4 + %12 = OpTypePointer Output %11 + %13 = OpVariable %12 Output + %14 = OpTypeInt 32 0 + %15 = OpConstant %14 3 + %16 = OpTypeArray %6 %15 + %17 = OpTypeStruct %16 + %18 = OpTypePointer Uniform %17 + %19 = OpVariable %18 Uniform + %20 = OpConstant %6 0 + %21 = OpTypePointer Uniform %6 + %44 = OpConstant %6 2 + %47 = OpTypeBool + %51 = OpConstant %6 3 + %56 = OpTypeVector %10 2 + %57 = OpTypeStruct %56 + %58 = OpTypePointer Uniform %57 + %59 = OpVariable %58 Uniform + %60 = OpConstant %14 0 + %61 = OpTypePointer Uniform %10 + %64 = OpConstant %14 1 + %65 = OpTypeArray %10 %64 + %66 = OpTypeStruct %65 + %67 = OpTypePointer Uniform %66 + %68 = OpVariable %67 Uniform + %4 = OpFunction %2 None %3 + %5 = OpLabel + %8 = OpVariable %7 Function + %35 = OpVariable %7 Function + OpStore %8 %9 + %22 = OpAccessChain %21 %19 %20 %20 + %23 = OpLoad %6 %22 + %24 = OpConvertSToF %10 %23 + %25 = OpAccessChain %21 %19 %20 %9 + %26 = OpLoad %6 %25 + %27 = OpConvertSToF %10 %26 + %28 = OpAccessChain %21 %19 %20 %9 + %29 = OpLoad %6 %28 + %30 = OpConvertSToF %10 %29 + %31 = OpAccessChain %21 %19 %20 %20 + %32 = OpLoad %6 %31 + %33 = OpConvertSToF %10 %32 + %34 = OpCompositeConstruct %11 %24 %27 %30 %33 + OpStore %13 %34 + %36 = OpAccessChain %21 %19 %20 %9 + %37 = OpLoad %6 %36 + OpStore %35 %37 + OpBranch %38 + %38 = OpLabel + OpLoopMerge %40 %41 None + OpBranch %42 + %42 = OpLabel + %43 = OpLoad %6 %35 + %45 = OpAccessChain %21 %19 %20 %44 + %46 = OpLoad %6 %45 + %48 = OpSLessThan %47 %43 %46 + OpBranchConditional %48 %39 %40 + %39 = OpLabel + %49 = OpLoad %6 %8 + %50 = OpIAdd %6 %49 %9 + OpStore %8 %50 + %52 = OpSGreaterThan %47 %49 %51 + OpSelectionMerge %54 None + OpBranchConditional %52 %53 %54 + %53 = OpLabel + OpBranch %40 + %54 = OpLabel + %62 = OpAccessChain %61 %59 %20 %60 + %63 = OpLoad %10 %62 + %69 = OpAccessChain %61 %68 %20 %20 + %70 = OpLoad %10 %69 + %71 = OpFOrdGreaterThan %47 %63 %70 + OpSelectionMerge %73 None + OpBranchConditional %71 %72 %73 + %72 = OpLabel + OpKill + %73 = OpLabel + OpBranch %41 + %41 = OpLabel + %75 = OpLoad %6 %35 + %76 = OpIAdd %6 %75 %9 + OpStore %35 %76 + OpBranch %38 + %40 = OpLabel + OpReturn + OpFunctionEnd +END + +# uniforms for variant + +# injectionSwitch +BUFFER variant_injectionSwitch DATA_TYPE vec2 STD140 DATA + 0.0 1.0 +END +# _GLF_uniform_float_values +BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA + 1.0 +END +# _GLF_uniform_int_values +BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA + 1 0 4 +END + +BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM + +PIPELINE graphics variant_pipeline + ATTACH variant_vertex_shader + ATTACH variant_fragment_shader + FRAMEBUFFER_SIZE 256 256 + BIND BUFFER variant_framebuffer AS color LOCATION 0 + BIND BUFFER variant_injectionSwitch AS uniform DESCRIPTOR_SET 0 BINDING 2 + BIND BUFFER variant__GLF_uniform_float_values AS uniform DESCRIPTOR_SET 0 BINDING 1 + BIND BUFFER variant__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 0 +END +CLEAR_COLOR variant_pipeline 0 0 0 255 + +CLEAR variant_pipeline +RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 256 256 + +EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255 diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-continue-break-discard-return-in-loop.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-continue-break-discard-return-in-loop.amber new file mode 100644 index 0000000..a78fce5 --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-continue-break-discard-return-in-loop.amber @@ -0,0 +1,224 @@ +#!amber + +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# A test for a coverage-gap found by the GraphicsFuzz project. + +# Short description: A fragment shader that covers specific NIR code paths + +# The test passes because the shader always writes red. + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 320 es +# #define _int_1 _GLF_uniform_int_values[0] +# #define _int_0 _GLF_uniform_int_values[1] +# #define _int_2 _GLF_uniform_int_values[2] +# #define _int_3 _GLF_uniform_int_values[3] +# +# precision highp float; +# precision highp int; +# +# // Contents of _GLF_uniform_int_values: [1, 0, 2, 3] +# layout(set = 0, binding = 0) uniform buf0 +# { +# int _GLF_uniform_int_values[4]; +# }; +# +# // Contents of zero: 0 +# layout(set = 0, binding = 1) uniform buf1 +# { +# int zero; +# }; +# +# layout(location = 0) out vec4 _GLF_color; +# +# void main() +# { +# _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1); +# +# do +# { +# // Always false. +# if(zero == _int_1) +# { +# continue; +# } +# +# // Always false. +# if(zero == _int_2) +# { +# break; +# } +# +# // Always false. +# if(zero == _int_3) +# { +# discard; +# } +# +# return; +# } +# while(false); +# +# // This should never be hit. +# _GLF_color = vec4(_int_0); +# } +SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0 +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 10 +; Bound: 73 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %9 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 320 + OpName %4 "main" + OpName %9 "_GLF_color" + OpName %14 "buf0" + OpMemberName %14 0 "_GLF_uniform_int_values" + OpName %16 "" + OpName %37 "buf1" + OpMemberName %37 0 "zero" + OpName %39 "" + OpDecorate %9 Location 0 + OpDecorate %13 ArrayStride 16 + OpMemberDecorate %14 0 Offset 0 + OpDecorate %14 Block + OpDecorate %16 DescriptorSet 0 + OpDecorate %16 Binding 0 + OpMemberDecorate %37 0 Offset 0 + OpDecorate %37 Block + OpDecorate %39 DescriptorSet 0 + OpDecorate %39 Binding 1 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeFloat 32 + %7 = OpTypeVector %6 4 + %8 = OpTypePointer Output %7 + %9 = OpVariable %8 Output + %10 = OpTypeInt 32 1 + %11 = OpTypeInt 32 0 + %12 = OpConstant %11 4 + %13 = OpTypeArray %10 %12 + %14 = OpTypeStruct %13 + %15 = OpTypePointer Uniform %14 + %16 = OpVariable %15 Uniform + %17 = OpConstant %10 0 + %18 = OpTypePointer Uniform %10 + %22 = OpConstant %10 1 + %37 = OpTypeStruct %10 + %38 = OpTypePointer Uniform %37 + %39 = OpVariable %38 Uniform + %44 = OpTypeBool + %51 = OpConstant %10 2 + %60 = OpConstant %10 3 + %68 = OpConstantFalse %44 + %4 = OpFunction %2 None %3 + %5 = OpLabel + %19 = OpAccessChain %18 %16 %17 %17 + %20 = OpLoad %10 %19 + %21 = OpConvertSToF %6 %20 + %23 = OpAccessChain %18 %16 %17 %22 + %24 = OpLoad %10 %23 + %25 = OpConvertSToF %6 %24 + %26 = OpAccessChain %18 %16 %17 %22 + %27 = OpLoad %10 %26 + %28 = OpConvertSToF %6 %27 + %29 = OpAccessChain %18 %16 %17 %17 + %30 = OpLoad %10 %29 + %31 = OpConvertSToF %6 %30 + %32 = OpCompositeConstruct %7 %21 %25 %28 %31 + OpStore %9 %32 + OpBranch %33 + %33 = OpLabel + OpLoopMerge %35 %36 None + OpBranch %34 + %34 = OpLabel + %40 = OpAccessChain %18 %39 %17 + %41 = OpLoad %10 %40 + %42 = OpAccessChain %18 %16 %17 %17 + %43 = OpLoad %10 %42 + %45 = OpIEqual %44 %41 %43 + OpSelectionMerge %47 None + OpBranchConditional %45 %46 %47 + %46 = OpLabel + OpBranch %36 + %47 = OpLabel + %49 = OpAccessChain %18 %39 %17 + %50 = OpLoad %10 %49 + %52 = OpAccessChain %18 %16 %17 %51 + %53 = OpLoad %10 %52 + %54 = OpIEqual %44 %50 %53 + OpSelectionMerge %56 None + OpBranchConditional %54 %55 %56 + %55 = OpLabel + OpBranch %35 + %56 = OpLabel + %58 = OpAccessChain %18 %39 %17 + %59 = OpLoad %10 %58 + %61 = OpAccessChain %18 %16 %17 %60 + %62 = OpLoad %10 %61 + %63 = OpIEqual %44 %59 %62 + OpSelectionMerge %65 None + OpBranchConditional %63 %64 %65 + %64 = OpLabel + OpKill + %65 = OpLabel + OpReturn + %36 = OpLabel + OpBranchConditional %68 %33 %35 + %35 = OpLabel + %69 = OpAccessChain %18 %16 %17 %22 + %70 = OpLoad %10 %69 + %71 = OpConvertSToF %6 %70 + %72 = OpCompositeConstruct %7 %71 %71 %71 %71 + OpStore %9 %72 + OpReturn + OpFunctionEnd +END + +# uniforms for variant + +# zero +BUFFER variant_zero DATA_TYPE int32 STD140 DATA + 0 +END +# _GLF_uniform_int_values +BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA + 1 0 2 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_zero AS uniform DESCRIPTOR_SET 0 BINDING 1 + BIND BUFFER variant__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 0 +END +CLEAR_COLOR variant_pipeline 0 0 0 255 + +CLEAR variant_pipeline +RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 256 256 + +EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255 diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-cosh-clamped-to-one.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-cosh-clamped-to-one.amber new file mode 100644 index 0000000..bd2bd08 --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-cosh-clamped-to-one.amber @@ -0,0 +1,162 @@ +#!amber + +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# A test for a coverage-gap found by the GraphicsFuzz project. + +# Short description: A fragment shader that covers specific NIR code paths + +# The test passes because the shader always writes red. + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 320 es +# +# #define _int_0 _GLF_uniform_int_values[0] +# #define _float_1_0 _GLF_uniform_float_values[0] +# +# precision highp float; +# precision highp int; +# +# // Contents of _GLF_uniform_float_values: 1.0 +# layout(set = 0, binding = 0) uniform buf0 +# { +# float _GLF_uniform_float_values[1]; +# }; +# // Contents of _GLF_uniform_int_values: 0 +# layout(set = 0, binding = 1) uniform buf1 +# { +# int _GLF_uniform_int_values[1]; +# }; +# layout(location = 0) out vec4 _GLF_color; +# +# void main() +# { +# vec4 v = clamp(cosh(vec4(1.0)), _float_1_0, 1.0); +# _GLF_color = vec4(v.x, _int_0, _int_0, v.z); +# } +SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0 +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 10 +; Bound: 48 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %28 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 320 + OpName %4 "main" + OpName %9 "v" + OpName %16 "buf0" + OpMemberName %16 0 "_GLF_uniform_float_values" + OpName %18 "" + OpName %28 "_GLF_color" + OpName %34 "buf1" + OpMemberName %34 0 "_GLF_uniform_int_values" + OpName %36 "" + OpDecorate %15 ArrayStride 16 + OpMemberDecorate %16 0 Offset 0 + OpDecorate %16 Block + OpDecorate %18 DescriptorSet 0 + OpDecorate %18 Binding 0 + OpDecorate %28 Location 0 + OpDecorate %33 ArrayStride 16 + OpMemberDecorate %34 0 Offset 0 + OpDecorate %34 Block + OpDecorate %36 DescriptorSet 0 + OpDecorate %36 Binding 1 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeFloat 32 + %7 = OpTypeVector %6 4 + %8 = OpTypePointer Function %7 + %10 = OpConstant %6 1 + %11 = OpConstantComposite %7 %10 %10 %10 %10 + %13 = OpTypeInt 32 0 + %14 = OpConstant %13 1 + %15 = OpTypeArray %6 %14 + %16 = OpTypeStruct %15 + %17 = OpTypePointer Uniform %16 + %18 = OpVariable %17 Uniform + %19 = OpTypeInt 32 1 + %20 = OpConstant %19 0 + %21 = OpTypePointer Uniform %6 + %27 = OpTypePointer Output %7 + %28 = OpVariable %27 Output + %29 = OpConstant %13 0 + %30 = OpTypePointer Function %6 + %33 = OpTypeArray %19 %14 + %34 = OpTypeStruct %33 + %35 = OpTypePointer Uniform %34 + %36 = OpVariable %35 Uniform + %37 = OpTypePointer Uniform %19 + %44 = OpConstant %13 2 + %4 = OpFunction %2 None %3 + %5 = OpLabel + %9 = OpVariable %8 Function + %12 = OpExtInst %7 %1 Cosh %11 + %22 = OpAccessChain %21 %18 %20 %20 + %23 = OpLoad %6 %22 + %24 = OpCompositeConstruct %7 %23 %23 %23 %23 + %25 = OpCompositeConstruct %7 %10 %10 %10 %10 + %26 = OpExtInst %7 %1 FClamp %12 %24 %25 + OpStore %9 %26 + %31 = OpAccessChain %30 %9 %29 + %32 = OpLoad %6 %31 + %38 = OpAccessChain %37 %36 %20 %20 + %39 = OpLoad %19 %38 + %40 = OpConvertSToF %6 %39 + %41 = OpAccessChain %37 %36 %20 %20 + %42 = OpLoad %19 %41 + %43 = OpConvertSToF %6 %42 + %45 = OpAccessChain %30 %9 %44 + %46 = OpLoad %6 %45 + %47 = OpCompositeConstruct %7 %32 %40 %43 %46 + OpStore %28 %47 + OpReturn + OpFunctionEnd +END + +# uniforms for variant + +# _GLF_uniform_int_values +BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA + 0 +END +# _GLF_uniform_float_values +BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA + 1.0 +END + +BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM + +PIPELINE graphics variant_pipeline + ATTACH variant_vertex_shader + ATTACH variant_fragment_shader + FRAMEBUFFER_SIZE 256 256 + BIND BUFFER variant_framebuffer AS color LOCATION 0 + BIND BUFFER variant__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 1 + BIND BUFFER variant__GLF_uniform_float_values AS uniform DESCRIPTOR_SET 0 BINDING 0 +END +CLEAR_COLOR variant_pipeline 0 0 0 255 + +CLEAR variant_pipeline +RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 256 256 + +EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255 diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-double-if-true-in-loop.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-double-if-true-in-loop.amber new file mode 100644 index 0000000..76277b1 --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-double-if-true-in-loop.amber @@ -0,0 +1,216 @@ +#!amber + +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# A test for a coverage-gap found by the GraphicsFuzz project. + +# Short description: A fragment shader that covers specific NIR code paths + +# The test passes because the shader always writes red. + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 320 es +# #define _int_0 _GLF_uniform_int_values[0] +# #define _int_10 _GLF_uniform_int_values[1] +# #define _int_1 _GLF_uniform_int_values[2] +# +# precision highp float; +# precision highp int; +# +# // Contents of _GLF_uniform_int_values: [0, 10, 1] +# layout(set = 0, binding = 0) uniform buf0 +# { +# int _GLF_uniform_int_values[3]; +# }; +# +# layout(location = 0) out vec4 _GLF_color; +# +# int func() +# { +# int i = _int_0; +# +# do +# { +# i++; +# +# if (true) +# { +# if (true) +# { +# return _int_1; +# } +# } +# } +# while (i < _int_10); +# +# return _int_0; +# } +# +# void main() +# { +# if (func() == _int_1) +# { +# _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1); +# } +# else +# { +# _GLF_color = vec4(_int_0); +# } +# } +SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0 +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 10 +; Bound: 75 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %56 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 320 + OpName %4 "main" + OpName %8 "func(" + OpName %11 "i" + OpName %15 "buf0" + OpMemberName %15 0 "_GLF_uniform_int_values" + OpName %17 "" + OpName %56 "_GLF_color" + OpDecorate %14 ArrayStride 16 + OpMemberDecorate %15 0 Offset 0 + OpDecorate %15 Block + OpDecorate %17 DescriptorSet 0 + OpDecorate %17 Binding 0 + OpDecorate %56 Location 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeInt 32 1 + %7 = OpTypeFunction %6 + %10 = OpTypePointer Function %6 + %12 = OpTypeInt 32 0 + %13 = OpConstant %12 3 + %14 = OpTypeArray %6 %13 + %15 = OpTypeStruct %14 + %16 = OpTypePointer Uniform %15 + %17 = OpVariable %16 Uniform + %18 = OpConstant %6 0 + %19 = OpTypePointer Uniform %6 + %27 = OpConstant %6 1 + %29 = OpTypeBool + %30 = OpConstantTrue %29 + %35 = OpConstant %6 2 + %53 = OpTypeFloat 32 + %54 = OpTypeVector %53 4 + %55 = OpTypePointer Output %54 + %56 = OpVariable %55 Output + %4 = OpFunction %2 None %3 + %5 = OpLabel + %47 = OpFunctionCall %6 %8 + %48 = OpAccessChain %19 %17 %18 %35 + %49 = OpLoad %6 %48 + %50 = OpIEqual %29 %47 %49 + OpSelectionMerge %52 None + OpBranchConditional %50 %51 %70 + %51 = OpLabel + %57 = OpAccessChain %19 %17 %18 %35 + %58 = OpLoad %6 %57 + %59 = OpConvertSToF %53 %58 + %60 = OpAccessChain %19 %17 %18 %18 + %61 = OpLoad %6 %60 + %62 = OpConvertSToF %53 %61 + %63 = OpAccessChain %19 %17 %18 %18 + %64 = OpLoad %6 %63 + %65 = OpConvertSToF %53 %64 + %66 = OpAccessChain %19 %17 %18 %35 + %67 = OpLoad %6 %66 + %68 = OpConvertSToF %53 %67 + %69 = OpCompositeConstruct %54 %59 %62 %65 %68 + OpStore %56 %69 + OpBranch %52 + %70 = OpLabel + %71 = OpAccessChain %19 %17 %18 %18 + %72 = OpLoad %6 %71 + %73 = OpConvertSToF %53 %72 + %74 = OpCompositeConstruct %54 %73 %73 %73 %73 + OpStore %56 %74 + OpBranch %52 + %52 = OpLabel + OpReturn + OpFunctionEnd + %8 = OpFunction %6 None %7 + %9 = OpLabel + %11 = OpVariable %10 Function + %20 = OpAccessChain %19 %17 %18 %18 + %21 = OpLoad %6 %20 + OpStore %11 %21 + OpBranch %22 + %22 = OpLabel + OpLoopMerge %24 %25 None + OpBranch %23 + %23 = OpLabel + %26 = OpLoad %6 %11 + %28 = OpIAdd %6 %26 %27 + OpStore %11 %28 + OpSelectionMerge %32 None + OpBranchConditional %30 %31 %32 + %31 = OpLabel + OpSelectionMerge %34 None + OpBranchConditional %30 %33 %34 + %33 = OpLabel + %36 = OpAccessChain %19 %17 %18 %35 + %37 = OpLoad %6 %36 + OpReturnValue %37 + %34 = OpLabel + OpBranch %32 + %32 = OpLabel + OpBranch %25 + %25 = OpLabel + %39 = OpLoad %6 %11 + %40 = OpAccessChain %19 %17 %18 %27 + %41 = OpLoad %6 %40 + %42 = OpSLessThan %29 %39 %41 + OpBranchConditional %42 %22 %24 + %24 = OpLabel + %43 = OpAccessChain %19 %17 %18 %18 + %44 = OpLoad %6 %43 + OpReturnValue %44 + OpFunctionEnd +END + +# uniforms for variant + +# _GLF_uniform_int_values +BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA + 0 10 1 +END + +BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM + +PIPELINE graphics variant_pipeline + ATTACH variant_vertex_shader + ATTACH variant_fragment_shader + FRAMEBUFFER_SIZE 256 256 + BIND BUFFER variant_framebuffer AS color LOCATION 0 + BIND BUFFER variant__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 0 +END +CLEAR_COLOR variant_pipeline 0 0 0 255 + +CLEAR variant_pipeline +RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 256 256 + +EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255 diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-for-loop-min-increment-array-element.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-for-loop-min-increment-array-element.amber new file mode 100644 index 0000000..240da48 --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-for-loop-min-increment-array-element.amber @@ -0,0 +1,236 @@ +#!amber + +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# A test for a coverage-gap found by the GraphicsFuzz project. + +# Short description: A fragment shader that covers specific NIR code paths + +# The test passes because the shader always writes red. + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 320 es +# +# #define _int_0 _GLF_uniform_int_values[0] +# #define _int_1 _GLF_uniform_int_values[1] +# #define _int_2 _GLF_uniform_int_values[2] +# #define _float_1_0 _GLF_uniform_float_values[0] +# #define _float_2_0 _GLF_uniform_float_values[1] +# #define _float_3_0 _GLF_uniform_float_values[2] +# #define _float_4_0 _GLF_uniform_float_values[3] +# +# precision highp float; +# precision highp int; +# +# // Contents of _GLF_uniform_float_values: [1.0, 2.0, 3.0, 4.0] +# layout(set = 0, binding = 0) uniform buf0 +# { +# float _GLF_uniform_float_values[4]; +# }; +# // Contents of _GLF_uniform_int_values: [0, 1, 2] +# layout(set = 0, binding = 1) uniform buf1 +# { +# int _GLF_uniform_int_values[3]; +# }; +# layout(location = 0) out vec4 _GLF_color; +# +# void main() +# { +# float arr[3] = float[3](_float_1_0, _float_2_0, _float_3_0); +# +# for (int i = 1; i < min(_int_2, 3); i++) +# { +# arr[_int_2] += _float_1_0; +# } +# +# if(arr[_int_2] == _float_4_0) +# { +# _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1); +# } +# else +# { +# _GLF_color = vec4(_int_0); +# } +# } +SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0 +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 10 +; Bound: 89 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %70 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 320 + OpName %4 "main" + OpName %11 "arr" + OpName %14 "buf0" + OpMemberName %14 0 "_GLF_uniform_float_values" + OpName %16 "" + OpName %30 "i" + OpName %38 "buf1" + OpMemberName %38 0 "_GLF_uniform_int_values" + OpName %40 "" + OpName %70 "_GLF_color" + OpDecorate %13 ArrayStride 16 + OpMemberDecorate %14 0 Offset 0 + OpDecorate %14 Block + OpDecorate %16 DescriptorSet 0 + OpDecorate %16 Binding 0 + OpDecorate %37 ArrayStride 16 + OpMemberDecorate %38 0 Offset 0 + OpDecorate %38 Block + OpDecorate %40 DescriptorSet 0 + OpDecorate %40 Binding 1 + OpDecorate %70 Location 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeFloat 32 + %7 = OpTypeInt 32 0 + %8 = OpConstant %7 3 + %9 = OpTypeArray %6 %8 + %10 = OpTypePointer Function %9 + %12 = OpConstant %7 4 + %13 = OpTypeArray %6 %12 + %14 = OpTypeStruct %13 + %15 = OpTypePointer Uniform %14 + %16 = OpVariable %15 Uniform + %17 = OpTypeInt 32 1 + %18 = OpConstant %17 0 + %19 = OpTypePointer Uniform %6 + %22 = OpConstant %17 1 + %25 = OpConstant %17 2 + %29 = OpTypePointer Function %17 + %37 = OpTypeArray %17 %8 + %38 = OpTypeStruct %37 + %39 = OpTypePointer Uniform %38 + %40 = OpVariable %39 Uniform + %41 = OpTypePointer Uniform %17 + %44 = OpConstant %17 3 + %46 = OpTypeBool + %52 = OpTypePointer Function %6 + %68 = OpTypeVector %6 4 + %69 = OpTypePointer Output %68 + %70 = OpVariable %69 Output + %4 = OpFunction %2 None %3 + %5 = OpLabel + %11 = OpVariable %10 Function + %30 = OpVariable %29 Function + %20 = OpAccessChain %19 %16 %18 %18 + %21 = OpLoad %6 %20 + %23 = OpAccessChain %19 %16 %18 %22 + %24 = OpLoad %6 %23 + %26 = OpAccessChain %19 %16 %18 %25 + %27 = OpLoad %6 %26 + %28 = OpCompositeConstruct %9 %21 %24 %27 + OpStore %11 %28 + OpStore %30 %22 + OpBranch %31 + %31 = OpLabel + OpLoopMerge %33 %34 None + OpBranch %35 + %35 = OpLabel + %36 = OpLoad %17 %30 + %42 = OpAccessChain %41 %40 %18 %25 + %43 = OpLoad %17 %42 + %45 = OpExtInst %17 %1 SMin %43 %44 + %47 = OpSLessThan %46 %36 %45 + OpBranchConditional %47 %32 %33 + %32 = OpLabel + %48 = OpAccessChain %41 %40 %18 %25 + %49 = OpLoad %17 %48 + %50 = OpAccessChain %19 %16 %18 %18 + %51 = OpLoad %6 %50 + %53 = OpAccessChain %52 %11 %49 + %54 = OpLoad %6 %53 + %55 = OpFAdd %6 %54 %51 + %56 = OpAccessChain %52 %11 %49 + OpStore %56 %55 + OpBranch %34 + %34 = OpLabel + %57 = OpLoad %17 %30 + %58 = OpIAdd %17 %57 %22 + OpStore %30 %58 + OpBranch %31 + %33 = OpLabel + %59 = OpAccessChain %41 %40 %18 %25 + %60 = OpLoad %17 %59 + %61 = OpAccessChain %52 %11 %60 + %62 = OpLoad %6 %61 + %63 = OpAccessChain %19 %16 %18 %44 + %64 = OpLoad %6 %63 + %65 = OpFOrdEqual %46 %62 %64 + OpSelectionMerge %67 None + OpBranchConditional %65 %66 %84 + %66 = OpLabel + %71 = OpAccessChain %41 %40 %18 %22 + %72 = OpLoad %17 %71 + %73 = OpConvertSToF %6 %72 + %74 = OpAccessChain %41 %40 %18 %18 + %75 = OpLoad %17 %74 + %76 = OpConvertSToF %6 %75 + %77 = OpAccessChain %41 %40 %18 %18 + %78 = OpLoad %17 %77 + %79 = OpConvertSToF %6 %78 + %80 = OpAccessChain %41 %40 %18 %22 + %81 = OpLoad %17 %80 + %82 = OpConvertSToF %6 %81 + %83 = OpCompositeConstruct %68 %73 %76 %79 %82 + OpStore %70 %83 + OpBranch %67 + %84 = OpLabel + %85 = OpAccessChain %41 %40 %18 %18 + %86 = OpLoad %17 %85 + %87 = OpConvertSToF %6 %86 + %88 = OpCompositeConstruct %68 %87 %87 %87 %87 + OpStore %70 %88 + OpBranch %67 + %67 = OpLabel + OpReturn + OpFunctionEnd +END + +# uniforms for variant + +# _GLF_uniform_int_values +BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA + 0 1 2 +END +# _GLF_uniform_float_values +BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA + 1.0 2.0 3.0 4.0 +END + +BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM + +PIPELINE graphics variant_pipeline + ATTACH variant_vertex_shader + ATTACH variant_fragment_shader + FRAMEBUFFER_SIZE 256 256 + BIND BUFFER variant_framebuffer AS color LOCATION 0 + BIND BUFFER variant__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 1 + BIND BUFFER variant__GLF_uniform_float_values AS uniform DESCRIPTOR_SET 0 BINDING 0 +END +CLEAR_COLOR variant_pipeline 0 0 0 255 + +CLEAR variant_pipeline +RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 256 256 + +EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255 diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-if-true-discard-in-do-while-never-reached.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-if-true-discard-in-do-while-never-reached.amber new file mode 100644 index 0000000..c4dac9c --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-if-true-discard-in-do-while-never-reached.amber @@ -0,0 +1,200 @@ +#!amber + +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# A test for a coverage-gap found by the GraphicsFuzz project. + +# Short description: A fragment shader that covers specific NIR code paths + +# The test passes because the shader always writes red. + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 320 es +# #define _int_0 _GLF_uniform_int_values[0] +# #define _int_1 _GLF_uniform_int_values[1] +# +# precision highp float; +# precision highp int; +# +# // Contents of _GLF_uniform_int_values: [0, 1] +# layout(set = 0, binding = 0) uniform buf0 +# { +# int _GLF_uniform_int_values[2]; +# }; +# +# layout(location = 0) out vec4 _GLF_color; +# +# void main() +# { +# int a = 1; +# +# do +# { +# // Always true. +# if(a >= _int_0) +# { +# break; +# } +# +# // Never executed as the break above is always hit. +# if (true) +# { +# discard; +# } +# +# a++; +# } +# while(a != 1); +# +# // Always true. +# if(a == 1) +# { +# _GLF_color = vec4(1, _int_0, _int_0, _int_1); +# } +# else +# { +# _GLF_color = vec4(_int_0); +# } +# } +SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0 +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 10 +; Bound: 62 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %45 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 320 + OpName %4 "main" + OpName %8 "a" + OpName %18 "buf0" + OpMemberName %18 0 "_GLF_uniform_int_values" + OpName %20 "" + OpName %45 "_GLF_color" + OpDecorate %17 ArrayStride 16 + 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 1 + %15 = OpTypeInt 32 0 + %16 = OpConstant %15 2 + %17 = OpTypeArray %6 %16 + %18 = OpTypeStruct %17 + %19 = OpTypePointer Uniform %18 + %20 = OpVariable %19 Uniform + %21 = OpConstant %6 0 + %22 = OpTypePointer Uniform %6 + %25 = OpTypeBool + %30 = OpConstantTrue %25 + %42 = OpTypeFloat 32 + %43 = OpTypeVector %42 4 + %44 = OpTypePointer Output %43 + %45 = OpVariable %44 Output + %46 = OpConstant %42 1 + %4 = OpFunction %2 None %3 + %5 = OpLabel + %8 = OpVariable %7 Function + OpStore %8 %9 + OpBranch %10 + %10 = OpLabel + OpLoopMerge %12 %13 None + OpBranch %11 + %11 = OpLabel + %14 = OpLoad %6 %8 + %23 = OpAccessChain %22 %20 %21 %21 + %24 = OpLoad %6 %23 + %26 = OpSGreaterThanEqual %25 %14 %24 + OpSelectionMerge %28 None + OpBranchConditional %26 %27 %28 + %27 = OpLabel + OpBranch %12 + %28 = OpLabel + OpSelectionMerge %32 None + OpBranchConditional %30 %31 %32 + %31 = OpLabel + OpKill + %32 = OpLabel + %34 = OpLoad %6 %8 + %35 = OpIAdd %6 %34 %9 + OpStore %8 %35 + OpBranch %13 + %13 = OpLabel + %36 = OpLoad %6 %8 + %37 = OpINotEqual %25 %36 %9 + OpBranchConditional %37 %10 %12 + %12 = OpLabel + %38 = OpLoad %6 %8 + %39 = OpIEqual %25 %38 %9 + OpSelectionMerge %41 None + OpBranchConditional %39 %40 %57 + %40 = OpLabel + %47 = OpAccessChain %22 %20 %21 %21 + %48 = OpLoad %6 %47 + %49 = OpConvertSToF %42 %48 + %50 = OpAccessChain %22 %20 %21 %21 + %51 = OpLoad %6 %50 + %52 = OpConvertSToF %42 %51 + %53 = OpAccessChain %22 %20 %21 %9 + %54 = OpLoad %6 %53 + %55 = OpConvertSToF %42 %54 + %56 = OpCompositeConstruct %43 %46 %49 %52 %55 + OpStore %45 %56 + OpBranch %41 + %57 = OpLabel + %58 = OpAccessChain %22 %20 %21 %21 + %59 = OpLoad %6 %58 + %60 = OpConvertSToF %42 %59 + %61 = OpCompositeConstruct %43 %60 %60 %60 %60 + OpStore %45 %61 + OpBranch %41 + %41 = OpLabel + OpReturn + OpFunctionEnd +END + +# uniforms for variant + +# _GLF_uniform_int_values +BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA + 0 1 +END + +BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM + +PIPELINE graphics variant_pipeline + ATTACH variant_vertex_shader + ATTACH variant_fragment_shader + FRAMEBUFFER_SIZE 256 256 + BIND BUFFER variant_framebuffer AS color LOCATION 0 + BIND BUFFER variant__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 0 +END +CLEAR_COLOR variant_pipeline 0 0 0 255 + +CLEAR variant_pipeline +RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 256 256 + +EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255 diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-increment-float-in-loop-abs.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-increment-float-in-loop-abs.amber new file mode 100644 index 0000000..e3166cf --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-increment-float-in-loop-abs.amber @@ -0,0 +1,239 @@ +#!amber + +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# A test for a coverage-gap found by the GraphicsFuzz project. + +# Short description: A fragment shader that covers specific BRW code paths + +# The test passes because the shader always writes red. + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 320 es +# #define _int_33 _GLF_uniform_int_values[0] +# #define _int_0 _GLF_uniform_int_values[1] +# #define _int_1 _GLF_uniform_int_values[2] +# #define _float_1_0 _GLF_uniform_float_values[0] +# #define _float_23_0 _GLF_uniform_float_values[1] +# #define _float_24_0 _GLF_uniform_float_values[2] +# +# precision highp int; +# precision highp float; +# +# // Contents of _GLF_uniform_float_values: [1.0, 23.0, 24.0] +# layout(set = 0, binding = 0) uniform buf0 +# { +# float _GLF_uniform_float_values[3]; +# }; +# // Contents of _GLF_uniform_int_values: [33, 0, 1] +# layout(set = 0, binding = 1) uniform buf1 +# { +# int _GLF_uniform_int_values[3]; +# }; +# layout(location = 0) out vec4 _GLF_color; +# +# void main() +# { +# float f0 = _float_1_0; +# float f1 = _float_1_0; +# +# for (int i = _int_0; i < _int_33; i++) +# { +# f0 = abs(1.1 * f0); +# f1 = f0; +# } +# +# // Always true. +# if (f1 > _float_23_0 && f1 < _float_24_0) +# { +# _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1); +# } +# else +# { +# _GLF_color = vec4(_int_0); +# } +# } +SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0 +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 10 +; Bound: 85 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %66 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 320 + OpName %4 "main" + OpName %8 "f0" + OpName %12 "buf0" + OpMemberName %12 0 "_GLF_uniform_float_values" + OpName %14 "" + OpName %20 "f1" + OpName %24 "i" + OpName %26 "buf1" + OpMemberName %26 0 "_GLF_uniform_int_values" + OpName %28 "" + OpName %66 "_GLF_color" + OpDecorate %11 ArrayStride 16 + OpMemberDecorate %12 0 Offset 0 + OpDecorate %12 Block + OpDecorate %14 DescriptorSet 0 + OpDecorate %14 Binding 0 + OpDecorate %25 ArrayStride 16 + OpMemberDecorate %26 0 Offset 0 + OpDecorate %26 Block + OpDecorate %28 DescriptorSet 0 + OpDecorate %28 Binding 1 + OpDecorate %66 Location 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeFloat 32 + %7 = OpTypePointer Function %6 + %9 = OpTypeInt 32 0 + %10 = OpConstant %9 3 + %11 = OpTypeArray %6 %10 + %12 = OpTypeStruct %11 + %13 = OpTypePointer Uniform %12 + %14 = OpVariable %13 Uniform + %15 = OpTypeInt 32 1 + %16 = OpConstant %15 0 + %17 = OpTypePointer Uniform %6 + %23 = OpTypePointer Function %15 + %25 = OpTypeArray %15 %10 + %26 = OpTypeStruct %25 + %27 = OpTypePointer Uniform %26 + %28 = OpVariable %27 Uniform + %29 = OpConstant %15 1 + %30 = OpTypePointer Uniform %15 + %41 = OpTypeBool + %43 = OpConstant %6 1.10000002 + %57 = OpConstant %15 2 + %64 = OpTypeVector %6 4 + %65 = OpTypePointer Output %64 + %66 = OpVariable %65 Output + %4 = OpFunction %2 None %3 + %5 = OpLabel + %8 = OpVariable %7 Function + %20 = OpVariable %7 Function + %24 = OpVariable %23 Function + %18 = OpAccessChain %17 %14 %16 %16 + %19 = OpLoad %6 %18 + OpStore %8 %19 + %21 = OpAccessChain %17 %14 %16 %16 + %22 = OpLoad %6 %21 + OpStore %20 %22 + %31 = OpAccessChain %30 %28 %16 %29 + %32 = OpLoad %15 %31 + OpStore %24 %32 + OpBranch %33 + %33 = OpLabel + OpLoopMerge %35 %36 None + OpBranch %37 + %37 = OpLabel + %38 = OpLoad %15 %24 + %39 = OpAccessChain %30 %28 %16 %16 + %40 = OpLoad %15 %39 + %42 = OpSLessThan %41 %38 %40 + OpBranchConditional %42 %34 %35 + %34 = OpLabel + %44 = OpLoad %6 %8 + %45 = OpFMul %6 %43 %44 + %46 = OpExtInst %6 %1 FAbs %45 + OpStore %8 %46 + %47 = OpLoad %6 %8 + OpStore %20 %47 + OpBranch %36 + %36 = OpLabel + %48 = OpLoad %15 %24 + %49 = OpIAdd %15 %48 %29 + OpStore %24 %49 + OpBranch %33 + %35 = OpLabel + %50 = OpLoad %6 %20 + %51 = OpAccessChain %17 %14 %16 %29 + %52 = OpLoad %6 %51 + %53 = OpFOrdGreaterThan %41 %50 %52 + OpSelectionMerge %55 None + OpBranchConditional %53 %54 %55 + %54 = OpLabel + %56 = OpLoad %6 %20 + %58 = OpAccessChain %17 %14 %16 %57 + %59 = OpLoad %6 %58 + %60 = OpFOrdLessThan %41 %56 %59 + OpBranch %55 + %55 = OpLabel + %61 = OpPhi %41 %53 %35 %60 %54 + OpSelectionMerge %63 None + OpBranchConditional %61 %62 %80 + %62 = OpLabel + %67 = OpAccessChain %30 %28 %16 %57 + %68 = OpLoad %15 %67 + %69 = OpConvertSToF %6 %68 + %70 = OpAccessChain %30 %28 %16 %29 + %71 = OpLoad %15 %70 + %72 = OpConvertSToF %6 %71 + %73 = OpAccessChain %30 %28 %16 %29 + %74 = OpLoad %15 %73 + %75 = OpConvertSToF %6 %74 + %76 = OpAccessChain %30 %28 %16 %57 + %77 = OpLoad %15 %76 + %78 = OpConvertSToF %6 %77 + %79 = OpCompositeConstruct %64 %69 %72 %75 %78 + OpStore %66 %79 + OpBranch %63 + %80 = OpLabel + %81 = OpAccessChain %30 %28 %16 %29 + %82 = OpLoad %15 %81 + %83 = OpConvertSToF %6 %82 + %84 = OpCompositeConstruct %64 %83 %83 %83 %83 + OpStore %66 %84 + OpBranch %63 + %63 = OpLabel + OpReturn + OpFunctionEnd +END + +# uniforms for variant + +# _GLF_uniform_int_values +BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA + 33 0 1 +END +# _GLF_uniform_float_values +BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA + 1.0 23.0 24.0 +END + +BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM + +PIPELINE graphics variant_pipeline + ATTACH variant_vertex_shader + ATTACH variant_fragment_shader + FRAMEBUFFER_SIZE 256 256 + BIND BUFFER variant_framebuffer AS color LOCATION 0 + BIND BUFFER variant__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 1 + BIND BUFFER variant__GLF_uniform_float_values AS uniform DESCRIPTOR_SET 0 BINDING 0 +END +CLEAR_COLOR variant_pipeline 0 0 0 255 + +CLEAR variant_pipeline +RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 256 256 + +EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255 diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-increment-vector-component-with-matrix-copy.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-increment-vector-component-with-matrix-copy.amber new file mode 100644 index 0000000..4e40cce --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-increment-vector-component-with-matrix-copy.amber @@ -0,0 +1,254 @@ +#!amber + +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# A test for a coverage-gap found by the GraphicsFuzz project. + +# Short description: A fragment shader that covers specific NIR code paths + +# The test passes because the shader always writes red. + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 320 es +# +# #define _int_1 _GLF_uniform_int_values[0] +# #define _int_0 _GLF_uniform_int_values[1] +# #define _float_3_0 _GLF_uniform_float_values[0] +# #define _float_4_0 _GLF_uniform_float_values[1] +# #define _float_1_0 _GLF_uniform_float_values[2] +# #define _float_2_0 _GLF_uniform_float_values[3] +# +# precision highp int; +# precision highp float; +# +# // Contents of _GLF_uniform_int_values: [1, 0] +# layout(set = 0, binding = 0) uniform buf0 +# { +# int _GLF_uniform_int_values[2]; +# }; +# // Contents of _GLF_uniform_float_values: [3.0, 4.0, 1.0, 2.0] +# layout(set = 0, binding = 1) uniform buf1 +# { +# float _GLF_uniform_float_values[4]; +# }; +# layout(location = 0) out vec4 _GLF_color; +# +# void main() +# { +# int a = _int_1; +# vec4 v = vec4(_float_1_0); +# mat3x4 m = mat3x4(_float_2_0); +# m[a][a] = _float_3_0; +# v[a] += mat4(m)[a][a]; +# +# if(v.y == _float_4_0) +# { +# _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1); +# } +# else +# { +# _GLF_color = vec4(_int_0); +# } +# } +SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0 +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 10 +; Bound: 111 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %92 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 320 + OpName %4 "main" + OpName %8 "a" + OpName %12 "buf0" + OpMemberName %12 0 "_GLF_uniform_int_values" + OpName %14 "" + OpName %22 "v" + OpName %25 "buf1" + OpMemberName %25 0 "_GLF_uniform_float_values" + OpName %27 "" + OpName %35 "m" + OpName %74 "indexable" + OpName %92 "_GLF_color" + OpDecorate %11 ArrayStride 16 + OpMemberDecorate %12 0 Offset 0 + OpDecorate %12 Block + OpDecorate %14 DescriptorSet 0 + OpDecorate %14 Binding 0 + OpDecorate %24 ArrayStride 16 + OpMemberDecorate %25 0 Offset 0 + OpDecorate %25 Block + OpDecorate %27 DescriptorSet 0 + OpDecorate %27 Binding 1 + OpDecorate %92 Location 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeInt 32 1 + %7 = OpTypePointer Function %6 + %9 = OpTypeInt 32 0 + %10 = OpConstant %9 2 + %11 = OpTypeArray %6 %10 + %12 = OpTypeStruct %11 + %13 = OpTypePointer Uniform %12 + %14 = OpVariable %13 Uniform + %15 = OpConstant %6 0 + %16 = OpTypePointer Uniform %6 + %19 = OpTypeFloat 32 + %20 = OpTypeVector %19 4 + %21 = OpTypePointer Function %20 + %23 = OpConstant %9 4 + %24 = OpTypeArray %19 %23 + %25 = OpTypeStruct %24 + %26 = OpTypePointer Uniform %25 + %27 = OpVariable %26 Uniform + %28 = OpConstant %6 2 + %29 = OpTypePointer Uniform %19 + %33 = OpTypeMatrix %20 3 + %34 = OpTypePointer Function %33 + %36 = OpConstant %6 3 + %39 = OpConstant %19 1 + %40 = OpConstant %19 0 + %49 = OpTypePointer Function %19 + %53 = OpTypeMatrix %20 4 + %73 = OpTypePointer Function %53 + %81 = OpConstant %9 1 + %84 = OpConstant %6 1 + %87 = OpTypeBool + %91 = OpTypePointer Output %20 + %92 = OpVariable %91 Output + %4 = OpFunction %2 None %3 + %5 = OpLabel + %8 = OpVariable %7 Function + %22 = OpVariable %21 Function + %35 = OpVariable %34 Function + %74 = OpVariable %73 Function + %17 = OpAccessChain %16 %14 %15 %15 + %18 = OpLoad %6 %17 + OpStore %8 %18 + %30 = OpAccessChain %29 %27 %15 %28 + %31 = OpLoad %19 %30 + %32 = OpCompositeConstruct %20 %31 %31 %31 %31 + OpStore %22 %32 + %37 = OpAccessChain %29 %27 %15 %36 + %38 = OpLoad %19 %37 + %41 = OpCompositeConstruct %20 %38 %40 %40 %40 + %42 = OpCompositeConstruct %20 %40 %38 %40 %40 + %43 = OpCompositeConstruct %20 %40 %40 %38 %40 + %44 = OpCompositeConstruct %33 %41 %42 %43 + OpStore %35 %44 + %45 = OpLoad %6 %8 + %46 = OpLoad %6 %8 + %47 = OpAccessChain %29 %27 %15 %15 + %48 = OpLoad %19 %47 + %50 = OpAccessChain %49 %35 %45 %46 + OpStore %50 %48 + %51 = OpLoad %6 %8 + %52 = OpLoad %33 %35 + %54 = OpCompositeExtract %19 %52 0 0 + %55 = OpCompositeExtract %19 %52 0 1 + %56 = OpCompositeExtract %19 %52 0 2 + %57 = OpCompositeExtract %19 %52 0 3 + %58 = OpCompositeExtract %19 %52 1 0 + %59 = OpCompositeExtract %19 %52 1 1 + %60 = OpCompositeExtract %19 %52 1 2 + %61 = OpCompositeExtract %19 %52 1 3 + %62 = OpCompositeExtract %19 %52 2 0 + %63 = OpCompositeExtract %19 %52 2 1 + %64 = OpCompositeExtract %19 %52 2 2 + %65 = OpCompositeExtract %19 %52 2 3 + %66 = OpCompositeConstruct %20 %54 %55 %56 %57 + %67 = OpCompositeConstruct %20 %58 %59 %60 %61 + %68 = OpCompositeConstruct %20 %62 %63 %64 %65 + %69 = OpCompositeConstruct %20 %40 %40 %40 %39 + %70 = OpCompositeConstruct %53 %66 %67 %68 %69 + %71 = OpLoad %6 %8 + %72 = OpLoad %6 %8 + OpStore %74 %70 + %75 = OpAccessChain %49 %74 %71 %72 + %76 = OpLoad %19 %75 + %77 = OpAccessChain %49 %22 %51 + %78 = OpLoad %19 %77 + %79 = OpFAdd %19 %78 %76 + %80 = OpAccessChain %49 %22 %51 + OpStore %80 %79 + %82 = OpAccessChain %49 %22 %81 + %83 = OpLoad %19 %82 + %85 = OpAccessChain %29 %27 %15 %84 + %86 = OpLoad %19 %85 + %88 = OpFOrdEqual %87 %83 %86 + OpSelectionMerge %90 None + OpBranchConditional %88 %89 %106 + %89 = OpLabel + %93 = OpAccessChain %16 %14 %15 %15 + %94 = OpLoad %6 %93 + %95 = OpConvertSToF %19 %94 + %96 = OpAccessChain %16 %14 %15 %84 + %97 = OpLoad %6 %96 + %98 = OpConvertSToF %19 %97 + %99 = OpAccessChain %16 %14 %15 %84 + %100 = OpLoad %6 %99 + %101 = OpConvertSToF %19 %100 + %102 = OpAccessChain %16 %14 %15 %15 + %103 = OpLoad %6 %102 + %104 = OpConvertSToF %19 %103 + %105 = OpCompositeConstruct %20 %95 %98 %101 %104 + OpStore %92 %105 + OpBranch %90 + %106 = OpLabel + %107 = OpAccessChain %16 %14 %15 %84 + %108 = OpLoad %6 %107 + %109 = OpConvertSToF %19 %108 + %110 = OpCompositeConstruct %20 %109 %109 %109 %109 + OpStore %92 %110 + OpBranch %90 + %90 = OpLabel + OpReturn + OpFunctionEnd +END + +# uniforms for variant + +# _GLF_uniform_float_values +BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA + 3.0 4.0 1.0 2.0 +END +# _GLF_uniform_int_values +BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA + 1 0 +END + +BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM + +PIPELINE graphics variant_pipeline + ATTACH variant_vertex_shader + ATTACH variant_fragment_shader + FRAMEBUFFER_SIZE 256 256 + BIND BUFFER variant_framebuffer AS color LOCATION 0 + BIND BUFFER variant__GLF_uniform_float_values AS uniform DESCRIPTOR_SET 0 BINDING 1 + BIND BUFFER variant__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 0 +END +CLEAR_COLOR variant_pipeline 0 0 0 255 + +CLEAR variant_pipeline +RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 256 256 + +EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255 diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-matching-conditions-break.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-matching-conditions-break.amber new file mode 100644 index 0000000..cf53c38 --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-matching-conditions-break.amber @@ -0,0 +1,247 @@ +#!amber + +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# A test for a coverage-gap found by the GraphicsFuzz project. + +# Short description: A fragment shader that covers specific NIR code paths + +# The test passes because the shader always writes red. + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 320 es +# +# #define _int_1 _GLF_uniform_int_values[0] +# #define _int_0 _GLF_uniform_int_values[1] +# #define _int_4 _GLF_uniform_int_values[2] +# +# precision highp float; +# precision highp int; +# +# // Contents of _GLF_uniform_int_values: [1, 0, 4] +# layout(set = 0, binding = 0) uniform buf0 +# { +# int _GLF_uniform_int_values[3]; +# }; +# +# layout(location = 0) out vec4 _GLF_color; +# +# void main() +# { +# _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1); +# +# // Always false. +# if(gl_FragCoord.y < 0.0) +# { +# _GLF_color = vec4(_int_0); +# } +# +# for(int i = _int_0; i < _int_4; i++) +# { +# // Always true. +# if(gl_FragCoord.x > 0.0) +# { +# // Always false. +# if(gl_FragCoord.y < 0.0) +# { +# _GLF_color = vec4(_int_0); +# break; +# } +# } +# +# // Always true. +# if(gl_FragCoord.x > 0.0) +# { +# // Always false. +# if(gl_FragCoord.y < 0.0) +# { +# _GLF_color = vec4(_int_0); +# } +# } +# } +# } +SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0 +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 10 +; Bound: 94 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %9 %34 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 320 + OpName %4 "main" + OpName %9 "_GLF_color" + OpName %14 "buf0" + OpMemberName %14 0 "_GLF_uniform_int_values" + OpName %16 "" + OpName %34 "gl_FragCoord" + OpName %49 "i" + OpDecorate %9 Location 0 + OpDecorate %13 ArrayStride 16 + OpMemberDecorate %14 0 Offset 0 + OpDecorate %14 Block + OpDecorate %16 DescriptorSet 0 + OpDecorate %16 Binding 0 + OpDecorate %34 BuiltIn FragCoord + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeFloat 32 + %7 = OpTypeVector %6 4 + %8 = OpTypePointer Output %7 + %9 = OpVariable %8 Output + %10 = OpTypeInt 32 1 + %11 = OpTypeInt 32 0 + %12 = OpConstant %11 3 + %13 = OpTypeArray %10 %12 + %14 = OpTypeStruct %13 + %15 = OpTypePointer Uniform %14 + %16 = OpVariable %15 Uniform + %17 = OpConstant %10 0 + %18 = OpTypePointer Uniform %10 + %22 = OpConstant %10 1 + %33 = OpTypePointer Input %7 + %34 = OpVariable %33 Input + %35 = OpConstant %11 1 + %36 = OpTypePointer Input %6 + %39 = OpConstant %6 0 + %40 = OpTypeBool + %48 = OpTypePointer Function %10 + %58 = OpConstant %10 2 + %62 = OpConstant %11 0 + %4 = OpFunction %2 None %3 + %5 = OpLabel + %49 = OpVariable %48 Function + %19 = OpAccessChain %18 %16 %17 %17 + %20 = OpLoad %10 %19 + %21 = OpConvertSToF %6 %20 + %23 = OpAccessChain %18 %16 %17 %22 + %24 = OpLoad %10 %23 + %25 = OpConvertSToF %6 %24 + %26 = OpAccessChain %18 %16 %17 %22 + %27 = OpLoad %10 %26 + %28 = OpConvertSToF %6 %27 + %29 = OpAccessChain %18 %16 %17 %17 + %30 = OpLoad %10 %29 + %31 = OpConvertSToF %6 %30 + %32 = OpCompositeConstruct %7 %21 %25 %28 %31 + OpStore %9 %32 + %37 = OpAccessChain %36 %34 %35 + %38 = OpLoad %6 %37 + %41 = OpFOrdLessThan %40 %38 %39 + OpSelectionMerge %43 None + OpBranchConditional %41 %42 %43 + %42 = OpLabel + %44 = OpAccessChain %18 %16 %17 %22 + %45 = OpLoad %10 %44 + %46 = OpConvertSToF %6 %45 + %47 = OpCompositeConstruct %7 %46 %46 %46 %46 + OpStore %9 %47 + OpBranch %43 + %43 = OpLabel + %50 = OpAccessChain %18 %16 %17 %22 + %51 = OpLoad %10 %50 + OpStore %49 %51 + OpBranch %52 + %52 = OpLabel + OpLoopMerge %54 %55 None + OpBranch %56 + %56 = OpLabel + %57 = OpLoad %10 %49 + %59 = OpAccessChain %18 %16 %17 %58 + %60 = OpLoad %10 %59 + %61 = OpSLessThan %40 %57 %60 + OpBranchConditional %61 %53 %54 + %53 = OpLabel + %63 = OpAccessChain %36 %34 %62 + %64 = OpLoad %6 %63 + %65 = OpFOrdGreaterThan %40 %64 %39 + OpSelectionMerge %67 None + OpBranchConditional %65 %66 %67 + %66 = OpLabel + %68 = OpAccessChain %36 %34 %35 + %69 = OpLoad %6 %68 + %70 = OpFOrdLessThan %40 %69 %39 + OpSelectionMerge %72 None + OpBranchConditional %70 %71 %72 + %71 = OpLabel + %73 = OpAccessChain %18 %16 %17 %22 + %74 = OpLoad %10 %73 + %75 = OpConvertSToF %6 %74 + %76 = OpCompositeConstruct %7 %75 %75 %75 %75 + OpStore %9 %76 + OpBranch %54 + %72 = OpLabel + OpBranch %67 + %67 = OpLabel + %78 = OpAccessChain %36 %34 %62 + %79 = OpLoad %6 %78 + %80 = OpFOrdGreaterThan %40 %79 %39 + OpSelectionMerge %82 None + OpBranchConditional %80 %81 %82 + %81 = OpLabel + %83 = OpAccessChain %36 %34 %35 + %84 = OpLoad %6 %83 + %85 = OpFOrdLessThan %40 %84 %39 + OpSelectionMerge %87 None + OpBranchConditional %85 %86 %87 + %86 = OpLabel + %88 = OpAccessChain %18 %16 %17 %22 + %89 = OpLoad %10 %88 + %90 = OpConvertSToF %6 %89 + %91 = OpCompositeConstruct %7 %90 %90 %90 %90 + OpStore %9 %91 + OpBranch %87 + %87 = OpLabel + OpBranch %82 + %82 = OpLabel + OpBranch %55 + %55 = OpLabel + %92 = OpLoad %10 %49 + %93 = OpIAdd %10 %92 %22 + OpStore %49 %93 + OpBranch %52 + %54 = OpLabel + OpReturn + OpFunctionEnd +END + +# uniforms for variant + +# _GLF_uniform_int_values +BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA + 1 0 4 +END + +BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM + +PIPELINE graphics variant_pipeline + ATTACH variant_vertex_shader + ATTACH variant_fragment_shader + FRAMEBUFFER_SIZE 256 256 + BIND BUFFER variant_framebuffer AS color LOCATION 0 + BIND BUFFER variant__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 0 +END +CLEAR_COLOR variant_pipeline 0 0 0 255 + +CLEAR variant_pipeline +RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 256 256 + +EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255 diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-matching-if-always-true-inside-loop.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-matching-if-always-true-inside-loop.amber new file mode 100644 index 0000000..4acc231 --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-matching-if-always-true-inside-loop.amber @@ -0,0 +1,297 @@ +#!amber + +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# A test for a coverage-gap found by the GraphicsFuzz project. + +# Short description: A fragment shader that covers specific NIR code paths + +# The test passes because the shader always writes red. + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 320 es +# +# #define _int_0 _GLF_uniform_int_values[0] +# #define _int_4 _GLF_uniform_int_values[1] +# #define _int_3 _GLF_uniform_int_values[2] +# #define _int_1 _GLF_uniform_int_values[3] +# #define _int_2 _GLF_uniform_int_values[4] +# +# precision highp int; +# precision highp float; +# +# // Contents of _GLF_uniform_int_values: [0, 4, 3, 1, 2] +# layout(set = 0, binding = 0) uniform buf0 +# { +# int _GLF_uniform_int_values[5]; +# }; +# +# layout(location = 0) out vec4 _GLF_color; +# +# int func(int x) +# { +# int a = _int_0; +# +# for (int i = _int_0; i < _int_4; i++) +# { +# if (int[4](_int_1, _int_1, _int_1, _int_1)[a] > x) +# { +# if (true) +# { +# // We hit this the first time the function is called (x = 0). +# return _int_1; +# } +# else +# { +# a = _int_1; +# } +# } +# else +# { +# if (true) +# { +# // We hit this the second time the function is called (x = 1). +# return _int_2; +# } +# } +# } +# +# return _int_0; +# } +# +# void main() +# { +# // a becomes 1. +# int a = func(_int_0); +# // a becomes 3. +# a += func(_int_1); +# +# if(a == _int_3) +# { +# _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1); +# } +# else +# { +# _GLF_color = vec4(_int_0); +# } +# } +SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0 +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 10 +; Bound: 120 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %101 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 320 + OpName %4 "main" + OpName %10 "func(i1;" + OpName %9 "x" + OpName %12 "a" + OpName %16 "buf0" + OpMemberName %16 0 "_GLF_uniform_int_values" + OpName %18 "" + OpName %23 "i" + OpName %51 "indexable" + OpName %80 "a" + OpName %81 "param" + OpName %85 "param" + OpName %101 "_GLF_color" + OpDecorate %15 ArrayStride 16 + OpMemberDecorate %16 0 Offset 0 + OpDecorate %16 Block + OpDecorate %18 DescriptorSet 0 + OpDecorate %18 Binding 0 + OpDecorate %101 Location 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeInt 32 1 + %7 = OpTypePointer Function %6 + %8 = OpTypeFunction %6 %7 + %13 = OpTypeInt 32 0 + %14 = OpConstant %13 5 + %15 = OpTypeArray %6 %14 + %16 = OpTypeStruct %15 + %17 = OpTypePointer Uniform %16 + %18 = OpVariable %17 Uniform + %19 = OpConstant %6 0 + %20 = OpTypePointer Uniform %6 + %32 = OpConstant %6 1 + %35 = OpTypeBool + %37 = OpConstant %6 3 + %46 = OpConstant %13 4 + %47 = OpTypeArray %6 %46 + %50 = OpTypePointer Function %47 + %58 = OpConstantTrue %35 + %70 = OpConstant %6 4 + %92 = OpConstant %6 2 + %98 = OpTypeFloat 32 + %99 = OpTypeVector %98 4 + %100 = OpTypePointer Output %99 + %101 = OpVariable %100 Output + %4 = OpFunction %2 None %3 + %5 = OpLabel + %80 = OpVariable %7 Function + %81 = OpVariable %7 Function + %85 = OpVariable %7 Function + %82 = OpAccessChain %20 %18 %19 %19 + %83 = OpLoad %6 %82 + OpStore %81 %83 + %84 = OpFunctionCall %6 %10 %81 + OpStore %80 %84 + %86 = OpAccessChain %20 %18 %19 %37 + %87 = OpLoad %6 %86 + OpStore %85 %87 + %88 = OpFunctionCall %6 %10 %85 + %89 = OpLoad %6 %80 + %90 = OpIAdd %6 %89 %88 + OpStore %80 %90 + %91 = OpLoad %6 %80 + %93 = OpAccessChain %20 %18 %19 %92 + %94 = OpLoad %6 %93 + %95 = OpIEqual %35 %91 %94 + OpSelectionMerge %97 None + OpBranchConditional %95 %96 %115 + %96 = OpLabel + %102 = OpAccessChain %20 %18 %19 %37 + %103 = OpLoad %6 %102 + %104 = OpConvertSToF %98 %103 + %105 = OpAccessChain %20 %18 %19 %19 + %106 = OpLoad %6 %105 + %107 = OpConvertSToF %98 %106 + %108 = OpAccessChain %20 %18 %19 %19 + %109 = OpLoad %6 %108 + %110 = OpConvertSToF %98 %109 + %111 = OpAccessChain %20 %18 %19 %37 + %112 = OpLoad %6 %111 + %113 = OpConvertSToF %98 %112 + %114 = OpCompositeConstruct %99 %104 %107 %110 %113 + OpStore %101 %114 + OpBranch %97 + %115 = OpLabel + %116 = OpAccessChain %20 %18 %19 %19 + %117 = OpLoad %6 %116 + %118 = OpConvertSToF %98 %117 + %119 = OpCompositeConstruct %99 %118 %118 %118 %118 + OpStore %101 %119 + OpBranch %97 + %97 = OpLabel + OpReturn + OpFunctionEnd + %10 = OpFunction %6 None %8 + %9 = OpFunctionParameter %7 + %11 = OpLabel + %12 = OpVariable %7 Function + %23 = OpVariable %7 Function + %51 = OpVariable %50 Function + %21 = OpAccessChain %20 %18 %19 %19 + %22 = OpLoad %6 %21 + OpStore %12 %22 + %24 = OpAccessChain %20 %18 %19 %19 + %25 = OpLoad %6 %24 + OpStore %23 %25 + OpBranch %26 + %26 = OpLabel + OpLoopMerge %28 %29 None + OpBranch %30 + %30 = OpLabel + %31 = OpLoad %6 %23 + %33 = OpAccessChain %20 %18 %19 %32 + %34 = OpLoad %6 %33 + %36 = OpSLessThan %35 %31 %34 + OpBranchConditional %36 %27 %28 + %27 = OpLabel + %38 = OpAccessChain %20 %18 %19 %37 + %39 = OpLoad %6 %38 + %40 = OpAccessChain %20 %18 %19 %37 + %41 = OpLoad %6 %40 + %42 = OpAccessChain %20 %18 %19 %37 + %43 = OpLoad %6 %42 + %44 = OpAccessChain %20 %18 %19 %37 + %45 = OpLoad %6 %44 + %48 = OpCompositeConstruct %47 %39 %41 %43 %45 + %49 = OpLoad %6 %12 + OpStore %51 %48 + %52 = OpAccessChain %7 %51 %49 + %53 = OpLoad %6 %52 + %54 = OpLoad %6 %9 + %55 = OpSGreaterThan %35 %53 %54 + OpSelectionMerge %57 None + OpBranchConditional %55 %56 %67 + %56 = OpLabel + OpSelectionMerge %60 None + OpBranchConditional %58 %59 %64 + %59 = OpLabel + %61 = OpAccessChain %20 %18 %19 %37 + %62 = OpLoad %6 %61 + OpReturnValue %62 + %64 = OpLabel + %65 = OpAccessChain %20 %18 %19 %37 + %66 = OpLoad %6 %65 + OpStore %12 %66 + OpBranch %60 + %60 = OpLabel + OpBranch %57 + %67 = OpLabel + OpSelectionMerge %69 None + OpBranchConditional %58 %68 %69 + %68 = OpLabel + %71 = OpAccessChain %20 %18 %19 %70 + %72 = OpLoad %6 %71 + OpReturnValue %72 + %69 = OpLabel + OpBranch %57 + %57 = OpLabel + OpBranch %29 + %29 = OpLabel + %74 = OpLoad %6 %23 + %75 = OpIAdd %6 %74 %32 + OpStore %23 %75 + OpBranch %26 + %28 = OpLabel + %76 = OpAccessChain %20 %18 %19 %19 + %77 = OpLoad %6 %76 + OpReturnValue %77 + OpFunctionEnd +END + +# uniforms for variant + +# _GLF_uniform_int_values +BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA + 0 4 3 1 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__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 0 +END +CLEAR_COLOR variant_pipeline 0 0 0 255 + +CLEAR variant_pipeline +RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 256 256 + +EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255 diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-rcp-negative-int.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-rcp-negative-int.amber new file mode 100644 index 0000000..02e1cd6 --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-rcp-negative-int.amber @@ -0,0 +1,160 @@ +#!amber + +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# A test for a coverage-gap found by the GraphicsFuzz project. + +# Short description: A fragment shader that covers specific NIR code paths + +# The test passes because the shader always writes red. + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 320 es +# #define _int_0 _GLF_uniform_int_values[0] +# #define _int_1 _GLF_uniform_int_values[1] +# +# precision highp int; +# precision highp float; +# +# // Contents of _GLF_uniform_int_values: [0, 1] +# layout(set = 0, binding = 0) uniform buf0 +# { +# int _GLF_uniform_int_values[2]; +# }; +# layout(location = 0) out vec4 _GLF_color; +# +# void main() +# { +# int a = -7563; +# +# // Always true. +# if(_int_1 / a == _int_0) +# { +# _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1); +# } +# else +# { +# _GLF_color = vec4(_int_0); +# } +# } +SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0 +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 10 +; Bound: 51 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %32 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 320 + OpName %4 "main" + OpName %8 "a" + OpName %13 "buf0" + OpMemberName %13 0 "_GLF_uniform_int_values" + OpName %15 "" + OpName %32 "_GLF_color" + OpDecorate %12 ArrayStride 16 + OpMemberDecorate %13 0 Offset 0 + OpDecorate %13 Block + OpDecorate %15 DescriptorSet 0 + OpDecorate %15 Binding 0 + OpDecorate %32 Location 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeInt 32 1 + %7 = OpTypePointer Function %6 + %9 = OpConstant %6 -7563 + %10 = OpTypeInt 32 0 + %11 = OpConstant %10 2 + %12 = OpTypeArray %6 %11 + %13 = OpTypeStruct %12 + %14 = OpTypePointer Uniform %13 + %15 = OpVariable %14 Uniform + %16 = OpConstant %6 0 + %17 = OpConstant %6 1 + %18 = OpTypePointer Uniform %6 + %25 = OpTypeBool + %29 = OpTypeFloat 32 + %30 = OpTypeVector %29 4 + %31 = OpTypePointer Output %30 + %32 = OpVariable %31 Output + %4 = OpFunction %2 None %3 + %5 = OpLabel + %8 = OpVariable %7 Function + OpStore %8 %9 + %19 = OpAccessChain %18 %15 %16 %17 + %20 = OpLoad %6 %19 + %21 = OpLoad %6 %8 + %22 = OpSDiv %6 %20 %21 + %23 = OpAccessChain %18 %15 %16 %16 + %24 = OpLoad %6 %23 + %26 = OpIEqual %25 %22 %24 + OpSelectionMerge %28 None + OpBranchConditional %26 %27 %46 + %27 = OpLabel + %33 = OpAccessChain %18 %15 %16 %17 + %34 = OpLoad %6 %33 + %35 = OpConvertSToF %29 %34 + %36 = OpAccessChain %18 %15 %16 %16 + %37 = OpLoad %6 %36 + %38 = OpConvertSToF %29 %37 + %39 = OpAccessChain %18 %15 %16 %16 + %40 = OpLoad %6 %39 + %41 = OpConvertSToF %29 %40 + %42 = OpAccessChain %18 %15 %16 %17 + %43 = OpLoad %6 %42 + %44 = OpConvertSToF %29 %43 + %45 = OpCompositeConstruct %30 %35 %38 %41 %44 + OpStore %32 %45 + OpBranch %28 + %46 = OpLabel + %47 = OpAccessChain %18 %15 %16 %16 + %48 = OpLoad %6 %47 + %49 = OpConvertSToF %29 %48 + %50 = OpCompositeConstruct %30 %49 %49 %49 %49 + OpStore %32 %50 + OpBranch %28 + %28 = OpLabel + OpReturn + OpFunctionEnd +END + +# uniforms for variant + +# _GLF_uniform_int_values +BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA + 0 1 +END + +BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM + +PIPELINE graphics variant_pipeline + ATTACH variant_vertex_shader + ATTACH variant_fragment_shader + FRAMEBUFFER_SIZE 256 256 + BIND BUFFER variant_framebuffer AS color LOCATION 0 + BIND BUFFER variant__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 0 +END +CLEAR_COLOR variant_pipeline 0 0 0 255 + +CLEAR variant_pipeline +RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 256 256 + +EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255 diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-return-after-first-iteration.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-return-after-first-iteration.amber new file mode 100644 index 0000000..070d5d2 --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-return-after-first-iteration.amber @@ -0,0 +1,236 @@ +#!amber + +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# A test for a coverage-gap found by the GraphicsFuzz project. + +# Short description: A fragment shader that covers specific BRW code paths + +# The test passes because the shader always writes red. + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 320 es +# #define _int_100 _GLF_uniform_int_values[0] +# #define _int_0 _GLF_uniform_int_values[1] +# #define _float_10_0 _GLF_uniform_float_values[0] +# +# precision highp int; +# precision highp float; +# +# // Contents of _GLF_uniform_float_values: 10.0 +# layout(set = 0, binding = 0) uniform buf0 +# { +# float _GLF_uniform_float_values[1]; +# }; +# // Contents of _GLF_uniform_int_values: [100, 0] +# layout(set = 0, binding = 1) uniform buf1 +# { +# int _GLF_uniform_int_values[2]; +# }; +# // Contents of injectionSwitch: [0.0, 1.0] +# layout(set = 0, binding = 2) uniform buf2 +# { +# vec2 injectionSwitch; +# }; +# layout(location = 0) out vec4 _GLF_color; +# +# void main() +# { +# // To hit the coverage points this value cannot +# // be changed later. +# _GLF_color = vec4(1, 0, 0, 1); +# +# for (int i = _int_0; i < _int_100; i++) +# { +# if (i != _int_0) +# { +# return; +# } +# } +# +# // Execution never reaches this point. +# if (gl_FragCoord.y < _float_10_0) +# { +# return; +# } +# _GLF_color = vec4(vec3(1.0), injectionSwitch.y); +# } +SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0 +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 10 +; Bound: 75 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %9 %47 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 320 + OpName %4 "main" + OpName %9 "_GLF_color" + OpName %15 "i" + OpName %19 "buf1" + OpMemberName %19 0 "_GLF_uniform_int_values" + OpName %21 "" + OpName %47 "gl_FragCoord" + OpName %53 "buf0" + OpMemberName %53 0 "_GLF_uniform_float_values" + OpName %55 "" + OpName %66 "buf2" + OpMemberName %66 0 "injectionSwitch" + OpName %68 "" + OpDecorate %9 Location 0 + OpDecorate %18 ArrayStride 16 + OpMemberDecorate %19 0 Offset 0 + OpDecorate %19 Block + OpDecorate %21 DescriptorSet 0 + OpDecorate %21 Binding 1 + OpDecorate %47 BuiltIn FragCoord + OpDecorate %52 ArrayStride 16 + OpMemberDecorate %53 0 Offset 0 + OpDecorate %53 Block + OpDecorate %55 DescriptorSet 0 + OpDecorate %55 Binding 0 + OpMemberDecorate %66 0 Offset 0 + OpDecorate %66 Block + OpDecorate %68 DescriptorSet 0 + OpDecorate %68 Binding 2 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeFloat 32 + %7 = OpTypeVector %6 4 + %8 = OpTypePointer Output %7 + %9 = OpVariable %8 Output + %10 = OpConstant %6 1 + %11 = OpConstant %6 0 + %12 = OpConstantComposite %7 %10 %11 %11 %10 + %13 = OpTypeInt 32 1 + %14 = OpTypePointer Function %13 + %16 = OpTypeInt 32 0 + %17 = OpConstant %16 2 + %18 = OpTypeArray %13 %17 + %19 = OpTypeStruct %18 + %20 = OpTypePointer Uniform %19 + %21 = OpVariable %20 Uniform + %22 = OpConstant %13 0 + %23 = OpConstant %13 1 + %24 = OpTypePointer Uniform %13 + %35 = OpTypeBool + %46 = OpTypePointer Input %7 + %47 = OpVariable %46 Input + %48 = OpConstant %16 1 + %49 = OpTypePointer Input %6 + %52 = OpTypeArray %6 %48 + %53 = OpTypeStruct %52 + %54 = OpTypePointer Uniform %53 + %55 = OpVariable %54 Uniform + %56 = OpTypePointer Uniform %6 + %63 = OpTypeVector %6 3 + %64 = OpConstantComposite %63 %10 %10 %10 + %65 = OpTypeVector %6 2 + %66 = OpTypeStruct %65 + %67 = OpTypePointer Uniform %66 + %68 = OpVariable %67 Uniform + %4 = OpFunction %2 None %3 + %5 = OpLabel + %15 = OpVariable %14 Function + OpStore %9 %12 + %25 = OpAccessChain %24 %21 %22 %23 + %26 = OpLoad %13 %25 + OpStore %15 %26 + OpBranch %27 + %27 = OpLabel + OpLoopMerge %29 %30 None + OpBranch %31 + %31 = OpLabel + %32 = OpLoad %13 %15 + %33 = OpAccessChain %24 %21 %22 %22 + %34 = OpLoad %13 %33 + %36 = OpSLessThan %35 %32 %34 + OpBranchConditional %36 %28 %29 + %28 = OpLabel + %37 = OpLoad %13 %15 + %38 = OpAccessChain %24 %21 %22 %23 + %39 = OpLoad %13 %38 + %40 = OpINotEqual %35 %37 %39 + OpSelectionMerge %42 None + OpBranchConditional %40 %41 %42 + %41 = OpLabel + OpReturn + %42 = OpLabel + OpBranch %30 + %30 = OpLabel + %44 = OpLoad %13 %15 + %45 = OpIAdd %13 %44 %23 + OpStore %15 %45 + OpBranch %27 + %29 = OpLabel + %50 = OpAccessChain %49 %47 %48 + %51 = OpLoad %6 %50 + %57 = OpAccessChain %56 %55 %22 %22 + %58 = OpLoad %6 %57 + %59 = OpFOrdLessThan %35 %51 %58 + OpSelectionMerge %61 None + OpBranchConditional %59 %60 %61 + %60 = OpLabel + OpReturn + %61 = OpLabel + %69 = OpAccessChain %56 %68 %22 %48 + %70 = OpLoad %6 %69 + %71 = OpCompositeExtract %6 %64 0 + %72 = OpCompositeExtract %6 %64 1 + %73 = OpCompositeExtract %6 %64 2 + %74 = OpCompositeConstruct %7 %71 %72 %73 %70 + OpStore %9 %74 + OpReturn + OpFunctionEnd +END + +# uniforms for variant + +# injectionSwitch +BUFFER variant_injectionSwitch DATA_TYPE vec2 STD140 DATA + 0.0 1.0 +END +# _GLF_uniform_int_values +BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA + 100 0 +END +# _GLF_uniform_float_values +BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA + 10.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_injectionSwitch AS uniform DESCRIPTOR_SET 0 BINDING 2 + BIND BUFFER variant__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 1 + BIND BUFFER variant__GLF_uniform_float_values AS uniform DESCRIPTOR_SET 0 BINDING 0 +END +CLEAR_COLOR variant_pipeline 0 0 0 255 + +CLEAR variant_pipeline +RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 256 256 + +EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255 diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/index.txt b/external/vulkancts/data/vulkan/amber/graphicsfuzz/index.txt index a17ca7f..893532d 100644 --- a/external/vulkancts/data/vulkan/amber/graphicsfuzz/index.txt +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/index.txt @@ -43,10 +43,14 @@ { "cov-bitwise-inverse-uniform-condition.amber", "cov-bitwise-inverse-uniform-condition", "A fragment shader that covers specific BRW code paths" }, { "cov-blockfrequency-several-for-loops.amber", "cov-blockfrequency-several-for-loops", "A fragment shader that covers a specific block frequency info code path." }, { "cov-branch-probability-identity-matrix.amber", "cov-branch-probability-identity-matrix", "A fragment shader that covers a specific branch propability path" }, +{ "cov-cast-float-to-int-and-back.amber", "cov-cast-float-to-int-and-back", "A fragment shader that covers specific NIR code paths" }, { "cov-clamp-loop-limit-increment-float-array.amber", "cov-clamp-loop-limit-increment-float-array", "A fragment shader that covers specific NIR code paths" }, { "cov-clamp-lower-limit-from-always-false.amber", "cov-clamp-lower-limit-from-always-false", "A fragment shader that covers specific BRW code paths" }, +{ "cov-clamp-vector-element-ceil-negative.amber", "cov-clamp-vector-element-ceil-negative", "A fragment shader that covers specific NIR code paths" }, { "cov-clamp-vector-variable-negative-offset.amber", "cov-clamp-vector-variable-negative-offset", "A fragment shader that covers specific NIR code paths" }, +{ "cov-clear-yz-inside-condition.amber", "cov-clear-yz-inside-condition", "A fragment shader that covers specific NIR code paths" }, { "cov-combine-and-or-xor-gt-lt.amber", "cov-combine-and-or-xor-gt-lt", "A fragment shader that covers a specific bitwise operator cobmining code path" }, +{ "cov-conditional-discard-inside-loop.amber", "cov-conditional-discard-inside-loop", "A fragment shader that covers specific NIR code paths" }, { "cov-const-folding-bitfieldinsert-div-one.amber", "cov-const-folding-bitfieldinsert-div-one", "A fragment shader that covers a specific const folding path" }, { "cov-color-overwrite-identity-matrix-multiply.amber", "cov-color-overwrite-identity-matrix-multiply", "A fragment shader that covers a specific DAG code paths" }, { "cov-const-folding-ceil-vec4.amber", "cov-const-folding-ceil-vec4", "A fragment shader that covers a specific constant folding code path" }, @@ -68,9 +72,11 @@ { "cov-constant-folding-atan-over-tanh.amber", "cov-constant-folding-atan-over-tanh", "A fragment shader that covers a specific constant folding code path." }, { "cov-constants-combine-add-sub.amber", "cov-constants-combine-add-sub", "A fragment shader that covers a specific constants and add/sub combining path" }, { "cov-constants-mix-uniform.amber", "cov-constants-mix-uniform", "A fragment shader that covers a specific constant handling path." }, +{ "cov-continue-break-discard-return-in-loop.amber", "cov-continue-break-discard-return-in-loop", "A fragment shader that covers specific NIR code paths" }, { "cov-copy-prop-arrays-func-argument.amber", "cov-copy-prop-arrays-func-argument", "A fragment shader that covers a specific propagate array copy path." }, { "cov-copy-prop-arrays-no-stores.amber", "cov-copy-prop-arrays-no-stores", "A fragment shader that covers a specific propagate array copy path." }, { "cov-copy-prop-arrays-param-uniform.amber", "cov-copy-prop-arrays-param-uniform", "A fragment shader that covers a specific propagate array copy path." }, +{ "cov-cosh-clamped-to-one.amber", "cov-cosh-clamped-to-one", "A fragment shader that covers specific NIR code paths" }, { "cov-cumulate-loops-unreachable.amber", "cov-cumulate-loops-unreachable", "A fragment shader that covers specific NIR code paths" }, { "cov-dag-combiner-clamp-undefined-access-array.amber", "cov-dag-combiner-clamp-undefined-access-array", "A fragment shader that covers a specific DAG combiner code path" }, { "cov-dag-combiner-combine-casts-legalize-vector-types-xyz-swizzle-for-loop.amber", "cov-dag-combiner-combine-casts-legalize-vector-types-xyz-swizzle-for-loop", "Covers DAG combiner, cast combining and legalize vector types code paths" }, @@ -83,6 +89,7 @@ { "cov-dead-branch-func-return-arg.amber", "cov-dead-branch-func-return-arg", "A fragment shader that covers a specific dead branch elimination path" }, { "cov-dead-code-unreachable-merge.amber", "cov-dead-code-unreachable-merge", "A fragment shader that covers a specific dead code elimination path." }, { "cov-derivative-uniform-vector-global-loop-count.amber", "cov-derivative-uniform-vector-global-loop-count", "A fragment shader that covers specific BRW code paths" }, +{ "cov-double-if-true-in-loop.amber", "cov-double-if-true-in-loop", "A fragment shader that covers specific NIR code paths" }, { "cov-exp2-two.amber", "cov-exp2-two", "A fragment shader that covers specific NIR code paths" }, { "cov-findlsb-division-by-zero.amber", "cov-findlsb-division-by-zero", "A fragment shader that covers a specific instruction simplify code path" }, { "cov-fold-and-in-for-loop-range.amber", "cov-fold-and-in-for-loop-range", "A fragment shader that covers a specific folding path" }, @@ -118,6 +125,7 @@ { "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-for-array-initializing-modulo.amber", "cov-for-array-initializing-modulo", "A fragment shader that covers a specific inst combine compares code path" }, +{ "cov-for-loop-min-increment-array-element.amber", "cov-for-loop-min-increment-array-element", "A fragment shader that covers specific NIR code paths" }, { "cov-for-switch-fallthrough.amber", "cov-for-switch-fallthrough", "A fragment shader that covers a specific inst combine and or xor code path" }, { "cov-fract-smoothstep-undefined.amber", "cov-fract-smoothstep-undefined", "A fragment shader that covers a specific APFloat code path" }, { "cov-fragcoord-clamp-array-access.amber", "cov-fragcoord-clamp-array-access", "A fragment shader that covers a specific instruction simplify path" }, @@ -128,14 +136,17 @@ { "cov-if-conversion-identical-branches.amber", "cov-if-conversion-identical-branches", "A fragment shader that covers a specific if condition conversion path." }, { "cov-if-switch-fallthrough.amber", "cov-if-switch-fallthrough", "A fragment shader that covers a specific inst combine and or xor code path" }, { "cov-if-true-continue.amber", "cov-if-true-continue", "A fragment shader that covers specific NIR code paths" }, +{ "cov-if-true-discard-in-do-while-never-reached.amber", "cov-if-true-discard-in-do-while-never-reached", "A fragment shader that covers specific NIR code paths" }, { "cov-inc-array-element-loop-lsb.amber", "cov-inc-array-element-loop-lsb", "A fragment shader that covers a specific SSCP path" }, { "cov-inc-inside-switch-and-for.amber", "cov-inc-inside-switch-and-for", "A fragment shader that covers a specific LLVM analysis code path." }, { "cov-increment-array-element-in-loop.amber", "cov-increment-array-element-in-loop", "A fragment shader that covers specific NIR code paths" }, +{ "cov-increment-float-in-loop-abs.amber", "cov-increment-float-in-loop-abs", "A fragment shader that covers specific BRW code paths" }, { "cov-increment-global-counter-loop-function.amber", "cov-increment-global-counter-loop-function", "A fragment shader that covers specific NIR code paths" }, { "cov-increment-inside-clamp.amber", "cov-increment-inside-clamp", "A fragment shader that covers specific value tracking and simplification paths" }, { "cov-increment-int-loop-counter-mod-array.amber", "cov-increment-int-loop-counter-mod-array", "A fragment shader that covers specific BRW code paths" }, { "cov-increment-multiple-integers.amber", "cov-increment-multiple-integers", "A fragment shader that covers specific NIR code paths" }, { "cov-increment-vector-array-matrix-element.amber", "cov-increment-vector-array-matrix-element", "A fragment shader that covers specific NIR code paths" }, +{ "cov-increment-vector-component-with-matrix-copy.amber", "cov-increment-vector-component-with-matrix-copy", "A fragment shader that covers specific NIR code paths" }, { "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." }, @@ -197,6 +208,8 @@ { "cov-machine-scheduler-for-if-pow.amber", "cov-machine-scheduler-for-if-pow", "A fragment shader that covers a specific machine scheduler path" }, { "cov-machine-basic-block-for-for-for-less-than.amber", "cov-machine-basic-block-for-for-for-less-than", "A fragment shader that covers a specific machine basic block code paths" }, { "cov-machinevaluetype-one-iter-loop.amber", "cov-machinevaluetype-one-iter-loop", "A fragment shader that covers a specific machine value type code path" }, +{ "cov-matching-conditions-break.amber", "cov-matching-conditions-break", "A fragment shader that covers specific NIR code paths" }, +{ "cov-matching-if-always-true-inside-loop.amber", "cov-matching-if-always-true-inside-loop", "A fragment shader that covers specific NIR code paths" }, { "cov-matrix-double-transpose.amber", "cov-matrix-double-transpose", "A fragment shader that covers specific NIR code paths" }, { "cov-matrix-square-mul-with-vector.amber", "cov-matrix-square-mul-with-vector", "A fragment shader that covers specific NIR code paths" }, { "cov-max-clamp-same-minval.amber", "cov-max-clamp-same-minval", "A fragment shader that covers a specific instruction simplification path" }, @@ -222,11 +235,13 @@ { "cov-pattern-match-single-bit.amber", "cov-pattern-match-single-bit", "A fragment shader that covers a specific pattern matching path." }, { "cov-peephole-optimizer-target-instr-info-for-if-if-if.amber", "cov-peephole-optimizer-target-instr-info-for-if-if-if", "Covers peephole optimizer and instr info code paths" }, { "cov-pow-undefined.amber", "cov-pow-undefined", "A fragment shader that covers specific constant fold and selection dag code paths" }, +{ "cov-rcp-negative-int.amber", "cov-rcp-negative-int", "A fragment shader that covers specific NIR code paths" }, { "cov-reciprocal-var-minus-one.amber", "cov-reciprocal-var-minus-one", "A fragment shader that covers specific NIR code paths" }, { "cov-reduce-load-replace-extract.amber", "cov-reduce-load-replace-extract", "A fragment shader that covers a specific load size reduction path." }, { "cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard.amber", "cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard", "Covers register coalescer, live intervals and target instr info code paths" }, { "cov-replace-copy-object.amber", "cov-replace-copy-object", "A fragment shader that covers a specific shader simplification path." }, { "cov-return-after-do-while.amber", "cov-return-after-do-while", "A fragment shader that covers a specific simplify cfg code path" }, +{ "cov-return-after-first-iteration.amber", "cov-return-after-first-iteration", "A fragment shader that covers specific BRW code paths" }, { "cov-return-partly-undefined-vector-from-array.amber", "cov-return-partly-undefined-vector-from-array", "A fragment shader that covers specific NIR code paths" }, { "cov-sample-texture-hundred-iterations.amber", "cov-sample-texture-hundred-iterations", "A fragment shader that covers specific NIR code paths" }, { "cov-scaled-number-nested-loops.amber", "cov-scaled-number-nested-loops", "A fragment shader that covers a specific scaled number code path." }, diff --git a/external/vulkancts/mustpass/master/vk-default/graphicsfuzz.txt b/external/vulkancts/mustpass/master/vk-default/graphicsfuzz.txt index ea64ab1..13d4215 100644 --- a/external/vulkancts/mustpass/master/vk-default/graphicsfuzz.txt +++ b/external/vulkancts/mustpass/master/vk-default/graphicsfuzz.txt @@ -43,10 +43,14 @@ dEQP-VK.graphicsfuzz.cov-bitfieldreverse-left-shift-findmsb dEQP-VK.graphicsfuzz.cov-bitwise-inverse-uniform-condition dEQP-VK.graphicsfuzz.cov-blockfrequency-several-for-loops dEQP-VK.graphicsfuzz.cov-branch-probability-identity-matrix +dEQP-VK.graphicsfuzz.cov-cast-float-to-int-and-back dEQP-VK.graphicsfuzz.cov-clamp-loop-limit-increment-float-array dEQP-VK.graphicsfuzz.cov-clamp-lower-limit-from-always-false +dEQP-VK.graphicsfuzz.cov-clamp-vector-element-ceil-negative dEQP-VK.graphicsfuzz.cov-clamp-vector-variable-negative-offset +dEQP-VK.graphicsfuzz.cov-clear-yz-inside-condition dEQP-VK.graphicsfuzz.cov-combine-and-or-xor-gt-lt +dEQP-VK.graphicsfuzz.cov-conditional-discard-inside-loop dEQP-VK.graphicsfuzz.cov-const-folding-bitfieldinsert-div-one dEQP-VK.graphicsfuzz.cov-color-overwrite-identity-matrix-multiply dEQP-VK.graphicsfuzz.cov-const-folding-ceil-vec4 @@ -68,9 +72,11 @@ dEQP-VK.graphicsfuzz.cov-const-folding-vector-shuffle dEQP-VK.graphicsfuzz.cov-constant-folding-atan-over-tanh dEQP-VK.graphicsfuzz.cov-constants-combine-add-sub dEQP-VK.graphicsfuzz.cov-constants-mix-uniform +dEQP-VK.graphicsfuzz.cov-continue-break-discard-return-in-loop dEQP-VK.graphicsfuzz.cov-copy-prop-arrays-func-argument dEQP-VK.graphicsfuzz.cov-copy-prop-arrays-no-stores dEQP-VK.graphicsfuzz.cov-copy-prop-arrays-param-uniform +dEQP-VK.graphicsfuzz.cov-cosh-clamped-to-one dEQP-VK.graphicsfuzz.cov-cumulate-loops-unreachable dEQP-VK.graphicsfuzz.cov-dag-combiner-clamp-undefined-access-array dEQP-VK.graphicsfuzz.cov-dag-combiner-combine-casts-legalize-vector-types-xyz-swizzle-for-loop @@ -83,6 +89,7 @@ dEQP-VK.graphicsfuzz.cov-dag-combiner-same-cond-nested dEQP-VK.graphicsfuzz.cov-dead-branch-func-return-arg dEQP-VK.graphicsfuzz.cov-dead-code-unreachable-merge dEQP-VK.graphicsfuzz.cov-derivative-uniform-vector-global-loop-count +dEQP-VK.graphicsfuzz.cov-double-if-true-in-loop dEQP-VK.graphicsfuzz.cov-exp2-two dEQP-VK.graphicsfuzz.cov-findlsb-division-by-zero dEQP-VK.graphicsfuzz.cov-fold-and-in-for-loop-range @@ -118,6 +125,7 @@ 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-for-array-initializing-modulo +dEQP-VK.graphicsfuzz.cov-for-loop-min-increment-array-element dEQP-VK.graphicsfuzz.cov-for-switch-fallthrough dEQP-VK.graphicsfuzz.cov-fract-smoothstep-undefined dEQP-VK.graphicsfuzz.cov-fragcoord-clamp-array-access @@ -128,14 +136,17 @@ dEQP-VK.graphicsfuzz.cov-global-loop-counter-main-function-call dEQP-VK.graphicsfuzz.cov-if-conversion-identical-branches dEQP-VK.graphicsfuzz.cov-if-switch-fallthrough dEQP-VK.graphicsfuzz.cov-if-true-continue +dEQP-VK.graphicsfuzz.cov-if-true-discard-in-do-while-never-reached dEQP-VK.graphicsfuzz.cov-inc-array-element-loop-lsb dEQP-VK.graphicsfuzz.cov-inc-inside-switch-and-for dEQP-VK.graphicsfuzz.cov-increment-array-element-in-loop +dEQP-VK.graphicsfuzz.cov-increment-float-in-loop-abs dEQP-VK.graphicsfuzz.cov-increment-global-counter-loop-function dEQP-VK.graphicsfuzz.cov-increment-inside-clamp dEQP-VK.graphicsfuzz.cov-increment-int-loop-counter-mod-array dEQP-VK.graphicsfuzz.cov-increment-multiple-integers dEQP-VK.graphicsfuzz.cov-increment-vector-array-matrix-element +dEQP-VK.graphicsfuzz.cov-increment-vector-component-with-matrix-copy 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 @@ -197,6 +208,8 @@ dEQP-VK.graphicsfuzz.cov-loop-with-two-integers dEQP-VK.graphicsfuzz.cov-machine-scheduler-for-if-pow dEQP-VK.graphicsfuzz.cov-machine-basic-block-for-for-for-less-than dEQP-VK.graphicsfuzz.cov-machinevaluetype-one-iter-loop +dEQP-VK.graphicsfuzz.cov-matching-conditions-break +dEQP-VK.graphicsfuzz.cov-matching-if-always-true-inside-loop dEQP-VK.graphicsfuzz.cov-matrix-double-transpose dEQP-VK.graphicsfuzz.cov-matrix-square-mul-with-vector dEQP-VK.graphicsfuzz.cov-max-clamp-same-minval @@ -222,11 +235,13 @@ dEQP-VK.graphicsfuzz.cov-pattern-match-signum dEQP-VK.graphicsfuzz.cov-pattern-match-single-bit dEQP-VK.graphicsfuzz.cov-peephole-optimizer-target-instr-info-for-if-if-if dEQP-VK.graphicsfuzz.cov-pow-undefined +dEQP-VK.graphicsfuzz.cov-rcp-negative-int dEQP-VK.graphicsfuzz.cov-reciprocal-var-minus-one dEQP-VK.graphicsfuzz.cov-reduce-load-replace-extract dEQP-VK.graphicsfuzz.cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard dEQP-VK.graphicsfuzz.cov-replace-copy-object dEQP-VK.graphicsfuzz.cov-return-after-do-while +dEQP-VK.graphicsfuzz.cov-return-after-first-iteration dEQP-VK.graphicsfuzz.cov-return-partly-undefined-vector-from-array dEQP-VK.graphicsfuzz.cov-sample-texture-hundred-iterations dEQP-VK.graphicsfuzz.cov-scaled-number-nested-loops