From: Antto Mäkinen Date: Fri, 16 Apr 2021 13:16:22 +0000 (+0300) Subject: Add a batch of GraphicsFuzz coverage tests X-Git-Tag: upstream/1.3.5~808 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4f97e8897da283746f638a28fa0203e7394c4381;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-and-even-numbers-from-fragcoord dEQP-VK.graphicsfuzz.cov-clamp-vector-variable-negative-offset dEQP-VK.graphicsfuzz.cov-derivative-uniform-vector-global-loop-count dEQP-VK.graphicsfuzz.cov-global-loop-counter-main-function-call dEQP-VK.graphicsfuzz.cov-if-true-continue dEQP-VK.graphicsfuzz.cov-increment-int-loop-counter-mod-array dEQP-VK.graphicsfuzz.cov-int-full-bits-divide-by-two-loop dEQP-VK.graphicsfuzz.cov-loop-clamp-to-one-empty-condition dEQP-VK.graphicsfuzz.cov-loop-returns-behind-true-and-false dEQP-VK.graphicsfuzz.cov-min-nested-loop-same-value-for-variables dEQP-VK.graphicsfuzz.cov-multiple-one-iteration-loops-global-counter-write-matrices dEQP-VK.graphicsfuzz.cov-return-partly-undefined-vector-from-array dEQP-VK.graphicsfuzz.cov-sum-uniform-vector-components-round dEQP-VK.graphicsfuzz.cov-unpack-unorm-mix-always-one dEQP-VK.graphicsfuzz.cov-write-past-matrix-elements-unused Change-Id: I5862c90e856a7dfda639f9300d6904456d7110c9 --- 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 014cdf3..b94dcf1 100644 --- a/android/cts/master/vk-master-2021-03-01/graphicsfuzz.txt +++ b/android/cts/master/vk-master-2021-03-01/graphicsfuzz.txt @@ -8,6 +8,7 @@ dEQP-VK.graphicsfuzz.color-set-in-for-loop dEQP-VK.graphicsfuzz.cosh-return-inf-unused dEQP-VK.graphicsfuzz.cov-access-array-dot dEQP-VK.graphicsfuzz.cov-analysis-reachable-from-many +dEQP-VK.graphicsfuzz.cov-and-even-numbers-from-fragcoord dEQP-VK.graphicsfuzz.cov-apfloat-acos-ldexp dEQP-VK.graphicsfuzz.cov-apfloat-determinant dEQP-VK.graphicsfuzz.cov-apfloat-mix-nan @@ -26,6 +27,7 @@ dEQP-VK.graphicsfuzz.cov-bitfieldinsert-undefined dEQP-VK.graphicsfuzz.cov-bitfieldreverse-left-shift-findmsb dEQP-VK.graphicsfuzz.cov-blockfrequency-several-for-loops dEQP-VK.graphicsfuzz.cov-branch-probability-identity-matrix +dEQP-VK.graphicsfuzz.cov-clamp-vector-variable-negative-offset dEQP-VK.graphicsfuzz.cov-combine-and-or-xor-gt-lt dEQP-VK.graphicsfuzz.cov-const-folding-bitfieldinsert-div-one dEQP-VK.graphicsfuzz.cov-color-overwrite-identity-matrix-multiply @@ -61,6 +63,7 @@ dEQP-VK.graphicsfuzz.cov-dag-combiner-neg-div-pow2 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-findlsb-division-by-zero dEQP-VK.graphicsfuzz.cov-fold-and-in-for-loop-range dEQP-VK.graphicsfuzz.cov-fold-bitwise-and-zero @@ -96,10 +99,13 @@ dEQP-VK.graphicsfuzz.cov-folding-rules-split-vector-init dEQP-VK.graphicsfuzz.cov-folding-rules-vec-mix-uniform dEQP-VK.graphicsfuzz.cov-fract-smoothstep-undefined dEQP-VK.graphicsfuzz.cov-fragcoord-clamp-array-access +dEQP-VK.graphicsfuzz.cov-global-loop-counter-main-function-call dEQP-VK.graphicsfuzz.cov-if-conversion-identical-branches +dEQP-VK.graphicsfuzz.cov-if-true-continue dEQP-VK.graphicsfuzz.cov-inc-array-element-loop-lsb dEQP-VK.graphicsfuzz.cov-inc-inside-switch-and-for dEQP-VK.graphicsfuzz.cov-increment-inside-clamp +dEQP-VK.graphicsfuzz.cov-increment-int-loop-counter-mod-array 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 @@ -139,13 +145,16 @@ dEQP-VK.graphicsfuzz.cov-inst-combine-simplify-demanded-pack-unpack dEQP-VK.graphicsfuzz.cov-inst-combine-simplify-demanded-packsnorm-unpackunorm dEQP-VK.graphicsfuzz.cov-inst-combine-simplify-demanded-switch-or-xor dEQP-VK.graphicsfuzz.cov-inst-combine-vector-ops-asin +dEQP-VK.graphicsfuzz.cov-int-full-bits-divide-by-two-loop dEQP-VK.graphicsfuzz.cov-integer-modulo-negative dEQP-VK.graphicsfuzz.cov-intervalmap-set-stop dEQP-VK.graphicsfuzz.cov-ir-builder-constant-fold-inst-combine-calls-value-tracking-findmsb-incr-if dEQP-VK.graphicsfuzz.cov-irbuilder-matrix-cell-uniform dEQP-VK.graphicsfuzz.cov-ldexp-undefined-mat-vec-multiply dEQP-VK.graphicsfuzz.cov-liveinterval-different-dest +dEQP-VK.graphicsfuzz.cov-loop-clamp-to-one-empty-condition dEQP-VK.graphicsfuzz.cov-loop-findmsb-findlsb +dEQP-VK.graphicsfuzz.cov-loop-returns-behind-true-and-false 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 @@ -153,9 +162,11 @@ dEQP-VK.graphicsfuzz.cov-max-clamp-same-minval dEQP-VK.graphicsfuzz.cov-mem-pass-sum-struct-members dEQP-VK.graphicsfuzz.cov-mem-pass-unused-component dEQP-VK.graphicsfuzz.cov-merge-return-condition-twice +dEQP-VK.graphicsfuzz.cov-min-nested-loop-same-value-for-variables dEQP-VK.graphicsfuzz.cov-mod-acosh dEQP-VK.graphicsfuzz.cov-modf-clamp-for dEQP-VK.graphicsfuzz.cov-modf-integer-to-private +dEQP-VK.graphicsfuzz.cov-multiple-one-iteration-loops-global-counter-write-matrices dEQP-VK.graphicsfuzz.cov-optimize-phis-for dEQP-VK.graphicsfuzz.cov-optimize-phis-for-for-do-while-if-if dEQP-VK.graphicsfuzz.cov-not-clamp-matrix-access @@ -167,6 +178,7 @@ 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-partly-undefined-vector-from-array dEQP-VK.graphicsfuzz.cov-scaled-number-nested-loops dEQP-VK.graphicsfuzz.cov-selection-dag-assign-back-and-forth dEQP-VK.graphicsfuzz.cov-selection-dag-lt-gt @@ -195,12 +207,14 @@ dEQP-VK.graphicsfuzz.cov-single-block-elim-self-assign dEQP-VK.graphicsfuzz.cov-single-store-elim-assume-store dEQP-VK.graphicsfuzz.cov-sinh-ldexp dEQP-VK.graphicsfuzz.cov-ssa-rewrite-case-with-default +dEQP-VK.graphicsfuzz.cov-sum-uniform-vector-components-round dEQP-VK.graphicsfuzz.cov-tail-duplicator-for-for-for dEQP-VK.graphicsfuzz.cov-tail-duplicator-infinite-loops dEQP-VK.graphicsfuzz.cov-target-lowering-dfdx-cos dEQP-VK.graphicsfuzz.cov-target-lowering-inst-combine-compares-struct-array-clamp-function-cal dEQP-VK.graphicsfuzz.cov-types-return-in-main-never-hit dEQP-VK.graphicsfuzz.cov-undefined-inversesqrt-reflect +dEQP-VK.graphicsfuzz.cov-unpack-unorm-mix-always-one dEQP-VK.graphicsfuzz.cov-val-cfg-case-fallthrough dEQP-VK.graphicsfuzz.cov-value-inst-combine-select-value-tracking-flip-bits dEQP-VK.graphicsfuzz.cov-value-tracking-apint-inst-combine-simplify-one-mod-loop-iterator @@ -216,6 +230,7 @@ dEQP-VK.graphicsfuzz.cov-vector-dce-unused-component dEQP-VK.graphicsfuzz.cov-vector-log2-cosh dEQP-VK.graphicsfuzz.cov-wrap-op-kill-for-loop dEQP-VK.graphicsfuzz.cov-wrap-op-kill-two-branches +dEQP-VK.graphicsfuzz.cov-write-past-matrix-elements-unused dEQP-VK.graphicsfuzz.cov-x86-isel-lowering-determinant-exp-acos dEQP-VK.graphicsfuzz.cov-x86-isel-lowering-machine-value-type-uint-to-float dEQP-VK.graphicsfuzz.cov-x86-isel-lowering-selection-dag-struct-array-clamp-index diff --git a/android/cts/master/vk-master/graphicsfuzz.txt b/android/cts/master/vk-master/graphicsfuzz.txt index 3ce23a1..666bde3 100644 --- a/android/cts/master/vk-master/graphicsfuzz.txt +++ b/android/cts/master/vk-master/graphicsfuzz.txt @@ -20,6 +20,7 @@ dEQP-VK.graphicsfuzz.control-flow-switch dEQP-VK.graphicsfuzz.cosh-return-inf-unused dEQP-VK.graphicsfuzz.cov-access-array-dot dEQP-VK.graphicsfuzz.cov-analysis-reachable-from-many +dEQP-VK.graphicsfuzz.cov-and-even-numbers-from-fragcoord dEQP-VK.graphicsfuzz.cov-apfloat-acos-ldexp dEQP-VK.graphicsfuzz.cov-apfloat-determinant dEQP-VK.graphicsfuzz.cov-apfloat-mix-nan @@ -38,6 +39,7 @@ dEQP-VK.graphicsfuzz.cov-bitfieldinsert-undefined dEQP-VK.graphicsfuzz.cov-bitfieldreverse-left-shift-findmsb dEQP-VK.graphicsfuzz.cov-blockfrequency-several-for-loops dEQP-VK.graphicsfuzz.cov-branch-probability-identity-matrix +dEQP-VK.graphicsfuzz.cov-clamp-vector-variable-negative-offset dEQP-VK.graphicsfuzz.cov-combine-and-or-xor-gt-lt dEQP-VK.graphicsfuzz.cov-const-folding-bitfieldinsert-div-one dEQP-VK.graphicsfuzz.cov-color-overwrite-identity-matrix-multiply @@ -73,6 +75,7 @@ dEQP-VK.graphicsfuzz.cov-dag-combiner-neg-div-pow2 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-findlsb-division-by-zero dEQP-VK.graphicsfuzz.cov-fold-and-in-for-loop-range dEQP-VK.graphicsfuzz.cov-fold-bitwise-and-zero @@ -108,10 +111,13 @@ dEQP-VK.graphicsfuzz.cov-folding-rules-split-vector-init dEQP-VK.graphicsfuzz.cov-folding-rules-vec-mix-uniform dEQP-VK.graphicsfuzz.cov-fract-smoothstep-undefined dEQP-VK.graphicsfuzz.cov-fragcoord-clamp-array-access +dEQP-VK.graphicsfuzz.cov-global-loop-counter-main-function-call dEQP-VK.graphicsfuzz.cov-if-conversion-identical-branches +dEQP-VK.graphicsfuzz.cov-if-true-continue dEQP-VK.graphicsfuzz.cov-inc-array-element-loop-lsb dEQP-VK.graphicsfuzz.cov-inc-inside-switch-and-for dEQP-VK.graphicsfuzz.cov-increment-inside-clamp +dEQP-VK.graphicsfuzz.cov-increment-int-loop-counter-mod-array 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 @@ -151,13 +157,16 @@ dEQP-VK.graphicsfuzz.cov-inst-combine-simplify-demanded-pack-unpack dEQP-VK.graphicsfuzz.cov-inst-combine-simplify-demanded-packsnorm-unpackunorm dEQP-VK.graphicsfuzz.cov-inst-combine-simplify-demanded-switch-or-xor dEQP-VK.graphicsfuzz.cov-inst-combine-vector-ops-asin +dEQP-VK.graphicsfuzz.cov-int-full-bits-divide-by-two-loop dEQP-VK.graphicsfuzz.cov-integer-modulo-negative dEQP-VK.graphicsfuzz.cov-intervalmap-set-stop dEQP-VK.graphicsfuzz.cov-ir-builder-constant-fold-inst-combine-calls-value-tracking-findmsb-incr-if dEQP-VK.graphicsfuzz.cov-irbuilder-matrix-cell-uniform dEQP-VK.graphicsfuzz.cov-ldexp-undefined-mat-vec-multiply dEQP-VK.graphicsfuzz.cov-liveinterval-different-dest +dEQP-VK.graphicsfuzz.cov-loop-clamp-to-one-empty-condition dEQP-VK.graphicsfuzz.cov-loop-findmsb-findlsb +dEQP-VK.graphicsfuzz.cov-loop-returns-behind-true-and-false 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 @@ -165,9 +174,11 @@ dEQP-VK.graphicsfuzz.cov-max-clamp-same-minval dEQP-VK.graphicsfuzz.cov-mem-pass-sum-struct-members dEQP-VK.graphicsfuzz.cov-mem-pass-unused-component dEQP-VK.graphicsfuzz.cov-merge-return-condition-twice +dEQP-VK.graphicsfuzz.cov-min-nested-loop-same-value-for-variables dEQP-VK.graphicsfuzz.cov-mod-acosh dEQP-VK.graphicsfuzz.cov-modf-clamp-for dEQP-VK.graphicsfuzz.cov-modf-integer-to-private +dEQP-VK.graphicsfuzz.cov-multiple-one-iteration-loops-global-counter-write-matrices dEQP-VK.graphicsfuzz.cov-optimize-phis-for dEQP-VK.graphicsfuzz.cov-optimize-phis-for-for-do-while-if-if dEQP-VK.graphicsfuzz.cov-not-clamp-matrix-access @@ -179,6 +190,7 @@ 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-partly-undefined-vector-from-array dEQP-VK.graphicsfuzz.cov-scaled-number-nested-loops dEQP-VK.graphicsfuzz.cov-selection-dag-assign-back-and-forth dEQP-VK.graphicsfuzz.cov-selection-dag-lt-gt @@ -207,12 +219,14 @@ dEQP-VK.graphicsfuzz.cov-single-block-elim-self-assign dEQP-VK.graphicsfuzz.cov-single-store-elim-assume-store dEQP-VK.graphicsfuzz.cov-sinh-ldexp dEQP-VK.graphicsfuzz.cov-ssa-rewrite-case-with-default +dEQP-VK.graphicsfuzz.cov-sum-uniform-vector-components-round dEQP-VK.graphicsfuzz.cov-tail-duplicator-for-for-for dEQP-VK.graphicsfuzz.cov-tail-duplicator-infinite-loops dEQP-VK.graphicsfuzz.cov-target-lowering-dfdx-cos dEQP-VK.graphicsfuzz.cov-target-lowering-inst-combine-compares-struct-array-clamp-function-cal dEQP-VK.graphicsfuzz.cov-types-return-in-main-never-hit dEQP-VK.graphicsfuzz.cov-undefined-inversesqrt-reflect +dEQP-VK.graphicsfuzz.cov-unpack-unorm-mix-always-one dEQP-VK.graphicsfuzz.cov-val-cfg-case-fallthrough dEQP-VK.graphicsfuzz.cov-value-inst-combine-select-value-tracking-flip-bits dEQP-VK.graphicsfuzz.cov-value-tracking-apint-inst-combine-simplify-one-mod-loop-iterator @@ -228,6 +242,7 @@ dEQP-VK.graphicsfuzz.cov-vector-dce-unused-component dEQP-VK.graphicsfuzz.cov-vector-log2-cosh dEQP-VK.graphicsfuzz.cov-wrap-op-kill-for-loop dEQP-VK.graphicsfuzz.cov-wrap-op-kill-two-branches +dEQP-VK.graphicsfuzz.cov-write-past-matrix-elements-unused dEQP-VK.graphicsfuzz.cov-x86-isel-lowering-determinant-exp-acos dEQP-VK.graphicsfuzz.cov-x86-isel-lowering-machine-value-type-uint-to-float dEQP-VK.graphicsfuzz.cov-x86-isel-lowering-selection-dag-struct-array-clamp-index diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-and-even-numbers-from-fragcoord.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-and-even-numbers-from-fragcoord.amber new file mode 100644 index 0000000..dc7c3aa --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-and-even-numbers-from-fragcoord.amber @@ -0,0 +1,228 @@ +#!amber + +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# A test for a coverage-gap found by the GraphicsFuzz project. + +# Short description: A fragment shader that covers specific NIR code paths + +# The test passes because the shader always writes red. + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 320 es +# #define _int_0 _GLF_uniform_int_values[0] +# #define _int_1 _GLF_uniform_int_values[1] +# #define _float_0_4 _GLF_uniform_float_values[0] +# #define _float_1_0 _GLF_uniform_float_values[1] +# #define _float_256_0 _GLF_uniform_float_values[2] +# +# precision highp int; +# precision highp float; +# +# // Contents of _GLF_uniform_int_values: [0, 1] +# layout(set = 0, binding = 0) uniform buf0 +# { +# int _GLF_uniform_int_values[2]; +# }; +# // Contents of _GLF_uniform_float_values: [0.4, 1.0, 256.0] +# layout(set = 0, binding = 1) uniform buf1 +# { +# float _GLF_uniform_float_values[3]; +# }; +# layout(location = 0) out vec4 _GLF_color; +# +# void main() +# { +# // Always false. +# if(gl_FragCoord.y < _float_0_4) +# { +# _GLF_color = vec4(_int_0); +# } +# else +# { +# // gl_FragCoord has the decimal part of 0.5. If we name the integer part +# // of gl_FragCoord (X, Y) it can be expressed as (X + 0.5, Y + 0.5). +# // +# // The value of v is calculated as follows: +# // v = ((X + 0.5, Y + 0.5) - (1.0, 0.4)) * 256 +# // = (X - 1 + 0.5, Y + 0.5 - 0.4) * 256 +# // = (X - 0.5, Y + 0.1) * 256 +# // = (X * 256 - 128, Y * 256 + 25.6) +# // +# // X * 256 is always an even number, and substracting 128 still keeps it even. +# // Y * 256 is always and even number, but adding 25.6 (and converting to an integer) +# // makes it always odd. +# ivec2 v = ivec2((gl_FragCoord.xy - vec2(_float_1_0, _float_0_4)) * _float_256_0); +# +# // v.x is even and v.y is odd. We substract one from v.y making it even too. +# // Doing a bitwise AND with an even number always resuls in zero. +# _GLF_color = vec4(_float_1_0, (v.y - _int_1) & _int_1, v.x & _int_1, _float_1_0); +# } +# } +SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0 +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 10 +; Bound: 82 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %9 %30 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 320 + OpName %4 "main" + OpName %9 "gl_FragCoord" + OpName %17 "buf1" + OpMemberName %17 0 "_GLF_uniform_float_values" + OpName %19 "" + OpName %30 "_GLF_color" + OpName %33 "buf0" + OpMemberName %33 0 "_GLF_uniform_int_values" + OpName %35 "" + OpName %44 "v" + OpDecorate %9 BuiltIn FragCoord + OpDecorate %16 ArrayStride 16 + OpMemberDecorate %17 0 Offset 0 + OpDecorate %17 Block + OpDecorate %19 DescriptorSet 0 + OpDecorate %19 Binding 1 + OpDecorate %30 Location 0 + OpDecorate %32 ArrayStride 16 + OpMemberDecorate %33 0 Offset 0 + OpDecorate %33 Block + OpDecorate %35 DescriptorSet 0 + OpDecorate %35 Binding 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeFloat 32 + %7 = OpTypeVector %6 4 + %8 = OpTypePointer Input %7 + %9 = OpVariable %8 Input + %10 = OpTypeInt 32 0 + %11 = OpConstant %10 1 + %12 = OpTypePointer Input %6 + %15 = OpConstant %10 3 + %16 = OpTypeArray %6 %15 + %17 = OpTypeStruct %16 + %18 = OpTypePointer Uniform %17 + %19 = OpVariable %18 Uniform + %20 = OpTypeInt 32 1 + %21 = OpConstant %20 0 + %22 = OpTypePointer Uniform %6 + %25 = OpTypeBool + %29 = OpTypePointer Output %7 + %30 = OpVariable %29 Output + %31 = OpConstant %10 2 + %32 = OpTypeArray %20 %31 + %33 = OpTypeStruct %32 + %34 = OpTypePointer Uniform %33 + %35 = OpVariable %34 Uniform + %36 = OpTypePointer Uniform %20 + %42 = OpTypeVector %20 2 + %43 = OpTypePointer Function %42 + %45 = OpTypeVector %6 2 + %48 = OpConstant %20 1 + %55 = OpConstant %20 2 + %62 = OpTypePointer Function %20 + %72 = OpConstant %10 0 + %4 = OpFunction %2 None %3 + %5 = OpLabel + %44 = OpVariable %43 Function + %13 = OpAccessChain %12 %9 %11 + %14 = OpLoad %6 %13 + %23 = OpAccessChain %22 %19 %21 %21 + %24 = OpLoad %6 %23 + %26 = OpFOrdLessThan %25 %14 %24 + OpSelectionMerge %28 None + OpBranchConditional %26 %27 %41 + %27 = OpLabel + %37 = OpAccessChain %36 %35 %21 %21 + %38 = OpLoad %20 %37 + %39 = OpConvertSToF %6 %38 + %40 = OpCompositeConstruct %7 %39 %39 %39 %39 + OpStore %30 %40 + OpBranch %28 + %41 = OpLabel + %46 = OpLoad %7 %9 + %47 = OpVectorShuffle %45 %46 %46 0 1 + %49 = OpAccessChain %22 %19 %21 %48 + %50 = OpLoad %6 %49 + %51 = OpAccessChain %22 %19 %21 %21 + %52 = OpLoad %6 %51 + %53 = OpCompositeConstruct %45 %50 %52 + %54 = OpFSub %45 %47 %53 + %56 = OpAccessChain %22 %19 %21 %55 + %57 = OpLoad %6 %56 + %58 = OpVectorTimesScalar %45 %54 %57 + %59 = OpConvertFToS %42 %58 + OpStore %44 %59 + %60 = OpAccessChain %22 %19 %21 %48 + %61 = OpLoad %6 %60 + %63 = OpAccessChain %62 %44 %11 + %64 = OpLoad %20 %63 + %65 = OpAccessChain %36 %35 %21 %48 + %66 = OpLoad %20 %65 + %67 = OpISub %20 %64 %66 + %68 = OpAccessChain %36 %35 %21 %48 + %69 = OpLoad %20 %68 + %70 = OpBitwiseAnd %20 %67 %69 + %71 = OpConvertSToF %6 %70 + %73 = OpAccessChain %62 %44 %72 + %74 = OpLoad %20 %73 + %75 = OpAccessChain %36 %35 %21 %48 + %76 = OpLoad %20 %75 + %77 = OpBitwiseAnd %20 %74 %76 + %78 = OpConvertSToF %6 %77 + %79 = OpAccessChain %22 %19 %21 %48 + %80 = OpLoad %6 %79 + %81 = OpCompositeConstruct %7 %61 %71 %78 %80 + OpStore %30 %81 + OpBranch %28 + %28 = OpLabel + OpReturn + OpFunctionEnd +END + +# uniforms for variant + +# _GLF_uniform_float_values +BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA + 0.4 1.0 256.0 +END +# _GLF_uniform_int_values +BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA + 0 1 +END + +BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM + +PIPELINE graphics variant_pipeline + ATTACH variant_vertex_shader + ATTACH variant_fragment_shader + FRAMEBUFFER_SIZE 256 256 + BIND BUFFER variant_framebuffer AS color LOCATION 0 + BIND BUFFER variant__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-clamp-vector-variable-negative-offset.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-clamp-vector-variable-negative-offset.amber new file mode 100644 index 0000000..9cc7225 --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-clamp-vector-variable-negative-offset.amber @@ -0,0 +1,209 @@ +#!amber + +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# A test for a coverage-gap found by the GraphicsFuzz project. + +# Short description: A fragment shader that covers specific NIR code paths + +# The test passes because the shader always writes red. + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 320 es +# #define _int_1 _GLF_uniform_int_values[0] +# #define _int_0 _GLF_uniform_int_values[1] +# #define _float_0_0 _GLF_uniform_float_values[0] +# #define _float_2_0 _GLF_uniform_float_values[1] +# #define _float_1_0 _GLF_uniform_float_values[2] +# +# precision highp float; +# precision highp int; +# +# // Contents of _GLF_uniform_int_values: [1, 0] +# layout(set = 0, binding = 0) uniform buf0 +# { +# int _GLF_uniform_int_values[2]; +# }; +# +# // Contents of _GLF_uniform_float_values: [0.0, 2.0, 1.0] +# layout(set = 0, binding = 1) uniform buf1 +# { +# float _GLF_uniform_float_values[3]; +# }; +# +# layout(location = 0) out vec4 _GLF_color; +# +# void main() +# { +# vec2 v0 = vec2(_float_1_0, 3.8); +# vec2 v1 = clamp(v0 - 1.0, 0.0, _float_2_0); +# +# if (v1 == vec2(_float_0_0, _float_2_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: 75 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %50 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 320 + OpName %4 "main" + OpName %9 "v0" + OpName %13 "buf1" + OpMemberName %13 0 "_GLF_uniform_float_values" + OpName %15 "" + OpName %24 "v1" + OpName %50 "_GLF_color" + OpName %53 "buf0" + OpMemberName %53 0 "_GLF_uniform_int_values" + OpName %55 "" + OpDecorate %12 ArrayStride 16 + OpMemberDecorate %13 0 Offset 0 + OpDecorate %13 Block + OpDecorate %15 DescriptorSet 0 + OpDecorate %15 Binding 1 + OpDecorate %50 Location 0 + OpDecorate %52 ArrayStride 16 + OpMemberDecorate %53 0 Offset 0 + OpDecorate %53 Block + OpDecorate %55 DescriptorSet 0 + OpDecorate %55 Binding 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeFloat 32 + %7 = OpTypeVector %6 2 + %8 = OpTypePointer Function %7 + %10 = OpTypeInt 32 0 + %11 = OpConstant %10 3 + %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 2 + %19 = OpTypePointer Uniform %6 + %22 = OpConstant %6 3.79999995 + %26 = OpConstant %6 1 + %29 = OpConstant %6 0 + %30 = OpConstant %16 1 + %42 = OpTypeBool + %43 = OpTypeVector %42 2 + %48 = OpTypeVector %6 4 + %49 = OpTypePointer Output %48 + %50 = OpVariable %49 Output + %51 = OpConstant %10 2 + %52 = OpTypeArray %16 %51 + %53 = OpTypeStruct %52 + %54 = OpTypePointer Uniform %53 + %55 = OpVariable %54 Uniform + %56 = 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 + %27 = OpCompositeConstruct %7 %26 %26 + %28 = OpFSub %7 %25 %27 + %31 = OpAccessChain %19 %15 %17 %30 + %32 = OpLoad %6 %31 + %33 = OpCompositeConstruct %7 %29 %29 + %34 = OpCompositeConstruct %7 %32 %32 + %35 = OpExtInst %7 %1 FClamp %28 %33 %34 + OpStore %24 %35 + %36 = OpLoad %7 %24 + %37 = OpAccessChain %19 %15 %17 %17 + %38 = OpLoad %6 %37 + %39 = OpAccessChain %19 %15 %17 %30 + %40 = OpLoad %6 %39 + %41 = OpCompositeConstruct %7 %38 %40 + %44 = OpFOrdEqual %43 %36 %41 + %45 = OpAll %42 %44 + OpSelectionMerge %47 None + OpBranchConditional %45 %46 %70 + %46 = OpLabel + %57 = OpAccessChain %56 %55 %17 %17 + %58 = OpLoad %16 %57 + %59 = OpConvertSToF %6 %58 + %60 = OpAccessChain %56 %55 %17 %30 + %61 = OpLoad %16 %60 + %62 = OpConvertSToF %6 %61 + %63 = OpAccessChain %56 %55 %17 %30 + %64 = OpLoad %16 %63 + %65 = OpConvertSToF %6 %64 + %66 = OpAccessChain %56 %55 %17 %17 + %67 = OpLoad %16 %66 + %68 = OpConvertSToF %6 %67 + %69 = OpCompositeConstruct %48 %59 %62 %65 %68 + OpStore %50 %69 + OpBranch %47 + %70 = OpLabel + %71 = OpAccessChain %56 %55 %17 %30 + %72 = OpLoad %16 %71 + %73 = OpConvertSToF %6 %72 + %74 = OpCompositeConstruct %48 %73 %73 %73 %73 + OpStore %50 %74 + OpBranch %47 + %47 = OpLabel + OpReturn + OpFunctionEnd +END + +# uniforms for variant + +# _GLF_uniform_float_values +BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA + 0.0 2.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-derivative-uniform-vector-global-loop-count.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-derivative-uniform-vector-global-loop-count.amber new file mode 100644 index 0000000..cb0f9d5 --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-derivative-uniform-vector-global-loop-count.amber @@ -0,0 +1,288 @@ +#!amber + +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# A test for a coverage-gap found by the GraphicsFuzz project. + +# Short description: A fragment shader that covers specific BRW code paths + +# The test passes because the shader always writes red. + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 320 es +# #define _int_1 _GLF_uniform_int_values[0] +# #define _int_0 _GLF_uniform_int_values[1] +# #define _int_10 _GLF_uniform_int_values[2] +# #define _float_1_0 _GLF_uniform_float_values[0] +# #define _float_91_0 _GLF_uniform_float_values[1] +# +# precision highp float; +# precision highp int; +# +# // Contents of _GLF_uniform_int_values: [1, 0, 10] +# layout(set = 0, binding = 0) uniform buf0 +# { +# int _GLF_uniform_int_values[3]; +# }; +# +# // Contents of _GLF_uniform_float_values: [1.0, 91.0] +# layout(set = 0, binding = 1) uniform buf1 +# { +# float _GLF_uniform_float_values[2]; +# }; +# +# const int _GLF_global_loop_bound = 100; +# int _GLF_global_loop_count = 0; +# +# // 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() +# { +# float f = _float_1_0; +# +# for(int r = _int_0; r < _int_10; r ++) +# { +# _GLF_global_loop_count ++; +# // Derivative of a uniform vector is always zero. +# f += dFdx(injectionSwitch).y; +# } +# +# while(_GLF_global_loop_count < _GLF_global_loop_bound) +# { +# _GLF_global_loop_count ++; +# f += _float_1_0; +# } +# +# // Always true. +# if(f == _float_91_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: 101 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %82 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 320 + OpName %4 "main" + OpName %8 "_GLF_global_loop_count" + OpName %12 "f" + OpName %16 "buf1" + OpMemberName %16 0 "_GLF_uniform_float_values" + OpName %18 "" + OpName %23 "r" + OpName %26 "buf0" + OpMemberName %26 0 "_GLF_uniform_int_values" + OpName %28 "" + OpName %47 "buf2" + OpMemberName %47 0 "injectionSwitch" + OpName %49 "" + OpName %82 "_GLF_color" + OpDecorate %15 ArrayStride 16 + OpMemberDecorate %16 0 Offset 0 + OpDecorate %16 Block + OpDecorate %18 DescriptorSet 0 + OpDecorate %18 Binding 1 + OpDecorate %25 ArrayStride 16 + OpMemberDecorate %26 0 Offset 0 + OpDecorate %26 Block + OpDecorate %28 DescriptorSet 0 + OpDecorate %28 Binding 0 + OpMemberDecorate %47 0 Offset 0 + OpDecorate %47 Block + OpDecorate %49 DescriptorSet 0 + OpDecorate %49 Binding 2 + OpDecorate %82 Location 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeInt 32 1 + %7 = OpTypePointer Private %6 + %8 = OpVariable %7 Private + %9 = OpConstant %6 0 + %10 = OpTypeFloat 32 + %11 = OpTypePointer Function %10 + %13 = OpTypeInt 32 0 + %14 = OpConstant %13 2 + %15 = OpTypeArray %10 %14 + %16 = OpTypeStruct %15 + %17 = OpTypePointer Uniform %16 + %18 = OpVariable %17 Uniform + %19 = OpTypePointer Uniform %10 + %22 = OpTypePointer Function %6 + %24 = OpConstant %13 3 + %25 = OpTypeArray %6 %24 + %26 = OpTypeStruct %25 + %27 = OpTypePointer Uniform %26 + %28 = OpVariable %27 Uniform + %29 = OpConstant %6 1 + %30 = OpTypePointer Uniform %6 + %39 = OpConstant %6 2 + %42 = OpTypeBool + %46 = OpTypeVector %10 2 + %47 = OpTypeStruct %46 + %48 = OpTypePointer Uniform %47 + %49 = OpVariable %48 Uniform + %50 = OpTypePointer Uniform %46 + %54 = OpConstant %13 1 + %66 = OpConstant %6 100 + %80 = OpTypeVector %10 4 + %81 = OpTypePointer Output %80 + %82 = OpVariable %81 Output + %4 = OpFunction %2 None %3 + %5 = OpLabel + %12 = OpVariable %11 Function + %23 = OpVariable %22 Function + OpStore %8 %9 + %20 = OpAccessChain %19 %18 %9 %9 + %21 = OpLoad %10 %20 + OpStore %12 %21 + %31 = OpAccessChain %30 %28 %9 %29 + %32 = OpLoad %6 %31 + OpStore %23 %32 + OpBranch %33 + %33 = OpLabel + OpLoopMerge %35 %36 None + OpBranch %37 + %37 = OpLabel + %38 = OpLoad %6 %23 + %40 = OpAccessChain %30 %28 %9 %39 + %41 = OpLoad %6 %40 + %43 = OpSLessThan %42 %38 %41 + OpBranchConditional %43 %34 %35 + %34 = OpLabel + %44 = OpLoad %6 %8 + %45 = OpIAdd %6 %44 %29 + OpStore %8 %45 + %51 = OpAccessChain %50 %49 %9 + %52 = OpLoad %46 %51 + %53 = OpDPdx %46 %52 + %55 = OpCompositeExtract %10 %53 1 + %56 = OpLoad %10 %12 + %57 = OpFAdd %10 %56 %55 + OpStore %12 %57 + OpBranch %36 + %36 = OpLabel + %58 = OpLoad %6 %23 + %59 = OpIAdd %6 %58 %29 + OpStore %23 %59 + OpBranch %33 + %35 = OpLabel + OpBranch %60 + %60 = OpLabel + OpLoopMerge %62 %63 None + OpBranch %64 + %64 = OpLabel + %65 = OpLoad %6 %8 + %67 = OpSLessThan %42 %65 %66 + OpBranchConditional %67 %61 %62 + %61 = OpLabel + %68 = OpLoad %6 %8 + %69 = OpIAdd %6 %68 %29 + OpStore %8 %69 + %70 = OpAccessChain %19 %18 %9 %9 + %71 = OpLoad %10 %70 + %72 = OpLoad %10 %12 + %73 = OpFAdd %10 %72 %71 + OpStore %12 %73 + OpBranch %63 + %63 = OpLabel + OpBranch %60 + %62 = OpLabel + %74 = OpLoad %10 %12 + %75 = OpAccessChain %19 %18 %9 %29 + %76 = OpLoad %10 %75 + %77 = OpFOrdEqual %42 %74 %76 + OpSelectionMerge %79 None + OpBranchConditional %77 %78 %96 + %78 = OpLabel + %83 = OpAccessChain %30 %28 %9 %9 + %84 = OpLoad %6 %83 + %85 = OpConvertSToF %10 %84 + %86 = OpAccessChain %30 %28 %9 %29 + %87 = OpLoad %6 %86 + %88 = OpConvertSToF %10 %87 + %89 = OpAccessChain %30 %28 %9 %29 + %90 = OpLoad %6 %89 + %91 = OpConvertSToF %10 %90 + %92 = OpAccessChain %30 %28 %9 %9 + %93 = OpLoad %6 %92 + %94 = OpConvertSToF %10 %93 + %95 = OpCompositeConstruct %80 %85 %88 %91 %94 + OpStore %82 %95 + OpBranch %79 + %96 = OpLabel + %97 = OpAccessChain %30 %28 %9 %29 + %98 = OpLoad %6 %97 + %99 = OpConvertSToF %10 %98 + %100 = OpCompositeConstruct %80 %99 %99 %99 %99 + OpStore %82 %100 + OpBranch %79 + %79 = 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 91.0 +END +# _GLF_uniform_int_values +BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA + 1 0 10 +END + +BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM + +PIPELINE graphics variant_pipeline + ATTACH variant_vertex_shader + ATTACH variant_fragment_shader + FRAMEBUFFER_SIZE 256 256 + BIND BUFFER variant_framebuffer AS color LOCATION 0 + BIND BUFFER variant_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-global-loop-counter-main-function-call.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-global-loop-counter-main-function-call.amber new file mode 100644 index 0000000..ce2c53b --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-global-loop-counter-main-function-call.amber @@ -0,0 +1,240 @@ +#!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] +# +# precision highp float; +# precision highp int; +# +# // Contents of _GLF_uniform_int_values: [1, 0, 2] +# layout(set = 0, binding = 0) uniform buf0 +# { +# int _GLF_uniform_int_values[3]; +# }; +# +# const int _GLF_global_loop_bound = 100; +# int _GLF_global_loop_count = 0; +# +# layout(location = 0) out vec4 _GLF_color; +# +# int func() +# { +# // Never iterated as the loop count has already been exhausted +# // before calling this function. +# while (_GLF_global_loop_count < _GLF_global_loop_bound) +# { +# _GLF_global_loop_count++; +# return _int_1; +# } +# +# return _int_2; +# } +# +# void main() +# { +# do +# { +# _GLF_global_loop_count++; +# +# if (false) +# { +# return; +# } +# } +# while (true && (_GLF_global_loop_count < _GLF_global_loop_bound)); +# +# int a = func(); +# +# // Always true. +# if (a == _int_2) +# { +# _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1); +# } +# else +# { +# _GLF_color = vec4(_int_0); +# } +# } +SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0 +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 10 +; Bound: 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 "func(" + OpName %11 "_GLF_global_loop_count" + OpName %28 "buf0" + OpMemberName %28 0 "_GLF_uniform_int_values" + OpName %30 "" + OpName %55 "a" + OpName %66 "_GLF_color" + OpDecorate %27 ArrayStride 16 + OpMemberDecorate %28 0 Offset 0 + OpDecorate %28 Block + OpDecorate %30 DescriptorSet 0 + OpDecorate %30 Binding 0 + OpDecorate %66 Location 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeInt 32 1 + %7 = OpTypeFunction %6 + %10 = OpTypePointer Private %6 + %11 = OpVariable %10 Private + %12 = OpConstant %6 0 + %19 = OpConstant %6 100 + %20 = OpTypeBool + %23 = OpConstant %6 1 + %25 = OpTypeInt 32 0 + %26 = OpConstant %25 3 + %27 = OpTypeArray %6 %26 + %28 = OpTypeStruct %27 + %29 = OpTypePointer Uniform %28 + %30 = OpVariable %29 Uniform + %31 = OpTypePointer Uniform %6 + %35 = OpConstant %6 2 + %46 = OpConstantFalse %20 + %50 = OpConstantTrue %20 + %54 = OpTypePointer Function %6 + %63 = OpTypeFloat 32 + %64 = OpTypeVector %63 4 + %65 = OpTypePointer Output %64 + %66 = OpVariable %65 Output + %4 = OpFunction %2 None %3 + %5 = OpLabel + %55 = OpVariable %54 Function + OpStore %11 %12 + OpBranch %40 + %40 = OpLabel + OpLoopMerge %42 %43 None + OpBranch %41 + %41 = OpLabel + %44 = OpLoad %6 %11 + %45 = OpIAdd %6 %44 %23 + OpStore %11 %45 + OpSelectionMerge %48 None + OpBranchConditional %46 %47 %48 + %47 = OpLabel + OpReturn + %48 = OpLabel + OpBranch %43 + %43 = OpLabel + %51 = OpLoad %6 %11 + %52 = OpSLessThan %20 %51 %19 + %53 = OpLogicalAnd %20 %50 %52 + OpBranchConditional %53 %40 %42 + %42 = OpLabel + %56 = OpFunctionCall %6 %8 + OpStore %55 %56 + %57 = OpLoad %6 %55 + %58 = OpAccessChain %31 %30 %12 %35 + %59 = OpLoad %6 %58 + %60 = OpIEqual %20 %57 %59 + OpSelectionMerge %62 None + OpBranchConditional %60 %61 %80 + %61 = OpLabel + %67 = OpAccessChain %31 %30 %12 %12 + %68 = OpLoad %6 %67 + %69 = OpConvertSToF %63 %68 + %70 = OpAccessChain %31 %30 %12 %23 + %71 = OpLoad %6 %70 + %72 = OpConvertSToF %63 %71 + %73 = OpAccessChain %31 %30 %12 %23 + %74 = OpLoad %6 %73 + %75 = OpConvertSToF %63 %74 + %76 = OpAccessChain %31 %30 %12 %12 + %77 = OpLoad %6 %76 + %78 = OpConvertSToF %63 %77 + %79 = OpCompositeConstruct %64 %69 %72 %75 %78 + OpStore %66 %79 + OpBranch %62 + %80 = OpLabel + %81 = OpAccessChain %31 %30 %12 %23 + %82 = OpLoad %6 %81 + %83 = OpConvertSToF %63 %82 + %84 = OpCompositeConstruct %64 %83 %83 %83 %83 + OpStore %66 %84 + OpBranch %62 + %62 = OpLabel + OpReturn + OpFunctionEnd + %8 = OpFunction %6 None %7 + %9 = OpLabel + OpBranch %13 + %13 = OpLabel + OpLoopMerge %15 %16 None + OpBranch %17 + %17 = OpLabel + %18 = OpLoad %6 %11 + %21 = OpSLessThan %20 %18 %19 + OpBranchConditional %21 %14 %15 + %14 = OpLabel + %22 = OpLoad %6 %11 + %24 = OpIAdd %6 %22 %23 + OpStore %11 %24 + %32 = OpAccessChain %31 %30 %12 %12 + %33 = OpLoad %6 %32 + OpReturnValue %33 + %16 = OpLabel + OpBranch %13 + %15 = OpLabel + %36 = OpAccessChain %31 %30 %12 %35 + %37 = OpLoad %6 %36 + OpReturnValue %37 + OpFunctionEnd +END + +# uniforms for variant + +# _GLF_uniform_int_values +BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA + 1 0 2 +END + +BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM + +PIPELINE graphics variant_pipeline + ATTACH variant_vertex_shader + ATTACH variant_fragment_shader + FRAMEBUFFER_SIZE 256 256 + BIND BUFFER variant_framebuffer AS color LOCATION 0 + BIND BUFFER variant__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-if-true-continue.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-if-true-continue.amber new file mode 100644 index 0000000..8957e0c --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-if-true-continue.amber @@ -0,0 +1,240 @@ +#!amber + +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# A test for a coverage-gap found by 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] +# #define _int_2 _GLF_uniform_int_values[3] +# +# precision highp float; +# precision highp int; +# +# // Contents of _GLF_uniform_int_values: [0, 10, 1, 2] +# layout(set = 0, binding = 0) uniform buf0 +# { +# int _GLF_uniform_int_values[4]; +# }; +# layout(location = 0) out vec4 _GLF_color; +# +# void main() +# { +# int a = _int_0; +# int b = _int_10; +# int c = _int_1; +# +# // Loop iterates 10 times where a goes from 0 to 10 +# // during the loop, and c goes from 1 to 2 on the +# // first iteration. +# while (a < b) +# { +# a++; +# +# // True for the first iteration. +# if (c == _int_1) +# { +# c *= _int_2; +# } +# else if (true) +# { +# continue; +# } +# } +# +# // Always true. +# if (a == b && c == _int_2) +# { +# _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1); +# } +# else +# { +# _GLF_color = vec4(_int_0); +# } +# } +SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0 +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 10 +; Bound: 88 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %69 + 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 %19 "b" + OpName %23 "c" + OpName %69 "_GLF_color" + OpDecorate %11 ArrayStride 16 + OpMemberDecorate %12 0 Offset 0 + OpDecorate %12 Block + OpDecorate %14 DescriptorSet 0 + OpDecorate %14 Binding 0 + OpDecorate %69 Location 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeInt 32 1 + %7 = OpTypePointer Function %6 + %9 = OpTypeInt 32 0 + %10 = OpConstant %9 4 + %11 = OpTypeArray %6 %10 + %12 = OpTypeStruct %11 + %13 = OpTypePointer Uniform %12 + %14 = OpVariable %13 Uniform + %15 = OpConstant %6 0 + %16 = OpTypePointer Uniform %6 + %20 = OpConstant %6 1 + %24 = OpConstant %6 2 + %34 = OpTypeBool + %44 = OpConstant %6 3 + %50 = OpConstantTrue %34 + %66 = OpTypeFloat 32 + %67 = OpTypeVector %66 4 + %68 = OpTypePointer Output %67 + %69 = OpVariable %68 Output + %4 = OpFunction %2 None %3 + %5 = OpLabel + %8 = OpVariable %7 Function + %19 = OpVariable %7 Function + %23 = OpVariable %7 Function + %17 = OpAccessChain %16 %14 %15 %15 + %18 = OpLoad %6 %17 + OpStore %8 %18 + %21 = OpAccessChain %16 %14 %15 %20 + %22 = OpLoad %6 %21 + OpStore %19 %22 + %25 = OpAccessChain %16 %14 %15 %24 + %26 = OpLoad %6 %25 + OpStore %23 %26 + OpBranch %27 + %27 = OpLabel + OpLoopMerge %29 %30 None + OpBranch %31 + %31 = OpLabel + %32 = OpLoad %6 %8 + %33 = OpLoad %6 %19 + %35 = OpSLessThan %34 %32 %33 + OpBranchConditional %35 %28 %29 + %28 = OpLabel + %36 = OpLoad %6 %8 + %37 = OpIAdd %6 %36 %20 + OpStore %8 %37 + %38 = OpLoad %6 %23 + %39 = OpAccessChain %16 %14 %15 %24 + %40 = OpLoad %6 %39 + %41 = OpIEqual %34 %38 %40 + OpSelectionMerge %43 None + OpBranchConditional %41 %42 %49 + %42 = OpLabel + %45 = OpAccessChain %16 %14 %15 %44 + %46 = OpLoad %6 %45 + %47 = OpLoad %6 %23 + %48 = OpIMul %6 %47 %46 + OpStore %23 %48 + OpBranch %43 + %49 = OpLabel + OpSelectionMerge %52 None + OpBranchConditional %50 %51 %52 + %51 = OpLabel + OpBranch %30 + %52 = OpLabel + OpBranch %43 + %43 = OpLabel + OpBranch %30 + %30 = OpLabel + OpBranch %27 + %29 = OpLabel + %54 = OpLoad %6 %8 + %55 = OpLoad %6 %19 + %56 = OpIEqual %34 %54 %55 + OpSelectionMerge %58 None + OpBranchConditional %56 %57 %58 + %57 = OpLabel + %59 = OpLoad %6 %23 + %60 = OpAccessChain %16 %14 %15 %44 + %61 = OpLoad %6 %60 + %62 = OpIEqual %34 %59 %61 + OpBranch %58 + %58 = OpLabel + %63 = OpPhi %34 %56 %29 %62 %57 + OpSelectionMerge %65 None + OpBranchConditional %63 %64 %83 + %64 = OpLabel + %70 = OpAccessChain %16 %14 %15 %24 + %71 = OpLoad %6 %70 + %72 = OpConvertSToF %66 %71 + %73 = OpAccessChain %16 %14 %15 %15 + %74 = OpLoad %6 %73 + %75 = OpConvertSToF %66 %74 + %76 = OpAccessChain %16 %14 %15 %15 + %77 = OpLoad %6 %76 + %78 = OpConvertSToF %66 %77 + %79 = OpAccessChain %16 %14 %15 %24 + %80 = OpLoad %6 %79 + %81 = OpConvertSToF %66 %80 + %82 = OpCompositeConstruct %67 %72 %75 %78 %81 + OpStore %69 %82 + OpBranch %65 + %83 = OpLabel + %84 = OpAccessChain %16 %14 %15 %15 + %85 = OpLoad %6 %84 + %86 = OpConvertSToF %66 %85 + %87 = OpCompositeConstruct %67 %86 %86 %86 %86 + OpStore %69 %87 + OpBranch %65 + %65 = OpLabel + OpReturn + OpFunctionEnd +END + +# uniforms for variant + +# _GLF_uniform_int_values +BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA + 0 10 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-increment-int-loop-counter-mod-array.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-increment-int-loop-counter-mod-array.amber new file mode 100644 index 0000000..5bc551c --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-increment-int-loop-counter-mod-array.amber @@ -0,0 +1,214 @@ +#!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_157 _GLF_uniform_int_values[1] +# #define _int_1 _GLF_uniform_int_values[2] +# #define _int_0 _GLF_uniform_int_values[3] +# #define _int_9 _GLF_uniform_int_values[4] +# +# precision highp int; +# precision highp float; +# +# // Contents of _GLF_uniform_int_values: [33, 157, 1, 0, 9] +# layout(set = 0, binding = 0) uniform buf0 +# { +# int _GLF_uniform_int_values[5]; +# }; +# +# layout(location = 0) out vec4 _GLF_color; +# +# void main() +# { +# int a = _int_1; +# +# for(int i = _int_0; i < _int_33; i++) +# { +# a += int[9](1, 2, 3, 4, 5, 6, 7, 8, 9)[i % _int_9]; +# } +# +# if(a == _int_157) +# { +# _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: 84 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %65 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 320 + OpName %4 "main" + OpName %8 "a" + OpName %12 "buf0" + OpMemberName %12 0 "_GLF_uniform_int_values" + OpName %14 "" + OpName %20 "i" + OpName %49 "indexable" + OpName %65 "_GLF_color" + OpDecorate %11 ArrayStride 16 + OpMemberDecorate %12 0 Offset 0 + OpDecorate %12 Block + OpDecorate %14 DescriptorSet 0 + OpDecorate %14 Binding 0 + OpDecorate %65 Location 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeInt 32 1 + %7 = OpTypePointer Function %6 + %9 = OpTypeInt 32 0 + %10 = OpConstant %9 5 + %11 = OpTypeArray %6 %10 + %12 = OpTypeStruct %11 + %13 = OpTypePointer Uniform %12 + %14 = OpVariable %13 Uniform + %15 = OpConstant %6 0 + %16 = OpConstant %6 2 + %17 = OpTypePointer Uniform %6 + %21 = OpConstant %6 3 + %32 = OpTypeBool + %34 = OpConstant %9 9 + %35 = OpTypeArray %6 %34 + %36 = OpConstant %6 1 + %37 = OpConstant %6 4 + %38 = OpConstant %6 5 + %39 = OpConstant %6 6 + %40 = OpConstant %6 7 + %41 = OpConstant %6 8 + %42 = OpConstant %6 9 + %43 = OpConstantComposite %35 %36 %16 %21 %37 %38 %39 %40 %41 %42 + %48 = OpTypePointer Function %35 + %62 = OpTypeFloat 32 + %63 = OpTypeVector %62 4 + %64 = OpTypePointer Output %63 + %65 = OpVariable %64 Output + %4 = OpFunction %2 None %3 + %5 = OpLabel + %8 = OpVariable %7 Function + %20 = OpVariable %7 Function + %49 = OpVariable %48 Function + %18 = OpAccessChain %17 %14 %15 %16 + %19 = OpLoad %6 %18 + OpStore %8 %19 + %22 = OpAccessChain %17 %14 %15 %21 + %23 = OpLoad %6 %22 + OpStore %20 %23 + OpBranch %24 + %24 = OpLabel + OpLoopMerge %26 %27 None + OpBranch %28 + %28 = OpLabel + %29 = OpLoad %6 %20 + %30 = OpAccessChain %17 %14 %15 %15 + %31 = OpLoad %6 %30 + %33 = OpSLessThan %32 %29 %31 + OpBranchConditional %33 %25 %26 + %25 = OpLabel + %44 = OpLoad %6 %20 + %45 = OpAccessChain %17 %14 %15 %37 + %46 = OpLoad %6 %45 + %47 = OpSMod %6 %44 %46 + OpStore %49 %43 + %50 = OpAccessChain %7 %49 %47 + %51 = OpLoad %6 %50 + %52 = OpLoad %6 %8 + %53 = OpIAdd %6 %52 %51 + OpStore %8 %53 + OpBranch %27 + %27 = OpLabel + %54 = OpLoad %6 %20 + %55 = OpIAdd %6 %54 %36 + OpStore %20 %55 + OpBranch %24 + %26 = OpLabel + %56 = OpLoad %6 %8 + %57 = OpAccessChain %17 %14 %15 %36 + %58 = OpLoad %6 %57 + %59 = OpIEqual %32 %56 %58 + OpSelectionMerge %61 None + OpBranchConditional %59 %60 %79 + %60 = OpLabel + %66 = OpAccessChain %17 %14 %15 %16 + %67 = OpLoad %6 %66 + %68 = OpConvertSToF %62 %67 + %69 = OpAccessChain %17 %14 %15 %21 + %70 = OpLoad %6 %69 + %71 = OpConvertSToF %62 %70 + %72 = OpAccessChain %17 %14 %15 %21 + %73 = OpLoad %6 %72 + %74 = OpConvertSToF %62 %73 + %75 = OpAccessChain %17 %14 %15 %16 + %76 = OpLoad %6 %75 + %77 = OpConvertSToF %62 %76 + %78 = OpCompositeConstruct %63 %68 %71 %74 %77 + OpStore %65 %78 + OpBranch %61 + %79 = OpLabel + %80 = OpAccessChain %17 %14 %15 %21 + %81 = OpLoad %6 %80 + %82 = OpConvertSToF %62 %81 + %83 = OpCompositeConstruct %63 %82 %82 %82 %82 + OpStore %65 %83 + OpBranch %61 + %61 = OpLabel + OpReturn + OpFunctionEnd +END + +# uniforms for variant + +# _GLF_uniform_int_values +BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA + 33 157 1 0 9 +END + +BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM + +PIPELINE graphics variant_pipeline + ATTACH variant_vertex_shader + ATTACH variant_fragment_shader + FRAMEBUFFER_SIZE 256 256 + BIND BUFFER variant_framebuffer AS color LOCATION 0 + BIND BUFFER variant__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 0 +END +CLEAR_COLOR variant_pipeline 0 0 0 255 + +CLEAR variant_pipeline +RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 256 256 + +EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255 diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-int-full-bits-divide-by-two-loop.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-int-full-bits-divide-by-two-loop.amber new file mode 100644 index 0000000..782d401 --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-int-full-bits-divide-by-two-loop.amber @@ -0,0 +1,199 @@ +#!amber + +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# A test for a coverage-gap found by the GraphicsFuzz project. + +# Short description: A fragment shader that covers specific BRW code paths + +# The test passes because the shader always writes red. + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 320 es +# #define _int_1 _GLF_uniform_int_values[0] +# #define _int_0 _GLF_uniform_int_values[1] +# +# precision highp int; +# precision highp float; +# +# // Contents of _GLF_uniform_int_values: [1, 0] +# layout(set = 0, binding = 0) uniform buf0 +# { +# int _GLF_uniform_int_values[2]; +# }; +# +# layout(location = 0) out vec4 _GLF_color; +# +# void main() +# { +# // Always selects ~0. +# int a = int(gl_FragCoord.x) < _int_0 ? 0 : ~0; +# +# for (int i = 0; i < 5; i ++) +# { +# a /= 2; +# } +# +# // Always true. +# if (a == ~0 / 32) +# { +# _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" %12 %52 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 320 + OpName %4 "main" + OpName %8 "a" + OpName %12 "gl_FragCoord" + OpName %21 "buf0" + OpMemberName %21 0 "_GLF_uniform_int_values" + OpName %23 "" + OpName %33 "i" + OpName %52 "_GLF_color" + OpDecorate %12 BuiltIn FragCoord + OpDecorate %20 ArrayStride 16 + OpMemberDecorate %21 0 Offset 0 + OpDecorate %21 Block + OpDecorate %23 DescriptorSet 0 + OpDecorate %23 Binding 0 + OpDecorate %52 Location 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeInt 32 1 + %7 = OpTypePointer Function %6 + %9 = OpTypeFloat 32 + %10 = OpTypeVector %9 4 + %11 = OpTypePointer Input %10 + %12 = OpVariable %11 Input + %13 = OpTypeInt 32 0 + %14 = OpConstant %13 0 + %15 = OpTypePointer Input %9 + %19 = OpConstant %13 2 + %20 = OpTypeArray %6 %19 + %21 = OpTypeStruct %20 + %22 = OpTypePointer Uniform %21 + %23 = OpVariable %22 Uniform + %24 = OpConstant %6 0 + %25 = OpConstant %6 1 + %26 = OpTypePointer Uniform %6 + %29 = OpTypeBool + %31 = OpConstant %6 -1 + %40 = OpConstant %6 5 + %42 = OpConstant %6 2 + %51 = OpTypePointer Output %10 + %52 = OpVariable %51 Output + %4 = OpFunction %2 None %3 + %5 = OpLabel + %8 = OpVariable %7 Function + %33 = OpVariable %7 Function + %16 = OpAccessChain %15 %12 %14 + %17 = OpLoad %9 %16 + %18 = OpConvertFToS %6 %17 + %27 = OpAccessChain %26 %23 %24 %25 + %28 = OpLoad %6 %27 + %30 = OpSLessThan %29 %18 %28 + %32 = OpSelect %6 %30 %24 %31 + OpStore %8 %32 + OpStore %33 %24 + OpBranch %34 + %34 = OpLabel + OpLoopMerge %36 %37 None + OpBranch %38 + %38 = OpLabel + %39 = OpLoad %6 %33 + %41 = OpSLessThan %29 %39 %40 + OpBranchConditional %41 %35 %36 + %35 = OpLabel + %43 = OpLoad %6 %8 + %44 = OpSDiv %6 %43 %42 + OpStore %8 %44 + OpBranch %37 + %37 = OpLabel + %45 = OpLoad %6 %33 + %46 = OpIAdd %6 %45 %25 + OpStore %33 %46 + OpBranch %34 + %36 = OpLabel + %47 = OpLoad %6 %8 + %48 = OpIEqual %29 %47 %24 + OpSelectionMerge %50 None + OpBranchConditional %48 %49 %66 + %49 = OpLabel + %53 = OpAccessChain %26 %23 %24 %24 + %54 = OpLoad %6 %53 + %55 = OpConvertSToF %9 %54 + %56 = OpAccessChain %26 %23 %24 %25 + %57 = OpLoad %6 %56 + %58 = OpConvertSToF %9 %57 + %59 = OpAccessChain %26 %23 %24 %25 + %60 = OpLoad %6 %59 + %61 = OpConvertSToF %9 %60 + %62 = OpAccessChain %26 %23 %24 %24 + %63 = OpLoad %6 %62 + %64 = OpConvertSToF %9 %63 + %65 = OpCompositeConstruct %10 %55 %58 %61 %64 + OpStore %52 %65 + OpBranch %50 + %66 = OpLabel + %67 = OpAccessChain %26 %23 %24 %25 + %68 = OpLoad %6 %67 + %69 = OpConvertSToF %9 %68 + %70 = OpCompositeConstruct %10 %69 %69 %69 %69 + OpStore %52 %70 + OpBranch %50 + %50 = OpLabel + OpReturn + OpFunctionEnd +END + +# uniforms for variant + +# _GLF_uniform_int_values +BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA + 1 0 +END + +BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM + +PIPELINE graphics variant_pipeline + ATTACH variant_vertex_shader + ATTACH variant_fragment_shader + FRAMEBUFFER_SIZE 256 256 + BIND BUFFER variant_framebuffer AS color LOCATION 0 + BIND BUFFER variant__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 0 +END +CLEAR_COLOR variant_pipeline 0 0 0 255 + +CLEAR variant_pipeline +RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 256 256 + +EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255 diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-loop-clamp-to-one-empty-condition.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-loop-clamp-to-one-empty-condition.amber new file mode 100644 index 0000000..9b7e78c --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-loop-clamp-to-one-empty-condition.amber @@ -0,0 +1,250 @@ +#!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_100 _GLF_uniform_int_values[2] +# #define _float_99_0 _GLF_uniform_float_values[0] +# #define _float_1_0 _GLF_uniform_float_values[1] +# #define _float_5_0 _GLF_uniform_float_values[2] +# +# precision highp int; +# precision highp float; +# +# // Contents of _GLF_uniform_float_values: [99.0, 1.0, 5.0] +# layout(set = 0, binding = 0) uniform buf0 +# { +# float _GLF_uniform_float_values[3]; +# }; +# +# // Contents of _GLF_uniform_int_values: [1, 0, 100] +# layout(set = 0, binding = 1) uniform buf1 +# { +# int _GLF_uniform_int_values[3]; +# }; +# +# const int _GLF_global_loop_bound = 100; +# int _GLF_global_loop_count = 0; +# +# layout(location = 0) out vec4 _GLF_color; +# +# void main() +# { +# float f = _float_1_0; +# +# for (int i = _int_0; i < _int_100; i ++) +# { +# if (f > _float_1_0) +# { +# } +# +# f = 1.0; +# f = (1.0 - clamp(_float_5_0, 1.0, f)) + float(i); +# } +# +# // Always true. +# if (f == _float_99_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: 88 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %68 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 320 + OpName %4 "main" + OpName %8 "_GLF_global_loop_count" + OpName %12 "f" + OpName %16 "buf0" + OpMemberName %16 0 "_GLF_uniform_float_values" + OpName %18 "" + OpName %24 "i" + OpName %26 "buf1" + OpMemberName %26 0 "_GLF_uniform_int_values" + OpName %28 "" + OpName %68 "_GLF_color" + OpDecorate %15 ArrayStride 16 + OpMemberDecorate %16 0 Offset 0 + OpDecorate %16 Block + OpDecorate %18 DescriptorSet 0 + OpDecorate %18 Binding 0 + OpDecorate %25 ArrayStride 16 + OpMemberDecorate %26 0 Offset 0 + OpDecorate %26 Block + OpDecorate %28 DescriptorSet 0 + OpDecorate %28 Binding 1 + OpDecorate %68 Location 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeInt 32 1 + %7 = OpTypePointer Private %6 + %8 = OpVariable %7 Private + %9 = OpConstant %6 0 + %10 = OpTypeFloat 32 + %11 = OpTypePointer Function %10 + %13 = OpTypeInt 32 0 + %14 = OpConstant %13 3 + %15 = OpTypeArray %10 %14 + %16 = OpTypeStruct %15 + %17 = OpTypePointer Uniform %16 + %18 = OpVariable %17 Uniform + %19 = OpConstant %6 1 + %20 = OpTypePointer Uniform %10 + %23 = OpTypePointer Function %6 + %25 = OpTypeArray %6 %14 + %26 = OpTypeStruct %25 + %27 = OpTypePointer Uniform %26 + %28 = OpVariable %27 Uniform + %29 = OpTypePointer Uniform %6 + %38 = OpConstant %6 2 + %41 = OpTypeBool + %49 = OpConstant %10 1 + %66 = OpTypeVector %10 4 + %67 = OpTypePointer Output %66 + %68 = OpVariable %67 Output + %87 = OpConstant %6 100 + %4 = OpFunction %2 None %3 + %5 = OpLabel + %12 = OpVariable %11 Function + %24 = OpVariable %23 Function + OpStore %8 %9 + %21 = OpAccessChain %20 %18 %9 %19 + %22 = OpLoad %10 %21 + OpStore %12 %22 + %30 = OpAccessChain %29 %28 %9 %19 + %31 = OpLoad %6 %30 + OpStore %24 %31 + OpBranch %32 + %32 = OpLabel + OpLoopMerge %34 %35 None + OpBranch %36 + %36 = OpLabel + %37 = OpLoad %6 %24 + %39 = OpAccessChain %29 %28 %9 %38 + %40 = OpLoad %6 %39 + %42 = OpSLessThan %41 %37 %40 + OpBranchConditional %42 %33 %34 + %33 = OpLabel + %43 = OpLoad %10 %12 + %44 = OpAccessChain %20 %18 %9 %19 + %45 = OpLoad %10 %44 + %46 = OpFOrdGreaterThan %41 %43 %45 + OpSelectionMerge %48 None + OpBranchConditional %46 %47 %48 + %47 = OpLabel + OpBranch %48 + %48 = OpLabel + OpStore %12 %49 + %50 = OpAccessChain %20 %18 %9 %38 + %51 = OpLoad %10 %50 + %52 = OpLoad %10 %12 + %53 = OpExtInst %10 %1 FClamp %51 %49 %52 + %54 = OpFSub %10 %49 %53 + %55 = OpLoad %6 %24 + %56 = OpConvertSToF %10 %55 + %57 = OpFAdd %10 %54 %56 + OpStore %12 %57 + OpBranch %35 + %35 = OpLabel + %58 = OpLoad %6 %24 + %59 = OpIAdd %6 %58 %19 + OpStore %24 %59 + OpBranch %32 + %34 = OpLabel + %60 = OpLoad %10 %12 + %61 = OpAccessChain %20 %18 %9 %9 + %62 = OpLoad %10 %61 + %63 = OpFOrdEqual %41 %60 %62 + OpSelectionMerge %65 None + OpBranchConditional %63 %64 %82 + %64 = OpLabel + %69 = OpAccessChain %29 %28 %9 %9 + %70 = OpLoad %6 %69 + %71 = OpConvertSToF %10 %70 + %72 = OpAccessChain %29 %28 %9 %19 + %73 = OpLoad %6 %72 + %74 = OpConvertSToF %10 %73 + %75 = OpAccessChain %29 %28 %9 %19 + %76 = OpLoad %6 %75 + %77 = OpConvertSToF %10 %76 + %78 = OpAccessChain %29 %28 %9 %9 + %79 = OpLoad %6 %78 + %80 = OpConvertSToF %10 %79 + %81 = OpCompositeConstruct %66 %71 %74 %77 %80 + OpStore %68 %81 + OpBranch %65 + %82 = OpLabel + %83 = OpAccessChain %29 %28 %9 %19 + %84 = OpLoad %6 %83 + %85 = OpConvertSToF %10 %84 + %86 = OpCompositeConstruct %66 %85 %85 %85 %85 + OpStore %68 %86 + OpBranch %65 + %65 = OpLabel + OpReturn + OpFunctionEnd +END + +# uniforms for variant + +# _GLF_uniform_int_values +BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA + 1 0 100 +END +# _GLF_uniform_float_values +BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA + 99.0 1.0 5.0 +END + +BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM + +PIPELINE graphics variant_pipeline + ATTACH variant_vertex_shader + ATTACH variant_fragment_shader + FRAMEBUFFER_SIZE 256 256 + BIND BUFFER variant_framebuffer AS color LOCATION 0 + BIND BUFFER variant__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-loop-returns-behind-true-and-false.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-loop-returns-behind-true-and-false.amber new file mode 100644 index 0000000..e92ad7a --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-loop-returns-behind-true-and-false.amber @@ -0,0 +1,228 @@ +#!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] +# +# precision highp float; +# precision highp int; +# +# // Contents of _GLF_uniform_int_values: [1, 0] +# layout(set = 0, binding = 0) uniform buf0 +# { +# int _GLF_uniform_int_values[2]; +# }; +# +# const int _GLF_global_loop_bound = 100; +# int _GLF_global_loop_count = 0; +# +# layout(location = 0) out vec4 _GLF_color; +# +# void main() +# { +# switch(_int_1) +# { +# case 0: +# if (true) +# { +# _GLF_color = vec4(_int_0); +# return; +# } +# case 1: +# if (true) +# { +# _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1); +# +# if (false) +# { +# _GLF_color = vec4(_int_1); +# +# do +# { +# _GLF_global_loop_count++; +# +# if (false) +# { +# return; +# } +# if (true) +# { +# return; +# } +# } +# while (_GLF_global_loop_count < _GLF_global_loop_bound); +# } +# } +# } +# } +SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0 +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 10 +; Bound: 74 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %29 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 320 + OpName %4 "main" + OpName %8 "_GLF_global_loop_count" + OpName %13 "buf0" + OpMemberName %13 0 "_GLF_uniform_int_values" + OpName %15 "" + OpName %29 "_GLF_color" + OpDecorate %12 ArrayStride 16 + OpMemberDecorate %13 0 Offset 0 + OpDecorate %13 Block + OpDecorate %15 DescriptorSet 0 + OpDecorate %15 Binding 0 + OpDecorate %29 Location 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeInt 32 1 + %7 = OpTypePointer Private %6 + %8 = OpVariable %7 Private + %9 = OpConstant %6 0 + %10 = OpTypeInt 32 0 + %11 = OpConstant %10 2 + %12 = OpTypeArray %6 %11 + %13 = OpTypeStruct %12 + %14 = OpTypePointer Uniform %13 + %15 = OpVariable %14 Uniform + %16 = OpTypePointer Uniform %6 + %22 = OpTypeBool + %23 = OpConstantTrue %22 + %26 = OpTypeFloat 32 + %27 = OpTypeVector %26 4 + %28 = OpTypePointer Output %27 + %29 = OpVariable %28 Output + %30 = OpConstant %6 1 + %51 = OpConstantFalse %22 + %71 = OpConstant %6 100 + %4 = OpFunction %2 None %3 + %5 = OpLabel + OpStore %8 %9 + %17 = OpAccessChain %16 %15 %9 %9 + %18 = OpLoad %6 %17 + OpSelectionMerge %21 None + OpSwitch %18 %21 0 %19 1 %20 + %19 = OpLabel + OpSelectionMerge %25 None + OpBranchConditional %23 %24 %25 + %24 = OpLabel + %31 = OpAccessChain %16 %15 %9 %30 + %32 = OpLoad %6 %31 + %33 = OpConvertSToF %26 %32 + %34 = OpCompositeConstruct %27 %33 %33 %33 %33 + OpStore %29 %34 + OpReturn + %25 = OpLabel + OpBranch %20 + %20 = OpLabel + OpSelectionMerge %37 None + OpBranchConditional %23 %36 %37 + %36 = OpLabel + %38 = OpAccessChain %16 %15 %9 %9 + %39 = OpLoad %6 %38 + %40 = OpConvertSToF %26 %39 + %41 = OpAccessChain %16 %15 %9 %30 + %42 = OpLoad %6 %41 + %43 = OpConvertSToF %26 %42 + %44 = OpAccessChain %16 %15 %9 %30 + %45 = OpLoad %6 %44 + %46 = OpConvertSToF %26 %45 + %47 = OpAccessChain %16 %15 %9 %9 + %48 = OpLoad %6 %47 + %49 = OpConvertSToF %26 %48 + %50 = OpCompositeConstruct %27 %40 %43 %46 %49 + OpStore %29 %50 + OpSelectionMerge %53 None + OpBranchConditional %51 %52 %53 + %52 = OpLabel + %54 = OpAccessChain %16 %15 %9 %9 + %55 = OpLoad %6 %54 + %56 = OpConvertSToF %26 %55 + %57 = OpCompositeConstruct %27 %56 %56 %56 %56 + OpStore %29 %57 + OpBranch %58 + %58 = OpLabel + OpLoopMerge %60 %61 None + OpBranch %59 + %59 = OpLabel + %62 = OpLoad %6 %8 + %63 = OpIAdd %6 %62 %30 + OpStore %8 %63 + OpSelectionMerge %65 None + OpBranchConditional %51 %64 %65 + %64 = OpLabel + OpReturn + %65 = OpLabel + OpSelectionMerge %68 None + OpBranchConditional %23 %67 %68 + %67 = OpLabel + OpReturn + %68 = OpLabel + OpBranch %61 + %61 = OpLabel + %70 = OpLoad %6 %8 + %72 = OpSLessThan %22 %70 %71 + OpBranchConditional %72 %58 %60 + %60 = OpLabel + OpBranch %53 + %53 = OpLabel + OpBranch %37 + %37 = OpLabel + OpBranch %21 + %21 = OpLabel + OpReturn + OpFunctionEnd +END + +# uniforms for variant + +# _GLF_uniform_int_values +BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA + 1 0 +END + +BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM + +PIPELINE graphics variant_pipeline + ATTACH variant_vertex_shader + ATTACH variant_fragment_shader + FRAMEBUFFER_SIZE 256 256 + BIND BUFFER variant_framebuffer AS color LOCATION 0 + BIND BUFFER variant__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 0 +END +CLEAR_COLOR variant_pipeline 0 0 0 255 + +CLEAR variant_pipeline +RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 256 256 + +EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255 diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-min-nested-loop-same-value-for-variables.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-min-nested-loop-same-value-for-variables.amber new file mode 100644 index 0000000..2083ddd --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-min-nested-loop-same-value-for-variables.amber @@ -0,0 +1,446 @@ +#!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 texgen_vert PASSTHROUGH + +SHADER fragment texgen_frag GLSL +#version 430 +precision highp float; + +layout(location = 0) out vec4 _GLF_color; + +void main() +{ + _GLF_color = vec4( + gl_FragCoord.x * (1.0 / 256.0), + (int(gl_FragCoord.x) ^ int(gl_FragCoord.y)) * (1.0 / 256.0), + gl_FragCoord.y * (1.0 / 256.0), + 1.0); +} +END +BUFFER default_texture FORMAT B8G8R8A8_UNORM + +PIPELINE graphics texgen_pipeline + ATTACH texgen_vert + ATTACH texgen_frag + FRAMEBUFFER_SIZE 256 256 + BIND BUFFER default_texture AS color LOCATION 0 +END + +CLEAR_COLOR texgen_pipeline 0 0 0 255 +CLEAR texgen_pipeline +RUN texgen_pipeline DRAW_RECT POS 0 0 SIZE 256 256 + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 320 es +# +# #define _int_1 _GLF_uniform_int_values[0] +# #define _int_0 _GLF_uniform_int_values[1] +# #define _float_1_0 _GLF_uniform_float_values[0] +# +# precision highp float; +# precision highp int; +# +# // Contents of _GLF_uniform_float_values: 1.0 +# layout(set = 0, binding = 0) uniform buf0 +# { +# float _GLF_uniform_float_values[1]; +# }; +# // Contents of _GLF_uniform_int_values: [1, 0] +# layout(set = 0, binding = 1) uniform buf1 +# { +# int _GLF_uniform_int_values[2]; +# }; +# +# layout(location = 0) out vec4 _GLF_color; +# layout(set = 0, binding = 2) uniform sampler2D tex; +# +# void main() +# { +# const float arr[9] = float[9](0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0); +# vec2 coord = gl_FragCoord.xy; +# vec4 res = vec4(_int_1, _int_0, _int_0, _int_1); +# +# for (int i = 0; i < 3; i++) +# { +# for (int j = 0; j < 3; j++) +# { +# int a = clamp(i + j, 0, 9); +# // f0 and f1 are guaranteed to get the value 0.0. +# float f0 = clamp(arr[a], arr[a], arr[a]); +# float f1 = clamp(arr[a], arr[a], arr[a]); +# // v0 = (0, 0, 0, 0) due to f0 being zero. +# vec4 v0 = vec4(f0); +# // v1, v2, v3, v4 all become (0, 0, 0, 0) due to multiplication by zero. +# vec4 v1 = texture(tex, vec2(i)) * f1; +# vec4 v2 = texture(tex, coord) * arr[a]; +# vec4 v3 = texture(tex, coord) * arr[a]; +# vec4 v4 = texture(tex, coord + vec2(i - _int_1, j - _int_1)) * arr[a]; +# +# // v5 becomes (0, 0, 0, 0) since the min function picks v2. +# vec4 v5 = min(vec4(1.0), v2); +# // v6 also becomes (0, 0, 0, 0) because both v3 and v5 are zero vectors. +# vec4 v6 = min(v3, v5); +# +# // The min chain simplifies to min(vec4(1.0), vec4(0.0)) which results +# // in zero vector. Thus the += operation has no effect. +# res += min(min(min(v0, v1), v6) + vec4(_float_1_0), v4); +# } +# } +# +# // res is originally red, and it has only zero vector added to it, so the +# // output color will be red too. +# _GLF_color = res; +# } +SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0 +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 10 +; Bound: 188 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %12 %186 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 320 + OpName %4 "main" + OpName %9 "coord" + OpName %12 "gl_FragCoord" + OpName %16 "res" + OpName %21 "buf1" + OpMemberName %21 0 "_GLF_uniform_int_values" + OpName %23 "" + OpName %41 "i" + OpName %51 "j" + OpName %59 "a" + OpName %66 "f0" + OpName %73 "indexable" + OpName %77 "indexable" + OpName %81 "indexable" + OpName %85 "f1" + OpName %87 "indexable" + OpName %91 "indexable" + OpName %95 "indexable" + OpName %99 "v0" + OpName %102 "v1" + OpName %106 "tex" + OpName %114 "v2" + OpName %119 "indexable" + OpName %123 "v3" + OpName %128 "indexable" + OpName %132 "v4" + OpName %149 "indexable" + OpName %153 "v5" + OpName %158 "v6" + OpName %169 "buf0" + OpMemberName %169 0 "_GLF_uniform_float_values" + OpName %171 "" + OpName %186 "_GLF_color" + OpDecorate %12 BuiltIn FragCoord + OpDecorate %20 ArrayStride 16 + OpMemberDecorate %21 0 Offset 0 + OpDecorate %21 Block + OpDecorate %23 DescriptorSet 0 + OpDecorate %23 Binding 1 + OpDecorate %106 RelaxedPrecision + OpDecorate %106 DescriptorSet 0 + OpDecorate %106 Binding 2 + OpDecorate %107 RelaxedPrecision + OpDecorate %109 RelaxedPrecision + OpDecorate %110 RelaxedPrecision + OpDecorate %111 RelaxedPrecision + OpDecorate %115 RelaxedPrecision + OpDecorate %117 RelaxedPrecision + OpDecorate %124 RelaxedPrecision + OpDecorate %126 RelaxedPrecision + OpDecorate %133 RelaxedPrecision + OpDecorate %147 RelaxedPrecision + OpDecorate %168 ArrayStride 16 + OpMemberDecorate %169 0 Offset 0 + OpDecorate %169 Block + OpDecorate %171 DescriptorSet 0 + OpDecorate %171 Binding 0 + OpDecorate %186 Location 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeFloat 32 + %7 = OpTypeVector %6 2 + %8 = OpTypePointer Function %7 + %10 = OpTypeVector %6 4 + %11 = OpTypePointer Input %10 + %12 = OpVariable %11 Input + %15 = OpTypePointer Function %10 + %17 = OpTypeInt 32 1 + %18 = OpTypeInt 32 0 + %19 = OpConstant %18 2 + %20 = OpTypeArray %17 %19 + %21 = OpTypeStruct %20 + %22 = OpTypePointer Uniform %21 + %23 = OpVariable %22 Uniform + %24 = OpConstant %17 0 + %25 = OpTypePointer Uniform %17 + %29 = OpConstant %17 1 + %40 = OpTypePointer Function %17 + %48 = OpConstant %17 3 + %49 = OpTypeBool + %63 = OpConstant %17 9 + %65 = OpTypePointer Function %6 + %67 = OpConstant %18 9 + %68 = OpTypeArray %6 %67 + %69 = OpConstant %6 0 + %70 = OpConstantComposite %68 %69 %69 %69 %69 %69 %69 %69 %69 %69 + %72 = OpTypePointer Function %68 + %103 = OpTypeImage %6 2D 0 0 0 1 Unknown + %104 = OpTypeSampledImage %103 + %105 = OpTypePointer UniformConstant %104 + %106 = OpVariable %105 UniformConstant + %154 = OpConstant %6 1 + %155 = OpConstantComposite %10 %154 %154 %154 %154 + %167 = OpConstant %18 1 + %168 = OpTypeArray %6 %167 + %169 = OpTypeStruct %168 + %170 = OpTypePointer Uniform %169 + %171 = OpVariable %170 Uniform + %172 = OpTypePointer Uniform %6 + %185 = OpTypePointer Output %10 + %186 = OpVariable %185 Output + %4 = OpFunction %2 None %3 + %5 = OpLabel + %9 = OpVariable %8 Function + %16 = OpVariable %15 Function + %41 = OpVariable %40 Function + %51 = OpVariable %40 Function + %59 = OpVariable %40 Function + %66 = OpVariable %65 Function + %73 = OpVariable %72 Function + %77 = OpVariable %72 Function + %81 = OpVariable %72 Function + %85 = OpVariable %65 Function + %87 = OpVariable %72 Function + %91 = OpVariable %72 Function + %95 = OpVariable %72 Function + %99 = OpVariable %15 Function + %102 = OpVariable %15 Function + %114 = OpVariable %15 Function + %119 = OpVariable %72 Function + %123 = OpVariable %15 Function + %128 = OpVariable %72 Function + %132 = OpVariable %15 Function + %149 = OpVariable %72 Function + %153 = OpVariable %15 Function + %158 = OpVariable %15 Function + %13 = OpLoad %10 %12 + %14 = OpVectorShuffle %7 %13 %13 0 1 + OpStore %9 %14 + %26 = OpAccessChain %25 %23 %24 %24 + %27 = OpLoad %17 %26 + %28 = OpConvertSToF %6 %27 + %30 = OpAccessChain %25 %23 %24 %29 + %31 = OpLoad %17 %30 + %32 = OpConvertSToF %6 %31 + %33 = OpAccessChain %25 %23 %24 %29 + %34 = OpLoad %17 %33 + %35 = OpConvertSToF %6 %34 + %36 = OpAccessChain %25 %23 %24 %24 + %37 = OpLoad %17 %36 + %38 = OpConvertSToF %6 %37 + %39 = OpCompositeConstruct %10 %28 %32 %35 %38 + OpStore %16 %39 + OpStore %41 %24 + OpBranch %42 + %42 = OpLabel + OpLoopMerge %44 %45 None + OpBranch %46 + %46 = OpLabel + %47 = OpLoad %17 %41 + %50 = OpSLessThan %49 %47 %48 + OpBranchConditional %50 %43 %44 + %43 = OpLabel + OpStore %51 %24 + OpBranch %52 + %52 = OpLabel + OpLoopMerge %54 %55 None + OpBranch %56 + %56 = OpLabel + %57 = OpLoad %17 %51 + %58 = OpSLessThan %49 %57 %48 + OpBranchConditional %58 %53 %54 + %53 = OpLabel + %60 = OpLoad %17 %41 + %61 = OpLoad %17 %51 + %62 = OpIAdd %17 %60 %61 + %64 = OpExtInst %17 %1 SClamp %62 %24 %63 + OpStore %59 %64 + %71 = OpLoad %17 %59 + OpStore %73 %70 + %74 = OpAccessChain %65 %73 %71 + %75 = OpLoad %6 %74 + %76 = OpLoad %17 %59 + OpStore %77 %70 + %78 = OpAccessChain %65 %77 %76 + %79 = OpLoad %6 %78 + %80 = OpLoad %17 %59 + OpStore %81 %70 + %82 = OpAccessChain %65 %81 %80 + %83 = OpLoad %6 %82 + %84 = OpExtInst %6 %1 FClamp %75 %79 %83 + OpStore %66 %84 + %86 = OpLoad %17 %59 + OpStore %87 %70 + %88 = OpAccessChain %65 %87 %86 + %89 = OpLoad %6 %88 + %90 = OpLoad %17 %59 + OpStore %91 %70 + %92 = OpAccessChain %65 %91 %90 + %93 = OpLoad %6 %92 + %94 = OpLoad %17 %59 + OpStore %95 %70 + %96 = OpAccessChain %65 %95 %94 + %97 = OpLoad %6 %96 + %98 = OpExtInst %6 %1 FClamp %89 %93 %97 + OpStore %85 %98 + %100 = OpLoad %6 %66 + %101 = OpCompositeConstruct %10 %100 %100 %100 %100 + OpStore %99 %101 + %107 = OpLoad %104 %106 + %108 = OpLoad %17 %41 + %109 = OpConvertSToF %6 %108 + %110 = OpCompositeConstruct %7 %109 %109 + %111 = OpImageSampleImplicitLod %10 %107 %110 + %112 = OpLoad %6 %85 + %113 = OpVectorTimesScalar %10 %111 %112 + OpStore %102 %113 + %115 = OpLoad %104 %106 + %116 = OpLoad %7 %9 + %117 = OpImageSampleImplicitLod %10 %115 %116 + %118 = OpLoad %17 %59 + OpStore %119 %70 + %120 = OpAccessChain %65 %119 %118 + %121 = OpLoad %6 %120 + %122 = OpVectorTimesScalar %10 %117 %121 + OpStore %114 %122 + %124 = OpLoad %104 %106 + %125 = OpLoad %7 %9 + %126 = OpImageSampleImplicitLod %10 %124 %125 + %127 = OpLoad %17 %59 + OpStore %128 %70 + %129 = OpAccessChain %65 %128 %127 + %130 = OpLoad %6 %129 + %131 = OpVectorTimesScalar %10 %126 %130 + OpStore %123 %131 + %133 = OpLoad %104 %106 + %134 = OpLoad %7 %9 + %135 = OpLoad %17 %41 + %136 = OpAccessChain %25 %23 %24 %24 + %137 = OpLoad %17 %136 + %138 = OpISub %17 %135 %137 + %139 = OpConvertSToF %6 %138 + %140 = OpLoad %17 %51 + %141 = OpAccessChain %25 %23 %24 %24 + %142 = OpLoad %17 %141 + %143 = OpISub %17 %140 %142 + %144 = OpConvertSToF %6 %143 + %145 = OpCompositeConstruct %7 %139 %144 + %146 = OpFAdd %7 %134 %145 + %147 = OpImageSampleImplicitLod %10 %133 %146 + %148 = OpLoad %17 %59 + OpStore %149 %70 + %150 = OpAccessChain %65 %149 %148 + %151 = OpLoad %6 %150 + %152 = OpVectorTimesScalar %10 %147 %151 + OpStore %132 %152 + %156 = OpLoad %10 %114 + %157 = OpExtInst %10 %1 FMin %155 %156 + OpStore %153 %157 + %159 = OpLoad %10 %123 + %160 = OpLoad %10 %153 + %161 = OpExtInst %10 %1 FMin %159 %160 + OpStore %158 %161 + %162 = OpLoad %10 %99 + %163 = OpLoad %10 %102 + %164 = OpExtInst %10 %1 FMin %162 %163 + %165 = OpLoad %10 %158 + %166 = OpExtInst %10 %1 FMin %164 %165 + %173 = OpAccessChain %172 %171 %24 %24 + %174 = OpLoad %6 %173 + %175 = OpCompositeConstruct %10 %174 %174 %174 %174 + %176 = OpFAdd %10 %166 %175 + %177 = OpLoad %10 %132 + %178 = OpExtInst %10 %1 FMin %176 %177 + %179 = OpLoad %10 %16 + %180 = OpFAdd %10 %179 %178 + OpStore %16 %180 + OpBranch %55 + %55 = OpLabel + %181 = OpLoad %17 %51 + %182 = OpIAdd %17 %181 %29 + OpStore %51 %182 + OpBranch %52 + %54 = OpLabel + OpBranch %45 + %45 = OpLabel + %183 = OpLoad %17 %41 + %184 = OpIAdd %17 %183 %29 + OpStore %41 %184 + OpBranch %42 + %44 = OpLabel + %187 = OpLoad %10 %16 + OpStore %186 %187 + OpReturn + OpFunctionEnd +END + +# uniforms for variant + +# tex +SAMPLER variant_tex + +# _GLF_uniform_int_values +BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA + 1 0 +END +# _GLF_uniform_float_values +BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA + 1.0 +END + +BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM + +PIPELINE graphics variant_pipeline + ATTACH variant_vertex_shader + ATTACH variant_fragment_shader + FRAMEBUFFER_SIZE 256 256 + BIND BUFFER variant_framebuffer AS color LOCATION 0 + BIND BUFFER default_texture AS combined_image_sampler SAMPLER variant_tex DESCRIPTOR_SET 0 BINDING 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/cov-multiple-one-iteration-loops-global-counter-write-matrices.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-multiple-one-iteration-loops-global-counter-write-matrices.amber new file mode 100644 index 0000000..c9540cf --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-multiple-one-iteration-loops-global-counter-write-matrices.amber @@ -0,0 +1,1056 @@ +#!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 LOOP for (int i = 0; i < 1; i++) +# +# precision highp int; +# precision highp float; +# +# const int _GLF_global_loop_bound = 100; +# int _GLF_global_loop_count = 0; +# +# layout(location = 0) out vec4 _GLF_color; +# +# void main() +# { +# mat2x3 m23 = mat2x3(0); +# mat2x4 m24 = mat2x4(0); +# mat3x2 m32 = mat3x2(0); +# mat3 m33 = mat3(0); +# mat3x4 m34 = mat3x4(0); +# mat4x2 m42 = mat4x2(0); +# mat4x3 m43 = mat4x3(0); +# mat4 m44 = mat4(0); +# +# // Each loop iterates just once. +# LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { +# LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { +# LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { LOOP { +# LOOP { LOOP { LOOP { LOOP { LOOP { +# // Run until _GLF_global_loop_bound is 98. +# do +# { +# _GLF_global_loop_count++; +# } +# while(_GLF_global_loop_count < _GLF_global_loop_bound - 2); +# +# // Write one to the first matrix element. +# m23[i][i] = 1.0; +# m24[i][i] = 1.0; +# m32[i][i] = 1.0; +# m33[i][i] = 1.0; +# m34[i][i] = 1.0; +# m42[i][i] = 1.0; +# m43[i][i] = 1.0; +# m44[i][i] = 1.0; +# } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } +# +# float sum = 0.0; +# // Iterate twice. The first iteration reads one and the second zero. +# for(int r = 0; _GLF_global_loop_count < _GLF_global_loop_bound; r++) +# { +# _GLF_global_loop_count++; +# sum += m23[0][r]; +# sum += m24[0][r]; +# sum += m32[0][r]; +# sum += m33[0][r]; +# sum += m34[0][r]; +# sum += m42[0][r]; +# sum += m43[0][r]; +# sum += m44[0][r]; +# } +# +# // Always true. +# if (sum == 8.0) +# _GLF_color = vec4(1, 0, 0, 1); +# else +# _GLF_color = vec4(0); +# } +SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0 +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 10 +; Bound: 531 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %528 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 320 + OpName %4 "main" + OpName %8 "_GLF_global_loop_count" + OpName %14 "m23" + OpName %21 "m24" + OpName %27 "m32" + OpName %32 "m33" + OpName %36 "m34" + OpName %40 "m42" + OpName %44 "m43" + OpName %48 "m44" + OpName %51 "i" + OpName %61 "i" + OpName %69 "i" + OpName %77 "i" + OpName %85 "i" + OpName %93 "i" + OpName %101 "i" + OpName %109 "i" + OpName %117 "i" + OpName %125 "i" + OpName %133 "i" + OpName %141 "i" + OpName %149 "i" + OpName %157 "i" + OpName %165 "i" + OpName %173 "i" + OpName %181 "i" + OpName %189 "i" + OpName %197 "i" + OpName %205 "i" + OpName %213 "i" + OpName %221 "i" + OpName %229 "i" + OpName %237 "i" + OpName %245 "i" + OpName %253 "i" + OpName %261 "i" + OpName %269 "i" + OpName %277 "i" + OpName %285 "i" + OpName %293 "i" + OpName %301 "i" + OpName %309 "i" + OpName %317 "i" + OpName %325 "i" + OpName %333 "i" + OpName %341 "i" + OpName %349 "i" + OpName %468 "sum" + OpName %469 "r" + OpName %528 "_GLF_color" + OpDecorate %528 Location 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeInt 32 1 + %7 = OpTypePointer Private %6 + %8 = OpVariable %7 Private + %9 = OpConstant %6 0 + %10 = OpTypeFloat 32 + %11 = OpTypeVector %10 3 + %12 = OpTypeMatrix %11 2 + %13 = OpTypePointer Function %12 + %15 = OpConstant %10 0 + %16 = OpConstantComposite %11 %15 %15 %15 + %17 = OpConstantComposite %12 %16 %16 + %18 = OpTypeVector %10 4 + %19 = OpTypeMatrix %18 2 + %20 = OpTypePointer Function %19 + %22 = OpConstantComposite %18 %15 %15 %15 %15 + %23 = OpConstantComposite %19 %22 %22 + %24 = OpTypeVector %10 2 + %25 = OpTypeMatrix %24 3 + %26 = OpTypePointer Function %25 + %28 = OpConstantComposite %24 %15 %15 + %29 = OpConstantComposite %25 %28 %28 %28 + %30 = OpTypeMatrix %11 3 + %31 = OpTypePointer Function %30 + %33 = OpConstantComposite %30 %16 %16 %16 + %34 = OpTypeMatrix %18 3 + %35 = OpTypePointer Function %34 + %37 = OpConstantComposite %34 %22 %22 %22 + %38 = OpTypeMatrix %24 4 + %39 = OpTypePointer Function %38 + %41 = OpConstantComposite %38 %28 %28 %28 %28 + %42 = OpTypeMatrix %11 4 + %43 = OpTypePointer Function %42 + %45 = OpConstantComposite %42 %16 %16 %16 %16 + %46 = OpTypeMatrix %18 4 + %47 = OpTypePointer Function %46 + %49 = OpConstantComposite %46 %22 %22 %22 %22 + %50 = OpTypePointer Function %6 + %58 = OpConstant %6 1 + %59 = OpTypeBool + %364 = OpConstant %6 98 + %368 = OpConstant %10 1 + %369 = OpTypePointer Function %10 + %476 = OpConstant %6 100 + %523 = OpConstant %10 8 + %527 = OpTypePointer Output %18 + %528 = OpVariable %527 Output + %529 = OpConstantComposite %18 %368 %15 %15 %368 + %4 = OpFunction %2 None %3 + %5 = OpLabel + %14 = OpVariable %13 Function + %21 = OpVariable %20 Function + %27 = OpVariable %26 Function + %32 = OpVariable %31 Function + %36 = OpVariable %35 Function + %40 = OpVariable %39 Function + %44 = OpVariable %43 Function + %48 = OpVariable %47 Function + %51 = OpVariable %50 Function + %61 = OpVariable %50 Function + %69 = OpVariable %50 Function + %77 = OpVariable %50 Function + %85 = OpVariable %50 Function + %93 = OpVariable %50 Function + %101 = OpVariable %50 Function + %109 = OpVariable %50 Function + %117 = OpVariable %50 Function + %125 = OpVariable %50 Function + %133 = OpVariable %50 Function + %141 = OpVariable %50 Function + %149 = OpVariable %50 Function + %157 = OpVariable %50 Function + %165 = OpVariable %50 Function + %173 = OpVariable %50 Function + %181 = OpVariable %50 Function + %189 = OpVariable %50 Function + %197 = OpVariable %50 Function + %205 = OpVariable %50 Function + %213 = OpVariable %50 Function + %221 = OpVariable %50 Function + %229 = OpVariable %50 Function + %237 = OpVariable %50 Function + %245 = OpVariable %50 Function + %253 = OpVariable %50 Function + %261 = OpVariable %50 Function + %269 = OpVariable %50 Function + %277 = OpVariable %50 Function + %285 = OpVariable %50 Function + %293 = OpVariable %50 Function + %301 = OpVariable %50 Function + %309 = OpVariable %50 Function + %317 = OpVariable %50 Function + %325 = OpVariable %50 Function + %333 = OpVariable %50 Function + %341 = OpVariable %50 Function + %349 = OpVariable %50 Function + %468 = OpVariable %369 Function + %469 = OpVariable %50 Function + OpStore %8 %9 + OpStore %14 %17 + OpStore %21 %23 + OpStore %27 %29 + OpStore %32 %33 + OpStore %36 %37 + OpStore %40 %41 + OpStore %44 %45 + OpStore %48 %49 + OpStore %51 %9 + OpBranch %52 + %52 = OpLabel + OpLoopMerge %54 %55 None + OpBranch %56 + %56 = OpLabel + %57 = OpLoad %6 %51 + %60 = OpSLessThan %59 %57 %58 + OpBranchConditional %60 %53 %54 + %53 = OpLabel + OpStore %61 %9 + OpBranch %62 + %62 = OpLabel + OpLoopMerge %64 %65 None + OpBranch %66 + %66 = OpLabel + %67 = OpLoad %6 %61 + %68 = OpSLessThan %59 %67 %58 + OpBranchConditional %68 %63 %64 + %63 = OpLabel + OpStore %69 %9 + OpBranch %70 + %70 = OpLabel + OpLoopMerge %72 %73 None + OpBranch %74 + %74 = OpLabel + %75 = OpLoad %6 %69 + %76 = OpSLessThan %59 %75 %58 + OpBranchConditional %76 %71 %72 + %71 = OpLabel + OpStore %77 %9 + OpBranch %78 + %78 = OpLabel + OpLoopMerge %80 %81 None + OpBranch %82 + %82 = OpLabel + %83 = OpLoad %6 %77 + %84 = OpSLessThan %59 %83 %58 + OpBranchConditional %84 %79 %80 + %79 = OpLabel + OpStore %85 %9 + OpBranch %86 + %86 = OpLabel + OpLoopMerge %88 %89 None + OpBranch %90 + %90 = OpLabel + %91 = OpLoad %6 %85 + %92 = OpSLessThan %59 %91 %58 + OpBranchConditional %92 %87 %88 + %87 = OpLabel + OpStore %93 %9 + OpBranch %94 + %94 = OpLabel + OpLoopMerge %96 %97 None + OpBranch %98 + %98 = OpLabel + %99 = OpLoad %6 %93 + %100 = OpSLessThan %59 %99 %58 + OpBranchConditional %100 %95 %96 + %95 = OpLabel + OpStore %101 %9 + OpBranch %102 + %102 = OpLabel + OpLoopMerge %104 %105 None + OpBranch %106 + %106 = OpLabel + %107 = OpLoad %6 %101 + %108 = OpSLessThan %59 %107 %58 + OpBranchConditional %108 %103 %104 + %103 = OpLabel + OpStore %109 %9 + OpBranch %110 + %110 = OpLabel + OpLoopMerge %112 %113 None + OpBranch %114 + %114 = OpLabel + %115 = OpLoad %6 %109 + %116 = OpSLessThan %59 %115 %58 + OpBranchConditional %116 %111 %112 + %111 = OpLabel + OpStore %117 %9 + OpBranch %118 + %118 = OpLabel + OpLoopMerge %120 %121 None + OpBranch %122 + %122 = OpLabel + %123 = OpLoad %6 %117 + %124 = OpSLessThan %59 %123 %58 + OpBranchConditional %124 %119 %120 + %119 = OpLabel + OpStore %125 %9 + OpBranch %126 + %126 = OpLabel + OpLoopMerge %128 %129 None + OpBranch %130 + %130 = OpLabel + %131 = OpLoad %6 %125 + %132 = OpSLessThan %59 %131 %58 + OpBranchConditional %132 %127 %128 + %127 = OpLabel + OpStore %133 %9 + OpBranch %134 + %134 = OpLabel + OpLoopMerge %136 %137 None + OpBranch %138 + %138 = OpLabel + %139 = OpLoad %6 %133 + %140 = OpSLessThan %59 %139 %58 + OpBranchConditional %140 %135 %136 + %135 = OpLabel + OpStore %141 %9 + OpBranch %142 + %142 = OpLabel + OpLoopMerge %144 %145 None + OpBranch %146 + %146 = OpLabel + %147 = OpLoad %6 %141 + %148 = OpSLessThan %59 %147 %58 + OpBranchConditional %148 %143 %144 + %143 = OpLabel + OpStore %149 %9 + OpBranch %150 + %150 = OpLabel + OpLoopMerge %152 %153 None + OpBranch %154 + %154 = OpLabel + %155 = OpLoad %6 %149 + %156 = OpSLessThan %59 %155 %58 + OpBranchConditional %156 %151 %152 + %151 = OpLabel + OpStore %157 %9 + OpBranch %158 + %158 = OpLabel + OpLoopMerge %160 %161 None + OpBranch %162 + %162 = OpLabel + %163 = OpLoad %6 %157 + %164 = OpSLessThan %59 %163 %58 + OpBranchConditional %164 %159 %160 + %159 = OpLabel + OpStore %165 %9 + OpBranch %166 + %166 = OpLabel + OpLoopMerge %168 %169 None + OpBranch %170 + %170 = OpLabel + %171 = OpLoad %6 %165 + %172 = OpSLessThan %59 %171 %58 + OpBranchConditional %172 %167 %168 + %167 = OpLabel + OpStore %173 %9 + OpBranch %174 + %174 = OpLabel + OpLoopMerge %176 %177 None + OpBranch %178 + %178 = OpLabel + %179 = OpLoad %6 %173 + %180 = OpSLessThan %59 %179 %58 + OpBranchConditional %180 %175 %176 + %175 = OpLabel + OpStore %181 %9 + OpBranch %182 + %182 = OpLabel + OpLoopMerge %184 %185 None + OpBranch %186 + %186 = OpLabel + %187 = OpLoad %6 %181 + %188 = OpSLessThan %59 %187 %58 + OpBranchConditional %188 %183 %184 + %183 = OpLabel + OpStore %189 %9 + OpBranch %190 + %190 = OpLabel + OpLoopMerge %192 %193 None + OpBranch %194 + %194 = OpLabel + %195 = OpLoad %6 %189 + %196 = OpSLessThan %59 %195 %58 + OpBranchConditional %196 %191 %192 + %191 = OpLabel + OpStore %197 %9 + OpBranch %198 + %198 = OpLabel + OpLoopMerge %200 %201 None + OpBranch %202 + %202 = OpLabel + %203 = OpLoad %6 %197 + %204 = OpSLessThan %59 %203 %58 + OpBranchConditional %204 %199 %200 + %199 = OpLabel + OpStore %205 %9 + OpBranch %206 + %206 = OpLabel + OpLoopMerge %208 %209 None + OpBranch %210 + %210 = OpLabel + %211 = OpLoad %6 %205 + %212 = OpSLessThan %59 %211 %58 + OpBranchConditional %212 %207 %208 + %207 = OpLabel + OpStore %213 %9 + OpBranch %214 + %214 = OpLabel + OpLoopMerge %216 %217 None + OpBranch %218 + %218 = OpLabel + %219 = OpLoad %6 %213 + %220 = OpSLessThan %59 %219 %58 + OpBranchConditional %220 %215 %216 + %215 = OpLabel + OpStore %221 %9 + OpBranch %222 + %222 = OpLabel + OpLoopMerge %224 %225 None + OpBranch %226 + %226 = OpLabel + %227 = OpLoad %6 %221 + %228 = OpSLessThan %59 %227 %58 + OpBranchConditional %228 %223 %224 + %223 = OpLabel + OpStore %229 %9 + OpBranch %230 + %230 = OpLabel + OpLoopMerge %232 %233 None + OpBranch %234 + %234 = OpLabel + %235 = OpLoad %6 %229 + %236 = OpSLessThan %59 %235 %58 + OpBranchConditional %236 %231 %232 + %231 = OpLabel + OpStore %237 %9 + OpBranch %238 + %238 = OpLabel + OpLoopMerge %240 %241 None + OpBranch %242 + %242 = OpLabel + %243 = OpLoad %6 %237 + %244 = OpSLessThan %59 %243 %58 + OpBranchConditional %244 %239 %240 + %239 = OpLabel + OpStore %245 %9 + OpBranch %246 + %246 = OpLabel + OpLoopMerge %248 %249 None + OpBranch %250 + %250 = OpLabel + %251 = OpLoad %6 %245 + %252 = OpSLessThan %59 %251 %58 + OpBranchConditional %252 %247 %248 + %247 = OpLabel + OpStore %253 %9 + OpBranch %254 + %254 = OpLabel + OpLoopMerge %256 %257 None + OpBranch %258 + %258 = OpLabel + %259 = OpLoad %6 %253 + %260 = OpSLessThan %59 %259 %58 + OpBranchConditional %260 %255 %256 + %255 = OpLabel + OpStore %261 %9 + OpBranch %262 + %262 = OpLabel + OpLoopMerge %264 %265 None + OpBranch %266 + %266 = OpLabel + %267 = OpLoad %6 %261 + %268 = OpSLessThan %59 %267 %58 + OpBranchConditional %268 %263 %264 + %263 = OpLabel + OpStore %269 %9 + OpBranch %270 + %270 = OpLabel + OpLoopMerge %272 %273 None + OpBranch %274 + %274 = OpLabel + %275 = OpLoad %6 %269 + %276 = OpSLessThan %59 %275 %58 + OpBranchConditional %276 %271 %272 + %271 = OpLabel + OpStore %277 %9 + OpBranch %278 + %278 = OpLabel + OpLoopMerge %280 %281 None + OpBranch %282 + %282 = OpLabel + %283 = OpLoad %6 %277 + %284 = OpSLessThan %59 %283 %58 + OpBranchConditional %284 %279 %280 + %279 = OpLabel + OpStore %285 %9 + OpBranch %286 + %286 = OpLabel + OpLoopMerge %288 %289 None + OpBranch %290 + %290 = OpLabel + %291 = OpLoad %6 %285 + %292 = OpSLessThan %59 %291 %58 + OpBranchConditional %292 %287 %288 + %287 = OpLabel + OpStore %293 %9 + OpBranch %294 + %294 = OpLabel + OpLoopMerge %296 %297 None + OpBranch %298 + %298 = OpLabel + %299 = OpLoad %6 %293 + %300 = OpSLessThan %59 %299 %58 + OpBranchConditional %300 %295 %296 + %295 = OpLabel + OpStore %301 %9 + OpBranch %302 + %302 = OpLabel + OpLoopMerge %304 %305 None + OpBranch %306 + %306 = OpLabel + %307 = OpLoad %6 %301 + %308 = OpSLessThan %59 %307 %58 + OpBranchConditional %308 %303 %304 + %303 = OpLabel + OpStore %309 %9 + OpBranch %310 + %310 = OpLabel + OpLoopMerge %312 %313 None + OpBranch %314 + %314 = OpLabel + %315 = OpLoad %6 %309 + %316 = OpSLessThan %59 %315 %58 + OpBranchConditional %316 %311 %312 + %311 = OpLabel + OpStore %317 %9 + OpBranch %318 + %318 = OpLabel + OpLoopMerge %320 %321 None + OpBranch %322 + %322 = OpLabel + %323 = OpLoad %6 %317 + %324 = OpSLessThan %59 %323 %58 + OpBranchConditional %324 %319 %320 + %319 = OpLabel + OpStore %325 %9 + OpBranch %326 + %326 = OpLabel + OpLoopMerge %328 %329 None + OpBranch %330 + %330 = OpLabel + %331 = OpLoad %6 %325 + %332 = OpSLessThan %59 %331 %58 + OpBranchConditional %332 %327 %328 + %327 = OpLabel + OpStore %333 %9 + OpBranch %334 + %334 = OpLabel + OpLoopMerge %336 %337 None + OpBranch %338 + %338 = OpLabel + %339 = OpLoad %6 %333 + %340 = OpSLessThan %59 %339 %58 + OpBranchConditional %340 %335 %336 + %335 = OpLabel + OpStore %341 %9 + OpBranch %342 + %342 = OpLabel + OpLoopMerge %344 %345 None + OpBranch %346 + %346 = OpLabel + %347 = OpLoad %6 %341 + %348 = OpSLessThan %59 %347 %58 + OpBranchConditional %348 %343 %344 + %343 = OpLabel + OpStore %349 %9 + OpBranch %350 + %350 = OpLabel + OpLoopMerge %352 %353 None + OpBranch %354 + %354 = OpLabel + %355 = OpLoad %6 %349 + %356 = OpSLessThan %59 %355 %58 + OpBranchConditional %356 %351 %352 + %351 = OpLabel + OpBranch %357 + %357 = OpLabel + OpLoopMerge %359 %360 None + OpBranch %358 + %358 = OpLabel + %361 = OpLoad %6 %8 + %362 = OpIAdd %6 %361 %58 + OpStore %8 %362 + OpBranch %360 + %360 = OpLabel + %363 = OpLoad %6 %8 + %365 = OpSLessThan %59 %363 %364 + OpBranchConditional %365 %357 %359 + %359 = OpLabel + %366 = OpLoad %6 %349 + %367 = OpLoad %6 %349 + %370 = OpAccessChain %369 %14 %366 %367 + OpStore %370 %368 + %371 = OpLoad %6 %349 + %372 = OpLoad %6 %349 + %373 = OpAccessChain %369 %21 %371 %372 + OpStore %373 %368 + %374 = OpLoad %6 %349 + %375 = OpLoad %6 %349 + %376 = OpAccessChain %369 %27 %374 %375 + OpStore %376 %368 + %377 = OpLoad %6 %349 + %378 = OpLoad %6 %349 + %379 = OpAccessChain %369 %32 %377 %378 + OpStore %379 %368 + %380 = OpLoad %6 %349 + %381 = OpLoad %6 %349 + %382 = OpAccessChain %369 %36 %380 %381 + OpStore %382 %368 + %383 = OpLoad %6 %349 + %384 = OpLoad %6 %349 + %385 = OpAccessChain %369 %40 %383 %384 + OpStore %385 %368 + %386 = OpLoad %6 %349 + %387 = OpLoad %6 %349 + %388 = OpAccessChain %369 %44 %386 %387 + OpStore %388 %368 + %389 = OpLoad %6 %349 + %390 = OpLoad %6 %349 + %391 = OpAccessChain %369 %48 %389 %390 + OpStore %391 %368 + OpBranch %353 + %353 = OpLabel + %392 = OpLoad %6 %349 + %393 = OpIAdd %6 %392 %58 + OpStore %349 %393 + OpBranch %350 + %352 = OpLabel + OpBranch %345 + %345 = OpLabel + %394 = OpLoad %6 %341 + %395 = OpIAdd %6 %394 %58 + OpStore %341 %395 + OpBranch %342 + %344 = OpLabel + OpBranch %337 + %337 = OpLabel + %396 = OpLoad %6 %333 + %397 = OpIAdd %6 %396 %58 + OpStore %333 %397 + OpBranch %334 + %336 = OpLabel + OpBranch %329 + %329 = OpLabel + %398 = OpLoad %6 %325 + %399 = OpIAdd %6 %398 %58 + OpStore %325 %399 + OpBranch %326 + %328 = OpLabel + OpBranch %321 + %321 = OpLabel + %400 = OpLoad %6 %317 + %401 = OpIAdd %6 %400 %58 + OpStore %317 %401 + OpBranch %318 + %320 = OpLabel + OpBranch %313 + %313 = OpLabel + %402 = OpLoad %6 %309 + %403 = OpIAdd %6 %402 %58 + OpStore %309 %403 + OpBranch %310 + %312 = OpLabel + OpBranch %305 + %305 = OpLabel + %404 = OpLoad %6 %301 + %405 = OpIAdd %6 %404 %58 + OpStore %301 %405 + OpBranch %302 + %304 = OpLabel + OpBranch %297 + %297 = OpLabel + %406 = OpLoad %6 %293 + %407 = OpIAdd %6 %406 %58 + OpStore %293 %407 + OpBranch %294 + %296 = OpLabel + OpBranch %289 + %289 = OpLabel + %408 = OpLoad %6 %285 + %409 = OpIAdd %6 %408 %58 + OpStore %285 %409 + OpBranch %286 + %288 = OpLabel + OpBranch %281 + %281 = OpLabel + %410 = OpLoad %6 %277 + %411 = OpIAdd %6 %410 %58 + OpStore %277 %411 + OpBranch %278 + %280 = OpLabel + OpBranch %273 + %273 = OpLabel + %412 = OpLoad %6 %269 + %413 = OpIAdd %6 %412 %58 + OpStore %269 %413 + OpBranch %270 + %272 = OpLabel + OpBranch %265 + %265 = OpLabel + %414 = OpLoad %6 %261 + %415 = OpIAdd %6 %414 %58 + OpStore %261 %415 + OpBranch %262 + %264 = OpLabel + OpBranch %257 + %257 = OpLabel + %416 = OpLoad %6 %253 + %417 = OpIAdd %6 %416 %58 + OpStore %253 %417 + OpBranch %254 + %256 = OpLabel + OpBranch %249 + %249 = OpLabel + %418 = OpLoad %6 %245 + %419 = OpIAdd %6 %418 %58 + OpStore %245 %419 + OpBranch %246 + %248 = OpLabel + OpBranch %241 + %241 = OpLabel + %420 = OpLoad %6 %237 + %421 = OpIAdd %6 %420 %58 + OpStore %237 %421 + OpBranch %238 + %240 = OpLabel + OpBranch %233 + %233 = OpLabel + %422 = OpLoad %6 %229 + %423 = OpIAdd %6 %422 %58 + OpStore %229 %423 + OpBranch %230 + %232 = OpLabel + OpBranch %225 + %225 = OpLabel + %424 = OpLoad %6 %221 + %425 = OpIAdd %6 %424 %58 + OpStore %221 %425 + OpBranch %222 + %224 = OpLabel + OpBranch %217 + %217 = OpLabel + %426 = OpLoad %6 %213 + %427 = OpIAdd %6 %426 %58 + OpStore %213 %427 + OpBranch %214 + %216 = OpLabel + OpBranch %209 + %209 = OpLabel + %428 = OpLoad %6 %205 + %429 = OpIAdd %6 %428 %58 + OpStore %205 %429 + OpBranch %206 + %208 = OpLabel + OpBranch %201 + %201 = OpLabel + %430 = OpLoad %6 %197 + %431 = OpIAdd %6 %430 %58 + OpStore %197 %431 + OpBranch %198 + %200 = OpLabel + OpBranch %193 + %193 = OpLabel + %432 = OpLoad %6 %189 + %433 = OpIAdd %6 %432 %58 + OpStore %189 %433 + OpBranch %190 + %192 = OpLabel + OpBranch %185 + %185 = OpLabel + %434 = OpLoad %6 %181 + %435 = OpIAdd %6 %434 %58 + OpStore %181 %435 + OpBranch %182 + %184 = OpLabel + OpBranch %177 + %177 = OpLabel + %436 = OpLoad %6 %173 + %437 = OpIAdd %6 %436 %58 + OpStore %173 %437 + OpBranch %174 + %176 = OpLabel + OpBranch %169 + %169 = OpLabel + %438 = OpLoad %6 %165 + %439 = OpIAdd %6 %438 %58 + OpStore %165 %439 + OpBranch %166 + %168 = OpLabel + OpBranch %161 + %161 = OpLabel + %440 = OpLoad %6 %157 + %441 = OpIAdd %6 %440 %58 + OpStore %157 %441 + OpBranch %158 + %160 = OpLabel + OpBranch %153 + %153 = OpLabel + %442 = OpLoad %6 %149 + %443 = OpIAdd %6 %442 %58 + OpStore %149 %443 + OpBranch %150 + %152 = OpLabel + OpBranch %145 + %145 = OpLabel + %444 = OpLoad %6 %141 + %445 = OpIAdd %6 %444 %58 + OpStore %141 %445 + OpBranch %142 + %144 = OpLabel + OpBranch %137 + %137 = OpLabel + %446 = OpLoad %6 %133 + %447 = OpIAdd %6 %446 %58 + OpStore %133 %447 + OpBranch %134 + %136 = OpLabel + OpBranch %129 + %129 = OpLabel + %448 = OpLoad %6 %125 + %449 = OpIAdd %6 %448 %58 + OpStore %125 %449 + OpBranch %126 + %128 = OpLabel + OpBranch %121 + %121 = OpLabel + %450 = OpLoad %6 %117 + %451 = OpIAdd %6 %450 %58 + OpStore %117 %451 + OpBranch %118 + %120 = OpLabel + OpBranch %113 + %113 = OpLabel + %452 = OpLoad %6 %109 + %453 = OpIAdd %6 %452 %58 + OpStore %109 %453 + OpBranch %110 + %112 = OpLabel + OpBranch %105 + %105 = OpLabel + %454 = OpLoad %6 %101 + %455 = OpIAdd %6 %454 %58 + OpStore %101 %455 + OpBranch %102 + %104 = OpLabel + OpBranch %97 + %97 = OpLabel + %456 = OpLoad %6 %93 + %457 = OpIAdd %6 %456 %58 + OpStore %93 %457 + OpBranch %94 + %96 = OpLabel + OpBranch %89 + %89 = OpLabel + %458 = OpLoad %6 %85 + %459 = OpIAdd %6 %458 %58 + OpStore %85 %459 + OpBranch %86 + %88 = OpLabel + OpBranch %81 + %81 = OpLabel + %460 = OpLoad %6 %77 + %461 = OpIAdd %6 %460 %58 + OpStore %77 %461 + OpBranch %78 + %80 = OpLabel + OpBranch %73 + %73 = OpLabel + %462 = OpLoad %6 %69 + %463 = OpIAdd %6 %462 %58 + OpStore %69 %463 + OpBranch %70 + %72 = OpLabel + OpBranch %65 + %65 = OpLabel + %464 = OpLoad %6 %61 + %465 = OpIAdd %6 %464 %58 + OpStore %61 %465 + OpBranch %62 + %64 = OpLabel + OpBranch %55 + %55 = OpLabel + %466 = OpLoad %6 %51 + %467 = OpIAdd %6 %466 %58 + OpStore %51 %467 + OpBranch %52 + %54 = OpLabel + OpStore %468 %15 + OpStore %469 %9 + OpBranch %470 + %470 = OpLabel + OpLoopMerge %472 %473 None + OpBranch %474 + %474 = OpLabel + %475 = OpLoad %6 %8 + %477 = OpSLessThan %59 %475 %476 + OpBranchConditional %477 %471 %472 + %471 = OpLabel + %478 = OpLoad %6 %8 + %479 = OpIAdd %6 %478 %58 + OpStore %8 %479 + %480 = OpLoad %6 %469 + %481 = OpAccessChain %369 %14 %9 %480 + %482 = OpLoad %10 %481 + %483 = OpLoad %10 %468 + %484 = OpFAdd %10 %483 %482 + OpStore %468 %484 + %485 = OpLoad %6 %469 + %486 = OpAccessChain %369 %21 %9 %485 + %487 = OpLoad %10 %486 + %488 = OpLoad %10 %468 + %489 = OpFAdd %10 %488 %487 + OpStore %468 %489 + %490 = OpLoad %6 %469 + %491 = OpAccessChain %369 %27 %9 %490 + %492 = OpLoad %10 %491 + %493 = OpLoad %10 %468 + %494 = OpFAdd %10 %493 %492 + OpStore %468 %494 + %495 = OpLoad %6 %469 + %496 = OpAccessChain %369 %32 %9 %495 + %497 = OpLoad %10 %496 + %498 = OpLoad %10 %468 + %499 = OpFAdd %10 %498 %497 + OpStore %468 %499 + %500 = OpLoad %6 %469 + %501 = OpAccessChain %369 %36 %9 %500 + %502 = OpLoad %10 %501 + %503 = OpLoad %10 %468 + %504 = OpFAdd %10 %503 %502 + OpStore %468 %504 + %505 = OpLoad %6 %469 + %506 = OpAccessChain %369 %40 %9 %505 + %507 = OpLoad %10 %506 + %508 = OpLoad %10 %468 + %509 = OpFAdd %10 %508 %507 + OpStore %468 %509 + %510 = OpLoad %6 %469 + %511 = OpAccessChain %369 %44 %9 %510 + %512 = OpLoad %10 %511 + %513 = OpLoad %10 %468 + %514 = OpFAdd %10 %513 %512 + OpStore %468 %514 + %515 = OpLoad %6 %469 + %516 = OpAccessChain %369 %48 %9 %515 + %517 = OpLoad %10 %516 + %518 = OpLoad %10 %468 + %519 = OpFAdd %10 %518 %517 + OpStore %468 %519 + OpBranch %473 + %473 = OpLabel + %520 = OpLoad %6 %469 + %521 = OpIAdd %6 %520 %58 + OpStore %469 %521 + OpBranch %470 + %472 = OpLabel + %522 = OpLoad %10 %468 + %524 = OpFOrdEqual %59 %522 %523 + OpSelectionMerge %526 None + OpBranchConditional %524 %525 %530 + %525 = OpLabel + OpStore %528 %529 + OpBranch %526 + %530 = OpLabel + OpStore %528 %22 + OpBranch %526 + %526 = OpLabel + OpReturn + OpFunctionEnd +END + + +BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM + +PIPELINE graphics variant_pipeline + ATTACH variant_vertex_shader + ATTACH variant_fragment_shader + FRAMEBUFFER_SIZE 256 256 + BIND BUFFER variant_framebuffer AS color LOCATION 0 +END +CLEAR_COLOR variant_pipeline 0 0 0 255 + +CLEAR variant_pipeline +RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 256 256 + +EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255 diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-return-partly-undefined-vector-from-array.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-return-partly-undefined-vector-from-array.amber new file mode 100644 index 0000000..0d03e12 --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-return-partly-undefined-vector-from-array.amber @@ -0,0 +1,224 @@ +#!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 _float_5_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_float_values: [5.0, 1.0] +# layout(set = 0, binding = 0) uniform buf0 +# { +# float _GLF_uniform_float_values[2]; +# }; +# +# // Contents of _GLF_uniform_int_values: [1, 0] +# layout(set = 0, binding = 1) uniform buf1 +# { +# int _GLF_uniform_int_values[2]; +# }; +# +# layout(location = 0) out vec4 _GLF_color; +# +# vec2 func() +# { +# vec2 v; +# v.y = _float_5_0; +# int a = 2; +# return vec2[3](vec2(_float_1_0), vec2(_float_1_0), v)[a]; +# } +# +# void main() +# { +# if(func().y == _float_5_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: 82 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %58 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 320 + OpName %4 "main" + OpName %9 "func(" + OpName %12 "v" + OpName %16 "buf0" + OpMemberName %16 0 "_GLF_uniform_float_values" + OpName %18 "" + OpName %28 "a" + OpName %43 "indexable" + OpName %58 "_GLF_color" + OpName %60 "buf1" + OpMemberName %60 0 "_GLF_uniform_int_values" + OpName %62 "" + OpDecorate %15 ArrayStride 16 + OpMemberDecorate %16 0 Offset 0 + OpDecorate %16 Block + OpDecorate %18 DescriptorSet 0 + OpDecorate %18 Binding 0 + OpDecorate %58 Location 0 + OpDecorate %59 ArrayStride 16 + OpMemberDecorate %60 0 Offset 0 + OpDecorate %60 Block + OpDecorate %62 DescriptorSet 0 + OpDecorate %62 Binding 1 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeFloat 32 + %7 = OpTypeVector %6 2 + %8 = OpTypeFunction %7 + %11 = OpTypePointer Function %7 + %13 = OpTypeInt 32 0 + %14 = OpConstant %13 2 + %15 = OpTypeArray %6 %14 + %16 = OpTypeStruct %15 + %17 = OpTypePointer Uniform %16 + %18 = OpVariable %17 Uniform + %19 = OpTypeInt 32 1 + %20 = OpConstant %19 0 + %21 = OpTypePointer Uniform %6 + %24 = OpConstant %13 1 + %25 = OpTypePointer Function %6 + %27 = OpTypePointer Function %19 + %29 = OpConstant %19 2 + %30 = OpConstant %19 1 + %38 = OpConstant %13 3 + %39 = OpTypeArray %7 %38 + %42 = OpTypePointer Function %39 + %52 = OpTypeBool + %56 = OpTypeVector %6 4 + %57 = OpTypePointer Output %56 + %58 = OpVariable %57 Output + %59 = OpTypeArray %19 %14 + %60 = OpTypeStruct %59 + %61 = OpTypePointer Uniform %60 + %62 = OpVariable %61 Uniform + %63 = OpTypePointer Uniform %19 + %4 = OpFunction %2 None %3 + %5 = OpLabel + %48 = OpFunctionCall %7 %9 + %49 = OpCompositeExtract %6 %48 1 + %50 = OpAccessChain %21 %18 %20 %20 + %51 = OpLoad %6 %50 + %53 = OpFOrdEqual %52 %49 %51 + OpSelectionMerge %55 None + OpBranchConditional %53 %54 %77 + %54 = OpLabel + %64 = OpAccessChain %63 %62 %20 %20 + %65 = OpLoad %19 %64 + %66 = OpConvertSToF %6 %65 + %67 = OpAccessChain %63 %62 %20 %30 + %68 = OpLoad %19 %67 + %69 = OpConvertSToF %6 %68 + %70 = OpAccessChain %63 %62 %20 %30 + %71 = OpLoad %19 %70 + %72 = OpConvertSToF %6 %71 + %73 = OpAccessChain %63 %62 %20 %20 + %74 = OpLoad %19 %73 + %75 = OpConvertSToF %6 %74 + %76 = OpCompositeConstruct %56 %66 %69 %72 %75 + OpStore %58 %76 + OpBranch %55 + %77 = OpLabel + %78 = OpAccessChain %63 %62 %20 %30 + %79 = OpLoad %19 %78 + %80 = OpConvertSToF %6 %79 + %81 = OpCompositeConstruct %56 %80 %80 %80 %80 + OpStore %58 %81 + OpBranch %55 + %55 = OpLabel + OpReturn + OpFunctionEnd + %9 = OpFunction %7 None %8 + %10 = OpLabel + %12 = OpVariable %11 Function + %28 = OpVariable %27 Function + %43 = OpVariable %42 Function + %22 = OpAccessChain %21 %18 %20 %20 + %23 = OpLoad %6 %22 + %26 = OpAccessChain %25 %12 %24 + OpStore %26 %23 + OpStore %28 %29 + %31 = OpAccessChain %21 %18 %20 %30 + %32 = OpLoad %6 %31 + %33 = OpCompositeConstruct %7 %32 %32 + %34 = OpAccessChain %21 %18 %20 %30 + %35 = OpLoad %6 %34 + %36 = OpCompositeConstruct %7 %35 %35 + %37 = OpLoad %7 %12 + %40 = OpCompositeConstruct %39 %33 %36 %37 + %41 = OpLoad %19 %28 + OpStore %43 %40 + %44 = OpAccessChain %11 %43 %41 + %45 = OpLoad %7 %44 + OpReturnValue %45 + OpFunctionEnd +END + +# uniforms for variant + +# _GLF_uniform_int_values +BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA + 1 0 +END +# _GLF_uniform_float_values +BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA + 5.0 1.0 +END + +BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM + +PIPELINE graphics variant_pipeline + ATTACH variant_vertex_shader + ATTACH variant_fragment_shader + FRAMEBUFFER_SIZE 256 256 + BIND BUFFER variant_framebuffer AS color LOCATION 0 + BIND BUFFER variant__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 1 + BIND BUFFER variant__GLF_uniform_float_values AS uniform DESCRIPTOR_SET 0 BINDING 0 +END +CLEAR_COLOR variant_pipeline 0 0 0 255 + +CLEAR variant_pipeline +RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 256 256 + +EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255 diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-sum-uniform-vector-components-round.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-sum-uniform-vector-components-round.amber new file mode 100644 index 0000000..f66a247 --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-sum-uniform-vector-components-round.amber @@ -0,0 +1,225 @@ +#!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_1540_7 _GLF_uniform_float_values[0] +# #define _float_2_0 _GLF_uniform_float_values[1] +# #define _float_3_0 _GLF_uniform_float_values[2] +# +# precision highp float; +# precision highp int; +# +# // Contents of _GLF_uniform_int_values: [1, 0] +# layout(set = 0, binding = 0) uniform buf0 +# { +# int _GLF_uniform_int_values[2]; +# }; +# +# // Contents of _GLF_uniform_float_values: [1540.7, 2.0, 3.0] +# layout(set = 0, binding = 1) uniform buf1 +# { +# float _GLF_uniform_float_values[3]; +# }; +# +# // Contents of resolution: [256.6, 256.5] +# layout(set = 0, binding = 2) uniform buf2 +# { +# vec2 resolution; +# }; +# +# layout(location = 0) out vec4 _GLF_color; +# +# void main() +# { +# float f = _float_2_0 * resolution.x + _float_3_0 * round(resolution.x) + resolution.y; +# +# // Always true. +# if(f == _float_1540_7) +# { +# _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" %50 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 320 + OpName %4 "main" + OpName %8 "f" + OpName %12 "buf1" + OpMemberName %12 0 "_GLF_uniform_float_values" + OpName %14 "" + OpName %22 "buf2" + OpMemberName %22 0 "resolution" + OpName %24 "" + OpName %50 "_GLF_color" + OpName %53 "buf0" + OpMemberName %53 0 "_GLF_uniform_int_values" + OpName %55 "" + OpDecorate %11 ArrayStride 16 + OpMemberDecorate %12 0 Offset 0 + OpDecorate %12 Block + OpDecorate %14 DescriptorSet 0 + OpDecorate %14 Binding 1 + OpMemberDecorate %22 0 Offset 0 + OpDecorate %22 Block + OpDecorate %24 DescriptorSet 0 + OpDecorate %24 Binding 2 + OpDecorate %50 Location 0 + OpDecorate %52 ArrayStride 16 + OpMemberDecorate %53 0 Offset 0 + OpDecorate %53 Block + OpDecorate %55 DescriptorSet 0 + OpDecorate %55 Binding 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeFloat 32 + %7 = 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 = OpConstant %15 1 + %18 = OpTypePointer Uniform %6 + %21 = OpTypeVector %6 2 + %22 = OpTypeStruct %21 + %23 = OpTypePointer Uniform %22 + %24 = OpVariable %23 Uniform + %25 = OpConstant %9 0 + %29 = OpConstant %15 2 + %37 = OpConstant %9 1 + %44 = OpTypeBool + %48 = OpTypeVector %6 4 + %49 = OpTypePointer Output %48 + %50 = OpVariable %49 Output + %51 = OpConstant %9 2 + %52 = OpTypeArray %15 %51 + %53 = OpTypeStruct %52 + %54 = OpTypePointer Uniform %53 + %55 = OpVariable %54 Uniform + %56 = OpTypePointer Uniform %15 + %4 = OpFunction %2 None %3 + %5 = OpLabel + %8 = OpVariable %7 Function + %19 = OpAccessChain %18 %14 %16 %17 + %20 = OpLoad %6 %19 + %26 = OpAccessChain %18 %24 %16 %25 + %27 = OpLoad %6 %26 + %28 = OpFMul %6 %20 %27 + %30 = OpAccessChain %18 %14 %16 %29 + %31 = OpLoad %6 %30 + %32 = OpAccessChain %18 %24 %16 %25 + %33 = OpLoad %6 %32 + %34 = OpExtInst %6 %1 Round %33 + %35 = OpFMul %6 %31 %34 + %36 = OpFAdd %6 %28 %35 + %38 = OpAccessChain %18 %24 %16 %37 + %39 = OpLoad %6 %38 + %40 = OpFAdd %6 %36 %39 + OpStore %8 %40 + %41 = OpLoad %6 %8 + %42 = OpAccessChain %18 %14 %16 %16 + %43 = OpLoad %6 %42 + %45 = OpFOrdEqual %44 %41 %43 + OpSelectionMerge %47 None + OpBranchConditional %45 %46 %70 + %46 = OpLabel + %57 = OpAccessChain %56 %55 %16 %16 + %58 = OpLoad %15 %57 + %59 = OpConvertSToF %6 %58 + %60 = OpAccessChain %56 %55 %16 %17 + %61 = OpLoad %15 %60 + %62 = OpConvertSToF %6 %61 + %63 = OpAccessChain %56 %55 %16 %17 + %64 = OpLoad %15 %63 + %65 = OpConvertSToF %6 %64 + %66 = OpAccessChain %56 %55 %16 %16 + %67 = OpLoad %15 %66 + %68 = OpConvertSToF %6 %67 + %69 = OpCompositeConstruct %48 %59 %62 %65 %68 + OpStore %50 %69 + OpBranch %47 + %70 = OpLabel + %71 = OpAccessChain %56 %55 %16 %17 + %72 = OpLoad %15 %71 + %73 = OpConvertSToF %6 %72 + %74 = OpCompositeConstruct %48 %73 %73 %73 %73 + OpStore %50 %74 + OpBranch %47 + %47 = OpLabel + OpReturn + OpFunctionEnd +END + +# uniforms for variant + +# resolution +BUFFER variant_resolution DATA_TYPE vec2 STD140 DATA + 256.6 256.5 +END +# _GLF_uniform_float_values +BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA + 1540.7 2.0 3.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_resolution 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-unpack-unorm-mix-always-one.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-unpack-unorm-mix-always-one.amber new file mode 100644 index 0000000..af9f19b --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-unpack-unorm-mix-always-one.amber @@ -0,0 +1,238 @@ +#!amber + +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# A test for a coverage-gap found by the GraphicsFuzz project. + +# Short description: A fragment shader that covers specific NIR code paths + +# The test passes because the shader always writes red. + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 320 es +# #define _int_0 _GLF_uniform_int_values[0] +# #define _int_1 _GLF_uniform_int_values[1] +# #define _uint_1 _GLF_uniform_uint_values[0] +# #define _float_0_01 _GLF_uniform_float_values[0] +# #define _float_1_0 _GLF_uniform_float_values[1] +# #define _float_255_0 _GLF_uniform_float_values[2] +# +# precision highp int; +# precision highp float; +# +# // Contents of _GLF_uniform_uint_values: 1 +# layout(set = 0, binding = 0) uniform buf0 +# { +# uint _GLF_uniform_uint_values[1]; +# }; +# +# // Contents of _GLF_uniform_int_values: [0, 1] +# layout(set = 0, binding = 1) uniform buf1 +# { +# int _GLF_uniform_int_values[2]; +# }; +# +# // Contents of _GLF_uniform_float_values: [0.01, 1.0, 255.0] +# layout(set = 0, binding = 2) uniform buf2 +# { +# float _GLF_uniform_float_values[3]; +# }; +# +# layout(location = 0) out vec4 _GLF_color; +# +# void main() +# { +# // Mix always chooses 1. Unpack results in (0, 0, 0, 1/255). +# vec4 v = unpackUnorm4x8(_uint_1 / mix(_uint_1, 92382u, true)); +# +# // Always true. +# if (distance(v, vec4(_int_0, _int_0, _int_0, _float_1_0 / _float_255_0)) < _float_0_01) +# { +# _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1); +# } +# else +# { +# _GLF_color = vec4(_int_0); +# } +# } +SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0 +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 10 +; Bound: 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 %9 "v" + OpName %13 "buf0" + OpMemberName %13 0 "_GLF_uniform_uint_values" + OpName %15 "" + OpName %32 "buf1" + OpMemberName %32 0 "_GLF_uniform_int_values" + OpName %34 "" + OpName %47 "buf2" + OpMemberName %47 0 "_GLF_uniform_float_values" + OpName %49 "" + OpName %66 "_GLF_color" + OpDecorate %12 ArrayStride 16 + OpMemberDecorate %13 0 Offset 0 + OpDecorate %13 Block + OpDecorate %15 DescriptorSet 0 + OpDecorate %15 Binding 0 + OpDecorate %31 ArrayStride 16 + OpMemberDecorate %32 0 Offset 0 + OpDecorate %32 Block + OpDecorate %34 DescriptorSet 0 + OpDecorate %34 Binding 1 + OpDecorate %46 ArrayStride 16 + OpMemberDecorate %47 0 Offset 0 + OpDecorate %47 Block + OpDecorate %49 DescriptorSet 0 + OpDecorate %49 Binding 2 + OpDecorate %66 Location 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeFloat 32 + %7 = OpTypeVector %6 4 + %8 = OpTypePointer Function %7 + %10 = OpTypeInt 32 0 + %11 = OpConstant %10 1 + %12 = OpTypeArray %10 %11 + %13 = OpTypeStruct %12 + %14 = OpTypePointer Uniform %13 + %15 = OpVariable %14 Uniform + %16 = OpTypeInt 32 1 + %17 = OpConstant %16 0 + %18 = OpTypePointer Uniform %10 + %23 = OpConstant %10 92382 + %24 = OpTypeBool + %25 = OpConstantTrue %24 + %30 = OpConstant %10 2 + %31 = OpTypeArray %16 %30 + %32 = OpTypeStruct %31 + %33 = OpTypePointer Uniform %32 + %34 = OpVariable %33 Uniform + %35 = OpTypePointer Uniform %16 + %45 = OpConstant %10 3 + %46 = OpTypeArray %6 %45 + %47 = OpTypeStruct %46 + %48 = OpTypePointer Uniform %47 + %49 = OpVariable %48 Uniform + %50 = OpConstant %16 1 + %51 = OpTypePointer Uniform %6 + %54 = OpConstant %16 2 + %65 = OpTypePointer Output %7 + %66 = OpVariable %65 Output + %4 = OpFunction %2 None %3 + %5 = OpLabel + %9 = OpVariable %8 Function + %19 = OpAccessChain %18 %15 %17 %17 + %20 = OpLoad %10 %19 + %21 = OpAccessChain %18 %15 %17 %17 + %22 = OpLoad %10 %21 + %26 = OpSelect %10 %25 %23 %22 + %27 = OpUDiv %10 %20 %26 + %28 = OpExtInst %7 %1 UnpackUnorm4x8 %27 + OpStore %9 %28 + %29 = OpLoad %7 %9 + %36 = OpAccessChain %35 %34 %17 %17 + %37 = OpLoad %16 %36 + %38 = OpConvertSToF %6 %37 + %39 = OpAccessChain %35 %34 %17 %17 + %40 = OpLoad %16 %39 + %41 = OpConvertSToF %6 %40 + %42 = OpAccessChain %35 %34 %17 %17 + %43 = OpLoad %16 %42 + %44 = OpConvertSToF %6 %43 + %52 = OpAccessChain %51 %49 %17 %50 + %53 = OpLoad %6 %52 + %55 = OpAccessChain %51 %49 %17 %54 + %56 = OpLoad %6 %55 + %57 = OpFDiv %6 %53 %56 + %58 = OpCompositeConstruct %7 %38 %41 %44 %57 + %59 = OpExtInst %6 %1 Distance %29 %58 + %60 = OpAccessChain %51 %49 %17 %17 + %61 = OpLoad %6 %60 + %62 = OpFOrdLessThan %24 %59 %61 + OpSelectionMerge %64 None + OpBranchConditional %62 %63 %80 + %63 = OpLabel + %67 = OpAccessChain %35 %34 %17 %50 + %68 = OpLoad %16 %67 + %69 = OpConvertSToF %6 %68 + %70 = OpAccessChain %35 %34 %17 %17 + %71 = OpLoad %16 %70 + %72 = OpConvertSToF %6 %71 + %73 = OpAccessChain %35 %34 %17 %17 + %74 = OpLoad %16 %73 + %75 = OpConvertSToF %6 %74 + %76 = OpAccessChain %35 %34 %17 %50 + %77 = OpLoad %16 %76 + %78 = OpConvertSToF %6 %77 + %79 = OpCompositeConstruct %7 %69 %72 %75 %78 + OpStore %66 %79 + OpBranch %64 + %80 = OpLabel + %81 = OpAccessChain %35 %34 %17 %17 + %82 = OpLoad %16 %81 + %83 = OpConvertSToF %6 %82 + %84 = OpCompositeConstruct %7 %83 %83 %83 %83 + OpStore %66 %84 + OpBranch %64 + %64 = OpLabel + OpReturn + OpFunctionEnd +END + +# uniforms for variant + +# _GLF_uniform_float_values +BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA + 0.01 1.0 255.0 +END +# _GLF_uniform_int_values +BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA + 0 1 +END +# _GLF_uniform_uint_values +BUFFER variant__GLF_uniform_uint_values DATA_TYPE int32[] STD140 DATA + 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_float_values AS uniform DESCRIPTOR_SET 0 BINDING 2 + BIND BUFFER variant__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 1 + BIND BUFFER variant__GLF_uniform_uint_values AS uniform DESCRIPTOR_SET 0 BINDING 0 +END +CLEAR_COLOR variant_pipeline 0 0 0 255 + +CLEAR variant_pipeline +RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 256 256 + +EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255 diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-write-past-matrix-elements-unused.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-write-past-matrix-elements-unused.amber new file mode 100644 index 0000000..4c943c8 --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-write-past-matrix-elements-unused.amber @@ -0,0 +1,249 @@ +#!amber + +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# A test for a coverage-gap found by the GraphicsFuzz project. + +# Short description: A fragment shader that covers specific NIR code paths + +# The test passes because the shader always writes red. + +# Optimized using spirv-opt with the following arguments: +# '--reduce-load-size' +# '--if-conversion' +# '--if-conversion' +# '--combine-access-chains' +# '--eliminate-dead-branches' +# '--merge-return' +# '--eliminate-dead-branches' +# '--merge-blocks' +# '--if-conversion' +# '--eliminate-local-single-store' +# '--redundancy-elimination' +# '--private-to-local' +# '--combine-access-chains' +# '--ccp' +# '--eliminate-local-multi-store' +# '--if-conversion' +# '--convert-local-access-chains' +# '--combine-access-chains' +# '--reduce-load-size' +# '--ccp' +# '--eliminate-dead-inserts' +# '--simplify-instructions' +# '--eliminate-dead-code-aggressive' +# spirv-opt commit hash: a0370efd589be33d5d9a85cfde2f85841b3755af + + + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 320 es +# #define _int_0 _GLF_uniform_int_values[0] +# #define _int_1 _GLF_uniform_int_values[1] +# #define _int_2 _GLF_uniform_int_values[2] +# #define _float_1_0 _GLF_uniform_float_values[0] +# #define _float_0_0 _GLF_uniform_float_values[1] +# +# precision highp int; +# precision highp float; +# +# // Contents of _GLF_uniform_int_values: [0, 1, 2] +# layout(set = 0, binding = 0) uniform buf0 +# { +# int _GLF_uniform_int_values[3]; +# }; +# // Contents of _GLF_uniform_float_values: [1.0, 0.0] +# layout(set = 0, binding = 1) uniform buf1 +# { +# float _GLF_uniform_float_values[2]; +# }; +# +# layout(location = 0) out vec4 _GLF_color; +# +# void main() +# { +# mat3x2 m32 = mat3x2(_float_1_0); +# int a = 3; +# +# // Always false. +# if (_int_0 == 1) +# { +# // Indexing past the matrix elements, but this +# // code is never executed and the values are not +# // used for the final results. +# m32[a][_int_0] = _float_1_0; +# } +# +# float sums[3] = float[3](_float_1_0, _float_1_0, _float_1_0); +# +# for(int c = _int_0; c < _int_2; c ++) +# { +# // This value is still unused later. +# sums[_int_2] += m32[c][_int_0]; +# } +# +# // This only depends on the initialized constant values. +# _GLF_color = vec4(sums[_int_0], _float_0_0, _float_0_0, sums[_int_1]); +# } +SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0 +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 10 +; Bound: 105 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %89 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 320 + OpName %4 "main" + OpName %10 "m32" + OpName %14 "buf1" + OpMemberName %14 0 "_GLF_uniform_float_values" + OpName %16 "" + OpName %33 "buf0" + OpMemberName %33 0 "_GLF_uniform_int_values" + OpName %35 "" + OpName %53 "sums" + OpName %89 "_GLF_color" + OpDecorate %13 ArrayStride 16 + OpMemberDecorate %14 0 Offset 0 + OpDecorate %14 Block + OpDecorate %16 DescriptorSet 0 + OpDecorate %16 Binding 1 + OpDecorate %32 ArrayStride 16 + OpMemberDecorate %33 0 Offset 0 + OpDecorate %33 Block + OpDecorate %35 DescriptorSet 0 + OpDecorate %35 Binding 0 + OpDecorate %89 Location 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeFloat 32 + %7 = OpTypeVector %6 2 + %8 = OpTypeMatrix %7 3 + %9 = OpTypePointer Function %8 + %11 = OpTypeInt 32 0 + %12 = OpConstant %11 2 + %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 + %23 = OpConstant %6 0 + %30 = OpConstant %17 3 + %31 = OpConstant %11 3 + %32 = OpTypeArray %17 %31 + %33 = OpTypeStruct %32 + %34 = OpTypePointer Uniform %33 + %35 = OpVariable %34 Uniform + %36 = OpTypePointer Uniform %17 + %39 = OpConstant %17 1 + %40 = OpTypeBool + %49 = OpTypePointer Function %6 + %51 = OpTypeArray %6 %31 + %52 = OpTypePointer Function %51 + %70 = OpConstant %17 2 + %87 = OpTypeVector %6 4 + %88 = OpTypePointer Output %87 + %89 = OpVariable %88 Output + %103 = OpConstantComposite %7 %23 %23 + %4 = OpFunction %2 None %3 + %5 = OpLabel + %10 = OpVariable %9 Function + %53 = OpVariable %52 Function + %20 = OpAccessChain %19 %16 %18 %18 + %21 = OpLoad %6 %20 + %24 = OpCompositeConstruct %7 %21 %23 + %25 = OpCompositeConstruct %7 %23 %21 + %27 = OpCompositeConstruct %8 %24 %25 %103 + OpStore %10 %27 + %37 = OpAccessChain %36 %35 %18 %18 + %38 = OpLoad %17 %37 + %41 = OpIEqual %40 %38 %39 + OpSelectionMerge %43 None + OpBranchConditional %41 %42 %43 + %42 = OpLabel + %50 = OpAccessChain %49 %10 %30 %38 + OpStore %50 %21 + OpBranch %43 + %43 = OpLabel + %60 = OpCompositeConstruct %51 %21 %21 %21 + OpStore %53 %60 + OpBranch %64 + %64 = OpLabel + %104 = OpPhi %17 %38 %43 %86 %65 + %71 = OpAccessChain %36 %35 %18 %70 + %72 = OpLoad %17 %71 + %73 = OpSLessThan %40 %104 %72 + OpLoopMerge %66 %65 None + OpBranchConditional %73 %65 %66 + %65 = OpLabel + %79 = OpAccessChain %49 %10 %104 %38 + %80 = OpLoad %6 %79 + %81 = OpAccessChain %49 %53 %72 + %82 = OpLoad %6 %81 + %83 = OpFAdd %6 %82 %80 + OpStore %81 %83 + %86 = OpIAdd %17 %104 %39 + OpBranch %64 + %66 = OpLabel + %92 = OpAccessChain %49 %53 %38 + %93 = OpLoad %6 %92 + %94 = OpAccessChain %19 %16 %18 %39 + %95 = OpLoad %6 %94 + %98 = OpAccessChain %36 %35 %18 %39 + %99 = OpLoad %17 %98 + %100 = OpAccessChain %49 %53 %99 + %101 = OpLoad %6 %100 + %102 = OpCompositeConstruct %87 %93 %95 %95 %101 + OpStore %89 %102 + OpReturn + OpFunctionEnd +END + +# uniforms for variant + +# _GLF_uniform_float_values +BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA + 1.0 0.0 +END +# _GLF_uniform_int_values +BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA + 0 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_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/index.txt b/external/vulkancts/data/vulkan/amber/graphicsfuzz/index.txt index 751d9f0..5864431 100644 --- a/external/vulkancts/data/vulkan/amber/graphicsfuzz/index.txt +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/index.txt @@ -20,6 +20,7 @@ { "cosh-return-inf-unused.amber", "cosh-return-inf-unused", "Cosh returns inf for one component which is never used" }, { "cov-access-array-dot.amber", "cov-access-array-dot", "Covers instruction combine casting, combine shifting and DAG code paths" }, { "cov-analysis-reachable-from-many.amber", "cov-analysis-reachable-from-many", "A fragment shader that covers a specific LLVM analysis code path." }, +{ "cov-and-even-numbers-from-fragcoord.amber", "cov-and-even-numbers-from-fragcoord", "A fragment shader that covers specific NIR code paths" }, { "cov-apfloat-acos-ldexp.amber", "cov-apfloat-acos-ldexp", "A fragment shader that covers a specific AP float code path." }, { "cov-apfloat-determinant.amber", "cov-apfloat-determinant", "A fragment shader that covers a specific arbitrary precision float usage." }, { "cov-apfloat-mix-nan.amber", "cov-apfloat-mix-nan", "A fragment shader that covers a specific floating point code path" }, @@ -38,6 +39,7 @@ { "cov-bitfieldreverse-left-shift-findmsb.amber", "cov-bitfieldreverse-left-shift-findmsb", "Covers specific DAG combiner and legalize vector ops 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-clamp-vector-variable-negative-offset.amber", "cov-clamp-vector-variable-negative-offset", "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-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" }, @@ -73,6 +75,7 @@ { "cov-dag-combiner-same-cond-nested.amber", "cov-dag-combiner-same-cond-nested", "A fragment shader that covers a specific DAG combiner code path" }, { "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-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" }, { "cov-fold-bitwise-and-zero.amber", "cov-fold-bitwise-and-zero", "A fragment shader that covers a specific instruction folding path." }, @@ -108,10 +111,13 @@ { "cov-folding-rules-vec-mix-uniform.amber", "cov-folding-rules-vec-mix-uniform", "A fragment shader that covers a specific instruction folding 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" }, +{ "cov-global-loop-counter-main-function-call.amber", "cov-global-loop-counter-main-function-call", "A fragment shader that covers specific NIR code paths" }, { "cov-if-conversion-identical-branches.amber", "cov-if-conversion-identical-branches", "A fragment shader that covers a specific if condition conversion path." }, +{ "cov-if-true-continue.amber", "cov-if-true-continue", "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-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-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." }, @@ -151,13 +157,16 @@ { "cov-inst-combine-simplify-demanded-packsnorm-unpackunorm.amber", "cov-inst-combine-simplify-demanded-packsnorm-unpackunorm", "Covers a specific instruction combine simplify demanded code path" }, { "cov-inst-combine-simplify-demanded-switch-or-xor.amber", "cov-inst-combine-simplify-demanded-switch-or-xor", "A fragment shader that covers a specific inst combine simplify demanded path" }, { "cov-inst-combine-vector-ops-asin.amber", "cov-inst-combine-vector-ops-asin", "A fragment shader that covers specific inst combine vector ops code paths" }, +{ "cov-int-full-bits-divide-by-two-loop.amber", "cov-int-full-bits-divide-by-two-loop", "A fragment shader that covers specific BRW code paths" }, { "cov-integer-modulo-negative.amber", "cov-integer-modulo-negative", "A fragment shader that covers specific instruction combining code paths" }, { "cov-intervalmap-set-stop.amber", "cov-intervalmap-set-stop", "A fragment shader that covers a specific interval map code path." }, { "cov-ir-builder-constant-fold-inst-combine-calls-value-tracking-findmsb-incr-if.amber", "cov-ir-builder-constant-fold-inst-combine-calls-value-tracking-findmsb-incr-if", "Covers IR builder, constant fold, inst combine calls and value tracking code paths"}, { "cov-irbuilder-matrix-cell-uniform.amber", "cov-irbuilder-matrix-cell-uniform", "A fragment shader that covers a specific IR builder path." }, { "cov-ldexp-undefined-mat-vec-multiply.amber", "cov-ldexp-undefined-mat-vec-multiply", "Covers specific inst combine simplify demanded and inst combine shifts path" }, { "cov-liveinterval-different-dest.amber", "cov-liveinterval-different-dest", "A fragment shader that covers a specific live interval code path." }, +{ "cov-loop-clamp-to-one-empty-condition.amber", "cov-loop-clamp-to-one-empty-condition", "A fragment shader that covers specific NIR code paths" }, { "cov-loop-findmsb-findlsb.amber", "cov-loop-findmsb-findlsb", "A fragment shader that covers specific simplification and value tracking paths" }, +{ "cov-loop-returns-behind-true-and-false.amber", "cov-loop-returns-behind-true-and-false", "A fragment shader that covers specific NIR code paths" }, { "cov-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" }, @@ -165,9 +174,11 @@ { "cov-mem-pass-sum-struct-members.amber", "cov-mem-pass-sum-struct-members", "A fragment shader that covers a specific mem pass code path." }, { "cov-mem-pass-unused-component.amber", "cov-mem-pass-unused-component", "A fragment shader that covers a specific mem pass code path." }, { "cov-merge-return-condition-twice.amber", "cov-merge-return-condition-twice", "A fragment shader that covers a specific return merge path." }, +{ "cov-min-nested-loop-same-value-for-variables.amber", "cov-min-nested-loop-same-value-for-variables", "A fragment shader that covers specific NIR code paths" }, { "cov-mod-acosh.amber", "cov-mod-acosh", "A fragment shader that calculates modulo of an acosh result" }, { "cov-modf-clamp-for.amber", "cov-modf-clamp-for", "A fragment shader that covers a specific live intervals code path" }, { "cov-modf-integer-to-private.amber", "cov-modf-integer-to-private", "A fragment shader that covers a specific private to local path." }, +{ "cov-multiple-one-iteration-loops-global-counter-write-matrices.amber", "cov-multiple-one-iteration-loops-global-counter-write-matrices", "A fragment shader that covers specific BRW code paths" }, { "cov-optimize-phis-for.amber", "cov-optimize-phis-for", "A fragment shader that cover specific optimize phis code paths" }, { "cov-optimize-phis-for-for-do-while-if-if.amber", "cov-optimize-phis-for-for-do-while-if-if", "A fragment shader that covers a specific optimize PHIs code path" }, { "cov-not-clamp-matrix-access.amber", "cov-not-clamp-matrix-access", "A fragment shader that covers a specific selection dag code path" }, @@ -179,6 +190,7 @@ { "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-partly-undefined-vector-from-array.amber", "cov-return-partly-undefined-vector-from-array", "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." }, { "cov-selection-dag-assign-back-and-forth.amber", "cov-selection-dag-assign-back-and-forth", "A fragment shader that covers a specific selection DAG code path" }, { "cov-selection-dag-lt-gt.amber", "cov-selection-dag-lt-gt", "A fragment shader that covers a specific selection DAG code path" }, @@ -207,12 +219,14 @@ { "cov-single-store-elim-assume-store.amber", "cov-single-store-elim-assume-store", "A fragment shader that covers a specific single store elimination path." }, { "cov-sinh-ldexp.amber", "cov-sinh-ldexp", "A fragment shader that covers a specific inst combine compares code path" }, { "cov-ssa-rewrite-case-with-default.amber", "cov-ssa-rewrite-case-with-default", "A fragment shader that covers a specific SSA rewrite path." }, +{ "cov-sum-uniform-vector-components-round.amber", "cov-sum-uniform-vector-components-round", "A fragment shader that covers specific NIR code paths" }, { "cov-tail-duplicator-for-for-for.amber", "cov-tail-duplicator-for-for-for", "A fragment shader that covers a specific tail duplicator code path" }, { "cov-tail-duplicator-infinite-loops.amber", "cov-tail-duplicator-infinite-loops", "A fragment shader that covers a specific tail duplicator code path" }, { "cov-target-lowering-dfdx-cos.amber", "cov-target-lowering-dfdx-cos", "A fragment shader that covers a specific target lowering code path." }, { "cov-target-lowering-inst-combine-compares-struct-array-clamp-function-cal.amber", "cov-target-lowering-inst-combine-compares-struct-array-clamp-function-cal", "Covers target lowering and compare combining code paths" }, { "cov-types-return-in-main-never-hit.amber", "cov-types-return-in-main-never-hit", "A fragment shader that covers a specific types optimization path." }, { "cov-undefined-inversesqrt-reflect.amber", "cov-undefined-inversesqrt-reflect", "A fragment shader that covers a specific APFloat code path" }, +{ "cov-unpack-unorm-mix-always-one.amber", "cov-unpack-unorm-mix-always-one", "A fragment shader that covers specific NIR code paths" }, { "cov-val-cfg-case-fallthrough.amber", "cov-val-cfg-case-fallthrough", "A fragment shader that covers a specific shader validation path." }, { "cov-value-inst-combine-select-value-tracking-flip-bits.amber", "cov-value-inst-combine-select-value-tracking-flip-bits", "Covers value, inst combine select and value tracking code paths" }, { "cov-value-tracking-apint-inst-combine-simplify-one-mod-loop-iterator.amber", "cov-value-tracking-apint-inst-combine-simplify-one-mod-loop-iterator", "A fragment shader that calculates modulo of constant one with a loop iterator" }, @@ -228,6 +242,7 @@ { "cov-vector-log2-cosh.amber", "cov-vector-log2-cosh", "A fragment shader that covers a specific vector log2 and cosh code path." }, { "cov-wrap-op-kill-for-loop.amber", "cov-wrap-op-kill-for-loop", "A fragment shader that covers a specific OpKill wrapping code path" }, { "cov-wrap-op-kill-two-branches.amber", "cov-wrap-op-kill-two-branches", "A fragment shader that covers a specific OpKill wrapping path." }, +{ "cov-write-past-matrix-elements-unused.amber", "cov-write-past-matrix-elements-unused", "A fragment shader that covers specific NIR code paths" }, { "cov-x86-isel-lowering-determinant-exp-acos.amber", "cov-x86-isel-lowering-determinant-exp-acos", "A fragment shader that covers a specific x86 isel lowering code path" }, { "cov-x86-isel-lowering-machine-value-type-uint-to-float.amber", "cov-x86-isel-lowering-machine-value-type-uint-to-float", "Covers specific X86 ISel lowering and machine value type code paths" }, { "cov-x86-isel-lowering-selection-dag-struct-array-clamp-index.amber", "cov-x86-isel-lowering-selection-dag-struct-array-clamp-index", "Covers a specific X86 ISel lowering and DAG selection code paths" }, diff --git a/external/vulkancts/mustpass/master/vk-default/graphicsfuzz.txt b/external/vulkancts/mustpass/master/vk-default/graphicsfuzz.txt index 3ce23a1..666bde3 100644 --- a/external/vulkancts/mustpass/master/vk-default/graphicsfuzz.txt +++ b/external/vulkancts/mustpass/master/vk-default/graphicsfuzz.txt @@ -20,6 +20,7 @@ dEQP-VK.graphicsfuzz.control-flow-switch dEQP-VK.graphicsfuzz.cosh-return-inf-unused dEQP-VK.graphicsfuzz.cov-access-array-dot dEQP-VK.graphicsfuzz.cov-analysis-reachable-from-many +dEQP-VK.graphicsfuzz.cov-and-even-numbers-from-fragcoord dEQP-VK.graphicsfuzz.cov-apfloat-acos-ldexp dEQP-VK.graphicsfuzz.cov-apfloat-determinant dEQP-VK.graphicsfuzz.cov-apfloat-mix-nan @@ -38,6 +39,7 @@ dEQP-VK.graphicsfuzz.cov-bitfieldinsert-undefined dEQP-VK.graphicsfuzz.cov-bitfieldreverse-left-shift-findmsb dEQP-VK.graphicsfuzz.cov-blockfrequency-several-for-loops dEQP-VK.graphicsfuzz.cov-branch-probability-identity-matrix +dEQP-VK.graphicsfuzz.cov-clamp-vector-variable-negative-offset dEQP-VK.graphicsfuzz.cov-combine-and-or-xor-gt-lt dEQP-VK.graphicsfuzz.cov-const-folding-bitfieldinsert-div-one dEQP-VK.graphicsfuzz.cov-color-overwrite-identity-matrix-multiply @@ -73,6 +75,7 @@ dEQP-VK.graphicsfuzz.cov-dag-combiner-neg-div-pow2 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-findlsb-division-by-zero dEQP-VK.graphicsfuzz.cov-fold-and-in-for-loop-range dEQP-VK.graphicsfuzz.cov-fold-bitwise-and-zero @@ -108,10 +111,13 @@ dEQP-VK.graphicsfuzz.cov-folding-rules-split-vector-init dEQP-VK.graphicsfuzz.cov-folding-rules-vec-mix-uniform dEQP-VK.graphicsfuzz.cov-fract-smoothstep-undefined dEQP-VK.graphicsfuzz.cov-fragcoord-clamp-array-access +dEQP-VK.graphicsfuzz.cov-global-loop-counter-main-function-call dEQP-VK.graphicsfuzz.cov-if-conversion-identical-branches +dEQP-VK.graphicsfuzz.cov-if-true-continue dEQP-VK.graphicsfuzz.cov-inc-array-element-loop-lsb dEQP-VK.graphicsfuzz.cov-inc-inside-switch-and-for dEQP-VK.graphicsfuzz.cov-increment-inside-clamp +dEQP-VK.graphicsfuzz.cov-increment-int-loop-counter-mod-array 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 @@ -151,13 +157,16 @@ dEQP-VK.graphicsfuzz.cov-inst-combine-simplify-demanded-pack-unpack dEQP-VK.graphicsfuzz.cov-inst-combine-simplify-demanded-packsnorm-unpackunorm dEQP-VK.graphicsfuzz.cov-inst-combine-simplify-demanded-switch-or-xor dEQP-VK.graphicsfuzz.cov-inst-combine-vector-ops-asin +dEQP-VK.graphicsfuzz.cov-int-full-bits-divide-by-two-loop dEQP-VK.graphicsfuzz.cov-integer-modulo-negative dEQP-VK.graphicsfuzz.cov-intervalmap-set-stop dEQP-VK.graphicsfuzz.cov-ir-builder-constant-fold-inst-combine-calls-value-tracking-findmsb-incr-if dEQP-VK.graphicsfuzz.cov-irbuilder-matrix-cell-uniform dEQP-VK.graphicsfuzz.cov-ldexp-undefined-mat-vec-multiply dEQP-VK.graphicsfuzz.cov-liveinterval-different-dest +dEQP-VK.graphicsfuzz.cov-loop-clamp-to-one-empty-condition dEQP-VK.graphicsfuzz.cov-loop-findmsb-findlsb +dEQP-VK.graphicsfuzz.cov-loop-returns-behind-true-and-false 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 @@ -165,9 +174,11 @@ dEQP-VK.graphicsfuzz.cov-max-clamp-same-minval dEQP-VK.graphicsfuzz.cov-mem-pass-sum-struct-members dEQP-VK.graphicsfuzz.cov-mem-pass-unused-component dEQP-VK.graphicsfuzz.cov-merge-return-condition-twice +dEQP-VK.graphicsfuzz.cov-min-nested-loop-same-value-for-variables dEQP-VK.graphicsfuzz.cov-mod-acosh dEQP-VK.graphicsfuzz.cov-modf-clamp-for dEQP-VK.graphicsfuzz.cov-modf-integer-to-private +dEQP-VK.graphicsfuzz.cov-multiple-one-iteration-loops-global-counter-write-matrices dEQP-VK.graphicsfuzz.cov-optimize-phis-for dEQP-VK.graphicsfuzz.cov-optimize-phis-for-for-do-while-if-if dEQP-VK.graphicsfuzz.cov-not-clamp-matrix-access @@ -179,6 +190,7 @@ 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-partly-undefined-vector-from-array dEQP-VK.graphicsfuzz.cov-scaled-number-nested-loops dEQP-VK.graphicsfuzz.cov-selection-dag-assign-back-and-forth dEQP-VK.graphicsfuzz.cov-selection-dag-lt-gt @@ -207,12 +219,14 @@ dEQP-VK.graphicsfuzz.cov-single-block-elim-self-assign dEQP-VK.graphicsfuzz.cov-single-store-elim-assume-store dEQP-VK.graphicsfuzz.cov-sinh-ldexp dEQP-VK.graphicsfuzz.cov-ssa-rewrite-case-with-default +dEQP-VK.graphicsfuzz.cov-sum-uniform-vector-components-round dEQP-VK.graphicsfuzz.cov-tail-duplicator-for-for-for dEQP-VK.graphicsfuzz.cov-tail-duplicator-infinite-loops dEQP-VK.graphicsfuzz.cov-target-lowering-dfdx-cos dEQP-VK.graphicsfuzz.cov-target-lowering-inst-combine-compares-struct-array-clamp-function-cal dEQP-VK.graphicsfuzz.cov-types-return-in-main-never-hit dEQP-VK.graphicsfuzz.cov-undefined-inversesqrt-reflect +dEQP-VK.graphicsfuzz.cov-unpack-unorm-mix-always-one dEQP-VK.graphicsfuzz.cov-val-cfg-case-fallthrough dEQP-VK.graphicsfuzz.cov-value-inst-combine-select-value-tracking-flip-bits dEQP-VK.graphicsfuzz.cov-value-tracking-apint-inst-combine-simplify-one-mod-loop-iterator @@ -228,6 +242,7 @@ dEQP-VK.graphicsfuzz.cov-vector-dce-unused-component dEQP-VK.graphicsfuzz.cov-vector-log2-cosh dEQP-VK.graphicsfuzz.cov-wrap-op-kill-for-loop dEQP-VK.graphicsfuzz.cov-wrap-op-kill-two-branches +dEQP-VK.graphicsfuzz.cov-write-past-matrix-elements-unused dEQP-VK.graphicsfuzz.cov-x86-isel-lowering-determinant-exp-acos dEQP-VK.graphicsfuzz.cov-x86-isel-lowering-machine-value-type-uint-to-float dEQP-VK.graphicsfuzz.cov-x86-isel-lowering-selection-dag-struct-array-clamp-index