From a3338eb2ded98b5befda64f9325db0d219095a00 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Antto=20M=C3=A4kinen?= Date: Fri, 26 Nov 2021 17:12:06 +0200 Subject: [PATCH] Add a batch of GraphicsFuzz coverage tests This commit adds a batch of GraphicsFuzz coverage tests. Components: Vulkan New Tests: dEQP-VK.graphicsfuzz.cov-do-while-negative-iterator-nested-loops-increment-array-element dEQP-VK.graphicsfuzz.cov-fragcoord-conditions-never-return-index-array-using-uniform dEQP-VK.graphicsfuzz.cov-function-loop-condition-uniform-shift-right dEQP-VK.graphicsfuzz.cov-function-nested-loops-break-early-never-discard dEQP-VK.graphicsfuzz.cov-function-two-loops-limit-using-arguments-array-element-copies dEQP-VK.graphicsfuzz.cov-global-loop-counter-set-array-element-once-index-using-findmsb dEQP-VK.graphicsfuzz.cov-integer-minus-one-increased-before-indexing-array dEQP-VK.graphicsfuzz.cov-loop-array-element-copy-index-clamp-sign dEQP-VK.graphicsfuzz.cov-loop-start-from-one-switch-case-never-executed dEQP-VK.graphicsfuzz.cov-loop-two-iterators-increment-array-empty-do-while dEQP-VK.graphicsfuzz.cov-nested-functions-compare-fragcood-length-zero-vector dEQP-VK.graphicsfuzz.cov-nested-loops-decrease-vector-component-by-matrix-element-global-loop-counter dEQP-VK.graphicsfuzz.cov-nested-loops-global-counter-func-set-struct-field dEQP-VK.graphicsfuzz.cov-repeating-conditions-fract-unused Change-Id: I6e6377a60a134b59d3afd40015d282821b429a2a --- .../master/vk-master-2021-03-01/graphicsfuzz.txt | 14 + android/cts/master/vk-master/graphicsfuzz.txt | 14 + ...ator-nested-loops-increment-array-element.amber | 470 ++++++++++++++++ ...ns-never-return-index-array-using-uniform.amber | 284 ++++++++++ ...nction-loop-condition-uniform-shift-right.amber | 287 ++++++++++ ...on-nested-loops-break-early-never-discard.amber | 435 +++++++++++++++ ...imit-using-arguments-array-element-copies.amber | 335 ++++++++++++ ...et-array-element-once-index-using-findmsb.amber | 390 ++++++++++++++ ...minus-one-increased-before-indexing-array.amber | 597 +++++++++++++++++++++ ...-loop-array-element-copy-index-clamp-sign.amber | 283 ++++++++++ ...start-from-one-switch-case-never-executed.amber | 215 ++++++++ ...-iterators-increment-array-empty-do-while.amber | 302 +++++++++++ ...tions-compare-fragcood-length-zero-vector.amber | 354 ++++++++++++ ...ent-by-matrix-element-global-loop-counter.amber | 298 ++++++++++ ...oops-global-counter-func-set-struct-field.amber | 358 ++++++++++++ .../cov-repeating-conditions-fract-unused.amber | 230 ++++++++ .../data/vulkan/amber/graphicsfuzz/index.txt | 14 + .../mustpass/master/vk-default/graphicsfuzz.txt | 14 + 18 files changed, 4894 insertions(+) create mode 100644 external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-do-while-negative-iterator-nested-loops-increment-array-element.amber create mode 100644 external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-fragcoord-conditions-never-return-index-array-using-uniform.amber create mode 100644 external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-function-loop-condition-uniform-shift-right.amber create mode 100644 external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-function-nested-loops-break-early-never-discard.amber create mode 100644 external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-function-two-loops-limit-using-arguments-array-element-copies.amber create mode 100644 external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-global-loop-counter-set-array-element-once-index-using-findmsb.amber create mode 100644 external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-integer-minus-one-increased-before-indexing-array.amber create mode 100644 external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-loop-array-element-copy-index-clamp-sign.amber create mode 100644 external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-loop-start-from-one-switch-case-never-executed.amber create mode 100644 external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-loop-two-iterators-increment-array-empty-do-while.amber create mode 100644 external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-nested-functions-compare-fragcood-length-zero-vector.amber create mode 100644 external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-nested-loops-decrease-vector-component-by-matrix-element-global-loop-counter.amber create mode 100644 external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-nested-loops-global-counter-func-set-struct-field.amber create mode 100644 external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-repeating-conditions-fract-unused.amber 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 656b7b3..141c6df 100644 --- a/android/cts/master/vk-master-2021-03-01/graphicsfuzz.txt +++ b/android/cts/master/vk-master-2021-03-01/graphicsfuzz.txt @@ -92,6 +92,7 @@ dEQP-VK.graphicsfuzz.cov-determinant-uninitialized-matrix-never-chosen dEQP-VK.graphicsfuzz.cov-dfdx-dfdy-after-nested-loops dEQP-VK.graphicsfuzz.cov-divide-matrix-transpose-by-constant dEQP-VK.graphicsfuzz.cov-do-while-loop-until-uniform-lt-itself +dEQP-VK.graphicsfuzz.cov-do-while-negative-iterator-nested-loops-increment-array-element dEQP-VK.graphicsfuzz.cov-do-while-switch-case-bitcount-findmsb dEQP-VK.graphicsfuzz.cov-double-if-true-in-loop dEQP-VK.graphicsfuzz.cov-dummy-function-loop-array-element-increment-never-read @@ -143,14 +144,18 @@ dEQP-VK.graphicsfuzz.cov-fract-trunc-always-zero dEQP-VK.graphicsfuzz.cov-fragcood-multiple-conditions-function-loop-global-counter dEQP-VK.graphicsfuzz.cov-fragcoord-bitwise-not dEQP-VK.graphicsfuzz.cov-fragcoord-clamp-array-access +dEQP-VK.graphicsfuzz.cov-fragcoord-conditions-never-return-index-array-using-uniform dEQP-VK.graphicsfuzz.cov-fragcoord-multiple-conditions-function-global-loop-counter-simplified dEQP-VK.graphicsfuzz.cov-fragcoord-multiply dEQP-VK.graphicsfuzz.cov-function-argument-uniform-float-loop-never-return dEQP-VK.graphicsfuzz.cov-function-find-lsb-ivec2-one dEQP-VK.graphicsfuzz.cov-function-fragcoord-condition-always-return dEQP-VK.graphicsfuzz.cov-function-large-array-max-clamp +dEQP-VK.graphicsfuzz.cov-function-loop-condition-uniform-shift-right dEQP-VK.graphicsfuzz.cov-function-nested-do-whiles-looped-once +dEQP-VK.graphicsfuzz.cov-function-nested-loops-break-early-never-discard dEQP-VK.graphicsfuzz.cov-function-trivial-switch-case +dEQP-VK.graphicsfuzz.cov-function-two-loops-limit-using-arguments-array-element-copies dEQP-VK.graphicsfuzz.cov-function-unpack-unorm-2x16-one dEQP-VK.graphicsfuzz.cov-function-vec2-never-discard dEQP-VK.graphicsfuzz.cov-function-with-nested-loops-called-from-nested-loops @@ -160,6 +165,7 @@ dEQP-VK.graphicsfuzz.cov-global-loop-counter-float-accumulate-matrix dEQP-VK.graphicsfuzz.cov-global-loop-counter-main-function-call dEQP-VK.graphicsfuzz.cov-global-loop-counter-multiply-one-minus dEQP-VK.graphicsfuzz.cov-global-loop-counter-read-past-matrix-size-never-executed +dEQP-VK.graphicsfuzz.cov-global-loop-counter-set-array-element-once-index-using-findmsb dEQP-VK.graphicsfuzz.cov-global-loop-counter-squared-comparison dEQP-VK.graphicsfuzz.cov-global-loop-counter-texture-sample-loop-condition-set-array-element dEQP-VK.graphicsfuzz.cov-if-conversion-identical-branches @@ -224,6 +230,7 @@ dEQP-VK.graphicsfuzz.cov-inst-combine-vector-ops-asin dEQP-VK.graphicsfuzz.cov-int-div-round-to-zero dEQP-VK.graphicsfuzz.cov-int-full-bits-divide-by-two-loop dEQP-VK.graphicsfuzz.cov-int-initialize-from-multiple-large-arrays +dEQP-VK.graphicsfuzz.cov-integer-minus-one-increased-before-indexing-array 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 @@ -236,6 +243,7 @@ dEQP-VK.graphicsfuzz.cov-left-shift-array-access dEQP-VK.graphicsfuzz.cov-left-shift-right-shift-compare dEQP-VK.graphicsfuzz.cov-liveinterval-different-dest dEQP-VK.graphicsfuzz.cov-loop-abs-multiply-offset +dEQP-VK.graphicsfuzz.cov-loop-array-element-copy-index-clamp-sign dEQP-VK.graphicsfuzz.cov-loop-break-after-first-iteration-set-array-element dEQP-VK.graphicsfuzz.cov-loop-break-floor-nan-never-executed dEQP-VK.graphicsfuzz.cov-loop-clamp-to-one-empty-condition @@ -254,8 +262,10 @@ dEQP-VK.graphicsfuzz.cov-loop-integer-half-minus-one dEQP-VK.graphicsfuzz.cov-loop-logical-xor dEQP-VK.graphicsfuzz.cov-loop-returns-behind-true-and-false dEQP-VK.graphicsfuzz.cov-loop-set-vector-components-pow-two +dEQP-VK.graphicsfuzz.cov-loop-start-from-one-switch-case-never-executed dEQP-VK.graphicsfuzz.cov-loop-struct-array-field-set-value-self-dependency dEQP-VK.graphicsfuzz.cov-loop-switch-discard-never-hit +dEQP-VK.graphicsfuzz.cov-loop-two-iterators-increment-array-empty-do-while dEQP-VK.graphicsfuzz.cov-loop-with-two-integers dEQP-VK.graphicsfuzz.cov-machine-scheduler-for-if-pow dEQP-VK.graphicsfuzz.cov-machine-basic-block-for-for-for-less-than @@ -283,6 +293,7 @@ dEQP-VK.graphicsfuzz.cov-multiple-fragcoord-conditions-false-never-return-sample dEQP-VK.graphicsfuzz.cov-multiple-fragcoord-conditions-never-return-color-uninitialized dEQP-VK.graphicsfuzz.cov-multiple-one-iteration-loops-global-counter-write-matrices dEQP-VK.graphicsfuzz.cov-nested-functions-accumulate-global-matrix +dEQP-VK.graphicsfuzz.cov-nested-functions-compare-fragcood-length-zero-vector dEQP-VK.graphicsfuzz.cov-nested-functions-loop-assign-global-array-element dEQP-VK.graphicsfuzz.cov-nested-functions-struct-arrays-vector-lengths dEQP-VK.graphicsfuzz.cov-nested-loop-continue-inner-copy-array-element @@ -291,8 +302,10 @@ dEQP-VK.graphicsfuzz.cov-nested-loop-large-array-index-using-vector-components dEQP-VK.graphicsfuzz.cov-nested-loop-not-greater-than-increment-array-element dEQP-VK.graphicsfuzz.cov-nested-loop-undefined-smoothstep-never-executed dEQP-VK.graphicsfuzz.cov-nested-loops-clamp-ivec-push-constant-increment-global-counter +dEQP-VK.graphicsfuzz.cov-nested-loops-decrease-vector-component-by-matrix-element-global-loop-counter dEQP-VK.graphicsfuzz.cov-nested-loops-float-array-select-by-fragcoord dEQP-VK.graphicsfuzz.cov-nested-loops-float-bits-to-int-increment-array +dEQP-VK.graphicsfuzz.cov-nested-loops-global-counter-func-set-struct-field dEQP-VK.graphicsfuzz.cov-nested-loops-global-counter-increment-single-element dEQP-VK.graphicsfuzz.cov-nested-loops-global-loop-counter-do-while-accumulate-float dEQP-VK.graphicsfuzz.cov-nested-loops-global-loop-counter-fragcoord-negative-always-false @@ -319,6 +332,7 @@ dEQP-VK.graphicsfuzz.cov-reciprocal-var-minus-one dEQP-VK.graphicsfuzz.cov-reduce-load-replace-extract dEQP-VK.graphicsfuzz.cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard dEQP-VK.graphicsfuzz.cov-reinitialize-matrix-after-undefined-value +dEQP-VK.graphicsfuzz.cov-repeating-conditions-fract-unused dEQP-VK.graphicsfuzz.cov-replace-copy-object dEQP-VK.graphicsfuzz.cov-return-after-do-while dEQP-VK.graphicsfuzz.cov-return-after-first-iteration diff --git a/android/cts/master/vk-master/graphicsfuzz.txt b/android/cts/master/vk-master/graphicsfuzz.txt index 97768f6..3eb85c1 100644 --- a/android/cts/master/vk-master/graphicsfuzz.txt +++ b/android/cts/master/vk-master/graphicsfuzz.txt @@ -104,6 +104,7 @@ dEQP-VK.graphicsfuzz.cov-determinant-uninitialized-matrix-never-chosen dEQP-VK.graphicsfuzz.cov-dfdx-dfdy-after-nested-loops dEQP-VK.graphicsfuzz.cov-divide-matrix-transpose-by-constant dEQP-VK.graphicsfuzz.cov-do-while-loop-until-uniform-lt-itself +dEQP-VK.graphicsfuzz.cov-do-while-negative-iterator-nested-loops-increment-array-element dEQP-VK.graphicsfuzz.cov-do-while-switch-case-bitcount-findmsb dEQP-VK.graphicsfuzz.cov-double-if-true-in-loop dEQP-VK.graphicsfuzz.cov-dummy-function-loop-array-element-increment-never-read @@ -155,14 +156,18 @@ dEQP-VK.graphicsfuzz.cov-fract-trunc-always-zero dEQP-VK.graphicsfuzz.cov-fragcood-multiple-conditions-function-loop-global-counter dEQP-VK.graphicsfuzz.cov-fragcoord-bitwise-not dEQP-VK.graphicsfuzz.cov-fragcoord-clamp-array-access +dEQP-VK.graphicsfuzz.cov-fragcoord-conditions-never-return-index-array-using-uniform dEQP-VK.graphicsfuzz.cov-fragcoord-multiple-conditions-function-global-loop-counter-simplified dEQP-VK.graphicsfuzz.cov-fragcoord-multiply dEQP-VK.graphicsfuzz.cov-function-argument-uniform-float-loop-never-return dEQP-VK.graphicsfuzz.cov-function-find-lsb-ivec2-one dEQP-VK.graphicsfuzz.cov-function-fragcoord-condition-always-return dEQP-VK.graphicsfuzz.cov-function-large-array-max-clamp +dEQP-VK.graphicsfuzz.cov-function-loop-condition-uniform-shift-right dEQP-VK.graphicsfuzz.cov-function-nested-do-whiles-looped-once +dEQP-VK.graphicsfuzz.cov-function-nested-loops-break-early-never-discard dEQP-VK.graphicsfuzz.cov-function-trivial-switch-case +dEQP-VK.graphicsfuzz.cov-function-two-loops-limit-using-arguments-array-element-copies dEQP-VK.graphicsfuzz.cov-function-unpack-unorm-2x16-one dEQP-VK.graphicsfuzz.cov-function-vec2-never-discard dEQP-VK.graphicsfuzz.cov-function-with-nested-loops-called-from-nested-loops @@ -172,6 +177,7 @@ dEQP-VK.graphicsfuzz.cov-global-loop-counter-float-accumulate-matrix dEQP-VK.graphicsfuzz.cov-global-loop-counter-main-function-call dEQP-VK.graphicsfuzz.cov-global-loop-counter-multiply-one-minus dEQP-VK.graphicsfuzz.cov-global-loop-counter-read-past-matrix-size-never-executed +dEQP-VK.graphicsfuzz.cov-global-loop-counter-set-array-element-once-index-using-findmsb dEQP-VK.graphicsfuzz.cov-global-loop-counter-squared-comparison dEQP-VK.graphicsfuzz.cov-global-loop-counter-texture-sample-loop-condition-set-array-element dEQP-VK.graphicsfuzz.cov-if-conversion-identical-branches @@ -236,6 +242,7 @@ dEQP-VK.graphicsfuzz.cov-inst-combine-vector-ops-asin dEQP-VK.graphicsfuzz.cov-int-div-round-to-zero dEQP-VK.graphicsfuzz.cov-int-full-bits-divide-by-two-loop dEQP-VK.graphicsfuzz.cov-int-initialize-from-multiple-large-arrays +dEQP-VK.graphicsfuzz.cov-integer-minus-one-increased-before-indexing-array 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 @@ -248,6 +255,7 @@ dEQP-VK.graphicsfuzz.cov-left-shift-array-access dEQP-VK.graphicsfuzz.cov-left-shift-right-shift-compare dEQP-VK.graphicsfuzz.cov-liveinterval-different-dest dEQP-VK.graphicsfuzz.cov-loop-abs-multiply-offset +dEQP-VK.graphicsfuzz.cov-loop-array-element-copy-index-clamp-sign dEQP-VK.graphicsfuzz.cov-loop-break-after-first-iteration-set-array-element dEQP-VK.graphicsfuzz.cov-loop-break-floor-nan-never-executed dEQP-VK.graphicsfuzz.cov-loop-clamp-to-one-empty-condition @@ -266,8 +274,10 @@ dEQP-VK.graphicsfuzz.cov-loop-integer-half-minus-one dEQP-VK.graphicsfuzz.cov-loop-logical-xor dEQP-VK.graphicsfuzz.cov-loop-returns-behind-true-and-false dEQP-VK.graphicsfuzz.cov-loop-set-vector-components-pow-two +dEQP-VK.graphicsfuzz.cov-loop-start-from-one-switch-case-never-executed dEQP-VK.graphicsfuzz.cov-loop-struct-array-field-set-value-self-dependency dEQP-VK.graphicsfuzz.cov-loop-switch-discard-never-hit +dEQP-VK.graphicsfuzz.cov-loop-two-iterators-increment-array-empty-do-while dEQP-VK.graphicsfuzz.cov-loop-with-two-integers dEQP-VK.graphicsfuzz.cov-machine-scheduler-for-if-pow dEQP-VK.graphicsfuzz.cov-machine-basic-block-for-for-for-less-than @@ -295,6 +305,7 @@ dEQP-VK.graphicsfuzz.cov-multiple-fragcoord-conditions-false-never-return-sample dEQP-VK.graphicsfuzz.cov-multiple-fragcoord-conditions-never-return-color-uninitialized dEQP-VK.graphicsfuzz.cov-multiple-one-iteration-loops-global-counter-write-matrices dEQP-VK.graphicsfuzz.cov-nested-functions-accumulate-global-matrix +dEQP-VK.graphicsfuzz.cov-nested-functions-compare-fragcood-length-zero-vector dEQP-VK.graphicsfuzz.cov-nested-functions-loop-assign-global-array-element dEQP-VK.graphicsfuzz.cov-nested-functions-struct-arrays-vector-lengths dEQP-VK.graphicsfuzz.cov-nested-loop-continue-inner-copy-array-element @@ -303,8 +314,10 @@ dEQP-VK.graphicsfuzz.cov-nested-loop-large-array-index-using-vector-components dEQP-VK.graphicsfuzz.cov-nested-loop-not-greater-than-increment-array-element dEQP-VK.graphicsfuzz.cov-nested-loop-undefined-smoothstep-never-executed dEQP-VK.graphicsfuzz.cov-nested-loops-clamp-ivec-push-constant-increment-global-counter +dEQP-VK.graphicsfuzz.cov-nested-loops-decrease-vector-component-by-matrix-element-global-loop-counter dEQP-VK.graphicsfuzz.cov-nested-loops-float-array-select-by-fragcoord dEQP-VK.graphicsfuzz.cov-nested-loops-float-bits-to-int-increment-array +dEQP-VK.graphicsfuzz.cov-nested-loops-global-counter-func-set-struct-field dEQP-VK.graphicsfuzz.cov-nested-loops-global-counter-increment-single-element dEQP-VK.graphicsfuzz.cov-nested-loops-global-loop-counter-do-while-accumulate-float dEQP-VK.graphicsfuzz.cov-nested-loops-global-loop-counter-fragcoord-negative-always-false @@ -331,6 +344,7 @@ dEQP-VK.graphicsfuzz.cov-reciprocal-var-minus-one dEQP-VK.graphicsfuzz.cov-reduce-load-replace-extract dEQP-VK.graphicsfuzz.cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard dEQP-VK.graphicsfuzz.cov-reinitialize-matrix-after-undefined-value +dEQP-VK.graphicsfuzz.cov-repeating-conditions-fract-unused dEQP-VK.graphicsfuzz.cov-replace-copy-object dEQP-VK.graphicsfuzz.cov-return-after-do-while dEQP-VK.graphicsfuzz.cov-return-after-first-iteration diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-do-while-negative-iterator-nested-loops-increment-array-element.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-do-while-negative-iterator-nested-loops-increment-array-element.amber new file mode 100644 index 0000000..1ac9035 --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-do-while-negative-iterator-nested-loops-increment-array-element.amber @@ -0,0 +1,470 @@ +#!amber + +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# A test for a coverage-gap found by the GraphicsFuzz project. + +# Short description: A fragment shader that covers specific LLVM code paths + +# The test passes because the shader always writes red. + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 320 es +# +# #define _int_5 _GLF_uniform_int_values[0] +# #define _int_0 _GLF_uniform_int_values[1] +# #define _int_20 _GLF_uniform_int_values[2] +# #define _int_1 _GLF_uniform_int_values[3] +# #define _int_2 _GLF_uniform_int_values[4] +# #define _int_3 _GLF_uniform_int_values[5] +# #define _int_4 _GLF_uniform_int_values[6] +# #define _int_19 _GLF_uniform_int_values[7] +# #define _int_16 _GLF_uniform_int_values[8] +# #define _int_17 _GLF_uniform_int_values[9] +# #define _int_18 _GLF_uniform_int_values[10] +# #define _float_1_0 _GLF_uniform_float_values[0] +# +# precision highp int; +# precision highp float; +# +# // 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: [5, 0, 20, 1, 2, 3, 4, 19, 16, 17, 18] +# layout(set = 0, binding = 1) uniform buf1 +# { +# int _GLF_uniform_int_values[11]; +# }; +# layout(location = 0) out vec4 _GLF_color; +# +# void main() +# { +# int arr[5] = int[5](_int_1, _int_2, _int_3, _int_4, _int_5); +# _GLF_color = vec4(_int_0); +# +# // Iterated five times. +# for(int i = _int_0; i < _int_5; i ++) +# { +# int a = - 100; +# int b = 1; +# +# // This loop has no effect. +# do +# { +# if(b > 7) +# { +# break; +# } +# +# switch(a) +# { +# case 0: +# // Never executed. +# _GLF_color = vec4(_int_1); +# break; +# case 5: +# // Never executed. +# if(gl_FragCoord.x < _float_1_0) +# { +# _GLF_color = vec4(1); +# } +# break; +# } +# +# a++; +# b++; +# } +# while(a < 10); +# +# // Increments each array element by three. +# for(int j = _int_0; j < _int_5; j ++) +# { +# for(int k = _int_0; k < _int_3; k ++) +# { +# for(int l = _int_0; l < k; l ++) +# { +# arr[j]++; +# } +# } +# } +# } +# +# // Always true. +# if(arr[_int_0] == _int_16 && arr[_int_1] == _int_17 && arr[_int_2] == _int_18 && arr[_int_3] == _int_19 && arr[_int_4] == _int_20) +# { +# _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1); +# } +# } +SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0 +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 10 +; Bound: 219 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %37 %80 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 320 + OpName %4 "main" + OpName %11 "arr" + OpName %14 "buf1" + OpMemberName %14 0 "_GLF_uniform_int_values" + OpName %16 "" + OpName %37 "_GLF_color" + OpName %44 "i" + OpName %57 "a" + OpName %59 "b" + OpName %80 "gl_FragCoord" + OpName %87 "buf0" + OpMemberName %87 0 "_GLF_uniform_float_values" + OpName %89 "" + OpName %107 "j" + OpName %119 "k" + OpName %131 "l" + OpDecorate %13 ArrayStride 16 + OpMemberDecorate %14 0 Offset 0 + OpDecorate %14 Block + OpDecorate %16 DescriptorSet 0 + OpDecorate %16 Binding 1 + OpDecorate %37 Location 0 + OpDecorate %80 BuiltIn FragCoord + OpDecorate %86 ArrayStride 16 + OpMemberDecorate %87 0 Offset 0 + OpDecorate %87 Block + OpDecorate %89 DescriptorSet 0 + OpDecorate %89 Binding 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeInt 32 1 + %7 = OpTypeInt 32 0 + %8 = OpConstant %7 5 + %9 = OpTypeArray %6 %8 + %10 = OpTypePointer Function %9 + %12 = OpConstant %7 11 + %13 = OpTypeArray %6 %12 + %14 = OpTypeStruct %13 + %15 = OpTypePointer Uniform %14 + %16 = OpVariable %15 Uniform + %17 = OpConstant %6 0 + %18 = OpConstant %6 3 + %19 = OpTypePointer Uniform %6 + %22 = OpConstant %6 4 + %25 = OpConstant %6 5 + %28 = OpConstant %6 6 + %34 = OpTypeFloat 32 + %35 = OpTypeVector %34 4 + %36 = OpTypePointer Output %35 + %37 = OpVariable %36 Output + %38 = OpConstant %6 1 + %43 = OpTypePointer Function %6 + %55 = OpTypeBool + %58 = OpConstant %6 -100 + %65 = OpConstant %6 7 + %79 = OpTypePointer Input %35 + %80 = OpVariable %79 Input + %81 = OpConstant %7 0 + %82 = OpTypePointer Input %34 + %85 = OpConstant %7 1 + %86 = OpTypeArray %34 %85 + %87 = OpTypeStruct %86 + %88 = OpTypePointer Uniform %87 + %89 = OpVariable %88 Uniform + %90 = OpTypePointer Uniform %34 + %96 = OpConstant %34 1 + %97 = OpConstantComposite %35 %96 %96 %96 %96 + %105 = OpConstant %6 10 + %158 = OpConstant %6 8 + %168 = OpConstant %6 9 + %199 = OpConstant %6 2 + %4 = OpFunction %2 None %3 + %5 = OpLabel + %11 = OpVariable %10 Function + %44 = OpVariable %43 Function + %57 = OpVariable %43 Function + %59 = OpVariable %43 Function + %107 = OpVariable %43 Function + %119 = OpVariable %43 Function + %131 = OpVariable %43 Function + %20 = OpAccessChain %19 %16 %17 %18 + %21 = OpLoad %6 %20 + %23 = OpAccessChain %19 %16 %17 %22 + %24 = OpLoad %6 %23 + %26 = OpAccessChain %19 %16 %17 %25 + %27 = OpLoad %6 %26 + %29 = OpAccessChain %19 %16 %17 %28 + %30 = OpLoad %6 %29 + %31 = OpAccessChain %19 %16 %17 %17 + %32 = OpLoad %6 %31 + %33 = OpCompositeConstruct %9 %21 %24 %27 %30 %32 + OpStore %11 %33 + %39 = OpAccessChain %19 %16 %17 %38 + %40 = OpLoad %6 %39 + %41 = OpConvertSToF %34 %40 + %42 = OpCompositeConstruct %35 %41 %41 %41 %41 + OpStore %37 %42 + %45 = OpAccessChain %19 %16 %17 %38 + %46 = OpLoad %6 %45 + OpStore %44 %46 + OpBranch %47 + %47 = OpLabel + OpLoopMerge %49 %50 None + OpBranch %51 + %51 = OpLabel + %52 = OpLoad %6 %44 + %53 = OpAccessChain %19 %16 %17 %17 + %54 = OpLoad %6 %53 + %56 = OpSLessThan %55 %52 %54 + OpBranchConditional %56 %48 %49 + %48 = OpLabel + OpStore %57 %58 + OpStore %59 %38 + OpBranch %60 + %60 = OpLabel + OpLoopMerge %62 %63 None + OpBranch %61 + %61 = OpLabel + %64 = OpLoad %6 %59 + %66 = OpSGreaterThan %55 %64 %65 + OpSelectionMerge %68 None + OpBranchConditional %66 %67 %68 + %67 = OpLabel + OpBranch %62 + %68 = OpLabel + %70 = OpLoad %6 %57 + OpSelectionMerge %73 None + OpSwitch %70 %73 0 %71 5 %72 + %71 = OpLabel + %74 = OpAccessChain %19 %16 %17 %18 + %75 = OpLoad %6 %74 + %76 = OpConvertSToF %34 %75 + %77 = OpCompositeConstruct %35 %76 %76 %76 %76 + OpStore %37 %77 + OpBranch %73 + %72 = OpLabel + %83 = OpAccessChain %82 %80 %81 + %84 = OpLoad %34 %83 + %91 = OpAccessChain %90 %89 %17 %17 + %92 = OpLoad %34 %91 + %93 = OpFOrdLessThan %55 %84 %92 + OpSelectionMerge %95 None + OpBranchConditional %93 %94 %95 + %94 = OpLabel + OpStore %37 %97 + OpBranch %95 + %95 = OpLabel + OpBranch %73 + %73 = OpLabel + %100 = OpLoad %6 %57 + %101 = OpIAdd %6 %100 %38 + OpStore %57 %101 + %102 = OpLoad %6 %59 + %103 = OpIAdd %6 %102 %38 + OpStore %59 %103 + OpBranch %63 + %63 = OpLabel + %104 = OpLoad %6 %57 + %106 = OpSLessThan %55 %104 %105 + OpBranchConditional %106 %60 %62 + %62 = OpLabel + %108 = OpAccessChain %19 %16 %17 %38 + %109 = OpLoad %6 %108 + OpStore %107 %109 + OpBranch %110 + %110 = OpLabel + OpLoopMerge %112 %113 None + OpBranch %114 + %114 = OpLabel + %115 = OpLoad %6 %107 + %116 = OpAccessChain %19 %16 %17 %17 + %117 = OpLoad %6 %116 + %118 = OpSLessThan %55 %115 %117 + OpBranchConditional %118 %111 %112 + %111 = OpLabel + %120 = OpAccessChain %19 %16 %17 %38 + %121 = OpLoad %6 %120 + OpStore %119 %121 + OpBranch %122 + %122 = OpLabel + OpLoopMerge %124 %125 None + OpBranch %126 + %126 = OpLabel + %127 = OpLoad %6 %119 + %128 = OpAccessChain %19 %16 %17 %25 + %129 = OpLoad %6 %128 + %130 = OpSLessThan %55 %127 %129 + OpBranchConditional %130 %123 %124 + %123 = OpLabel + %132 = OpAccessChain %19 %16 %17 %38 + %133 = OpLoad %6 %132 + OpStore %131 %133 + OpBranch %134 + %134 = OpLabel + OpLoopMerge %136 %137 None + OpBranch %138 + %138 = OpLabel + %139 = OpLoad %6 %131 + %140 = OpLoad %6 %119 + %141 = OpSLessThan %55 %139 %140 + OpBranchConditional %141 %135 %136 + %135 = OpLabel + %142 = OpLoad %6 %107 + %143 = OpAccessChain %43 %11 %142 + %144 = OpLoad %6 %143 + %145 = OpIAdd %6 %144 %38 + OpStore %143 %145 + OpBranch %137 + %137 = OpLabel + %146 = OpLoad %6 %131 + %147 = OpIAdd %6 %146 %38 + OpStore %131 %147 + OpBranch %134 + %136 = OpLabel + OpBranch %125 + %125 = OpLabel + %148 = OpLoad %6 %119 + %149 = OpIAdd %6 %148 %38 + OpStore %119 %149 + OpBranch %122 + %124 = OpLabel + OpBranch %113 + %113 = OpLabel + %150 = OpLoad %6 %107 + %151 = OpIAdd %6 %150 %38 + OpStore %107 %151 + OpBranch %110 + %112 = OpLabel + OpBranch %50 + %50 = OpLabel + %152 = OpLoad %6 %44 + %153 = OpIAdd %6 %152 %38 + OpStore %44 %153 + OpBranch %47 + %49 = OpLabel + %154 = OpAccessChain %19 %16 %17 %38 + %155 = OpLoad %6 %154 + %156 = OpAccessChain %43 %11 %155 + %157 = OpLoad %6 %156 + %159 = OpAccessChain %19 %16 %17 %158 + %160 = OpLoad %6 %159 + %161 = OpIEqual %55 %157 %160 + OpSelectionMerge %163 None + OpBranchConditional %161 %162 %163 + %162 = OpLabel + %164 = OpAccessChain %19 %16 %17 %18 + %165 = OpLoad %6 %164 + %166 = OpAccessChain %43 %11 %165 + %167 = OpLoad %6 %166 + %169 = OpAccessChain %19 %16 %17 %168 + %170 = OpLoad %6 %169 + %171 = OpIEqual %55 %167 %170 + OpBranch %163 + %163 = OpLabel + %172 = OpPhi %55 %161 %49 %171 %162 + OpSelectionMerge %174 None + OpBranchConditional %172 %173 %174 + %173 = OpLabel + %175 = OpAccessChain %19 %16 %17 %22 + %176 = OpLoad %6 %175 + %177 = OpAccessChain %43 %11 %176 + %178 = OpLoad %6 %177 + %179 = OpAccessChain %19 %16 %17 %105 + %180 = OpLoad %6 %179 + %181 = OpIEqual %55 %178 %180 + OpBranch %174 + %174 = OpLabel + %182 = OpPhi %55 %172 %163 %181 %173 + OpSelectionMerge %184 None + OpBranchConditional %182 %183 %184 + %183 = OpLabel + %185 = OpAccessChain %19 %16 %17 %25 + %186 = OpLoad %6 %185 + %187 = OpAccessChain %43 %11 %186 + %188 = OpLoad %6 %187 + %189 = OpAccessChain %19 %16 %17 %65 + %190 = OpLoad %6 %189 + %191 = OpIEqual %55 %188 %190 + OpBranch %184 + %184 = OpLabel + %192 = OpPhi %55 %182 %174 %191 %183 + OpSelectionMerge %194 None + OpBranchConditional %192 %193 %194 + %193 = OpLabel + %195 = OpAccessChain %19 %16 %17 %28 + %196 = OpLoad %6 %195 + %197 = OpAccessChain %43 %11 %196 + %198 = OpLoad %6 %197 + %200 = OpAccessChain %19 %16 %17 %199 + %201 = OpLoad %6 %200 + %202 = OpIEqual %55 %198 %201 + OpBranch %194 + %194 = OpLabel + %203 = OpPhi %55 %192 %184 %202 %193 + OpSelectionMerge %205 None + OpBranchConditional %203 %204 %205 + %204 = OpLabel + %206 = OpAccessChain %19 %16 %17 %18 + %207 = OpLoad %6 %206 + %208 = OpConvertSToF %34 %207 + %209 = OpAccessChain %19 %16 %17 %38 + %210 = OpLoad %6 %209 + %211 = OpConvertSToF %34 %210 + %212 = OpAccessChain %19 %16 %17 %38 + %213 = OpLoad %6 %212 + %214 = OpConvertSToF %34 %213 + %215 = OpAccessChain %19 %16 %17 %18 + %216 = OpLoad %6 %215 + %217 = OpConvertSToF %34 %216 + %218 = OpCompositeConstruct %35 %208 %211 %214 %217 + OpStore %37 %218 + OpBranch %205 + %205 = OpLabel + OpReturn + OpFunctionEnd +END + +# uniforms for variant + +# _GLF_uniform_int_values +BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA + 5 0 20 1 2 3 4 19 16 17 18 +END +# _GLF_uniform_float_values +BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA + 1.0 +END + +BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM + +PIPELINE graphics variant_pipeline + ATTACH variant_vertex_shader + ATTACH variant_fragment_shader + FRAMEBUFFER_SIZE 256 256 + BIND BUFFER variant_framebuffer AS color LOCATION 0 + BIND BUFFER variant__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 1 + BIND BUFFER variant__GLF_uniform_float_values AS uniform DESCRIPTOR_SET 0 BINDING 0 +END +CLEAR_COLOR variant_pipeline 0 0 0 255 + +CLEAR variant_pipeline +RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 256 256 + +EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255 diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-fragcoord-conditions-never-return-index-array-using-uniform.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-fragcoord-conditions-never-return-index-array-using-uniform.amber new file mode 100644 index 0000000..af89adf --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-fragcoord-conditions-never-return-index-array-using-uniform.amber @@ -0,0 +1,284 @@ +#!amber + +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# A test for a coverage-gap found by the GraphicsFuzz project. + +# Short description: A fragment shader that covers specific LLVM code paths + +# The test passes because the shader always writes red. + +# Optimized using spirv-opt with the following arguments: +# '--if-conversion' +# '--eliminate-dead-branches' +# '--merge-return' +# '--private-to-local' +# '--scalar-replacement=100' +# '--if-conversion' +# '--scalar-replacement=100' +# '--eliminate-dead-branches' +# '--scalar-replacement=100' +# '--redundancy-elimination' +# '--private-to-local' +# '--eliminate-dead-branches' +# '--merge-blocks' +# '--if-conversion' +# '--if-conversion' +# '--scalar-replacement=100' +# '--inline-entry-points-exhaustive' +# '--eliminate-dead-code-aggressive' +# '--copy-propagate-arrays' +# '--eliminate-local-single-block' +# '--vector-dce' +# '--ccp' +# spirv-opt commit hash: a0370efd589be33d5d9a85cfde2f85841b3755af + + + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 320 es +# +# #define _int_1 _GLF_uniform_int_values[0] +# #define _int_0 _GLF_uniform_int_values[1] +# #define _float_0_0 _GLF_uniform_float_values[0] +# #define _float_300_0 _GLF_uniform_float_values[1] +# +# precision highp float; +# precision highp int; +# +# // Contents of _GLF_uniform_int_values: [1, 0] +# layout(set = 0, binding = 0) uniform buf0 +# { +# int _GLF_uniform_int_values[2]; +# }; +# +# // Contents of _GLF_uniform_float_values: [0.0, 300.0] +# layout(set = 0, binding = 1) uniform buf1 { +# float _GLF_uniform_float_values[2]; +# }; +# +# layout(location = 0) out vec4 _GLF_color; +# +# void main() +# { +# // Always false. +# if(gl_FragCoord.x < _float_0_0) +# { +# for(int i = _int_1; i != _int_1; ) +# { +# return; +# } +# } +# +# // Iterated once. +# do +# { +# // Useless line but still needed for the coverage. +# gl_FragCoord.y < _float_0_0; +# +# +# // Always false. +# if(gl_FragCoord.y >= _float_300_0) +# { +# return; +# } +# } +# while(gl_FragCoord.y < _float_0_0); +# +# // Selects (1, 0, 0, 1). +# _GLF_color = vec4[4](vec4(_int_1, _int_0, _int_0, _int_1), vec4(_int_0), vec4(_int_0), vec4(_int_0))[_int_0]; +# } +SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0 +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 10 +; Bound: 119 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %9 %73 + 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 "i" + OpName %32 "buf0" + OpMemberName %32 0 "_GLF_uniform_int_values" + OpName %34 "" + OpName %73 "_GLF_color" + OpName %105 "indexable" + 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 %31 ArrayStride 16 + OpMemberDecorate %32 0 Offset 0 + OpDecorate %32 Block + OpDecorate %34 DescriptorSet 0 + OpDecorate %34 Binding 0 + OpDecorate %73 Location 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 0 + %12 = OpTypePointer Input %6 + %15 = OpConstant %10 2 + %16 = OpTypeArray %6 %15 + %17 = OpTypeStruct %16 + %18 = OpTypePointer Uniform %17 + %19 = OpVariable %18 Uniform + %20 = OpTypeInt 32 1 + %21 = OpConstant %20 0 + %22 = OpTypePointer Uniform %6 + %25 = OpTypeBool + %29 = OpTypePointer Function %20 + %31 = OpTypeArray %20 %15 + %32 = OpTypeStruct %31 + %33 = OpTypePointer Uniform %32 + %34 = OpVariable %33 Uniform + %35 = OpTypePointer Uniform %20 + %52 = OpConstant %10 1 + %60 = OpConstant %20 1 + %72 = OpTypePointer Output %7 + %73 = OpVariable %72 Output + %99 = OpConstant %10 4 + %100 = OpTypeArray %7 %99 + %104 = OpTypePointer Function %100 + %106 = OpTypePointer Function %7 + %111 = OpConstantFalse %25 + %112 = OpTypePointer Function %25 + %114 = OpConstantTrue %25 + %4 = OpFunction %2 None %3 + %5 = OpLabel + %113 = OpVariable %112 Function %111 + %30 = OpVariable %29 Function + %105 = OpVariable %104 Function + OpSelectionMerge %109 None + OpSwitch %11 %110 + %110 = OpLabel + %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 %28 + %27 = OpLabel + %36 = OpAccessChain %35 %34 %21 %21 + %37 = OpLoad %20 %36 + OpStore %30 %37 + OpBranch %38 + %38 = OpLabel + %43 = OpLoad %20 %30 + %46 = OpINotEqual %25 %43 %37 + OpLoopMerge %40 %41 None + OpBranchConditional %46 %39 %40 + %39 = OpLabel + OpStore %113 %114 + OpBranch %40 + %41 = OpLabel + OpBranch %38 + %40 = OpLabel + %116 = OpLoad %25 %113 + OpSelectionMerge %115 None + OpBranchConditional %116 %109 %115 + %115 = OpLabel + OpBranch %28 + %28 = OpLabel + OpBranch %48 + %48 = OpLabel + OpLoopMerge %50 %51 None + OpBranch %49 + %49 = OpLabel + %53 = OpAccessChain %12 %9 %52 + %54 = OpLoad %6 %53 + %57 = OpFOrdLessThan %25 %54 %24 + %61 = OpAccessChain %22 %19 %21 %60 + %62 = OpLoad %6 %61 + %63 = OpFOrdGreaterThanEqual %25 %54 %62 + OpSelectionMerge %65 None + OpBranchConditional %63 %64 %65 + %64 = OpLabel + OpStore %113 %114 + OpBranch %50 + %65 = OpLabel + OpBranch %51 + %51 = OpLabel + OpBranchConditional %57 %48 %50 + %50 = OpLabel + %118 = OpLoad %25 %113 + OpSelectionMerge %117 None + OpBranchConditional %118 %109 %117 + %117 = OpLabel + %74 = OpAccessChain %35 %34 %21 %21 + %75 = OpLoad %20 %74 + %76 = OpConvertSToF %6 %75 + %77 = OpAccessChain %35 %34 %21 %60 + %78 = OpLoad %20 %77 + %79 = OpConvertSToF %6 %78 + %86 = OpCompositeConstruct %7 %76 %79 %79 %76 + %90 = OpCompositeConstruct %7 %79 %79 %79 %79 + %101 = OpCompositeConstruct %100 %86 %90 %90 %90 + OpStore %105 %101 + %107 = OpAccessChain %106 %105 %78 + %108 = OpLoad %7 %107 + OpStore %73 %108 + OpStore %113 %114 + OpBranch %109 + %109 = OpLabel + OpReturn + OpFunctionEnd +END + +# uniforms for variant + +# _GLF_uniform_float_values +BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA + 0.0 300.0 +END +# _GLF_uniform_int_values +BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA + 1 0 +END + +BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM + +PIPELINE graphics variant_pipeline + ATTACH variant_vertex_shader + ATTACH variant_fragment_shader + FRAMEBUFFER_SIZE 256 256 + BIND BUFFER variant_framebuffer AS color LOCATION 0 + BIND BUFFER variant__GLF_uniform_float_values AS uniform DESCRIPTOR_SET 0 BINDING 1 + BIND BUFFER variant__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 0 +END +CLEAR_COLOR variant_pipeline 0 0 0 255 + +CLEAR variant_pipeline +RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 256 256 + +EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255 diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-function-loop-condition-uniform-shift-right.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-function-loop-condition-uniform-shift-right.amber new file mode 100644 index 0000000..72f46a3 --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-function-loop-condition-uniform-shift-right.amber @@ -0,0 +1,287 @@ +#!amber + +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# A test for a coverage-gap found by the GraphicsFuzz project. + +# Short description: A fragment shader that covers specific LLVM code paths + +# The test passes because the shader always writes red. + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 320 es +# #define _int_0 _GLF_uniform_int_values[0] +# #define _int_5 _GLF_uniform_int_values[1] +# #define _int_30 _GLF_uniform_int_values[2] +# #define _int_1 _GLF_uniform_int_values[3] +# #define _int_6 _GLF_uniform_int_values[4] +# +# precision highp float; +# precision highp int; +# +# // Contents of _GLF_uniform_int_values: [0, 5, 30, 1, 6] +# layout(set = 0, binding = 0) uniform buf0 +# { +# int _GLF_uniform_int_values[5]; +# }; +# +# // Contents of two: 2 +# layout(push_constant) uniform buf_push +# { +# int two; +# }; +# +# layout(location = 0) out vec4 _GLF_color; +# +# // Always returns 6. +# int func() +# { +# int a = _int_1; +# +# // Iterated twice. +# for(int j = 0; j != two >> 1; j++) +# { +# while(a < _int_6) +# { +# a++; +# } +# } +# return a; +# } +# +# void main() +# { +# int a = _int_0; +# int b = _int_0; +# +# while(a < _int_5) +# { +# a++; +# b += func(); +# } +# +# // Always true. +# if(b == _int_30) +# { +# _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: 106 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %87 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 320 + OpName %4 "main" + OpName %8 "func(" + OpName %11 "a" + OpName %15 "buf0" + OpMemberName %15 0 "_GLF_uniform_int_values" + OpName %17 "" + OpName %23 "j" + OpName %30 "buf_push" + OpMemberName %30 0 "two" + OpName %32 "" + OpName %57 "a" + OpName %60 "b" + OpName %87 "_GLF_color" + OpDecorate %14 ArrayStride 16 + OpMemberDecorate %15 0 Offset 0 + OpDecorate %15 Block + OpDecorate %17 DescriptorSet 0 + OpDecorate %17 Binding 0 + OpMemberDecorate %30 0 Offset 0 + OpDecorate %30 Block + OpDecorate %87 Location 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeInt 32 1 + %7 = OpTypeFunction %6 + %10 = OpTypePointer Function %6 + %12 = OpTypeInt 32 0 + %13 = OpConstant %12 5 + %14 = OpTypeArray %6 %13 + %15 = OpTypeStruct %14 + %16 = OpTypePointer Uniform %15 + %17 = OpVariable %16 Uniform + %18 = OpConstant %6 0 + %19 = OpConstant %6 3 + %20 = OpTypePointer Uniform %6 + %30 = OpTypeStruct %6 + %31 = OpTypePointer PushConstant %30 + %32 = OpVariable %31 PushConstant + %33 = OpTypePointer PushConstant %6 + %36 = OpConstant %6 1 + %38 = OpTypeBool + %46 = OpConstant %6 4 + %78 = OpConstant %6 2 + %84 = OpTypeFloat 32 + %85 = OpTypeVector %84 4 + %86 = OpTypePointer Output %85 + %87 = OpVariable %86 Output + %4 = OpFunction %2 None %3 + %5 = OpLabel + %57 = OpVariable %10 Function + %60 = OpVariable %10 Function + %58 = OpAccessChain %20 %17 %18 %18 + %59 = OpLoad %6 %58 + OpStore %57 %59 + %61 = OpAccessChain %20 %17 %18 %18 + %62 = OpLoad %6 %61 + OpStore %60 %62 + OpBranch %63 + %63 = OpLabel + OpLoopMerge %65 %66 None + OpBranch %67 + %67 = OpLabel + %68 = OpLoad %6 %57 + %69 = OpAccessChain %20 %17 %18 %36 + %70 = OpLoad %6 %69 + %71 = OpSLessThan %38 %68 %70 + OpBranchConditional %71 %64 %65 + %64 = OpLabel + %72 = OpLoad %6 %57 + %73 = OpIAdd %6 %72 %36 + OpStore %57 %73 + %74 = OpFunctionCall %6 %8 + %75 = OpLoad %6 %60 + %76 = OpIAdd %6 %75 %74 + OpStore %60 %76 + OpBranch %66 + %66 = OpLabel + OpBranch %63 + %65 = OpLabel + %77 = OpLoad %6 %60 + %79 = OpAccessChain %20 %17 %18 %78 + %80 = OpLoad %6 %79 + %81 = OpIEqual %38 %77 %80 + OpSelectionMerge %83 None + OpBranchConditional %81 %82 %101 + %82 = OpLabel + %88 = OpAccessChain %20 %17 %18 %19 + %89 = OpLoad %6 %88 + %90 = OpConvertSToF %84 %89 + %91 = OpAccessChain %20 %17 %18 %18 + %92 = OpLoad %6 %91 + %93 = OpConvertSToF %84 %92 + %94 = OpAccessChain %20 %17 %18 %18 + %95 = OpLoad %6 %94 + %96 = OpConvertSToF %84 %95 + %97 = OpAccessChain %20 %17 %18 %19 + %98 = OpLoad %6 %97 + %99 = OpConvertSToF %84 %98 + %100 = OpCompositeConstruct %85 %90 %93 %96 %99 + OpStore %87 %100 + OpBranch %83 + %101 = OpLabel + %102 = OpAccessChain %20 %17 %18 %18 + %103 = OpLoad %6 %102 + %104 = OpConvertSToF %84 %103 + %105 = OpCompositeConstruct %85 %104 %104 %104 %104 + OpStore %87 %105 + OpBranch %83 + %83 = OpLabel + OpReturn + OpFunctionEnd + %8 = OpFunction %6 None %7 + %9 = OpLabel + %11 = OpVariable %10 Function + %23 = OpVariable %10 Function + %21 = OpAccessChain %20 %17 %18 %19 + %22 = OpLoad %6 %21 + OpStore %11 %22 + OpStore %23 %18 + OpBranch %24 + %24 = OpLabel + OpLoopMerge %26 %27 None + OpBranch %28 + %28 = OpLabel + %29 = OpLoad %6 %23 + %34 = OpAccessChain %33 %32 %18 + %35 = OpLoad %6 %34 + %37 = OpShiftRightArithmetic %6 %35 %36 + %39 = OpINotEqual %38 %29 %37 + OpBranchConditional %39 %25 %26 + %25 = OpLabel + OpBranch %40 + %40 = OpLabel + OpLoopMerge %42 %43 None + OpBranch %44 + %44 = OpLabel + %45 = OpLoad %6 %11 + %47 = OpAccessChain %20 %17 %18 %46 + %48 = OpLoad %6 %47 + %49 = OpSLessThan %38 %45 %48 + OpBranchConditional %49 %41 %42 + %41 = OpLabel + %50 = OpLoad %6 %11 + %51 = OpIAdd %6 %50 %36 + OpStore %11 %51 + OpBranch %43 + %43 = OpLabel + OpBranch %40 + %42 = OpLabel + OpBranch %27 + %27 = OpLabel + %52 = OpLoad %6 %23 + %53 = OpIAdd %6 %52 %36 + OpStore %23 %53 + OpBranch %24 + %26 = OpLabel + %54 = OpLoad %6 %11 + OpReturnValue %54 + OpFunctionEnd +END + +# uniforms for variant + +# two +BUFFER variant_two DATA_TYPE int32 STD140 DATA + 2 +END +# _GLF_uniform_int_values +BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA + 0 5 30 1 6 +END + +BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM + +PIPELINE graphics variant_pipeline + ATTACH variant_vertex_shader + ATTACH variant_fragment_shader + FRAMEBUFFER_SIZE 256 256 + BIND BUFFER variant_framebuffer AS color LOCATION 0 + BIND BUFFER variant_two AS push_constant + BIND BUFFER variant__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 0 +END +CLEAR_COLOR variant_pipeline 0 0 0 255 + +CLEAR variant_pipeline +RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 256 256 + +EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255 diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-function-nested-loops-break-early-never-discard.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-function-nested-loops-break-early-never-discard.amber new file mode 100644 index 0000000..582f309 --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-function-nested-loops-break-early-never-discard.amber @@ -0,0 +1,435 @@ +#!amber + +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# A test for a coverage-gap found by the GraphicsFuzz project. + +# Short description: A fragment shader that covers specific LLVM code paths + +# The test passes because the shader always writes red. + +# Optimized using spirv-opt with the following arguments: +# '--convert-local-access-chains' +# '--copy-propagate-arrays' +# '--reduce-load-size' +# '--scalar-replacement=100' +# '--eliminate-dead-code-aggressive' +# '--eliminate-dead-inserts' +# '--convert-local-access-chains' +# '--private-to-local' +# '--eliminate-local-single-block' +# '--combine-access-chains' +# '--eliminate-local-single-block' +# '--eliminate-local-single-store' +# '--eliminate-dead-branches' +# '--merge-return' +# '--eliminate-dead-branches' +# '--eliminate-local-single-store' +# '--ccp' +# '--simplify-instructions' +# '--eliminate-dead-inserts' +# '--inline-entry-points-exhaustive' +# '--simplify-instructions' +# '--eliminate-dead-branches' +# '--merge-blocks' +# '--eliminate-dead-branches' +# '--merge-return' +# '--ccp' +# spirv-opt commit hash: a0370efd589be33d5d9a85cfde2f85841b3755af + + + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 320 es +# #define _int_20 _GLF_uniform_int_values[0] +# #define _int_5 _GLF_uniform_int_values[1] +# #define _int_0 _GLF_uniform_int_values[2] +# #define _int_1 _GLF_uniform_int_values[3] +# #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: [20, 5, 0, 1] +# layout(set = 0, binding = 1) uniform buf1 +# { +# int _GLF_uniform_int_values[4]; +# }; +# +# layout(location = 0) out vec4 _GLF_color; +# +# int func() +# { +# int a = _int_0; +# +# for(int i = _int_1; i < _int_20; i++) +# { +# // Always false. +# if(gl_FragCoord.y < 0.0) +# { +# discard; +# } +# +# for(int j = 1; j < 80; j ++) +# { +# if(a >= 5) +# { +# // Always false. +# if(gl_FragCoord.y < 0.0) +# { +# continue; +# } +# +# break; +# } +# +# a++; +# +# if(gl_FragCoord.x < _float_1_0) +# { +# _GLF_color = vec4(_int_1); +# } +# } +# } +# +# // Always returns 5. +# return a; +# } +# +# void main() +# { +# _GLF_color = vec4(_int_0); +# +# // Always true. +# if(func() == _int_5) +# { +# _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1); +# } +# } +SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0 +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 10 +; Bound: 180 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %40 %88 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 320 + OpName %4 "main" + OpName %8 "func(" + OpName %11 "a" + OpName %15 "buf1" + OpMemberName %15 0 "_GLF_uniform_int_values" + OpName %17 "" + OpName %23 "i" + OpName %40 "gl_FragCoord" + OpName %50 "j" + OpName %78 "buf0" + OpMemberName %78 0 "_GLF_uniform_float_values" + OpName %80 "" + OpName %88 "_GLF_color" + OpDecorate %14 ArrayStride 16 + OpMemberDecorate %15 0 Offset 0 + OpDecorate %15 Block + OpDecorate %17 DescriptorSet 0 + OpDecorate %17 Binding 1 + OpDecorate %40 BuiltIn FragCoord + OpDecorate %77 ArrayStride 16 + OpMemberDecorate %78 0 Offset 0 + OpDecorate %78 Block + OpDecorate %80 DescriptorSet 0 + OpDecorate %80 Binding 0 + OpDecorate %88 Location 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeInt 32 1 + %7 = OpTypeFunction %6 + %10 = OpTypePointer Function %6 + %12 = OpTypeInt 32 0 + %13 = OpConstant %12 4 + %14 = OpTypeArray %6 %13 + %15 = OpTypeStruct %14 + %16 = OpTypePointer Uniform %15 + %17 = OpVariable %16 Uniform + %18 = OpConstant %6 0 + %19 = OpConstant %6 2 + %20 = OpTypePointer Uniform %6 + %24 = OpConstant %6 3 + %35 = OpTypeBool + %37 = OpTypeFloat 32 + %38 = OpTypeVector %37 4 + %39 = OpTypePointer Input %38 + %40 = OpVariable %39 Input + %41 = OpConstant %12 1 + %42 = OpTypePointer Input %37 + %45 = OpConstant %37 0 + %51 = OpConstant %6 1 + %58 = OpConstant %6 80 + %61 = OpConstant %6 5 + %74 = OpConstant %12 0 + %77 = OpTypeArray %37 %41 + %78 = OpTypeStruct %77 + %79 = OpTypePointer Uniform %78 + %80 = OpVariable %79 Uniform + %81 = OpTypePointer Uniform %37 + %87 = OpTypePointer Output %38 + %88 = OpVariable %87 Output + %4 = OpFunction %2 None %3 + %5 = OpLabel + %123 = OpVariable %10 Function + %124 = OpVariable %10 Function + %125 = OpVariable %10 Function + %126 = OpVariable %10 Function + %100 = OpAccessChain %20 %17 %18 %19 + %101 = OpLoad %6 %100 + %102 = OpConvertSToF %37 %101 + %103 = OpCompositeConstruct %38 %102 %102 %102 %102 + OpStore %88 %103 + %128 = OpAccessChain %20 %17 %18 %19 + %129 = OpLoad %6 %128 + OpStore %123 %129 + %130 = OpAccessChain %20 %17 %18 %24 + %131 = OpLoad %6 %130 + OpStore %124 %131 + OpBranch %132 + %132 = OpLabel + %134 = OpLoad %6 %124 + %135 = OpAccessChain %20 %17 %18 %18 + %136 = OpLoad %6 %135 + %137 = OpSLessThan %35 %134 %136 + OpLoopMerge %178 %175 None + OpBranchConditional %137 %138 %178 + %138 = OpLabel + %139 = OpAccessChain %42 %40 %41 + %140 = OpLoad %37 %139 + %141 = OpFOrdLessThan %35 %140 %45 + OpSelectionMerge %143 None + OpBranchConditional %141 %142 %143 + %142 = OpLabel + OpKill + %143 = OpLabel + OpStore %125 %51 + OpBranch %144 + %144 = OpLabel + %146 = OpLoad %6 %125 + %147 = OpSLessThan %35 %146 %58 + OpLoopMerge %174 %171 None + OpBranchConditional %147 %148 %174 + %148 = OpLabel + %149 = OpLoad %6 %123 + %150 = OpSGreaterThanEqual %35 %149 %61 + OpSelectionMerge %157 None + OpBranchConditional %150 %151 %157 + %151 = OpLabel + %152 = OpAccessChain %42 %40 %41 + %153 = OpLoad %37 %152 + %154 = OpFOrdLessThan %35 %153 %45 + OpSelectionMerge %156 None + OpBranchConditional %154 %155 %156 + %155 = OpLabel + OpBranch %171 + %156 = OpLabel + OpBranch %174 + %157 = OpLabel + %158 = OpLoad %6 %123 + %159 = OpIAdd %6 %158 %51 + OpStore %123 %159 + %160 = OpAccessChain %42 %40 %74 + %161 = OpLoad %37 %160 + %162 = OpAccessChain %81 %80 %18 %18 + %163 = OpLoad %37 %162 + %164 = OpFOrdLessThan %35 %161 %163 + OpSelectionMerge %170 None + OpBranchConditional %164 %165 %170 + %165 = OpLabel + %166 = OpAccessChain %20 %17 %18 %24 + %167 = OpLoad %6 %166 + %168 = OpConvertSToF %37 %167 + %169 = OpCompositeConstruct %38 %168 %168 %168 %168 + OpStore %88 %169 + OpBranch %170 + %170 = OpLabel + OpBranch %171 + %171 = OpLabel + %172 = OpLoad %6 %125 + %173 = OpIAdd %6 %172 %51 + OpStore %125 %173 + OpBranch %144 + %174 = OpLabel + OpBranch %175 + %175 = OpLabel + %176 = OpLoad %6 %124 + %177 = OpIAdd %6 %176 %51 + OpStore %124 %177 + OpBranch %132 + %178 = OpLabel + %179 = OpLoad %6 %123 + OpStore %126 %179 + %104 = OpLoad %6 %126 + %105 = OpAccessChain %20 %17 %18 %51 + %106 = OpLoad %6 %105 + %107 = OpIEqual %35 %104 %106 + OpSelectionMerge %109 None + OpBranchConditional %107 %108 %109 + %108 = OpLabel + %110 = OpAccessChain %20 %17 %18 %24 + %111 = OpLoad %6 %110 + %112 = OpConvertSToF %37 %111 + %113 = OpAccessChain %20 %17 %18 %19 + %114 = OpLoad %6 %113 + %115 = OpConvertSToF %37 %114 + %116 = OpAccessChain %20 %17 %18 %19 + %117 = OpLoad %6 %116 + %118 = OpConvertSToF %37 %117 + %119 = OpAccessChain %20 %17 %18 %24 + %120 = OpLoad %6 %119 + %121 = OpConvertSToF %37 %120 + %122 = OpCompositeConstruct %38 %112 %115 %118 %121 + OpStore %88 %122 + OpBranch %109 + %109 = OpLabel + OpReturn + OpFunctionEnd + %8 = OpFunction %6 None %7 + %9 = OpLabel + %11 = OpVariable %10 Function + %23 = OpVariable %10 Function + %50 = OpVariable %10 Function + %21 = OpAccessChain %20 %17 %18 %19 + %22 = OpLoad %6 %21 + OpStore %11 %22 + %25 = OpAccessChain %20 %17 %18 %24 + %26 = OpLoad %6 %25 + OpStore %23 %26 + OpBranch %27 + %27 = OpLabel + OpLoopMerge %29 %30 None + OpBranch %31 + %31 = OpLabel + %32 = OpLoad %6 %23 + %33 = OpAccessChain %20 %17 %18 %18 + %34 = OpLoad %6 %33 + %36 = OpSLessThan %35 %32 %34 + OpBranchConditional %36 %28 %29 + %28 = OpLabel + %43 = OpAccessChain %42 %40 %41 + %44 = OpLoad %37 %43 + %46 = OpFOrdLessThan %35 %44 %45 + OpSelectionMerge %48 None + OpBranchConditional %46 %47 %48 + %47 = OpLabel + OpKill + %48 = OpLabel + OpStore %50 %51 + OpBranch %52 + %52 = OpLabel + OpLoopMerge %54 %55 None + OpBranch %56 + %56 = OpLabel + %57 = OpLoad %6 %50 + %59 = OpSLessThan %35 %57 %58 + OpBranchConditional %59 %53 %54 + %53 = OpLabel + %60 = OpLoad %6 %11 + %62 = OpSGreaterThanEqual %35 %60 %61 + OpSelectionMerge %64 None + OpBranchConditional %62 %63 %64 + %63 = OpLabel + %65 = OpAccessChain %42 %40 %41 + %66 = OpLoad %37 %65 + %67 = OpFOrdLessThan %35 %66 %45 + OpSelectionMerge %69 None + OpBranchConditional %67 %68 %69 + %68 = OpLabel + OpBranch %55 + %69 = OpLabel + OpBranch %54 + %64 = OpLabel + %72 = OpLoad %6 %11 + %73 = OpIAdd %6 %72 %51 + OpStore %11 %73 + %75 = OpAccessChain %42 %40 %74 + %76 = OpLoad %37 %75 + %82 = OpAccessChain %81 %80 %18 %18 + %83 = OpLoad %37 %82 + %84 = OpFOrdLessThan %35 %76 %83 + OpSelectionMerge %86 None + OpBranchConditional %84 %85 %86 + %85 = OpLabel + %89 = OpAccessChain %20 %17 %18 %24 + %90 = OpLoad %6 %89 + %91 = OpConvertSToF %37 %90 + %92 = OpCompositeConstruct %38 %91 %91 %91 %91 + OpStore %88 %92 + OpBranch %86 + %86 = OpLabel + OpBranch %55 + %55 = OpLabel + %93 = OpLoad %6 %50 + %94 = OpIAdd %6 %93 %51 + OpStore %50 %94 + OpBranch %52 + %54 = OpLabel + OpBranch %30 + %30 = OpLabel + %95 = OpLoad %6 %23 + %96 = OpIAdd %6 %95 %51 + OpStore %23 %96 + OpBranch %27 + %29 = OpLabel + %97 = OpLoad %6 %11 + OpReturnValue %97 + OpFunctionEnd +END + +# uniforms for variant + +# _GLF_uniform_int_values +BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA + 20 5 0 1 +END +# _GLF_uniform_float_values +BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA + 1.0 +END + +BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM + +PIPELINE graphics variant_pipeline + ATTACH variant_vertex_shader + ATTACH variant_fragment_shader + FRAMEBUFFER_SIZE 256 256 + BIND BUFFER variant_framebuffer AS color LOCATION 0 + BIND BUFFER variant__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 1 + BIND BUFFER variant__GLF_uniform_float_values AS uniform DESCRIPTOR_SET 0 BINDING 0 +END +CLEAR_COLOR variant_pipeline 0 0 0 255 + +CLEAR variant_pipeline +RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 256 256 + +EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255 diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-function-two-loops-limit-using-arguments-array-element-copies.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-function-two-loops-limit-using-arguments-array-element-copies.amber new file mode 100644 index 0000000..7e0f151 --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-function-two-loops-limit-using-arguments-array-element-copies.amber @@ -0,0 +1,335 @@ +#!amber + +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# A test for a coverage-gap found by the GraphicsFuzz project. + +# Short description: A fragment shader that covers specific LLVM code paths + +# The test passes because the shader always writes red. + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 320 es +# +# #define _GLF_MAKE_IN_BOUNDS_INT(IDX, SZ) clamp(IDX, 0, SZ - 1) +# #define _int_1 _GLF_uniform_int_values[0] +# #define _int_0 _GLF_uniform_int_values[1] +# #define _int_10 _GLF_uniform_int_values[2] +# +# precision highp int; +# precision highp float; +# +# // Contents of _GLF_uniform_int_values: [1, 0, 10] +# layout(set = 0, binding = 0) uniform buf0 +# { +# int _GLF_uniform_int_values[3]; +# }; +# layout(location = 0) out vec4 _GLF_color; +# +# int arr0[10] = int[10](1, 1, 1, 1, 1, 1, 1, 1, 1, 1), arr1[10] = int[10](2, 2, 2, 2, 2, 2, 2, 2, 2, 2); +# +# void func(int a, int b, int c) +# { +# for(int i = a; i <= b; i++) +# { +# arr1[_GLF_MAKE_IN_BOUNDS_INT(i, 10)] = arr0[_GLF_MAKE_IN_BOUNDS_INT(i, 10)]; +# } +# +# for(int i = a; i <= c; i++) +# { +# arr0[_GLF_MAKE_IN_BOUNDS_INT(i, 10)] = arr1[_GLF_MAKE_IN_BOUNDS_INT(_int_1, 10)]; +# } +# } +# +# void main() +# { +# // Sets arr1 elements 1..9 to one. +# for(int i = 1; i < 50; i ++) +# { +# func(i, 2 * i - 1, 3 * i - 1); +# } +# +# _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1); +# +# // Check for errors. +# for(int i = _int_1; i < _int_10; i ++) +# { +# if(arr0[i] != _int_1 || arr1[i] != _int_1) +# { +# _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: 149 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %99 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 320 + OpName %4 "main" + OpName %12 "func(i1;i1;i1;" + OpName %9 "a" + OpName %10 "b" + OpName %11 "c" + OpName %18 "arr0" + OpName %21 "arr1" + OpName %24 "i" + OpName %47 "i" + OpName %61 "buf0" + OpMemberName %61 0 "_GLF_uniform_int_values" + OpName %63 "" + OpName %73 "i" + OpName %89 "param" + OpName %91 "param" + OpName %92 "param" + OpName %99 "_GLF_color" + OpName %113 "i" + OpDecorate %60 ArrayStride 16 + OpMemberDecorate %61 0 Offset 0 + OpDecorate %61 Block + OpDecorate %63 DescriptorSet 0 + OpDecorate %63 Binding 0 + OpDecorate %99 Location 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeInt 32 1 + %7 = OpTypePointer Function %6 + %8 = OpTypeFunction %2 %7 %7 %7 + %14 = OpTypeInt 32 0 + %15 = OpConstant %14 10 + %16 = OpTypeArray %6 %15 + %17 = OpTypePointer Private %16 + %18 = OpVariable %17 Private + %19 = OpConstant %6 1 + %20 = OpConstantComposite %16 %19 %19 %19 %19 %19 %19 %19 %19 %19 %19 + %21 = OpVariable %17 Private + %22 = OpConstant %6 2 + %23 = OpConstantComposite %16 %22 %22 %22 %22 %22 %22 %22 %22 %22 %22 + %33 = OpTypeBool + %36 = OpConstant %6 0 + %37 = OpConstant %6 9 + %41 = OpTypePointer Private %6 + %59 = OpConstant %14 3 + %60 = OpTypeArray %6 %59 + %61 = OpTypeStruct %60 + %62 = OpTypePointer Uniform %61 + %63 = OpVariable %62 Uniform + %64 = OpTypePointer Uniform %6 + %80 = OpConstant %6 50 + %85 = OpConstant %6 3 + %96 = OpTypeFloat 32 + %97 = OpTypeVector %96 4 + %98 = OpTypePointer Output %97 + %99 = OpVariable %98 Output + %4 = OpFunction %2 None %3 + %5 = OpLabel + %73 = OpVariable %7 Function + %89 = OpVariable %7 Function + %91 = OpVariable %7 Function + %92 = OpVariable %7 Function + %113 = OpVariable %7 Function + OpStore %18 %20 + OpStore %21 %23 + OpStore %73 %19 + OpBranch %74 + %74 = OpLabel + OpLoopMerge %76 %77 None + OpBranch %78 + %78 = OpLabel + %79 = OpLoad %6 %73 + %81 = OpSLessThan %33 %79 %80 + OpBranchConditional %81 %75 %76 + %75 = OpLabel + %82 = OpLoad %6 %73 + %83 = OpIMul %6 %22 %82 + %84 = OpISub %6 %83 %19 + %86 = OpLoad %6 %73 + %87 = OpIMul %6 %85 %86 + %88 = OpISub %6 %87 %19 + %90 = OpLoad %6 %73 + OpStore %89 %90 + OpStore %91 %84 + OpStore %92 %88 + %93 = OpFunctionCall %2 %12 %89 %91 %92 + OpBranch %77 + %77 = OpLabel + %94 = OpLoad %6 %73 + %95 = OpIAdd %6 %94 %19 + OpStore %73 %95 + OpBranch %74 + %76 = OpLabel + %100 = OpAccessChain %64 %63 %36 %36 + %101 = OpLoad %6 %100 + %102 = OpConvertSToF %96 %101 + %103 = OpAccessChain %64 %63 %36 %19 + %104 = OpLoad %6 %103 + %105 = OpConvertSToF %96 %104 + %106 = OpAccessChain %64 %63 %36 %19 + %107 = OpLoad %6 %106 + %108 = OpConvertSToF %96 %107 + %109 = OpAccessChain %64 %63 %36 %36 + %110 = OpLoad %6 %109 + %111 = OpConvertSToF %96 %110 + %112 = OpCompositeConstruct %97 %102 %105 %108 %111 + OpStore %99 %112 + %114 = OpAccessChain %64 %63 %36 %36 + %115 = OpLoad %6 %114 + OpStore %113 %115 + OpBranch %116 + %116 = OpLabel + OpLoopMerge %118 %119 None + OpBranch %120 + %120 = OpLabel + %121 = OpLoad %6 %113 + %122 = OpAccessChain %64 %63 %36 %22 + %123 = OpLoad %6 %122 + %124 = OpSLessThan %33 %121 %123 + OpBranchConditional %124 %117 %118 + %117 = OpLabel + %125 = OpLoad %6 %113 + %126 = OpAccessChain %41 %18 %125 + %127 = OpLoad %6 %126 + %128 = OpAccessChain %64 %63 %36 %36 + %129 = OpLoad %6 %128 + %130 = OpINotEqual %33 %127 %129 + %131 = OpLogicalNot %33 %130 + OpSelectionMerge %133 None + OpBranchConditional %131 %132 %133 + %132 = OpLabel + %134 = OpLoad %6 %113 + %135 = OpAccessChain %41 %21 %134 + %136 = OpLoad %6 %135 + %137 = OpAccessChain %64 %63 %36 %36 + %138 = OpLoad %6 %137 + %139 = OpINotEqual %33 %136 %138 + OpBranch %133 + %133 = OpLabel + %140 = OpPhi %33 %130 %117 %139 %132 + OpSelectionMerge %142 None + OpBranchConditional %140 %141 %142 + %141 = OpLabel + %143 = OpAccessChain %64 %63 %36 %19 + %144 = OpLoad %6 %143 + %145 = OpConvertSToF %96 %144 + %146 = OpCompositeConstruct %97 %145 %145 %145 %145 + OpStore %99 %146 + OpBranch %142 + %142 = OpLabel + OpBranch %119 + %119 = OpLabel + %147 = OpLoad %6 %113 + %148 = OpIAdd %6 %147 %19 + OpStore %113 %148 + OpBranch %116 + %118 = OpLabel + OpReturn + OpFunctionEnd + %12 = OpFunction %2 None %8 + %9 = OpFunctionParameter %7 + %10 = OpFunctionParameter %7 + %11 = OpFunctionParameter %7 + %13 = OpLabel + %24 = OpVariable %7 Function + %47 = OpVariable %7 Function + %25 = OpLoad %6 %9 + OpStore %24 %25 + OpBranch %26 + %26 = OpLabel + OpLoopMerge %28 %29 None + OpBranch %30 + %30 = OpLabel + %31 = OpLoad %6 %24 + %32 = OpLoad %6 %10 + %34 = OpSLessThanEqual %33 %31 %32 + OpBranchConditional %34 %27 %28 + %27 = OpLabel + %35 = OpLoad %6 %24 + %38 = OpExtInst %6 %1 SClamp %35 %36 %37 + %39 = OpLoad %6 %24 + %40 = OpExtInst %6 %1 SClamp %39 %36 %37 + %42 = OpAccessChain %41 %18 %40 + %43 = OpLoad %6 %42 + %44 = OpAccessChain %41 %21 %38 + OpStore %44 %43 + OpBranch %29 + %29 = OpLabel + %45 = OpLoad %6 %24 + %46 = OpIAdd %6 %45 %19 + OpStore %24 %46 + OpBranch %26 + %28 = OpLabel + %48 = OpLoad %6 %9 + OpStore %47 %48 + OpBranch %49 + %49 = OpLabel + OpLoopMerge %51 %52 None + OpBranch %53 + %53 = OpLabel + %54 = OpLoad %6 %47 + %55 = OpLoad %6 %11 + %56 = OpSLessThanEqual %33 %54 %55 + OpBranchConditional %56 %50 %51 + %50 = OpLabel + %57 = OpLoad %6 %47 + %58 = OpExtInst %6 %1 SClamp %57 %36 %37 + %65 = OpAccessChain %64 %63 %36 %36 + %66 = OpLoad %6 %65 + %67 = OpExtInst %6 %1 SClamp %66 %36 %37 + %68 = OpAccessChain %41 %21 %67 + %69 = OpLoad %6 %68 + %70 = OpAccessChain %41 %18 %58 + OpStore %70 %69 + OpBranch %52 + %52 = OpLabel + %71 = OpLoad %6 %47 + %72 = OpIAdd %6 %71 %19 + OpStore %47 %72 + OpBranch %49 + %51 = OpLabel + OpReturn + OpFunctionEnd +END + +# uniforms for variant + +# _GLF_uniform_int_values +BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA + 1 0 10 +END + +BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM + +PIPELINE graphics variant_pipeline + ATTACH variant_vertex_shader + ATTACH variant_fragment_shader + FRAMEBUFFER_SIZE 256 256 + BIND BUFFER variant_framebuffer AS color LOCATION 0 + BIND BUFFER variant__GLF_uniform_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-set-array-element-once-index-using-findmsb.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-global-loop-counter-set-array-element-once-index-using-findmsb.amber new file mode 100644 index 0000000..be0cc07 --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-global-loop-counter-set-array-element-once-index-using-findmsb.amber @@ -0,0 +1,390 @@ +#!amber + +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# A test for a coverage-gap found by the GraphicsFuzz project. + +# Short description: A fragment shader that covers specific LLVM code paths + +# The test passes because the shader always writes red. + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 320 es +# +# #define _int_1 _GLF_uniform_int_values[0] +# #define _int_2 _GLF_uniform_int_values[1] +# #define _int_0 _GLF_uniform_int_values[2] +# #define _float_1_0 _GLF_uniform_float_values[0] +# #define _float_0_0 _GLF_uniform_float_values[1] +# +# precision highp float; +# precision highp int; +# +# // Contents of _GLF_uniform_float_values: [1.0, 0.0] +# layout(set = 0, binding = 0) uniform buf0 +# { +# float _GLF_uniform_float_values[2]; +# }; +# +# // Contents of _GLF_uniform_int_values: [1, 2, 0] +# layout(set = 0, binding = 1) uniform buf1 +# { +# int _GLF_uniform_int_values[3]; +# }; +# +# const int _GLF_global_loop_bound = 50; +# int _GLF_global_loop_count = 0; +# +# layout(location = 0) out vec4 _GLF_color; +# +# // Contents of resolution: [256.0, 256.0] +# layout(push_constant) uniform buf_push +# { +# vec2 resolution; +# }; +# +# void main() +# { +# float arr[32] = float[32](_float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0); +# int i = 1; +# +# while(_GLF_global_loop_count < _GLF_global_loop_bound) +# { +# _GLF_global_loop_count ++; +# +# // Always false. +# if(gl_FragCoord.y < _float_0_0 && (true ? resolution : vec2(_int_1)).x >= _float_1_0) +# { +# break; +# } +# +# if(i == 1) +# { +# // Executed once. Sets arr[1] to zero. +# arr[i++] = _float_0_0; +# } +# } +# +# // Always true. Simplifies to arr[1] * resolution.y = 0.0 * 256.0 = 0.0. +# if(arr[findMSB(_int_2)] * resolution.y == _float_0_0) +# { +# _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1); +# } +# else +# { +# _GLF_color = vec4(_int_0); +# } +# } +SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0 +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 10 +; Bound: 191 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %103 %171 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 320 + OpName %4 "main" + OpName %8 "_GLF_global_loop_count" + OpName %15 "arr" + OpName %18 "buf0" + OpMemberName %18 0 "_GLF_uniform_float_values" + OpName %20 "" + OpName %88 "i" + OpName %103 "gl_FragCoord" + OpName %119 "buf_push" + OpMemberName %119 0 "resolution" + OpName %121 "" + OpName %128 "buf1" + OpMemberName %128 0 "_GLF_uniform_int_values" + OpName %130 "" + OpName %171 "_GLF_color" + OpDecorate %17 ArrayStride 16 + OpMemberDecorate %18 0 Offset 0 + OpDecorate %18 Block + OpDecorate %20 DescriptorSet 0 + OpDecorate %20 Binding 0 + OpDecorate %103 BuiltIn FragCoord + OpMemberDecorate %119 0 Offset 0 + OpDecorate %119 Block + OpDecorate %127 ArrayStride 16 + OpMemberDecorate %128 0 Offset 0 + OpDecorate %128 Block + OpDecorate %130 DescriptorSet 0 + OpDecorate %130 Binding 1 + OpDecorate %171 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 = OpTypeInt 32 0 + %12 = OpConstant %11 32 + %13 = OpTypeArray %10 %12 + %14 = OpTypePointer Function %13 + %16 = OpConstant %11 2 + %17 = OpTypeArray %10 %16 + %18 = OpTypeStruct %17 + %19 = OpTypePointer Uniform %18 + %20 = OpVariable %19 Uniform + %21 = OpTypePointer Uniform %10 + %87 = OpTypePointer Function %6 + %89 = OpConstant %6 1 + %96 = OpConstant %6 50 + %97 = OpTypeBool + %101 = OpTypeVector %10 4 + %102 = OpTypePointer Input %101 + %103 = OpVariable %102 Input + %104 = OpConstant %11 1 + %105 = OpTypePointer Input %10 + %113 = OpConstantTrue %97 + %114 = OpTypeVector %10 2 + %115 = OpTypePointer Function %114 + %119 = OpTypeStruct %114 + %120 = OpTypePointer PushConstant %119 + %121 = OpVariable %120 PushConstant + %122 = OpTypePointer PushConstant %114 + %126 = OpConstant %11 3 + %127 = OpTypeArray %6 %126 + %128 = OpTypeStruct %127 + %129 = OpTypePointer Uniform %128 + %130 = OpVariable %129 Uniform + %131 = OpTypePointer Uniform %6 + %136 = OpConstant %11 0 + %137 = OpTypePointer Function %10 + %161 = OpTypePointer PushConstant %10 + %170 = OpTypePointer Output %101 + %171 = OpVariable %170 Output + %175 = OpConstant %6 2 + %4 = OpFunction %2 None %3 + %5 = OpLabel + %15 = OpVariable %14 Function + %88 = OpVariable %87 Function + %116 = OpVariable %115 Function + OpStore %8 %9 + %22 = OpAccessChain %21 %20 %9 %9 + %23 = OpLoad %10 %22 + %24 = OpAccessChain %21 %20 %9 %9 + %25 = OpLoad %10 %24 + %26 = OpAccessChain %21 %20 %9 %9 + %27 = OpLoad %10 %26 + %28 = OpAccessChain %21 %20 %9 %9 + %29 = OpLoad %10 %28 + %30 = OpAccessChain %21 %20 %9 %9 + %31 = OpLoad %10 %30 + %32 = OpAccessChain %21 %20 %9 %9 + %33 = OpLoad %10 %32 + %34 = OpAccessChain %21 %20 %9 %9 + %35 = OpLoad %10 %34 + %36 = OpAccessChain %21 %20 %9 %9 + %37 = OpLoad %10 %36 + %38 = OpAccessChain %21 %20 %9 %9 + %39 = OpLoad %10 %38 + %40 = OpAccessChain %21 %20 %9 %9 + %41 = OpLoad %10 %40 + %42 = OpAccessChain %21 %20 %9 %9 + %43 = OpLoad %10 %42 + %44 = OpAccessChain %21 %20 %9 %9 + %45 = OpLoad %10 %44 + %46 = OpAccessChain %21 %20 %9 %9 + %47 = OpLoad %10 %46 + %48 = OpAccessChain %21 %20 %9 %9 + %49 = OpLoad %10 %48 + %50 = OpAccessChain %21 %20 %9 %9 + %51 = OpLoad %10 %50 + %52 = OpAccessChain %21 %20 %9 %9 + %53 = OpLoad %10 %52 + %54 = OpAccessChain %21 %20 %9 %9 + %55 = OpLoad %10 %54 + %56 = OpAccessChain %21 %20 %9 %9 + %57 = OpLoad %10 %56 + %58 = OpAccessChain %21 %20 %9 %9 + %59 = OpLoad %10 %58 + %60 = OpAccessChain %21 %20 %9 %9 + %61 = OpLoad %10 %60 + %62 = OpAccessChain %21 %20 %9 %9 + %63 = OpLoad %10 %62 + %64 = OpAccessChain %21 %20 %9 %9 + %65 = OpLoad %10 %64 + %66 = OpAccessChain %21 %20 %9 %9 + %67 = OpLoad %10 %66 + %68 = OpAccessChain %21 %20 %9 %9 + %69 = OpLoad %10 %68 + %70 = OpAccessChain %21 %20 %9 %9 + %71 = OpLoad %10 %70 + %72 = OpAccessChain %21 %20 %9 %9 + %73 = OpLoad %10 %72 + %74 = OpAccessChain %21 %20 %9 %9 + %75 = OpLoad %10 %74 + %76 = OpAccessChain %21 %20 %9 %9 + %77 = OpLoad %10 %76 + %78 = OpAccessChain %21 %20 %9 %9 + %79 = OpLoad %10 %78 + %80 = OpAccessChain %21 %20 %9 %9 + %81 = OpLoad %10 %80 + %82 = OpAccessChain %21 %20 %9 %9 + %83 = OpLoad %10 %82 + %84 = OpAccessChain %21 %20 %9 %9 + %85 = OpLoad %10 %84 + %86 = OpCompositeConstruct %13 %23 %25 %27 %29 %31 %33 %35 %37 %39 %41 %43 %45 %47 %49 %51 %53 %55 %57 %59 %61 %63 %65 %67 %69 %71 %73 %75 %77 %79 %81 %83 %85 + OpStore %15 %86 + OpStore %88 %89 + OpBranch %90 + %90 = OpLabel + OpLoopMerge %92 %93 None + OpBranch %94 + %94 = OpLabel + %95 = OpLoad %6 %8 + %98 = OpSLessThan %97 %95 %96 + OpBranchConditional %98 %91 %92 + %91 = OpLabel + %99 = OpLoad %6 %8 + %100 = OpIAdd %6 %99 %89 + OpStore %8 %100 + %106 = OpAccessChain %105 %103 %104 + %107 = OpLoad %10 %106 + %108 = OpAccessChain %21 %20 %9 %89 + %109 = OpLoad %10 %108 + %110 = OpFOrdLessThan %97 %107 %109 + OpSelectionMerge %112 None + OpBranchConditional %110 %111 %112 + %111 = OpLabel + OpSelectionMerge %118 None + OpBranchConditional %113 %117 %125 + %117 = OpLabel + %123 = OpAccessChain %122 %121 %9 + %124 = OpLoad %114 %123 + OpStore %116 %124 + OpBranch %118 + %125 = OpLabel + %132 = OpAccessChain %131 %130 %9 %9 + %133 = OpLoad %6 %132 + %134 = OpConvertSToF %10 %133 + %135 = OpCompositeConstruct %114 %134 %134 + OpStore %116 %135 + OpBranch %118 + %118 = OpLabel + %138 = OpAccessChain %137 %116 %136 + %139 = OpLoad %10 %138 + %140 = OpAccessChain %21 %20 %9 %9 + %141 = OpLoad %10 %140 + %142 = OpFOrdGreaterThanEqual %97 %139 %141 + OpBranch %112 + %112 = OpLabel + %143 = OpPhi %97 %110 %91 %142 %118 + OpSelectionMerge %145 None + OpBranchConditional %143 %144 %145 + %144 = OpLabel + OpBranch %92 + %145 = OpLabel + %147 = OpLoad %6 %88 + %148 = OpIEqual %97 %147 %89 + OpSelectionMerge %150 None + OpBranchConditional %148 %149 %150 + %149 = OpLabel + %151 = OpLoad %6 %88 + %152 = OpIAdd %6 %151 %89 + OpStore %88 %152 + %153 = OpAccessChain %21 %20 %9 %89 + %154 = OpLoad %10 %153 + %155 = OpAccessChain %137 %15 %151 + OpStore %155 %154 + OpBranch %150 + %150 = OpLabel + OpBranch %93 + %93 = OpLabel + OpBranch %90 + %92 = OpLabel + %156 = OpAccessChain %131 %130 %9 %89 + %157 = OpLoad %6 %156 + %158 = OpExtInst %6 %1 FindSMsb %157 + %159 = OpAccessChain %137 %15 %158 + %160 = OpLoad %10 %159 + %162 = OpAccessChain %161 %121 %9 %104 + %163 = OpLoad %10 %162 + %164 = OpFMul %10 %160 %163 + %165 = OpAccessChain %21 %20 %9 %89 + %166 = OpLoad %10 %165 + %167 = OpFOrdEqual %97 %164 %166 + OpSelectionMerge %169 None + OpBranchConditional %167 %168 %186 + %168 = OpLabel + %172 = OpAccessChain %131 %130 %9 %9 + %173 = OpLoad %6 %172 + %174 = OpConvertSToF %10 %173 + %176 = OpAccessChain %131 %130 %9 %175 + %177 = OpLoad %6 %176 + %178 = OpConvertSToF %10 %177 + %179 = OpAccessChain %131 %130 %9 %175 + %180 = OpLoad %6 %179 + %181 = OpConvertSToF %10 %180 + %182 = OpAccessChain %131 %130 %9 %9 + %183 = OpLoad %6 %182 + %184 = OpConvertSToF %10 %183 + %185 = OpCompositeConstruct %101 %174 %178 %181 %184 + OpStore %171 %185 + OpBranch %169 + %186 = OpLabel + %187 = OpAccessChain %131 %130 %9 %175 + %188 = OpLoad %6 %187 + %189 = OpConvertSToF %10 %188 + %190 = OpCompositeConstruct %101 %189 %189 %189 %189 + OpStore %171 %190 + OpBranch %169 + %169 = OpLabel + OpReturn + OpFunctionEnd +END + +# uniforms for variant + +# resolution +BUFFER variant_resolution DATA_TYPE vec2 STD140 DATA + 256.0 256.0 +END +# _GLF_uniform_int_values +BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA + 1 2 0 +END +# _GLF_uniform_float_values +BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA + 1.0 0.0 +END + +BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM + +PIPELINE graphics variant_pipeline + ATTACH variant_vertex_shader + ATTACH variant_fragment_shader + FRAMEBUFFER_SIZE 256 256 + BIND BUFFER variant_framebuffer AS color LOCATION 0 + BIND BUFFER variant_resolution AS push_constant + 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-integer-minus-one-increased-before-indexing-array.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-integer-minus-one-increased-before-indexing-array.amber new file mode 100644 index 0000000..fc8eed8 --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-integer-minus-one-increased-before-indexing-array.amber @@ -0,0 +1,597 @@ +#!amber + +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# A test for a coverage-gap found by the GraphicsFuzz project. + +# Short description: A fragment shader that covers specific LLVM code paths + +# The test passes because the shader always writes red. + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 320 es +# +# #define _int_8 _GLF_uniform_int_values[0] +# #define _int_9 _GLF_uniform_int_values[1] +# #define _int_1 _GLF_uniform_int_values[2] +# #define _int_2 _GLF_uniform_int_values[3] +# #define _int_3 _GLF_uniform_int_values[4] +# #define _int_4 _GLF_uniform_int_values[5] +# #define _int_5 _GLF_uniform_int_values[6] +# #define _int_6 _GLF_uniform_int_values[7] +# #define _int_7 _GLF_uniform_int_values[8] +# #define _int_0 _GLF_uniform_int_values[9] +# #define _int_10 _GLF_uniform_int_values[10] +# #define _float_0_0 _GLF_uniform_float_values[0] +# +# precision highp float; +# precision highp int; +# +# // Contents of _GLF_uniform_float_values: 0.0 +# layout(set = 0, binding = 0) uniform buf0 +# { +# float _GLF_uniform_float_values[1]; +# }; +# // Contents of _GLF_uniform_int_values: [8, 9, 1, 2, 3, 4, 5, 6, 7, 0, 10] +# layout(set = 0, binding = 1) uniform buf1 +# { +# int _GLF_uniform_int_values[11]; +# }; +# +# const int _GLF_global_loop_bound = 10; +# int _GLF_global_loop_count = 0; +# +# // Contents of zero: 0.0 +# layout(push_constant) uniform buf_push +# { +# float zero; +# }; +# +# layout(location = 0) out vec4 _GLF_color; +# +# // This function is called once with x = 0. +# int func(int x) +# { +# int i = _int_1; +# +# while(_GLF_global_loop_count < _GLF_global_loop_bound) +# { +# _GLF_global_loop_count ++; +# +# // Always true. +# if(x <= _int_1) +# { +# // Iterated once. +# for(int k = int(zero); k != _int_1; k ++) +# { +# // Always true. +# if(gl_FragCoord.y >= 0.0) +# { +# i++; +# } +# } +# +# // Sets global loop count to global loop bound. +# for(int k = int(zero); k < _int_1 && _GLF_global_loop_count < _GLF_global_loop_bound; ) +# { +# _GLF_global_loop_count++; +# } +# } +# } +# +# // Returns 2. +# return i; +# } +# +# void main() +# { +# int a = _int_1, b = _int_1, c = -_int_1; +# int arr[10] = int[10](_int_0, _int_1, _int_2, _int_3, _int_4, _int_5, _int_6, _int_7, _int_8, _int_9); +# +# // Always true. +# if(gl_FragCoord.y >= 0.0) +# { +# // c becomes zero. +# arr[++c] = _int_1; +# } +# +# // Iterated once. +# while(c >= _int_0 && _GLF_global_loop_count < _GLF_global_loop_bound) +# { +# _GLF_global_loop_count ++; +# +# // Always true. +# if(gl_FragCoord.y > _float_0_0) +# { +# // a becomes 0 +# a = arr[c]; +# } +# +# // Always true. +# if(zero == _float_0_0) +# { +# b = arr[c]; +# } +# +# if(a < _int_1) +# { +# // arr[0] becomes one and c becomes one. +# arr[++c] = _int_1; +# } +# +# // Calling the function makes global loop count to reach the global loop bound. The function returns 2 making the condition false. +# if(func(a) < _int_1) +# { +# arr[++c] = b; +# } +# } +# +# // Check the array against reference values, and set output color to black if the check fails. +# int ref[10] = int[10](_int_1, _int_1, _int_2, _int_3, _int_4, _int_5, _int_6, _int_7, _int_8, _int_9); +# _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1); +# +# for(int i = _int_0; i < _int_10; i ++) +# { +# if(arr[i] != ref[i]) +# { +# _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: 276 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %64 %235 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 320 + OpName %4 "main" + OpName %10 "func(i1;" + OpName %9 "x" + OpName %13 "_GLF_global_loop_count" + OpName %15 "i" + OpName %19 "buf1" + OpMemberName %19 0 "_GLF_uniform_int_values" + OpName %21 "" + OpName %44 "k" + OpName %46 "buf_push" + OpMemberName %46 0 "zero" + OpName %48 "" + OpName %64 "gl_FragCoord" + OpName %77 "k" + OpName %98 "a" + OpName %101 "b" + OpName %104 "c" + OpName %111 "arr" + OpName %167 "buf0" + OpMemberName %167 0 "_GLF_uniform_float_values" + OpName %169 "" + OpName %200 "param" + OpName %212 "ref" + OpName %235 "_GLF_color" + OpName %249 "i" + OpDecorate %18 ArrayStride 16 + OpMemberDecorate %19 0 Offset 0 + OpDecorate %19 Block + OpDecorate %21 DescriptorSet 0 + OpDecorate %21 Binding 1 + OpMemberDecorate %46 0 Offset 0 + OpDecorate %46 Block + OpDecorate %64 BuiltIn FragCoord + OpDecorate %166 ArrayStride 16 + OpMemberDecorate %167 0 Offset 0 + OpDecorate %167 Block + OpDecorate %169 DescriptorSet 0 + OpDecorate %169 Binding 0 + OpDecorate %235 Location 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeInt 32 1 + %7 = OpTypePointer Function %6 + %8 = OpTypeFunction %6 %7 + %12 = OpTypePointer Private %6 + %13 = OpVariable %12 Private + %14 = OpConstant %6 0 + %16 = OpTypeInt 32 0 + %17 = OpConstant %16 11 + %18 = OpTypeArray %6 %17 + %19 = OpTypeStruct %18 + %20 = OpTypePointer Uniform %19 + %21 = OpVariable %20 Uniform + %22 = OpConstant %6 2 + %23 = OpTypePointer Uniform %6 + %32 = OpConstant %6 10 + %33 = OpTypeBool + %36 = OpConstant %6 1 + %45 = OpTypeFloat 32 + %46 = OpTypeStruct %45 + %47 = OpTypePointer PushConstant %46 + %48 = OpVariable %47 PushConstant + %49 = OpTypePointer PushConstant %45 + %62 = OpTypeVector %45 4 + %63 = OpTypePointer Input %62 + %64 = OpVariable %63 Input + %65 = OpConstant %16 1 + %66 = OpTypePointer Input %45 + %69 = OpConstant %45 0 + %108 = OpConstant %16 10 + %109 = OpTypeArray %6 %108 + %110 = OpTypePointer Function %109 + %112 = OpConstant %6 9 + %117 = OpConstant %6 3 + %120 = OpConstant %6 4 + %123 = OpConstant %6 5 + %126 = OpConstant %6 6 + %129 = OpConstant %6 7 + %132 = OpConstant %6 8 + %166 = OpTypeArray %45 %65 + %167 = OpTypeStruct %166 + %168 = OpTypePointer Uniform %167 + %169 = OpVariable %168 Uniform + %170 = OpTypePointer Uniform %45 + %234 = OpTypePointer Output %62 + %235 = OpVariable %234 Output + %4 = OpFunction %2 None %3 + %5 = OpLabel + %98 = OpVariable %7 Function + %101 = OpVariable %7 Function + %104 = OpVariable %7 Function + %111 = OpVariable %110 Function + %200 = OpVariable %7 Function + %212 = OpVariable %110 Function + %249 = OpVariable %7 Function + OpStore %13 %14 + %99 = OpAccessChain %23 %21 %14 %22 + %100 = OpLoad %6 %99 + OpStore %98 %100 + %102 = OpAccessChain %23 %21 %14 %22 + %103 = OpLoad %6 %102 + OpStore %101 %103 + %105 = OpAccessChain %23 %21 %14 %22 + %106 = OpLoad %6 %105 + %107 = OpSNegate %6 %106 + OpStore %104 %107 + %113 = OpAccessChain %23 %21 %14 %112 + %114 = OpLoad %6 %113 + %115 = OpAccessChain %23 %21 %14 %22 + %116 = OpLoad %6 %115 + %118 = OpAccessChain %23 %21 %14 %117 + %119 = OpLoad %6 %118 + %121 = OpAccessChain %23 %21 %14 %120 + %122 = OpLoad %6 %121 + %124 = OpAccessChain %23 %21 %14 %123 + %125 = OpLoad %6 %124 + %127 = OpAccessChain %23 %21 %14 %126 + %128 = OpLoad %6 %127 + %130 = OpAccessChain %23 %21 %14 %129 + %131 = OpLoad %6 %130 + %133 = OpAccessChain %23 %21 %14 %132 + %134 = OpLoad %6 %133 + %135 = OpAccessChain %23 %21 %14 %14 + %136 = OpLoad %6 %135 + %137 = OpAccessChain %23 %21 %14 %36 + %138 = OpLoad %6 %137 + %139 = OpCompositeConstruct %109 %114 %116 %119 %122 %125 %128 %131 %134 %136 %138 + OpStore %111 %139 + %140 = OpAccessChain %66 %64 %65 + %141 = OpLoad %45 %140 + %142 = OpFOrdGreaterThanEqual %33 %141 %69 + OpSelectionMerge %144 None + OpBranchConditional %142 %143 %144 + %143 = OpLabel + %145 = OpLoad %6 %104 + %146 = OpIAdd %6 %145 %36 + OpStore %104 %146 + %147 = OpAccessChain %23 %21 %14 %22 + %148 = OpLoad %6 %147 + %149 = OpAccessChain %7 %111 %146 + OpStore %149 %148 + OpBranch %144 + %144 = OpLabel + OpBranch %150 + %150 = OpLabel + OpLoopMerge %152 %153 None + OpBranch %154 + %154 = OpLabel + %155 = OpLoad %6 %104 + %156 = OpAccessChain %23 %21 %14 %112 + %157 = OpLoad %6 %156 + %158 = OpSGreaterThanEqual %33 %155 %157 + %159 = OpLoad %6 %13 + %160 = OpSLessThan %33 %159 %32 + %161 = OpLogicalAnd %33 %158 %160 + OpBranchConditional %161 %151 %152 + %151 = OpLabel + %162 = OpLoad %6 %13 + %163 = OpIAdd %6 %162 %36 + OpStore %13 %163 + %164 = OpAccessChain %66 %64 %65 + %165 = OpLoad %45 %164 + %171 = OpAccessChain %170 %169 %14 %14 + %172 = OpLoad %45 %171 + %173 = OpFOrdGreaterThan %33 %165 %172 + OpSelectionMerge %175 None + OpBranchConditional %173 %174 %175 + %174 = OpLabel + %176 = OpLoad %6 %104 + %177 = OpAccessChain %7 %111 %176 + %178 = OpLoad %6 %177 + OpStore %98 %178 + OpBranch %175 + %175 = OpLabel + %179 = OpAccessChain %49 %48 %14 + %180 = OpLoad %45 %179 + %181 = OpAccessChain %170 %169 %14 %14 + %182 = OpLoad %45 %181 + %183 = OpFOrdEqual %33 %180 %182 + OpSelectionMerge %185 None + OpBranchConditional %183 %184 %185 + %184 = OpLabel + %186 = OpLoad %6 %104 + %187 = OpAccessChain %7 %111 %186 + %188 = OpLoad %6 %187 + OpStore %101 %188 + OpBranch %185 + %185 = OpLabel + %189 = OpLoad %6 %98 + %190 = OpAccessChain %23 %21 %14 %22 + %191 = OpLoad %6 %190 + %192 = OpSLessThan %33 %189 %191 + OpSelectionMerge %194 None + OpBranchConditional %192 %193 %194 + %193 = OpLabel + %195 = OpLoad %6 %104 + %196 = OpIAdd %6 %195 %36 + OpStore %104 %196 + %197 = OpAccessChain %23 %21 %14 %22 + %198 = OpLoad %6 %197 + %199 = OpAccessChain %7 %111 %196 + OpStore %199 %198 + OpBranch %194 + %194 = OpLabel + %201 = OpLoad %6 %98 + OpStore %200 %201 + %202 = OpFunctionCall %6 %10 %200 + %203 = OpAccessChain %23 %21 %14 %22 + %204 = OpLoad %6 %203 + %205 = OpSLessThan %33 %202 %204 + OpSelectionMerge %207 None + OpBranchConditional %205 %206 %207 + %206 = OpLabel + %208 = OpLoad %6 %104 + %209 = OpIAdd %6 %208 %36 + OpStore %104 %209 + %210 = OpLoad %6 %101 + %211 = OpAccessChain %7 %111 %209 + OpStore %211 %210 + OpBranch %207 + %207 = OpLabel + OpBranch %153 + %153 = OpLabel + OpBranch %150 + %152 = OpLabel + %213 = OpAccessChain %23 %21 %14 %22 + %214 = OpLoad %6 %213 + %215 = OpAccessChain %23 %21 %14 %22 + %216 = OpLoad %6 %215 + %217 = OpAccessChain %23 %21 %14 %117 + %218 = OpLoad %6 %217 + %219 = OpAccessChain %23 %21 %14 %120 + %220 = OpLoad %6 %219 + %221 = OpAccessChain %23 %21 %14 %123 + %222 = OpLoad %6 %221 + %223 = OpAccessChain %23 %21 %14 %126 + %224 = OpLoad %6 %223 + %225 = OpAccessChain %23 %21 %14 %129 + %226 = OpLoad %6 %225 + %227 = OpAccessChain %23 %21 %14 %132 + %228 = OpLoad %6 %227 + %229 = OpAccessChain %23 %21 %14 %14 + %230 = OpLoad %6 %229 + %231 = OpAccessChain %23 %21 %14 %36 + %232 = OpLoad %6 %231 + %233 = OpCompositeConstruct %109 %214 %216 %218 %220 %222 %224 %226 %228 %230 %232 + OpStore %212 %233 + %236 = OpAccessChain %23 %21 %14 %22 + %237 = OpLoad %6 %236 + %238 = OpConvertSToF %45 %237 + %239 = OpAccessChain %23 %21 %14 %112 + %240 = OpLoad %6 %239 + %241 = OpConvertSToF %45 %240 + %242 = OpAccessChain %23 %21 %14 %112 + %243 = OpLoad %6 %242 + %244 = OpConvertSToF %45 %243 + %245 = OpAccessChain %23 %21 %14 %22 + %246 = OpLoad %6 %245 + %247 = OpConvertSToF %45 %246 + %248 = OpCompositeConstruct %62 %238 %241 %244 %247 + OpStore %235 %248 + %250 = OpAccessChain %23 %21 %14 %112 + %251 = OpLoad %6 %250 + OpStore %249 %251 + OpBranch %252 + %252 = OpLabel + OpLoopMerge %254 %255 None + OpBranch %256 + %256 = OpLabel + %257 = OpLoad %6 %249 + %258 = OpAccessChain %23 %21 %14 %32 + %259 = OpLoad %6 %258 + %260 = OpSLessThan %33 %257 %259 + OpBranchConditional %260 %253 %254 + %253 = OpLabel + %261 = OpLoad %6 %249 + %262 = OpAccessChain %7 %111 %261 + %263 = OpLoad %6 %262 + %264 = OpLoad %6 %249 + %265 = OpAccessChain %7 %212 %264 + %266 = OpLoad %6 %265 + %267 = OpINotEqual %33 %263 %266 + OpSelectionMerge %269 None + OpBranchConditional %267 %268 %269 + %268 = OpLabel + %270 = OpAccessChain %23 %21 %14 %112 + %271 = OpLoad %6 %270 + %272 = OpConvertSToF %45 %271 + %273 = OpCompositeConstruct %62 %272 %272 %272 %272 + OpStore %235 %273 + OpBranch %269 + %269 = OpLabel + OpBranch %255 + %255 = OpLabel + %274 = OpLoad %6 %249 + %275 = OpIAdd %6 %274 %36 + OpStore %249 %275 + OpBranch %252 + %254 = OpLabel + OpReturn + OpFunctionEnd + %10 = OpFunction %6 None %8 + %9 = OpFunctionParameter %7 + %11 = OpLabel + %15 = OpVariable %7 Function + %44 = OpVariable %7 Function + %77 = OpVariable %7 Function + %24 = OpAccessChain %23 %21 %14 %22 + %25 = OpLoad %6 %24 + OpStore %15 %25 + OpBranch %26 + %26 = OpLabel + OpLoopMerge %28 %29 None + OpBranch %30 + %30 = OpLabel + %31 = OpLoad %6 %13 + %34 = OpSLessThan %33 %31 %32 + OpBranchConditional %34 %27 %28 + %27 = OpLabel + %35 = OpLoad %6 %13 + %37 = OpIAdd %6 %35 %36 + OpStore %13 %37 + %38 = OpLoad %6 %9 + %39 = OpAccessChain %23 %21 %14 %22 + %40 = OpLoad %6 %39 + %41 = OpSLessThanEqual %33 %38 %40 + OpSelectionMerge %43 None + OpBranchConditional %41 %42 %43 + %42 = OpLabel + %50 = OpAccessChain %49 %48 %14 + %51 = OpLoad %45 %50 + %52 = OpConvertFToS %6 %51 + OpStore %44 %52 + OpBranch %53 + %53 = OpLabel + OpLoopMerge %55 %56 None + OpBranch %57 + %57 = OpLabel + %58 = OpLoad %6 %44 + %59 = OpAccessChain %23 %21 %14 %22 + %60 = OpLoad %6 %59 + %61 = OpINotEqual %33 %58 %60 + OpBranchConditional %61 %54 %55 + %54 = OpLabel + %67 = OpAccessChain %66 %64 %65 + %68 = OpLoad %45 %67 + %70 = OpFOrdGreaterThanEqual %33 %68 %69 + OpSelectionMerge %72 None + OpBranchConditional %70 %71 %72 + %71 = OpLabel + %73 = OpLoad %6 %15 + %74 = OpIAdd %6 %73 %36 + OpStore %15 %74 + OpBranch %72 + %72 = OpLabel + OpBranch %56 + %56 = OpLabel + %75 = OpLoad %6 %44 + %76 = OpIAdd %6 %75 %36 + OpStore %44 %76 + OpBranch %53 + %55 = OpLabel + %78 = OpAccessChain %49 %48 %14 + %79 = OpLoad %45 %78 + %80 = OpConvertFToS %6 %79 + OpStore %77 %80 + OpBranch %81 + %81 = OpLabel + OpLoopMerge %83 %84 None + OpBranch %85 + %85 = OpLabel + %86 = OpLoad %6 %77 + %87 = OpAccessChain %23 %21 %14 %22 + %88 = OpLoad %6 %87 + %89 = OpSLessThan %33 %86 %88 + %90 = OpLoad %6 %13 + %91 = OpSLessThan %33 %90 %32 + %92 = OpLogicalAnd %33 %89 %91 + OpBranchConditional %92 %82 %83 + %82 = OpLabel + %93 = OpLoad %6 %13 + %94 = OpIAdd %6 %93 %36 + OpStore %13 %94 + OpBranch %84 + %84 = OpLabel + OpBranch %81 + %83 = OpLabel + OpBranch %43 + %43 = OpLabel + OpBranch %29 + %29 = OpLabel + OpBranch %26 + %28 = OpLabel + %95 = OpLoad %6 %15 + OpReturnValue %95 + OpFunctionEnd +END + +# uniforms for variant + +# zero +BUFFER variant_zero DATA_TYPE float STD140 DATA + 0.0 +END +# _GLF_uniform_int_values +BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA + 8 9 1 2 3 4 5 6 7 0 10 +END +# _GLF_uniform_float_values +BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA + 0.0 +END + +BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM + +PIPELINE graphics variant_pipeline + ATTACH variant_vertex_shader + ATTACH variant_fragment_shader + FRAMEBUFFER_SIZE 256 256 + BIND BUFFER variant_framebuffer AS color LOCATION 0 + BIND BUFFER variant_zero AS push_constant + 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-array-element-copy-index-clamp-sign.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-loop-array-element-copy-index-clamp-sign.amber new file mode 100644 index 0000000..7feaa69 --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-loop-array-element-copy-index-clamp-sign.amber @@ -0,0 +1,283 @@ +#!amber + +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# A test for a coverage-gap found by the GraphicsFuzz project. + +# Short description: A fragment shader that covers specific LLVM code paths + +# The test passes because the shader always writes red. + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 320 es +# +# #define _int_10 _GLF_uniform_int_values[0] +# #define _int_1 _GLF_uniform_int_values[1] +# #define _int_0 _GLF_uniform_int_values[2] +# #define _int_2 _GLF_uniform_int_values[3] +# #define _int_3 _GLF_uniform_int_values[4] +# #define _int_4 _GLF_uniform_int_values[5] +# #define _int_5 _GLF_uniform_int_values[6] +# #define _int_6 _GLF_uniform_int_values[7] +# #define _int_7 _GLF_uniform_int_values[8] +# #define _int_8 _GLF_uniform_int_values[9] +# #define _int_9 _GLF_uniform_int_values[10] +# +# precision highp int; +# precision highp float; +# +# // Contents of _GLF_uniform_int_values: [10, 1, 0, 2, 3, 4, 5, 6, 7, 8, 9] +# layout(set = 0, binding = 0) uniform buf0 +# { +# int _GLF_uniform_int_values[11]; +# }; +# +# layout(location = 0) out vec4 _GLF_color; +# +# void main() +# { +# int arr[10] = int[10](_int_0, _int_1, _int_2, _int_3, _int_4, _int_5, _int_6, _int_7, _int_8, _int_9); +# int ref[10] = int[10](_int_0, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1); +# +# // Sign returns 0 for i = 0 and 1 for all other values of i. +# for(int i = 0; i < _int_10; i++) +# arr[i] = arr[clamp(sign(i), _int_0, _int_1)]; +# +# _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1); +# +# // Verify results. +# for(int i = _int_0; i < _int_10; i++) +# if(arr[i] != ref[i]) +# _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: 141 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %100 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 320 + OpName %4 "main" + OpName %11 "arr" + OpName %14 "buf0" + OpMemberName %14 0 "_GLF_uniform_int_values" + OpName %16 "" + OpName %50 "ref" + OpName %73 "i" + OpName %100 "_GLF_color" + OpName %114 "i" + OpDecorate %13 ArrayStride 16 + OpMemberDecorate %14 0 Offset 0 + OpDecorate %14 Block + OpDecorate %16 DescriptorSet 0 + OpDecorate %16 Binding 0 + OpDecorate %100 Location 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeInt 32 1 + %7 = OpTypeInt 32 0 + %8 = OpConstant %7 10 + %9 = OpTypeArray %6 %8 + %10 = OpTypePointer Function %9 + %12 = OpConstant %7 11 + %13 = OpTypeArray %6 %12 + %14 = OpTypeStruct %13 + %15 = OpTypePointer Uniform %14 + %16 = OpVariable %15 Uniform + %17 = OpConstant %6 0 + %18 = OpConstant %6 2 + %19 = OpTypePointer Uniform %6 + %22 = OpConstant %6 1 + %25 = OpConstant %6 3 + %28 = OpConstant %6 4 + %31 = OpConstant %6 5 + %34 = OpConstant %6 6 + %37 = OpConstant %6 7 + %40 = OpConstant %6 8 + %43 = OpConstant %6 9 + %46 = OpConstant %6 10 + %72 = OpTypePointer Function %6 + %82 = OpTypeBool + %97 = OpTypeFloat 32 + %98 = OpTypeVector %97 4 + %99 = OpTypePointer Output %98 + %100 = OpVariable %99 Output + %4 = OpFunction %2 None %3 + %5 = OpLabel + %11 = OpVariable %10 Function + %50 = OpVariable %10 Function + %73 = OpVariable %72 Function + %114 = OpVariable %72 Function + %20 = OpAccessChain %19 %16 %17 %18 + %21 = OpLoad %6 %20 + %23 = OpAccessChain %19 %16 %17 %22 + %24 = OpLoad %6 %23 + %26 = OpAccessChain %19 %16 %17 %25 + %27 = OpLoad %6 %26 + %29 = OpAccessChain %19 %16 %17 %28 + %30 = OpLoad %6 %29 + %32 = OpAccessChain %19 %16 %17 %31 + %33 = OpLoad %6 %32 + %35 = OpAccessChain %19 %16 %17 %34 + %36 = OpLoad %6 %35 + %38 = OpAccessChain %19 %16 %17 %37 + %39 = OpLoad %6 %38 + %41 = OpAccessChain %19 %16 %17 %40 + %42 = OpLoad %6 %41 + %44 = OpAccessChain %19 %16 %17 %43 + %45 = OpLoad %6 %44 + %47 = OpAccessChain %19 %16 %17 %46 + %48 = OpLoad %6 %47 + %49 = OpCompositeConstruct %9 %21 %24 %27 %30 %33 %36 %39 %42 %45 %48 + OpStore %11 %49 + %51 = OpAccessChain %19 %16 %17 %18 + %52 = OpLoad %6 %51 + %53 = OpAccessChain %19 %16 %17 %22 + %54 = OpLoad %6 %53 + %55 = OpAccessChain %19 %16 %17 %22 + %56 = OpLoad %6 %55 + %57 = OpAccessChain %19 %16 %17 %22 + %58 = OpLoad %6 %57 + %59 = OpAccessChain %19 %16 %17 %22 + %60 = OpLoad %6 %59 + %61 = OpAccessChain %19 %16 %17 %22 + %62 = OpLoad %6 %61 + %63 = OpAccessChain %19 %16 %17 %22 + %64 = OpLoad %6 %63 + %65 = OpAccessChain %19 %16 %17 %22 + %66 = OpLoad %6 %65 + %67 = OpAccessChain %19 %16 %17 %22 + %68 = OpLoad %6 %67 + %69 = OpAccessChain %19 %16 %17 %22 + %70 = OpLoad %6 %69 + %71 = OpCompositeConstruct %9 %52 %54 %56 %58 %60 %62 %64 %66 %68 %70 + OpStore %50 %71 + OpStore %73 %17 + OpBranch %74 + %74 = OpLabel + OpLoopMerge %76 %77 None + OpBranch %78 + %78 = OpLabel + %79 = OpLoad %6 %73 + %80 = OpAccessChain %19 %16 %17 %17 + %81 = OpLoad %6 %80 + %83 = OpSLessThan %82 %79 %81 + OpBranchConditional %83 %75 %76 + %75 = OpLabel + %84 = OpLoad %6 %73 + %85 = OpLoad %6 %73 + %86 = OpExtInst %6 %1 SSign %85 + %87 = OpAccessChain %19 %16 %17 %18 + %88 = OpLoad %6 %87 + %89 = OpAccessChain %19 %16 %17 %22 + %90 = OpLoad %6 %89 + %91 = OpExtInst %6 %1 SClamp %86 %88 %90 + %92 = OpAccessChain %72 %11 %91 + %93 = OpLoad %6 %92 + %94 = OpAccessChain %72 %11 %84 + OpStore %94 %93 + OpBranch %77 + %77 = OpLabel + %95 = OpLoad %6 %73 + %96 = OpIAdd %6 %95 %22 + OpStore %73 %96 + OpBranch %74 + %76 = OpLabel + %101 = OpAccessChain %19 %16 %17 %22 + %102 = OpLoad %6 %101 + %103 = OpConvertSToF %97 %102 + %104 = OpAccessChain %19 %16 %17 %18 + %105 = OpLoad %6 %104 + %106 = OpConvertSToF %97 %105 + %107 = OpAccessChain %19 %16 %17 %18 + %108 = OpLoad %6 %107 + %109 = OpConvertSToF %97 %108 + %110 = OpAccessChain %19 %16 %17 %22 + %111 = OpLoad %6 %110 + %112 = OpConvertSToF %97 %111 + %113 = OpCompositeConstruct %98 %103 %106 %109 %112 + OpStore %100 %113 + %115 = OpAccessChain %19 %16 %17 %18 + %116 = OpLoad %6 %115 + OpStore %114 %116 + OpBranch %117 + %117 = OpLabel + OpLoopMerge %119 %120 None + OpBranch %121 + %121 = OpLabel + %122 = OpLoad %6 %114 + %123 = OpAccessChain %19 %16 %17 %17 + %124 = OpLoad %6 %123 + %125 = OpSLessThan %82 %122 %124 + OpBranchConditional %125 %118 %119 + %118 = OpLabel + %126 = OpLoad %6 %114 + %127 = OpAccessChain %72 %11 %126 + %128 = OpLoad %6 %127 + %129 = OpLoad %6 %114 + %130 = OpAccessChain %72 %50 %129 + %131 = OpLoad %6 %130 + %132 = OpINotEqual %82 %128 %131 + OpSelectionMerge %134 None + OpBranchConditional %132 %133 %134 + %133 = OpLabel + %135 = OpAccessChain %19 %16 %17 %18 + %136 = OpLoad %6 %135 + %137 = OpConvertSToF %97 %136 + %138 = OpCompositeConstruct %98 %137 %137 %137 %137 + OpStore %100 %138 + OpBranch %134 + %134 = OpLabel + OpBranch %120 + %120 = OpLabel + %139 = OpLoad %6 %114 + %140 = OpIAdd %6 %139 %22 + OpStore %114 %140 + OpBranch %117 + %119 = OpLabel + OpReturn + OpFunctionEnd +END + +# uniforms for variant + +# _GLF_uniform_int_values +BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA + 10 1 0 2 3 4 5 6 7 8 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-loop-start-from-one-switch-case-never-executed.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-loop-start-from-one-switch-case-never-executed.amber new file mode 100644 index 0000000..90d4329 --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-loop-start-from-one-switch-case-never-executed.amber @@ -0,0 +1,215 @@ +#!amber + +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# A test for a coverage-gap found by the GraphicsFuzz project. + +# Short description: A fragment shader that covers specific LLVM code paths + +# The test passes because the shader always writes red. + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 320 es +# #define _int_10 _GLF_uniform_int_values[0] +# #define _int_1 _GLF_uniform_int_values[1] +# #define _int_0 _GLF_uniform_int_values[2] +# +# precision highp float; +# precision highp int; +# +# // Contents of _GLF_uniform_int_values: [10, 1, 0] +# layout(set = 0, binding = 0) uniform buf0 +# { +# int _GLF_uniform_int_values[3]; +# }; +# +# layout(location = 0) out vec4 _GLF_color; +# +# void main() +# { +# int i = 1; +# for( i = _int_1; i < _int_10; i++) +# { +# // Always true. +# if(i > 0) +# { +# } +# else +# { +# // Never executed. +# switch(i) +# { +# case - 1: +# break; +# case 0: +# return; +# } +# } +# } +# +# // Always true. +# if(i == _int_10) +# { +# _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: 73 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %53 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 320 + OpName %4 "main" + OpName %8 "i" + OpName %13 "buf0" + OpMemberName %13 0 "_GLF_uniform_int_values" + OpName %15 "" + OpName %53 "_GLF_color" + OpDecorate %12 ArrayStride 16 + OpMemberDecorate %13 0 Offset 0 + OpDecorate %13 Block + OpDecorate %15 DescriptorSet 0 + OpDecorate %15 Binding 0 + OpDecorate %53 Location 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeInt 32 1 + %7 = OpTypePointer Function %6 + %9 = OpConstant %6 1 + %10 = OpTypeInt 32 0 + %11 = OpConstant %10 3 + %12 = OpTypeArray %6 %11 + %13 = OpTypeStruct %12 + %14 = OpTypePointer Uniform %13 + %15 = OpVariable %14 Uniform + %16 = OpConstant %6 0 + %17 = OpTypePointer Uniform %6 + %28 = OpTypeBool + %50 = OpTypeFloat 32 + %51 = OpTypeVector %50 4 + %52 = OpTypePointer Output %51 + %53 = OpVariable %52 Output + %57 = OpConstant %6 2 + %4 = OpFunction %2 None %3 + %5 = OpLabel + %8 = OpVariable %7 Function + OpStore %8 %9 + %18 = OpAccessChain %17 %15 %16 %9 + %19 = OpLoad %6 %18 + OpStore %8 %19 + OpBranch %20 + %20 = OpLabel + OpLoopMerge %22 %23 None + OpBranch %24 + %24 = OpLabel + %25 = OpLoad %6 %8 + %26 = OpAccessChain %17 %15 %16 %16 + %27 = OpLoad %6 %26 + %29 = OpSLessThan %28 %25 %27 + OpBranchConditional %29 %21 %22 + %21 = OpLabel + %30 = OpLoad %6 %8 + %31 = OpSGreaterThan %28 %30 %16 + OpSelectionMerge %33 None + OpBranchConditional %31 %32 %34 + %32 = OpLabel + OpBranch %33 + %34 = OpLabel + %35 = OpLoad %6 %8 + OpSelectionMerge %38 None + OpSwitch %35 %38 -1 %36 0 %37 + %36 = OpLabel + OpBranch %38 + %37 = OpLabel + OpReturn + %38 = OpLabel + OpBranch %33 + %33 = OpLabel + OpBranch %23 + %23 = OpLabel + %42 = OpLoad %6 %8 + %43 = OpIAdd %6 %42 %9 + OpStore %8 %43 + OpBranch %20 + %22 = OpLabel + %44 = OpLoad %6 %8 + %45 = OpAccessChain %17 %15 %16 %16 + %46 = OpLoad %6 %45 + %47 = OpIEqual %28 %44 %46 + OpSelectionMerge %49 None + OpBranchConditional %47 %48 %68 + %48 = OpLabel + %54 = OpAccessChain %17 %15 %16 %9 + %55 = OpLoad %6 %54 + %56 = OpConvertSToF %50 %55 + %58 = OpAccessChain %17 %15 %16 %57 + %59 = OpLoad %6 %58 + %60 = OpConvertSToF %50 %59 + %61 = OpAccessChain %17 %15 %16 %57 + %62 = OpLoad %6 %61 + %63 = OpConvertSToF %50 %62 + %64 = OpAccessChain %17 %15 %16 %9 + %65 = OpLoad %6 %64 + %66 = OpConvertSToF %50 %65 + %67 = OpCompositeConstruct %51 %56 %60 %63 %66 + OpStore %53 %67 + OpBranch %49 + %68 = OpLabel + %69 = OpAccessChain %17 %15 %16 %57 + %70 = OpLoad %6 %69 + %71 = OpConvertSToF %50 %70 + %72 = OpCompositeConstruct %51 %71 %71 %71 %71 + OpStore %53 %72 + OpBranch %49 + %49 = OpLabel + OpReturn + OpFunctionEnd +END + +# uniforms for variant + +# _GLF_uniform_int_values +BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA + 10 1 0 +END + +BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM + +PIPELINE graphics variant_pipeline + ATTACH variant_vertex_shader + ATTACH variant_fragment_shader + FRAMEBUFFER_SIZE 256 256 + BIND BUFFER variant_framebuffer AS color LOCATION 0 + BIND BUFFER variant__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 0 +END +CLEAR_COLOR variant_pipeline 0 0 0 255 + +CLEAR variant_pipeline +RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 256 256 + +EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255 diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-loop-two-iterators-increment-array-empty-do-while.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-loop-two-iterators-increment-array-empty-do-while.amber new file mode 100644 index 0000000..c09fc59 --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-loop-two-iterators-increment-array-empty-do-while.amber @@ -0,0 +1,302 @@ +#!amber + +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# A test for a coverage-gap found by the GraphicsFuzz project. + +# Short description: A fragment shader that covers specific LLVM code paths + +# The test passes because the shader always writes red. + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 320 es +# +# #define _int_1 _GLF_uniform_int_values[0] +# #define _int_0 _GLF_uniform_int_values[1] +# #define _int_10 _GLF_uniform_int_values[2] +# +# precision highp int; +# precision highp float; +# +# // Contents of _GLF_uniform_int_values: [1, 0, 10] +# layout(set = 0, binding = 0) uniform buf0 +# { +# int _GLF_uniform_int_values[3]; +# }; +# layout(location = 0) out vec4 _GLF_color; +# +# void main() +# { +# int arr[10] = int[10](_int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1); +# int ref[10] = int[10](_int_1, _int_0, _int_0, _int_0, _int_0, _int_0, _int_0, _int_1, _int_1, _int_1); +# int a = 1; +# +# // Iterated six times. +# for(int i = 1; i < 10; i ++) +# { +# if(a > 6) +# { +# break; +# } +# a++; +# arr[i] = 0; +# } +# +# // Exits after the first iteration. +# do +# { +# } +# while(arr[1] == _int_1); +# +# _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1); +# +# // Verify the results are what's expected. +# for(int i = _int_0; i < _int_10; i ++) +# { +# if(arr[i] != ref[i]) +# { +# _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: 141 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %99 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 320 + OpName %4 "main" + OpName %11 "arr" + OpName %14 "buf0" + OpMemberName %14 0 "_GLF_uniform_int_values" + OpName %16 "" + OpName %40 "ref" + OpName %64 "a" + OpName %65 "i" + OpName %99 "_GLF_color" + OpName %113 "i" + OpDecorate %13 ArrayStride 16 + OpMemberDecorate %14 0 Offset 0 + OpDecorate %14 Block + OpDecorate %16 DescriptorSet 0 + OpDecorate %16 Binding 0 + OpDecorate %99 Location 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeInt 32 1 + %7 = OpTypeInt 32 0 + %8 = OpConstant %7 10 + %9 = OpTypeArray %6 %8 + %10 = OpTypePointer Function %9 + %12 = OpConstant %7 3 + %13 = OpTypeArray %6 %12 + %14 = OpTypeStruct %13 + %15 = OpTypePointer Uniform %14 + %16 = OpVariable %15 Uniform + %17 = OpConstant %6 0 + %18 = OpTypePointer Uniform %6 + %43 = OpConstant %6 1 + %63 = OpTypePointer Function %6 + %72 = OpConstant %6 10 + %73 = OpTypeBool + %76 = OpConstant %6 6 + %96 = OpTypeFloat 32 + %97 = OpTypeVector %96 4 + %98 = OpTypePointer Output %97 + %99 = OpVariable %98 Output + %122 = OpConstant %6 2 + %4 = OpFunction %2 None %3 + %5 = OpLabel + %11 = OpVariable %10 Function + %40 = OpVariable %10 Function + %64 = OpVariable %63 Function + %65 = OpVariable %63 Function + %113 = OpVariable %63 Function + %19 = OpAccessChain %18 %16 %17 %17 + %20 = OpLoad %6 %19 + %21 = OpAccessChain %18 %16 %17 %17 + %22 = OpLoad %6 %21 + %23 = OpAccessChain %18 %16 %17 %17 + %24 = OpLoad %6 %23 + %25 = OpAccessChain %18 %16 %17 %17 + %26 = OpLoad %6 %25 + %27 = OpAccessChain %18 %16 %17 %17 + %28 = OpLoad %6 %27 + %29 = OpAccessChain %18 %16 %17 %17 + %30 = OpLoad %6 %29 + %31 = OpAccessChain %18 %16 %17 %17 + %32 = OpLoad %6 %31 + %33 = OpAccessChain %18 %16 %17 %17 + %34 = OpLoad %6 %33 + %35 = OpAccessChain %18 %16 %17 %17 + %36 = OpLoad %6 %35 + %37 = OpAccessChain %18 %16 %17 %17 + %38 = OpLoad %6 %37 + %39 = OpCompositeConstruct %9 %20 %22 %24 %26 %28 %30 %32 %34 %36 %38 + OpStore %11 %39 + %41 = OpAccessChain %18 %16 %17 %17 + %42 = OpLoad %6 %41 + %44 = OpAccessChain %18 %16 %17 %43 + %45 = OpLoad %6 %44 + %46 = OpAccessChain %18 %16 %17 %43 + %47 = OpLoad %6 %46 + %48 = OpAccessChain %18 %16 %17 %43 + %49 = OpLoad %6 %48 + %50 = OpAccessChain %18 %16 %17 %43 + %51 = OpLoad %6 %50 + %52 = OpAccessChain %18 %16 %17 %43 + %53 = OpLoad %6 %52 + %54 = OpAccessChain %18 %16 %17 %43 + %55 = OpLoad %6 %54 + %56 = OpAccessChain %18 %16 %17 %17 + %57 = OpLoad %6 %56 + %58 = OpAccessChain %18 %16 %17 %17 + %59 = OpLoad %6 %58 + %60 = OpAccessChain %18 %16 %17 %17 + %61 = OpLoad %6 %60 + %62 = OpCompositeConstruct %9 %42 %45 %47 %49 %51 %53 %55 %57 %59 %61 + OpStore %40 %62 + OpStore %64 %43 + OpStore %65 %43 + OpBranch %66 + %66 = OpLabel + OpLoopMerge %68 %69 None + OpBranch %70 + %70 = OpLabel + %71 = OpLoad %6 %65 + %74 = OpSLessThan %73 %71 %72 + OpBranchConditional %74 %67 %68 + %67 = OpLabel + %75 = OpLoad %6 %64 + %77 = OpSGreaterThan %73 %75 %76 + OpSelectionMerge %79 None + OpBranchConditional %77 %78 %79 + %78 = OpLabel + OpBranch %68 + %79 = OpLabel + %81 = OpLoad %6 %64 + %82 = OpIAdd %6 %81 %43 + OpStore %64 %82 + %83 = OpLoad %6 %65 + %84 = OpAccessChain %63 %11 %83 + OpStore %84 %17 + OpBranch %69 + %69 = OpLabel + %85 = OpLoad %6 %65 + %86 = OpIAdd %6 %85 %43 + OpStore %65 %86 + OpBranch %66 + %68 = OpLabel + OpBranch %87 + %87 = OpLabel + OpLoopMerge %89 %90 None + OpBranch %88 + %88 = OpLabel + OpBranch %90 + %90 = OpLabel + %91 = OpAccessChain %63 %11 %43 + %92 = OpLoad %6 %91 + %93 = OpAccessChain %18 %16 %17 %17 + %94 = OpLoad %6 %93 + %95 = OpIEqual %73 %92 %94 + OpBranchConditional %95 %87 %89 + %89 = OpLabel + %100 = OpAccessChain %18 %16 %17 %17 + %101 = OpLoad %6 %100 + %102 = OpConvertSToF %96 %101 + %103 = OpAccessChain %18 %16 %17 %43 + %104 = OpLoad %6 %103 + %105 = OpConvertSToF %96 %104 + %106 = OpAccessChain %18 %16 %17 %43 + %107 = OpLoad %6 %106 + %108 = OpConvertSToF %96 %107 + %109 = OpAccessChain %18 %16 %17 %17 + %110 = OpLoad %6 %109 + %111 = OpConvertSToF %96 %110 + %112 = OpCompositeConstruct %97 %102 %105 %108 %111 + OpStore %99 %112 + %114 = OpAccessChain %18 %16 %17 %43 + %115 = OpLoad %6 %114 + OpStore %113 %115 + OpBranch %116 + %116 = OpLabel + OpLoopMerge %118 %119 None + OpBranch %120 + %120 = OpLabel + %121 = OpLoad %6 %113 + %123 = OpAccessChain %18 %16 %17 %122 + %124 = OpLoad %6 %123 + %125 = OpSLessThan %73 %121 %124 + OpBranchConditional %125 %117 %118 + %117 = OpLabel + %126 = OpLoad %6 %113 + %127 = OpAccessChain %63 %11 %126 + %128 = OpLoad %6 %127 + %129 = OpLoad %6 %113 + %130 = OpAccessChain %63 %40 %129 + %131 = OpLoad %6 %130 + %132 = OpINotEqual %73 %128 %131 + OpSelectionMerge %134 None + OpBranchConditional %132 %133 %134 + %133 = OpLabel + %135 = OpAccessChain %18 %16 %17 %43 + %136 = OpLoad %6 %135 + %137 = OpConvertSToF %96 %136 + %138 = OpCompositeConstruct %97 %137 %137 %137 %137 + OpStore %99 %138 + OpBranch %134 + %134 = OpLabel + OpBranch %119 + %119 = OpLabel + %139 = OpLoad %6 %113 + %140 = OpIAdd %6 %139 %43 + OpStore %113 %140 + OpBranch %116 + %118 = OpLabel + OpReturn + OpFunctionEnd +END + +# uniforms for variant + +# _GLF_uniform_int_values +BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA + 1 0 10 +END + +BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM + +PIPELINE graphics variant_pipeline + ATTACH variant_vertex_shader + ATTACH variant_fragment_shader + FRAMEBUFFER_SIZE 256 256 + BIND BUFFER variant_framebuffer AS color LOCATION 0 + BIND BUFFER variant__GLF_uniform_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-nested-functions-compare-fragcood-length-zero-vector.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-nested-functions-compare-fragcood-length-zero-vector.amber new file mode 100644 index 0000000..02e989e --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-nested-functions-compare-fragcood-length-zero-vector.amber @@ -0,0 +1,354 @@ +#!amber + +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# A test for a coverage-gap found by the GraphicsFuzz project. + +# Short description: A fragment shader that covers specific LLVM code paths + +# The test passes because the shader always writes red. + +# Optimized using spirv-opt with the following arguments: +# '-O' +# spirv-opt commit hash: a0370efd589be33d5d9a85cfde2f85841b3755af + + + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 320 es +# #define _int_0 _GLF_uniform_int_values[0] +# #define _int_1 _GLF_uniform_int_values[1] +# #define _int_6 _GLF_uniform_int_values[2] +# #define _int_2 _GLF_uniform_int_values[3] +# #define _int_3 _GLF_uniform_int_values[4] +# #define _int_5 _GLF_uniform_int_values[5] +# +# precision highp int; +# precision highp float; +# +# // Contents of _GLF_uniform_int_values: [0, 1, 6, 2, 3, 5] +# layout(set = 0, binding = 0) uniform buf0 +# { +# int _GLF_uniform_int_values[6]; +# }; +# +# layout(location = 0) out vec4 _GLF_color; +# +# int func0(int x) +# { +# for(int i = _int_0; i < _int_5; i++) +# { +# // This function is only called with x = 0, +# // therefore the second iteration always returns 1. +# if(x == _int_1) +# { +# return _int_1; +# } +# +# x++; +# } +# +# // This part of the function is never executed because +# // the loop above always returns one. +# +# // Always true. +# if(gl_FragCoord.x > 0.0) +# { +# return -1; +# } +# +# // Never executed. +# return 2; +# } +# +# int func1() +# { +# // Always true. +# if(gl_FragCoord.y > 0.0) +# { +# // Always true. +# if(gl_FragCoord.y > length(vec3(0))) +# { +# return func0(_int_0); +# } +# +# // Never executed. +# if(gl_FragCoord.x > 0.0) +# { +# _GLF_color = vec4(_int_0); +# } +# +# // Never executed. +# if(func0(_int_6) > _int_0) +# { +# return _int_2; +# } +# } +# +# // Never executed. +# return _int_3; +# } +# +# void main() +# { +# // Always true. +# if(func1() == _int_1) +# { +# _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1); +# } +# else +# { +# _GLF_color = vec4(_int_0); +# } +# } +SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0 +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 10 +; Bound: 288 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %54 %90 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 320 + OpName %4 "main" + OpName %19 "buf0" + OpMemberName %19 0 "_GLF_uniform_int_values" + OpName %21 "" + OpName %54 "gl_FragCoord" + OpName %90 "_GLF_color" + OpDecorate %18 ArrayStride 16 + OpMemberDecorate %19 0 Offset 0 + OpDecorate %19 Block + OpDecorate %21 DescriptorSet 0 + OpDecorate %21 Binding 0 + OpDecorate %54 BuiltIn FragCoord + OpDecorate %90 Location 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeInt 32 1 + %16 = OpTypeInt 32 0 + %17 = OpConstant %16 6 + %18 = OpTypeArray %6 %17 + %19 = OpTypeStruct %18 + %20 = OpTypePointer Uniform %19 + %21 = OpVariable %20 Uniform + %22 = OpConstant %6 0 + %23 = OpTypePointer Uniform %6 + %32 = OpConstant %6 5 + %35 = OpTypeBool + %38 = OpConstant %6 1 + %51 = OpTypeFloat 32 + %52 = OpTypeVector %51 4 + %53 = OpTypePointer Input %52 + %54 = OpVariable %53 Input + %55 = OpConstant %16 0 + %56 = OpTypePointer Input %51 + %59 = OpConstant %51 0 + %63 = OpConstant %6 -1 + %65 = OpConstant %6 2 + %68 = OpConstant %16 1 + %89 = OpTypePointer Output %52 + %90 = OpVariable %89 Output + %104 = OpConstant %6 3 + %108 = OpConstant %6 4 + %141 = OpConstantFalse %35 + %144 = OpConstantTrue %35 + %279 = OpUndef %6 + %4 = OpFunction %2 None %3 + %5 = OpLabel + OpSelectionMerge %193 None + OpSwitch %55 %158 + %158 = OpLabel + %159 = OpAccessChain %56 %54 %68 + %160 = OpLoad %51 %159 + %161 = OpFOrdGreaterThan %35 %160 %59 + OpSelectionMerge %190 None + OpBranchConditional %161 %162 %190 + %162 = OpLabel + OpSelectionMerge %170 None + OpBranchConditional %161 %166 %170 + %166 = OpLabel + %167 = OpAccessChain %23 %21 %22 %22 + %168 = OpLoad %6 %167 + OpSelectionMerge %231 None + OpSwitch %55 %200 + %200 = OpLabel + OpBranch %203 + %203 = OpLabel + %281 = OpPhi %6 %168 %200 %219 %220 + %280 = OpPhi %6 %168 %200 %222 %220 + %206 = OpAccessChain %23 %21 %22 %32 + %207 = OpLoad %6 %206 + %208 = OpSLessThan %35 %280 %207 + OpLoopMerge %223 %220 None + OpBranchConditional %208 %209 %223 + %209 = OpLabel + %211 = OpAccessChain %23 %21 %22 %38 + %212 = OpLoad %6 %211 + %213 = OpIEqual %35 %281 %212 + OpSelectionMerge %217 None + OpBranchConditional %213 %214 %217 + %214 = OpLabel + OpBranch %223 + %217 = OpLabel + %219 = OpIAdd %6 %281 %38 + OpBranch %220 + %220 = OpLabel + %222 = OpIAdd %6 %280 %38 + OpBranch %203 + %223 = OpLabel + %285 = OpPhi %6 %279 %203 %212 %214 + %282 = OpPhi %35 %141 %203 %144 %214 + OpSelectionMerge %225 None + OpBranchConditional %282 %231 %225 + %225 = OpLabel + %226 = OpAccessChain %56 %54 %55 + %227 = OpLoad %51 %226 + %228 = OpFOrdGreaterThan %35 %227 %59 + OpSelectionMerge %230 None + OpBranchConditional %228 %229 %230 + %229 = OpLabel + OpBranch %231 + %230 = OpLabel + OpBranch %231 + %231 = OpLabel + %284 = OpPhi %6 %285 %223 %63 %229 %65 %230 + OpBranch %193 + %170 = OpLabel + %171 = OpAccessChain %56 %54 %55 + %172 = OpLoad %51 %171 + %173 = OpFOrdGreaterThan %35 %172 %59 + OpSelectionMerge %179 None + OpBranchConditional %173 %174 %179 + %174 = OpLabel + %175 = OpAccessChain %23 %21 %22 %22 + %176 = OpLoad %6 %175 + %177 = OpConvertSToF %51 %176 + %178 = OpCompositeConstruct %52 %177 %177 %177 %177 + OpStore %90 %178 + OpBranch %179 + %179 = OpLabel + %180 = OpAccessChain %23 %21 %22 %65 + %181 = OpLoad %6 %180 + OpSelectionMerge %269 None + OpSwitch %55 %238 + %238 = OpLabel + %239 = OpAccessChain %23 %21 %22 %22 + %240 = OpLoad %6 %239 + OpBranch %241 + %241 = OpLabel + %272 = OpPhi %6 %181 %238 %257 %258 + %271 = OpPhi %6 %240 %238 %260 %258 + %244 = OpAccessChain %23 %21 %22 %32 + %245 = OpLoad %6 %244 + %246 = OpSLessThan %35 %271 %245 + OpLoopMerge %261 %258 None + OpBranchConditional %246 %247 %261 + %247 = OpLabel + %249 = OpAccessChain %23 %21 %22 %38 + %250 = OpLoad %6 %249 + %251 = OpIEqual %35 %272 %250 + OpSelectionMerge %255 None + OpBranchConditional %251 %252 %255 + %252 = OpLabel + OpBranch %261 + %255 = OpLabel + %257 = OpIAdd %6 %272 %38 + OpBranch %258 + %258 = OpLabel + %260 = OpIAdd %6 %271 %38 + OpBranch %241 + %261 = OpLabel + %276 = OpPhi %6 %279 %241 %250 %252 + %273 = OpPhi %35 %141 %241 %144 %252 + OpSelectionMerge %263 None + OpBranchConditional %273 %269 %263 + %263 = OpLabel + OpSelectionMerge %268 None + OpBranchConditional %173 %267 %268 + %267 = OpLabel + OpBranch %269 + %268 = OpLabel + OpBranch %269 + %269 = OpLabel + %275 = OpPhi %6 %276 %261 %63 %267 %65 %268 + %185 = OpSGreaterThan %35 %275 %240 + OpSelectionMerge %189 None + OpBranchConditional %185 %186 %189 + %186 = OpLabel + %187 = OpAccessChain %23 %21 %22 %104 + %188 = OpLoad %6 %187 + OpBranch %193 + %189 = OpLabel + OpBranch %190 + %190 = OpLabel + %191 = OpAccessChain %23 %21 %22 %108 + %192 = OpLoad %6 %191 + OpBranch %193 + %193 = OpLabel + %287 = OpPhi %6 %284 %231 %188 %186 %192 %190 + %114 = OpAccessChain %23 %21 %22 %38 + %115 = OpLoad %6 %114 + %116 = OpIEqual %35 %287 %115 + OpSelectionMerge %118 None + OpBranchConditional %116 %117 %132 + %117 = OpLabel + %121 = OpConvertSToF %51 %115 + %122 = OpAccessChain %23 %21 %22 %22 + %123 = OpLoad %6 %122 + %124 = OpConvertSToF %51 %123 + %131 = OpCompositeConstruct %52 %121 %124 %124 %121 + OpStore %90 %131 + OpBranch %118 + %132 = OpLabel + %133 = OpAccessChain %23 %21 %22 %22 + %134 = OpLoad %6 %133 + %135 = OpConvertSToF %51 %134 + %136 = OpCompositeConstruct %52 %135 %135 %135 %135 + OpStore %90 %136 + OpBranch %118 + %118 = OpLabel + OpReturn + OpFunctionEnd +END + +# uniforms for variant + +# _GLF_uniform_int_values +BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA + 0 1 6 2 3 5 +END + +BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM + +PIPELINE graphics variant_pipeline + ATTACH variant_vertex_shader + ATTACH variant_fragment_shader + FRAMEBUFFER_SIZE 256 256 + BIND BUFFER variant_framebuffer AS color LOCATION 0 + BIND BUFFER variant__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-nested-loops-decrease-vector-component-by-matrix-element-global-loop-counter.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-nested-loops-decrease-vector-component-by-matrix-element-global-loop-counter.amber new file mode 100644 index 0000000..a160661 --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-nested-loops-decrease-vector-component-by-matrix-element-global-loop-counter.amber @@ -0,0 +1,298 @@ +#!amber + +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# A test for a coverage-gap found by the GraphicsFuzz project. + +# Short description: A fragment shader that covers specific LLVM code paths + +# The test passes because the shader always writes red. + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 320 es +# #define _int_0 _GLF_uniform_int_values[0] +# #define _int_1 _GLF_uniform_int_values[1] +# #define _float_1_0 _GLF_uniform_float_values[0] +# +# precision highp float; +# precision highp int; +# +# // Contents of _GLF_uniform_float_values: 1.0 +# layout(set = 0, binding = 0) uniform buf0 +# { +# float _GLF_uniform_float_values[1]; +# }; +# // Contents of _GLF_uniform_int_values: [0, 1] +# layout(set = 0, binding = 1) uniform buf1 +# { +# int _GLF_uniform_int_values[2]; +# }; +# +# const int _GLF_global_loop_bound = 10; +# int _GLF_global_loop_count = 0; +# +# layout(location = 0) out vec4 _GLF_color; +# +# void main() +# { +# vec4 v = vec4(_float_1_0); +# +# // Iterated twice with i = 1, 0. +# for(int i = _int_1; i >= 0 && _GLF_global_loop_count < _GLF_global_loop_bound; i--) +# { +# _GLF_global_loop_count++; +# +# for(int j = 1; j >= 1 && _GLF_global_loop_count < _GLF_global_loop_bound; j--) +# { +# _GLF_global_loop_count++; +# +# // i = 1: decreases v[1] by one. +# // i = 0: decreases v[0] by zero. +# v[i] -= mat4(1.0)[i][_int_1]; +# } +# } +# +# // Always true. +# if(v == vec4(_int_1, _int_0, _int_1, _int_1)) +# { +# _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1); +# } +# else +# { +# _GLF_color = vec4(_int_0); +# } +# } +SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0 +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 10 +; Bound: 126 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %107 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 320 + OpName %4 "main" + OpName %8 "_GLF_global_loop_count" + OpName %13 "v" + OpName %17 "buf0" + OpMemberName %17 0 "_GLF_uniform_float_values" + OpName %19 "" + OpName %25 "i" + OpName %28 "buf1" + OpMemberName %28 0 "_GLF_uniform_int_values" + OpName %30 "" + OpName %49 "j" + OpName %75 "indexable" + OpName %107 "_GLF_color" + OpDecorate %16 ArrayStride 16 + OpMemberDecorate %17 0 Offset 0 + OpDecorate %17 Block + OpDecorate %19 DescriptorSet 0 + OpDecorate %19 Binding 0 + OpDecorate %27 ArrayStride 16 + OpMemberDecorate %28 0 Offset 0 + OpDecorate %28 Block + OpDecorate %30 DescriptorSet 0 + OpDecorate %30 Binding 1 + OpDecorate %107 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 4 + %12 = OpTypePointer Function %11 + %14 = OpTypeInt 32 0 + %15 = OpConstant %14 1 + %16 = OpTypeArray %10 %15 + %17 = OpTypeStruct %16 + %18 = OpTypePointer Uniform %17 + %19 = OpVariable %18 Uniform + %20 = OpTypePointer Uniform %10 + %24 = OpTypePointer Function %6 + %26 = OpConstant %14 2 + %27 = OpTypeArray %6 %26 + %28 = OpTypeStruct %27 + %29 = OpTypePointer Uniform %28 + %30 = OpVariable %29 Uniform + %31 = OpConstant %6 1 + %32 = OpTypePointer Uniform %6 + %41 = OpTypeBool + %44 = OpConstant %6 10 + %63 = OpTypeMatrix %11 4 + %64 = OpConstant %10 1 + %65 = OpConstant %10 0 + %66 = OpConstantComposite %11 %64 %65 %65 %65 + %67 = OpConstantComposite %11 %65 %64 %65 %65 + %68 = OpConstantComposite %11 %65 %65 %64 %65 + %69 = OpConstantComposite %11 %65 %65 %65 %64 + %70 = OpConstantComposite %63 %66 %67 %68 %69 + %74 = OpTypePointer Function %63 + %76 = OpTypePointer Function %10 + %101 = OpTypeVector %41 4 + %106 = OpTypePointer Output %11 + %107 = OpVariable %106 Output + %4 = OpFunction %2 None %3 + %5 = OpLabel + %13 = OpVariable %12 Function + %25 = OpVariable %24 Function + %49 = OpVariable %24 Function + %75 = OpVariable %74 Function + OpStore %8 %9 + %21 = OpAccessChain %20 %19 %9 %9 + %22 = OpLoad %10 %21 + %23 = OpCompositeConstruct %11 %22 %22 %22 %22 + OpStore %13 %23 + %33 = OpAccessChain %32 %30 %9 %31 + %34 = OpLoad %6 %33 + OpStore %25 %34 + OpBranch %35 + %35 = OpLabel + OpLoopMerge %37 %38 None + OpBranch %39 + %39 = OpLabel + %40 = OpLoad %6 %25 + %42 = OpSGreaterThanEqual %41 %40 %9 + %43 = OpLoad %6 %8 + %45 = OpSLessThan %41 %43 %44 + %46 = OpLogicalAnd %41 %42 %45 + OpBranchConditional %46 %36 %37 + %36 = OpLabel + %47 = OpLoad %6 %8 + %48 = OpIAdd %6 %47 %31 + OpStore %8 %48 + OpStore %49 %31 + OpBranch %50 + %50 = OpLabel + OpLoopMerge %52 %53 None + OpBranch %54 + %54 = OpLabel + %55 = OpLoad %6 %49 + %56 = OpSGreaterThanEqual %41 %55 %31 + %57 = OpLoad %6 %8 + %58 = OpSLessThan %41 %57 %44 + %59 = OpLogicalAnd %41 %56 %58 + OpBranchConditional %59 %51 %52 + %51 = OpLabel + %60 = OpLoad %6 %8 + %61 = OpIAdd %6 %60 %31 + OpStore %8 %61 + %62 = OpLoad %6 %25 + %71 = OpLoad %6 %25 + %72 = OpAccessChain %32 %30 %9 %31 + %73 = OpLoad %6 %72 + OpStore %75 %70 + %77 = OpAccessChain %76 %75 %71 %73 + %78 = OpLoad %10 %77 + %79 = OpAccessChain %76 %13 %62 + %80 = OpLoad %10 %79 + %81 = OpFSub %10 %80 %78 + %82 = OpAccessChain %76 %13 %62 + OpStore %82 %81 + OpBranch %53 + %53 = OpLabel + %83 = OpLoad %6 %49 + %84 = OpISub %6 %83 %31 + OpStore %49 %84 + OpBranch %50 + %52 = OpLabel + OpBranch %38 + %38 = OpLabel + %85 = OpLoad %6 %25 + %86 = OpISub %6 %85 %31 + OpStore %25 %86 + OpBranch %35 + %37 = OpLabel + %87 = OpLoad %11 %13 + %88 = OpAccessChain %32 %30 %9 %31 + %89 = OpLoad %6 %88 + %90 = OpConvertSToF %10 %89 + %91 = OpAccessChain %32 %30 %9 %9 + %92 = OpLoad %6 %91 + %93 = OpConvertSToF %10 %92 + %94 = OpAccessChain %32 %30 %9 %31 + %95 = OpLoad %6 %94 + %96 = OpConvertSToF %10 %95 + %97 = OpAccessChain %32 %30 %9 %31 + %98 = OpLoad %6 %97 + %99 = OpConvertSToF %10 %98 + %100 = OpCompositeConstruct %11 %90 %93 %96 %99 + %102 = OpFOrdEqual %101 %87 %100 + %103 = OpAll %41 %102 + OpSelectionMerge %105 None + OpBranchConditional %103 %104 %121 + %104 = OpLabel + %108 = OpAccessChain %32 %30 %9 %31 + %109 = OpLoad %6 %108 + %110 = OpConvertSToF %10 %109 + %111 = OpAccessChain %32 %30 %9 %9 + %112 = OpLoad %6 %111 + %113 = OpConvertSToF %10 %112 + %114 = OpAccessChain %32 %30 %9 %9 + %115 = OpLoad %6 %114 + %116 = OpConvertSToF %10 %115 + %117 = OpAccessChain %32 %30 %9 %31 + %118 = OpLoad %6 %117 + %119 = OpConvertSToF %10 %118 + %120 = OpCompositeConstruct %11 %110 %113 %116 %119 + OpStore %107 %120 + OpBranch %105 + %121 = OpLabel + %122 = OpAccessChain %32 %30 %9 %9 + %123 = OpLoad %6 %122 + %124 = OpConvertSToF %10 %123 + %125 = OpCompositeConstruct %11 %124 %124 %124 %124 + OpStore %107 %125 + OpBranch %105 + %105 = OpLabel + OpReturn + OpFunctionEnd +END + +# uniforms for variant + +# _GLF_uniform_int_values +BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA + 0 1 +END +# _GLF_uniform_float_values +BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA + 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-nested-loops-global-counter-func-set-struct-field.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-nested-loops-global-counter-func-set-struct-field.amber new file mode 100644 index 0000000..1917251 --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-nested-loops-global-counter-func-set-struct-field.amber @@ -0,0 +1,358 @@ +#!amber + +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# A test for a coverage-gap found by the GraphicsFuzz project. + +# Short description: A fragment shader that covers specific LLVM code paths + +# The test passes because the shader always writes red. + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 320 es +# +# #define _int_0 _GLF_uniform_int_values[0] +# #define _int_1 _GLF_uniform_int_values[1] +# #define _int_2 _GLF_uniform_int_values[2] +# +# precision highp float; +# precision highp int; +# +# // Contents of _GLF_uniform_int_values: [0, 1, 2] +# layout(set = 0, binding = 0) uniform buf0 +# { +# int _GLF_uniform_int_values[3]; +# }; +# +# // Contents of zero: 0 +# layout(set = 0, binding = 1) uniform buf1 +# { +# int zero; +# }; +# +# layout(location = 0) out vec4 _GLF_color; +# +# const int _GLF_global_loop_bound = 10; +# int _GLF_global_loop_count = 0; +# +# struct S +# { +# int data0; +# int data1; +# }; +# +# S arr[10] = S[10](S(1, 1), S(1, 1), S(1, 1), S(1, 1), S(1, 1), S(1, 1), S(1, 1), S(1, 1), S(1, 1), S(1, 1)); +# +# void func(inout S s) +# { +# s.data0 = _int_0; +# } +# +# void main() +# { +# // Iterated once. +# for(int i = _int_1; _GLF_global_loop_count < _GLF_global_loop_bound; i++) +# { +# _GLF_global_loop_count++; +# +# // Iterates until the global loop bound is reached. +# for(int j = zero; j != _int_1 && _GLF_global_loop_count < _GLF_global_loop_bound; ) +# { +# _GLF_global_loop_count++; +# } +# +# // Always true. +# if(arr[i].data0 >= _int_1) +# { +# // Always false. +# if(arr[i].data1 == 2) +# { +# func(arr[i]); +# return; +# } +# else +# { +# func(arr[i]); +# } +# } +# } +# +# // Always true. +# if(arr[_int_1].data0 == _int_0 && arr[_int_2].data0 == _int_1) +# { +# _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1); +# } +# else +# { +# _GLF_color = vec4(_int_0); +# } +# } +SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0 +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 10 +; Bound: 143 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %124 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 320 + OpName %4 "main" + OpName %7 "S" + OpMemberName %7 0 "data0" + OpMemberName %7 1 "data1" + OpName %11 "func(struct-S-i1-i11;" + OpName %10 "s" + OpName %14 "_GLF_global_loop_count" + OpName %20 "arr" + OpName %26 "buf0" + OpMemberName %26 0 "_GLF_uniform_int_values" + OpName %28 "" + OpName %34 "i" + OpName %48 "j" + OpName %49 "buf1" + OpMemberName %49 0 "zero" + OpName %51 "" + OpName %84 "param" + OpName %94 "param" + OpName %124 "_GLF_color" + OpDecorate %25 ArrayStride 16 + OpMemberDecorate %26 0 Offset 0 + OpDecorate %26 Block + OpDecorate %28 DescriptorSet 0 + OpDecorate %28 Binding 0 + OpMemberDecorate %49 0 Offset 0 + OpDecorate %49 Block + OpDecorate %51 DescriptorSet 0 + OpDecorate %51 Binding 1 + OpDecorate %124 Location 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeInt 32 1 + %7 = OpTypeStruct %6 %6 + %8 = OpTypePointer Function %7 + %9 = OpTypeFunction %2 %8 + %13 = OpTypePointer Private %6 + %14 = OpVariable %13 Private + %15 = OpConstant %6 0 + %16 = OpTypeInt 32 0 + %17 = OpConstant %16 10 + %18 = OpTypeArray %7 %17 + %19 = OpTypePointer Private %18 + %20 = OpVariable %19 Private + %21 = OpConstant %6 1 + %22 = OpConstantComposite %7 %21 %21 + %23 = OpConstantComposite %18 %22 %22 %22 %22 %22 %22 %22 %22 %22 %22 + %24 = OpConstant %16 3 + %25 = OpTypeArray %6 %24 + %26 = OpTypeStruct %25 + %27 = OpTypePointer Uniform %26 + %28 = OpVariable %27 Uniform + %29 = OpTypePointer Uniform %6 + %32 = OpTypePointer Function %6 + %43 = OpConstant %6 10 + %44 = OpTypeBool + %49 = OpTypeStruct %6 + %50 = OpTypePointer Uniform %49 + %51 = OpVariable %50 Uniform + %79 = OpConstant %6 2 + %85 = OpTypePointer Private %7 + %121 = OpTypeFloat 32 + %122 = OpTypeVector %121 4 + %123 = OpTypePointer Output %122 + %124 = OpVariable %123 Output + %4 = OpFunction %2 None %3 + %5 = OpLabel + %34 = OpVariable %32 Function + %48 = OpVariable %32 Function + %84 = OpVariable %8 Function + %94 = OpVariable %8 Function + OpStore %14 %15 + OpStore %20 %23 + %35 = OpAccessChain %29 %28 %15 %21 + %36 = OpLoad %6 %35 + OpStore %34 %36 + OpBranch %37 + %37 = OpLabel + OpLoopMerge %39 %40 None + OpBranch %41 + %41 = OpLabel + %42 = OpLoad %6 %14 + %45 = OpSLessThan %44 %42 %43 + OpBranchConditional %45 %38 %39 + %38 = OpLabel + %46 = OpLoad %6 %14 + %47 = OpIAdd %6 %46 %21 + OpStore %14 %47 + %52 = OpAccessChain %29 %51 %15 + %53 = OpLoad %6 %52 + OpStore %48 %53 + OpBranch %54 + %54 = OpLabel + OpLoopMerge %56 %57 None + OpBranch %58 + %58 = OpLabel + %59 = OpLoad %6 %48 + %60 = OpAccessChain %29 %28 %15 %21 + %61 = OpLoad %6 %60 + %62 = OpINotEqual %44 %59 %61 + %63 = OpLoad %6 %14 + %64 = OpSLessThan %44 %63 %43 + %65 = OpLogicalAnd %44 %62 %64 + OpBranchConditional %65 %55 %56 + %55 = OpLabel + %66 = OpLoad %6 %14 + %67 = OpIAdd %6 %66 %21 + OpStore %14 %67 + OpBranch %57 + %57 = OpLabel + OpBranch %54 + %56 = OpLabel + %68 = OpLoad %6 %34 + %69 = OpAccessChain %13 %20 %68 %15 + %70 = OpLoad %6 %69 + %71 = OpAccessChain %29 %28 %15 %21 + %72 = OpLoad %6 %71 + %73 = OpSGreaterThanEqual %44 %70 %72 + OpSelectionMerge %75 None + OpBranchConditional %73 %74 %75 + %74 = OpLabel + %76 = OpLoad %6 %34 + %77 = OpAccessChain %13 %20 %76 %21 + %78 = OpLoad %6 %77 + %80 = OpIEqual %44 %78 %79 + OpSelectionMerge %82 None + OpBranchConditional %80 %81 %92 + %81 = OpLabel + %83 = OpLoad %6 %34 + %86 = OpAccessChain %85 %20 %83 + %87 = OpLoad %7 %86 + OpStore %84 %87 + %88 = OpFunctionCall %2 %11 %84 + %89 = OpLoad %7 %84 + %90 = OpAccessChain %85 %20 %83 + OpStore %90 %89 + OpReturn + %92 = OpLabel + %93 = OpLoad %6 %34 + %95 = OpAccessChain %85 %20 %93 + %96 = OpLoad %7 %95 + OpStore %94 %96 + %97 = OpFunctionCall %2 %11 %94 + %98 = OpLoad %7 %94 + %99 = OpAccessChain %85 %20 %93 + OpStore %99 %98 + OpBranch %82 + %82 = OpLabel + OpBranch %75 + %75 = OpLabel + OpBranch %40 + %40 = OpLabel + %100 = OpLoad %6 %34 + %101 = OpIAdd %6 %100 %21 + OpStore %34 %101 + OpBranch %37 + %39 = OpLabel + %102 = OpAccessChain %29 %28 %15 %21 + %103 = OpLoad %6 %102 + %104 = OpAccessChain %13 %20 %103 %15 + %105 = OpLoad %6 %104 + %106 = OpAccessChain %29 %28 %15 %15 + %107 = OpLoad %6 %106 + %108 = OpIEqual %44 %105 %107 + OpSelectionMerge %110 None + OpBranchConditional %108 %109 %110 + %109 = OpLabel + %111 = OpAccessChain %29 %28 %15 %79 + %112 = OpLoad %6 %111 + %113 = OpAccessChain %13 %20 %112 %15 + %114 = OpLoad %6 %113 + %115 = OpAccessChain %29 %28 %15 %21 + %116 = OpLoad %6 %115 + %117 = OpIEqual %44 %114 %116 + OpBranch %110 + %110 = OpLabel + %118 = OpPhi %44 %108 %39 %117 %109 + OpSelectionMerge %120 None + OpBranchConditional %118 %119 %138 + %119 = OpLabel + %125 = OpAccessChain %29 %28 %15 %21 + %126 = OpLoad %6 %125 + %127 = OpConvertSToF %121 %126 + %128 = OpAccessChain %29 %28 %15 %15 + %129 = OpLoad %6 %128 + %130 = OpConvertSToF %121 %129 + %131 = OpAccessChain %29 %28 %15 %15 + %132 = OpLoad %6 %131 + %133 = OpConvertSToF %121 %132 + %134 = OpAccessChain %29 %28 %15 %21 + %135 = OpLoad %6 %134 + %136 = OpConvertSToF %121 %135 + %137 = OpCompositeConstruct %122 %127 %130 %133 %136 + OpStore %124 %137 + OpBranch %120 + %138 = OpLabel + %139 = OpAccessChain %29 %28 %15 %15 + %140 = OpLoad %6 %139 + %141 = OpConvertSToF %121 %140 + %142 = OpCompositeConstruct %122 %141 %141 %141 %141 + OpStore %124 %142 + OpBranch %120 + %120 = OpLabel + OpReturn + OpFunctionEnd + %11 = OpFunction %2 None %9 + %10 = OpFunctionParameter %8 + %12 = OpLabel + %30 = OpAccessChain %29 %28 %15 %15 + %31 = OpLoad %6 %30 + %33 = OpAccessChain %32 %10 %15 + OpStore %33 %31 + OpReturn + OpFunctionEnd +END + +# uniforms for variant + +# zero +BUFFER variant_zero DATA_TYPE int32 STD140 DATA + 0 +END +# _GLF_uniform_int_values +BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA + 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_zero AS uniform DESCRIPTOR_SET 0 BINDING 1 + BIND BUFFER variant__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 0 +END +CLEAR_COLOR variant_pipeline 0 0 0 255 + +CLEAR variant_pipeline +RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 256 256 + +EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255 diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-repeating-conditions-fract-unused.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-repeating-conditions-fract-unused.amber new file mode 100644 index 0000000..d8b5313 --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-repeating-conditions-fract-unused.amber @@ -0,0 +1,230 @@ +#!amber + +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# A test for a coverage-gap found by the GraphicsFuzz project. + +# Short description: A fragment shader that covers specific LLVM code paths + +# The test passes because the shader always writes red. + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 320 es +# #define _int_0 _GLF_uniform_int_values[0] +# #define _float_0_0 _GLF_uniform_float_values[0] +# #define _float_1_5 _GLF_uniform_float_values[1] +# +# precision highp int; +# precision highp float; +# +# // Contents of _GLF_uniform_int_values: 0 +# layout(set = 0, binding = 0) uniform buf0 +# { +# int _GLF_uniform_int_values[1]; +# }; +# // Contents of _GLF_uniform_float_values: [0.0, 1.5] +# layout(set = 0, binding = 1) uniform buf1 { +# float _GLF_uniform_float_values[2]; +# }; +# layout(location = 0) out vec4 _GLF_color; +# +# void main() +# { +# float a = _float_1_5; +# _GLF_color = vec4(_int_0); +# +# // Always true. +# if(gl_FragCoord.y > _float_0_0) +# { +# _GLF_color = vec4(1); +# } +# +# // Always true. +# if(gl_FragCoord.x > _float_0_0) +# { +# _GLF_color = vec4(2); +# } +# +# // Always true. +# if(gl_FragCoord.x > _float_0_0) +# { +# _GLF_color = vec4(1, 0, 0, 1); +# +# // Always true. +# if(gl_FragCoord.y > _float_0_0) +# { +# // Result is unused. +# fract(a); +# } +# } +# } +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" %23 %35 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 320 + OpName %4 "main" + OpName %8 "a" + OpName %12 "buf1" + OpMemberName %12 0 "_GLF_uniform_float_values" + OpName %14 "" + OpName %23 "_GLF_color" + OpName %26 "buf0" + OpMemberName %26 0 "_GLF_uniform_int_values" + OpName %28 "" + OpName %35 "gl_FragCoord" + OpDecorate %11 ArrayStride 16 + OpMemberDecorate %12 0 Offset 0 + OpDecorate %12 Block + OpDecorate %14 DescriptorSet 0 + OpDecorate %14 Binding 1 + OpDecorate %23 Location 0 + OpDecorate %25 ArrayStride 16 + OpMemberDecorate %26 0 Offset 0 + OpDecorate %26 Block + OpDecorate %28 DescriptorSet 0 + OpDecorate %28 Binding 0 + OpDecorate %35 BuiltIn FragCoord + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeFloat 32 + %7 = OpTypePointer Function %6 + %9 = OpTypeInt 32 0 + %10 = OpConstant %9 2 + %11 = OpTypeArray %6 %10 + %12 = OpTypeStruct %11 + %13 = OpTypePointer Uniform %12 + %14 = OpVariable %13 Uniform + %15 = OpTypeInt 32 1 + %16 = OpConstant %15 0 + %17 = OpConstant %15 1 + %18 = OpTypePointer Uniform %6 + %21 = OpTypeVector %6 4 + %22 = OpTypePointer Output %21 + %23 = OpVariable %22 Output + %24 = OpConstant %9 1 + %25 = OpTypeArray %15 %24 + %26 = OpTypeStruct %25 + %27 = OpTypePointer Uniform %26 + %28 = OpVariable %27 Uniform + %29 = OpTypePointer Uniform %15 + %34 = OpTypePointer Input %21 + %35 = OpVariable %34 Input + %36 = OpTypePointer Input %6 + %41 = OpTypeBool + %45 = OpConstant %6 1 + %46 = OpConstantComposite %21 %45 %45 %45 %45 + %47 = OpConstant %9 0 + %55 = OpConstant %6 2 + %56 = OpConstantComposite %21 %55 %55 %55 %55 + %64 = OpConstant %6 0 + %65 = OpConstantComposite %21 %45 %64 %64 %45 + %4 = OpFunction %2 None %3 + %5 = OpLabel + %8 = OpVariable %7 Function + %19 = OpAccessChain %18 %14 %16 %17 + %20 = OpLoad %6 %19 + OpStore %8 %20 + %30 = OpAccessChain %29 %28 %16 %16 + %31 = OpLoad %15 %30 + %32 = OpConvertSToF %6 %31 + %33 = OpCompositeConstruct %21 %32 %32 %32 %32 + OpStore %23 %33 + %37 = OpAccessChain %36 %35 %24 + %38 = OpLoad %6 %37 + %39 = OpAccessChain %18 %14 %16 %16 + %40 = OpLoad %6 %39 + %42 = OpFOrdGreaterThan %41 %38 %40 + OpSelectionMerge %44 None + OpBranchConditional %42 %43 %44 + %43 = OpLabel + OpStore %23 %46 + OpBranch %44 + %44 = OpLabel + %48 = OpAccessChain %36 %35 %47 + %49 = OpLoad %6 %48 + %50 = OpAccessChain %18 %14 %16 %16 + %51 = OpLoad %6 %50 + %52 = OpFOrdGreaterThan %41 %49 %51 + OpSelectionMerge %54 None + OpBranchConditional %52 %53 %54 + %53 = OpLabel + OpStore %23 %56 + OpBranch %54 + %54 = OpLabel + %57 = OpAccessChain %36 %35 %47 + %58 = OpLoad %6 %57 + %59 = OpAccessChain %18 %14 %16 %16 + %60 = OpLoad %6 %59 + %61 = OpFOrdGreaterThan %41 %58 %60 + OpSelectionMerge %63 None + OpBranchConditional %61 %62 %63 + %62 = OpLabel + OpStore %23 %65 + %66 = OpAccessChain %36 %35 %24 + %67 = OpLoad %6 %66 + %68 = OpAccessChain %18 %14 %16 %16 + %69 = OpLoad %6 %68 + %70 = OpFOrdGreaterThan %41 %67 %69 + OpSelectionMerge %72 None + OpBranchConditional %70 %71 %72 + %71 = OpLabel + %73 = OpLoad %6 %8 + %74 = OpExtInst %6 %1 Fract %73 + OpBranch %72 + %72 = OpLabel + OpBranch %63 + %63 = OpLabel + OpReturn + OpFunctionEnd +END + +# uniforms for variant + +# _GLF_uniform_float_values +BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA + 0.0 1.5 +END +# _GLF_uniform_int_values +BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA + 0 +END + +BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM + +PIPELINE graphics variant_pipeline + ATTACH variant_vertex_shader + ATTACH variant_fragment_shader + FRAMEBUFFER_SIZE 256 256 + BIND BUFFER variant_framebuffer AS color LOCATION 0 + BIND BUFFER variant__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 831863a..2ffe201 100644 --- a/external/vulkancts/data/vulkan/amber/graphicsfuzz/index.txt +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/index.txt @@ -104,6 +104,7 @@ { "cov-dfdx-dfdy-after-nested-loops.amber", "cov-dfdx-dfdy-after-nested-loops", "A fragment shader that covers specific BRW code paths" }, { "cov-divide-matrix-transpose-by-constant.amber", "cov-divide-matrix-transpose-by-constant", "A fragment shader that covers specific VTN code path" }, { "cov-do-while-loop-until-uniform-lt-itself.amber", "cov-do-while-loop-until-uniform-lt-itself", "A fragment shader that covers specific LLVM code paths" }, +{ "cov-do-while-negative-iterator-nested-loops-increment-array-element.amber", "cov-do-while-negative-iterator-nested-loops-increment-array-element", "A fragment shader that covers specific LLVM code paths" }, { "cov-do-while-switch-case-bitcount-findmsb.amber", "cov-do-while-switch-case-bitcount-findmsb", "A fragment shader that covers specific LLVM code paths" }, { "cov-double-if-true-in-loop.amber", "cov-double-if-true-in-loop", "A fragment shader that covers specific NIR code paths" }, { "cov-dummy-function-loop-array-element-increment-never-read.amber", "cov-dummy-function-loop-array-element-increment-never-read", "A fragment shader that covers specific LLVM code paths" }, @@ -155,14 +156,18 @@ { "cov-fragcood-multiple-conditions-function-loop-global-counter.amber", "cov-fragcood-multiple-conditions-function-loop-global-counter", "A fragment shader that covers specific LLVM code paths" }, { "cov-fragcoord-bitwise-not.amber", "cov-fragcoord-bitwise-not", "A fragment shader that covers specific BRW code paths" }, { "cov-fragcoord-clamp-array-access.amber", "cov-fragcoord-clamp-array-access", "A fragment shader that covers a specific instruction simplify path" }, +{ "cov-fragcoord-conditions-never-return-index-array-using-uniform.amber", "cov-fragcoord-conditions-never-return-index-array-using-uniform", "A fragment shader that covers specific LLVM code paths" }, { "cov-fragcoord-multiple-conditions-function-global-loop-counter-simplified.amber", "cov-fragcoord-multiple-conditions-function-global-loop-counter-simplified", "A fragment shader that covers specific LLVM code paths" }, { "cov-fragcoord-multiply.amber", "cov-fragcoord-multiply", "A fragment shader that covers specific NIR code paths" }, { "cov-function-argument-uniform-float-loop-never-return.amber", "cov-function-argument-uniform-float-loop-never-return", "A fragment shader that covers specific LLVM code paths" }, { "cov-function-find-lsb-ivec2-one.amber", "cov-function-find-lsb-ivec2-one", "A fragment shader that covers specific LLVM code paths" }, { "cov-function-fragcoord-condition-always-return.amber", "cov-function-fragcoord-condition-always-return", "A fragment shader that covers specific LLVM code paths" }, { "cov-function-large-array-max-clamp.amber", "cov-function-large-array-max-clamp", "A fragment shader that covers specific LLVM code paths" }, +{ "cov-function-loop-condition-uniform-shift-right.amber", "cov-function-loop-condition-uniform-shift-right", "A fragment shader that covers specific LLVM code paths" }, { "cov-function-nested-do-whiles-looped-once.amber", "cov-function-nested-do-whiles-looped-once", "A fragment shader that covers specific LLVM code paths" }, +{ "cov-function-nested-loops-break-early-never-discard.amber", "cov-function-nested-loops-break-early-never-discard", "A fragment shader that covers specific LLVM code paths" }, { "cov-function-trivial-switch-case.amber", "cov-function-trivial-switch-case", "A fragment shader that covers specific LLVM code paths" }, +{ "cov-function-two-loops-limit-using-arguments-array-element-copies.amber", "cov-function-two-loops-limit-using-arguments-array-element-copies", "A fragment shader that covers specific LLVM code paths" }, { "cov-function-unpack-unorm-2x16-one.amber", "cov-function-unpack-unorm-2x16-one", "A fragment shader that covers specific LLVM code paths" }, { "cov-function-vec2-never-discard.amber", "cov-function-vec2-never-discard", "A fragment shader that covers specific BRW code paths" }, { "cov-function-with-nested-loops-called-from-nested-loops.amber", "cov-function-with-nested-loops-called-from-nested-loops", "A fragment shader that covers specific BRW code paths" }, @@ -172,6 +177,7 @@ { "cov-global-loop-counter-main-function-call.amber", "cov-global-loop-counter-main-function-call", "A fragment shader that covers specific NIR code paths" }, { "cov-global-loop-counter-multiply-one-minus.amber", "cov-global-loop-counter-multiply-one-minus", "A fragment shader that covers specific BRW code paths" }, { "cov-global-loop-counter-read-past-matrix-size-never-executed.amber", "cov-global-loop-counter-read-past-matrix-size-never-executed", "A fragment shader that covers specific LLVM code paths" }, +{ "cov-global-loop-counter-set-array-element-once-index-using-findmsb.amber", "cov-global-loop-counter-set-array-element-once-index-using-findmsb", "A fragment shader that covers specific LLVM code paths" }, { "cov-global-loop-counter-squared-comparison.amber", "cov-global-loop-counter-squared-comparison", "A fragment shader that covers specific LLVM code paths" }, { "cov-global-loop-counter-texture-sample-loop-condition-set-array-element.amber", "cov-global-loop-counter-texture-sample-loop-condition-set-array-element", "A fragment shader that covers specific LLVM code paths" }, { "cov-if-conversion-identical-branches.amber", "cov-if-conversion-identical-branches", "A fragment shader that covers a specific if condition conversion path." }, @@ -236,6 +242,7 @@ { "cov-int-div-round-to-zero.amber", "cov-int-div-round-to-zero", "A fragment shader that covers specific fast idiv code path" }, { "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-int-initialize-from-multiple-large-arrays.amber", "cov-int-initialize-from-multiple-large-arrays", "A fragment shader that covers specific LLVM code paths" }, +{ "cov-integer-minus-one-increased-before-indexing-array.amber", "cov-integer-minus-one-increased-before-indexing-array", "A fragment shader that covers specific LLVM 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"}, @@ -248,6 +255,7 @@ { "cov-left-shift-right-shift-compare.amber", "cov-left-shift-right-shift-compare", "A fragment shader that covers a specific inst combine compares code path" }, { "cov-liveinterval-different-dest.amber", "cov-liveinterval-different-dest", "A fragment shader that covers a specific live interval code path." }, { "cov-loop-abs-multiply-offset.amber", "cov-loop-abs-multiply-offset", "A fragment shader that covers specific NIR code paths" }, +{ "cov-loop-array-element-copy-index-clamp-sign.amber", "cov-loop-array-element-copy-index-clamp-sign", "A fragment shader that covers specific LLVM code paths" }, { "cov-loop-break-after-first-iteration-set-array-element.amber", "cov-loop-break-after-first-iteration-set-array-element", "A fragment shader that covers specific LLVM code paths" }, { "cov-loop-break-floor-nan-never-executed.amber", "cov-loop-break-floor-nan-never-executed", "A fragment shader that covers specific NIR code paths" }, { "cov-loop-clamp-to-one-empty-condition.amber", "cov-loop-clamp-to-one-empty-condition", "A fragment shader that covers specific NIR code paths" }, @@ -266,8 +274,10 @@ { "cov-loop-logical-xor.amber", "cov-loop-logical-xor", "A fragment shader that covers specific NIR code paths" }, { "cov-loop-returns-behind-true-and-false.amber", "cov-loop-returns-behind-true-and-false", "A fragment shader that covers specific NIR code paths" }, { "cov-loop-set-vector-components-pow-two.amber", "cov-loop-set-vector-components-pow-two", "A fragment shader that covers specific LLVM code paths" }, +{ "cov-loop-start-from-one-switch-case-never-executed.amber", "cov-loop-start-from-one-switch-case-never-executed", "A fragment shader that covers specific LLVM code paths" }, { "cov-loop-struct-array-field-set-value-self-dependency.amber", "cov-loop-struct-array-field-set-value-self-dependency", "A fragment shader that covers specific LLVM code paths" }, { "cov-loop-switch-discard-never-hit.amber", "cov-loop-switch-discard-never-hit", "A fragment shader that covers specific LLVM code paths" }, +{ "cov-loop-two-iterators-increment-array-empty-do-while.amber", "cov-loop-two-iterators-increment-array-empty-do-while", "A fragment shader that covers specific LLVM code paths" }, { "cov-loop-with-two-integers.amber", "cov-loop-with-two-integers", "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" }, @@ -295,6 +305,7 @@ { "cov-multiple-fragcoord-conditions-never-return-color-uninitialized.amber", "cov-multiple-fragcoord-conditions-never-return-color-uninitialized", "A fragment shader that covers specific LLVM code paths" }, { "cov-multiple-one-iteration-loops-global-counter-write-matrices.amber", "cov-multiple-one-iteration-loops-global-counter-write-matrices", "A fragment shader that covers specific BRW code paths" }, { "cov-nested-functions-accumulate-global-matrix.amber", "cov-nested-functions-accumulate-global-matrix", "A fragment shader that covers specific NIR code paths" }, +{ "cov-nested-functions-compare-fragcood-length-zero-vector.amber", "cov-nested-functions-compare-fragcood-length-zero-vector", "A fragment shader that covers specific LLVM code paths" }, { "cov-nested-functions-loop-assign-global-array-element.amber", "cov-nested-functions-loop-assign-global-array-element", "A fragment shader that covers specific LLVM code paths" }, { "cov-nested-functions-struct-arrays-vector-lengths.amber", "cov-nested-functions-struct-arrays-vector-lengths", "A fragment shader that covers specific LLVM code paths" }, { "cov-nested-loop-continue-inner-copy-array-element.amber", "cov-nested-loop-continue-inner-copy-array-element", "A fragment shader that covers specific LLVM code paths" }, @@ -303,8 +314,10 @@ { "cov-nested-loop-not-greater-than-increment-array-element.amber", "cov-nested-loop-not-greater-than-increment-array-element", "A fragment shader that covers specific LLVM code paths" }, { "cov-nested-loop-undefined-smoothstep-never-executed.amber", "cov-nested-loop-undefined-smoothstep-never-executed", "A fragment shader that covers specific BRW code paths" }, { "cov-nested-loops-clamp-ivec-push-constant-increment-global-counter.amber", "cov-nested-loops-clamp-ivec-push-constant-increment-global-counter", "A fragment shader that covers specific LLVM code paths" }, +{ "cov-nested-loops-decrease-vector-component-by-matrix-element-global-loop-counter.amber", "cov-nested-loops-decrease-vector-component-by-matrix-element-global-loop-counter", "A fragment shader that covers specific LLVM code paths" }, { "cov-nested-loops-float-array-select-by-fragcoord.amber", "cov-nested-loops-float-array-select-by-fragcoord", "A fragment shader that covers specific BRW code paths" }, { "cov-nested-loops-float-bits-to-int-increment-array.amber", "cov-nested-loops-float-bits-to-int-increment-array", "A fragment shader that covers specific LLVM code paths" }, +{ "cov-nested-loops-global-counter-func-set-struct-field.amber", "cov-nested-loops-global-counter-func-set-struct-field", "A fragment shader that covers specific LLVM code paths" }, { "cov-nested-loops-global-counter-increment-single-element.amber", "cov-nested-loops-global-counter-increment-single-element", "A fragment shader that covers specific LLVM code paths" }, { "cov-nested-loops-global-loop-counter-do-while-accumulate-float.amber", "cov-nested-loops-global-loop-counter-do-while-accumulate-float", "A fragment shader that covers specific BRW code paths" }, { "cov-nested-loops-global-loop-counter-fragcoord-negative-always-false.amber", "cov-nested-loops-global-loop-counter-fragcoord-negative-always-false", "A fragment shader that covers specific LLVM code paths" }, @@ -331,6 +344,7 @@ { "cov-reduce-load-replace-extract.amber", "cov-reduce-load-replace-extract", "A fragment shader that covers a specific load size reduction path." }, { "cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard.amber", "cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard", "Covers register coalescer, live intervals and target instr info code paths" }, { "cov-reinitialize-matrix-after-undefined-value.amber", "cov-reinitialize-matrix-after-undefined-value", "A fragment shader that covers specific NIR code paths" }, +{ "cov-repeating-conditions-fract-unused.amber", "cov-repeating-conditions-fract-unused", "A fragment shader that covers specific LLVM code paths" }, { "cov-replace-copy-object.amber", "cov-replace-copy-object", "A fragment shader that covers a specific shader simplification path." }, { "cov-return-after-do-while.amber", "cov-return-after-do-while", "A fragment shader that covers a specific simplify cfg code path" }, { "cov-return-after-first-iteration.amber", "cov-return-after-first-iteration", "A fragment shader that covers specific BRW code paths" }, diff --git a/external/vulkancts/mustpass/master/vk-default/graphicsfuzz.txt b/external/vulkancts/mustpass/master/vk-default/graphicsfuzz.txt index 97768f6..3eb85c1 100644 --- a/external/vulkancts/mustpass/master/vk-default/graphicsfuzz.txt +++ b/external/vulkancts/mustpass/master/vk-default/graphicsfuzz.txt @@ -104,6 +104,7 @@ dEQP-VK.graphicsfuzz.cov-determinant-uninitialized-matrix-never-chosen dEQP-VK.graphicsfuzz.cov-dfdx-dfdy-after-nested-loops dEQP-VK.graphicsfuzz.cov-divide-matrix-transpose-by-constant dEQP-VK.graphicsfuzz.cov-do-while-loop-until-uniform-lt-itself +dEQP-VK.graphicsfuzz.cov-do-while-negative-iterator-nested-loops-increment-array-element dEQP-VK.graphicsfuzz.cov-do-while-switch-case-bitcount-findmsb dEQP-VK.graphicsfuzz.cov-double-if-true-in-loop dEQP-VK.graphicsfuzz.cov-dummy-function-loop-array-element-increment-never-read @@ -155,14 +156,18 @@ dEQP-VK.graphicsfuzz.cov-fract-trunc-always-zero dEQP-VK.graphicsfuzz.cov-fragcood-multiple-conditions-function-loop-global-counter dEQP-VK.graphicsfuzz.cov-fragcoord-bitwise-not dEQP-VK.graphicsfuzz.cov-fragcoord-clamp-array-access +dEQP-VK.graphicsfuzz.cov-fragcoord-conditions-never-return-index-array-using-uniform dEQP-VK.graphicsfuzz.cov-fragcoord-multiple-conditions-function-global-loop-counter-simplified dEQP-VK.graphicsfuzz.cov-fragcoord-multiply dEQP-VK.graphicsfuzz.cov-function-argument-uniform-float-loop-never-return dEQP-VK.graphicsfuzz.cov-function-find-lsb-ivec2-one dEQP-VK.graphicsfuzz.cov-function-fragcoord-condition-always-return dEQP-VK.graphicsfuzz.cov-function-large-array-max-clamp +dEQP-VK.graphicsfuzz.cov-function-loop-condition-uniform-shift-right dEQP-VK.graphicsfuzz.cov-function-nested-do-whiles-looped-once +dEQP-VK.graphicsfuzz.cov-function-nested-loops-break-early-never-discard dEQP-VK.graphicsfuzz.cov-function-trivial-switch-case +dEQP-VK.graphicsfuzz.cov-function-two-loops-limit-using-arguments-array-element-copies dEQP-VK.graphicsfuzz.cov-function-unpack-unorm-2x16-one dEQP-VK.graphicsfuzz.cov-function-vec2-never-discard dEQP-VK.graphicsfuzz.cov-function-with-nested-loops-called-from-nested-loops @@ -172,6 +177,7 @@ dEQP-VK.graphicsfuzz.cov-global-loop-counter-float-accumulate-matrix dEQP-VK.graphicsfuzz.cov-global-loop-counter-main-function-call dEQP-VK.graphicsfuzz.cov-global-loop-counter-multiply-one-minus dEQP-VK.graphicsfuzz.cov-global-loop-counter-read-past-matrix-size-never-executed +dEQP-VK.graphicsfuzz.cov-global-loop-counter-set-array-element-once-index-using-findmsb dEQP-VK.graphicsfuzz.cov-global-loop-counter-squared-comparison dEQP-VK.graphicsfuzz.cov-global-loop-counter-texture-sample-loop-condition-set-array-element dEQP-VK.graphicsfuzz.cov-if-conversion-identical-branches @@ -236,6 +242,7 @@ dEQP-VK.graphicsfuzz.cov-inst-combine-vector-ops-asin dEQP-VK.graphicsfuzz.cov-int-div-round-to-zero dEQP-VK.graphicsfuzz.cov-int-full-bits-divide-by-two-loop dEQP-VK.graphicsfuzz.cov-int-initialize-from-multiple-large-arrays +dEQP-VK.graphicsfuzz.cov-integer-minus-one-increased-before-indexing-array 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 @@ -248,6 +255,7 @@ dEQP-VK.graphicsfuzz.cov-left-shift-array-access dEQP-VK.graphicsfuzz.cov-left-shift-right-shift-compare dEQP-VK.graphicsfuzz.cov-liveinterval-different-dest dEQP-VK.graphicsfuzz.cov-loop-abs-multiply-offset +dEQP-VK.graphicsfuzz.cov-loop-array-element-copy-index-clamp-sign dEQP-VK.graphicsfuzz.cov-loop-break-after-first-iteration-set-array-element dEQP-VK.graphicsfuzz.cov-loop-break-floor-nan-never-executed dEQP-VK.graphicsfuzz.cov-loop-clamp-to-one-empty-condition @@ -266,8 +274,10 @@ dEQP-VK.graphicsfuzz.cov-loop-integer-half-minus-one dEQP-VK.graphicsfuzz.cov-loop-logical-xor dEQP-VK.graphicsfuzz.cov-loop-returns-behind-true-and-false dEQP-VK.graphicsfuzz.cov-loop-set-vector-components-pow-two +dEQP-VK.graphicsfuzz.cov-loop-start-from-one-switch-case-never-executed dEQP-VK.graphicsfuzz.cov-loop-struct-array-field-set-value-self-dependency dEQP-VK.graphicsfuzz.cov-loop-switch-discard-never-hit +dEQP-VK.graphicsfuzz.cov-loop-two-iterators-increment-array-empty-do-while dEQP-VK.graphicsfuzz.cov-loop-with-two-integers dEQP-VK.graphicsfuzz.cov-machine-scheduler-for-if-pow dEQP-VK.graphicsfuzz.cov-machine-basic-block-for-for-for-less-than @@ -295,6 +305,7 @@ dEQP-VK.graphicsfuzz.cov-multiple-fragcoord-conditions-false-never-return-sample dEQP-VK.graphicsfuzz.cov-multiple-fragcoord-conditions-never-return-color-uninitialized dEQP-VK.graphicsfuzz.cov-multiple-one-iteration-loops-global-counter-write-matrices dEQP-VK.graphicsfuzz.cov-nested-functions-accumulate-global-matrix +dEQP-VK.graphicsfuzz.cov-nested-functions-compare-fragcood-length-zero-vector dEQP-VK.graphicsfuzz.cov-nested-functions-loop-assign-global-array-element dEQP-VK.graphicsfuzz.cov-nested-functions-struct-arrays-vector-lengths dEQP-VK.graphicsfuzz.cov-nested-loop-continue-inner-copy-array-element @@ -303,8 +314,10 @@ dEQP-VK.graphicsfuzz.cov-nested-loop-large-array-index-using-vector-components dEQP-VK.graphicsfuzz.cov-nested-loop-not-greater-than-increment-array-element dEQP-VK.graphicsfuzz.cov-nested-loop-undefined-smoothstep-never-executed dEQP-VK.graphicsfuzz.cov-nested-loops-clamp-ivec-push-constant-increment-global-counter +dEQP-VK.graphicsfuzz.cov-nested-loops-decrease-vector-component-by-matrix-element-global-loop-counter dEQP-VK.graphicsfuzz.cov-nested-loops-float-array-select-by-fragcoord dEQP-VK.graphicsfuzz.cov-nested-loops-float-bits-to-int-increment-array +dEQP-VK.graphicsfuzz.cov-nested-loops-global-counter-func-set-struct-field dEQP-VK.graphicsfuzz.cov-nested-loops-global-counter-increment-single-element dEQP-VK.graphicsfuzz.cov-nested-loops-global-loop-counter-do-while-accumulate-float dEQP-VK.graphicsfuzz.cov-nested-loops-global-loop-counter-fragcoord-negative-always-false @@ -331,6 +344,7 @@ dEQP-VK.graphicsfuzz.cov-reciprocal-var-minus-one dEQP-VK.graphicsfuzz.cov-reduce-load-replace-extract dEQP-VK.graphicsfuzz.cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard dEQP-VK.graphicsfuzz.cov-reinitialize-matrix-after-undefined-value +dEQP-VK.graphicsfuzz.cov-repeating-conditions-fract-unused dEQP-VK.graphicsfuzz.cov-replace-copy-object dEQP-VK.graphicsfuzz.cov-return-after-do-while dEQP-VK.graphicsfuzz.cov-return-after-first-iteration -- 2.7.4