Add a batch of GraphicsFuzz coverage tests
authorAri Suonpaa <ari.suonpaa@siru.fi>
Wed, 13 Apr 2022 08:10:43 +0000 (11:10 +0300)
committerMatthew Netsch <quic_mnetsch@quicinc.com>
Thu, 14 Apr 2022 19:02:54 +0000 (19:02 +0000)
This commit adds a batch of GraphicsFuzz coverage tests.

Components: Vulkan

New Tests:

dEQP-VK.graphicsfuzz.cov-function-global-loop-counter-sample-texture
dEQP-VK.graphicsfuzz.cov-function-index-array-redundant-clamps
dEQP-VK.graphicsfuzz.cov-function-loop-condition-constant-array-always-false
dEQP-VK.graphicsfuzz.cov-function-max-all-ones-select-always-true
dEQP-VK.graphicsfuzz.cov-function-struct-int-array-loop-check-element
dEQP-VK.graphicsfuzz.cov-loop-break-fragcoord-x-empty-loop
dEQP-VK.graphicsfuzz.cov-loop-condition-constant-struct-field-data
dEQP-VK.graphicsfuzz.cov-loop-global-counter-increment-iterator-select-uniform
dEQP-VK.graphicsfuzz.cov-loop-never-iterated-constant-vector-condition
dEQP-VK.graphicsfuzz.cov-loop-start-fragcoord-while-iterates-once
dEQP-VK.graphicsfuzz.cov-multiple-functions-global-never-change
dEQP-VK.graphicsfuzz.cov-nested-functions-vec4-array-element-argument
dEQP-VK.graphicsfuzz.cov-nested-loops-global-loop-counter-reached-second-iteration
dEQP-VK.graphicsfuzz.cov-two-loops-global-loop-counter-clamp-ivec-elements-index-array
dEQP-VK.graphicsfuzz.cov-two-loops-never-iterated

Change-Id: Ia12ea0e32ab889c203e3f3ef12459807252f30b5

19 files changed:
android/cts/main/vk-master-2022-03-01/graphicsfuzz.txt
android/cts/main/vk-master/graphicsfuzz.txt
external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-function-global-loop-counter-sample-texture.amber [new file with mode: 0644]
external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-function-index-array-redundant-clamps.amber [new file with mode: 0644]
external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-function-loop-condition-constant-array-always-false.amber [new file with mode: 0644]
external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-function-max-all-ones-select-always-true.amber [new file with mode: 0644]
external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-function-struct-int-array-loop-check-element.amber [new file with mode: 0644]
external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-loop-break-fragcoord-x-empty-loop.amber [new file with mode: 0644]
external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-loop-condition-constant-struct-field-data.amber [new file with mode: 0644]
external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-loop-global-counter-increment-iterator-select-uniform.amber [new file with mode: 0644]
external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-loop-never-iterated-constant-vector-condition.amber [new file with mode: 0644]
external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-loop-start-fragcoord-while-iterates-once.amber [new file with mode: 0644]
external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-multiple-functions-global-never-change.amber [new file with mode: 0644]
external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-nested-functions-vec4-array-element-argument.amber [new file with mode: 0644]
external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-nested-loops-global-loop-counter-reached-second-iteration.amber [new file with mode: 0644]
external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-two-loops-global-loop-counter-clamp-ivec-elements-index-array.amber [new file with mode: 0644]
external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-two-loops-never-iterated.amber [new file with mode: 0644]
external/vulkancts/data/vulkan/amber/graphicsfuzz/index.txt
external/vulkancts/mustpass/main/vk-default/graphicsfuzz.txt

index 76592d7..2bc5fe0 100644 (file)
@@ -76,18 +76,22 @@ dEQP-VK.graphicsfuzz.cov-function-call-twice-clamp-global-variable
 dEQP-VK.graphicsfuzz.cov-function-divide-argument-until-lt-one
 dEQP-VK.graphicsfuzz.cov-function-find-lsb-ivec2-one
 dEQP-VK.graphicsfuzz.cov-function-fragcoord-condition-always-return
+dEQP-VK.graphicsfuzz.cov-function-global-loop-counter-sample-texture
+dEQP-VK.graphicsfuzz.cov-function-index-array-redundant-clamps
 dEQP-VK.graphicsfuzz.cov-function-infinite-loop-always-return
 dEQP-VK.graphicsfuzz.cov-function-infinite-loop-return-identical-condition
 dEQP-VK.graphicsfuzz.cov-function-large-array-max-clamp
 dEQP-VK.graphicsfuzz.cov-function-large-loop-break-argument-lte-global-loop-bound
 dEQP-VK.graphicsfuzz.cov-function-loop-check-determinant-zero-return-vector
 dEQP-VK.graphicsfuzz.cov-function-loop-clamp-no-effect
+dEQP-VK.graphicsfuzz.cov-function-loop-condition-constant-array-always-false
 dEQP-VK.graphicsfuzz.cov-function-loop-condition-uniform-shift-right
 dEQP-VK.graphicsfuzz.cov-function-loop-condition-variable-less-than-min-itself
 dEQP-VK.graphicsfuzz.cov-function-loop-copy-array-elements-based-on-arguments
 dEQP-VK.graphicsfuzz.cov-function-loop-modify-ivec-components-infinite-loop-never-executed
 dEQP-VK.graphicsfuzz.cov-function-loop-same-conditions-multiple-times-struct-array
 dEQP-VK.graphicsfuzz.cov-function-loop-switch-increment-array-element-return
+dEQP-VK.graphicsfuzz.cov-function-max-all-ones-select-always-true
 dEQP-VK.graphicsfuzz.cov-function-min-integer-large-shift-unused
 dEQP-VK.graphicsfuzz.cov-function-loop-variable-multiplied-unused
 dEQP-VK.graphicsfuzz.cov-function-loops-vector-mul-matrix-never-executed
@@ -98,6 +102,7 @@ dEQP-VK.graphicsfuzz.cov-function-nested-loops-limit-uniform-xor-uniform
 dEQP-VK.graphicsfuzz.cov-function-set-struct-field-zero-loop-reset-first-element
 dEQP-VK.graphicsfuzz.cov-function-parameter-zero-divided-by-uniform
 dEQP-VK.graphicsfuzz.cov-function-round-unpack-half-2x16
+dEQP-VK.graphicsfuzz.cov-function-struct-int-array-loop-check-element
 dEQP-VK.graphicsfuzz.cov-function-switch-case-constant-clamp-transpose-identity-matrices
 dEQP-VK.graphicsfuzz.cov-function-trivial-switch-case
 dEQP-VK.graphicsfuzz.cov-function-two-loops-limit-using-arguments-array-element-copies
@@ -163,9 +168,11 @@ dEQP-VK.graphicsfuzz.cov-loop-array-index-decrement-never-negative
 dEQP-VK.graphicsfuzz.cov-loop-array-struct-field-index-array-with-uniforms
 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-break-fragcoord-x-empty-loop
 dEQP-VK.graphicsfuzz.cov-loop-clamp-to-one-empty-condition
 dEQP-VK.graphicsfuzz.cov-loop-condition-bitfield-extract-set-array-elements
 dEQP-VK.graphicsfuzz.cov-loop-condition-clamp-vec-of-ones
+dEQP-VK.graphicsfuzz.cov-loop-condition-constant-struct-field-data
 dEQP-VK.graphicsfuzz.cov-loop-condition-divide-by-uniform-always-false
 dEQP-VK.graphicsfuzz.cov-loop-condition-double-negate
 dEQP-VK.graphicsfuzz.cov-loop-condition-filter-some-iterations-never-discard
@@ -183,6 +190,7 @@ dEQP-VK.graphicsfuzz.cov-loop-find-lsb-eight-fragcoord-never-discard
 dEQP-VK.graphicsfuzz.cov-loop-fragcoord-identical-condition
 dEQP-VK.graphicsfuzz.cov-loop-global-counter-break-set-ivec-elements
 dEQP-VK.graphicsfuzz.cov-loop-function-call-negative-argument
+dEQP-VK.graphicsfuzz.cov-loop-global-counter-increment-iterator-select-uniform
 dEQP-VK.graphicsfuzz.cov-loop-increase-iterator-condition-uniform-copy-array-elements
 dEQP-VK.graphicsfuzz.cov-loop-increment-array-elements-clamp-index
 dEQP-VK.graphicsfuzz.cov-loop-increment-array-index-array-usuborrow-feedback
@@ -200,6 +208,7 @@ dEQP-VK.graphicsfuzz.cov-loop-limiter-min-findlsb
 dEQP-VK.graphicsfuzz.cov-loop-limiter-uniform-bitwise-and-one-always-break
 dEQP-VK.graphicsfuzz.cov-loop-logical-xor
 dEQP-VK.graphicsfuzz.cov-loop-multiple-iterator-variables-copy-array-elements
+dEQP-VK.graphicsfuzz.cov-loop-never-iterated-constant-vector-condition
 dEQP-VK.graphicsfuzz.cov-loop-read-array-index-from-array-data
 dEQP-VK.graphicsfuzz.cov-loop-max-divide-integer-by-ten
 dEQP-VK.graphicsfuzz.cov-loop-overwrite-sample-texture-as-color-output
@@ -208,6 +217,7 @@ dEQP-VK.graphicsfuzz.cov-loop-replace-output-color-restore-original
 dEQP-VK.graphicsfuzz.cov-loop-returns-behind-true-and-false
 dEQP-VK.graphicsfuzz.cov-loop-sampled-texel-integer-counter
 dEQP-VK.graphicsfuzz.cov-loop-set-vector-components-pow-two
+dEQP-VK.graphicsfuzz.cov-loop-start-fragcoord-while-iterates-once
 dEQP-VK.graphicsfuzz.cov-loop-start-from-one-switch-case-invalid-color-never-executed
 dEQP-VK.graphicsfuzz.cov-loop-start-from-one-switch-case-never-executed
 dEQP-VK.graphicsfuzz.cov-loop-struct-array-field-set-value-self-dependency
@@ -234,6 +244,7 @@ dEQP-VK.graphicsfuzz.cov-mod-uint-bits-float
 dEQP-VK.graphicsfuzz.cov-modulo-zero-never-executed
 dEQP-VK.graphicsfuzz.cov-multiple-fragcoord-conditions-false-never-return-sample-texture
 dEQP-VK.graphicsfuzz.cov-multiple-fragcoord-conditions-never-return-color-uninitialized
+dEQP-VK.graphicsfuzz.cov-multiple-functions-global-never-change
 dEQP-VK.graphicsfuzz.cov-multiple-loops-same-condition-always-false-global-loop-counter
 dEQP-VK.graphicsfuzz.cov-multiple-one-iteration-loops-global-counter-write-matrices
 dEQP-VK.graphicsfuzz.cov-negative-integer-bitwise-or-uniform-increment-loop
@@ -241,6 +252,7 @@ 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-functions-vec4-array-element-argument
 dEQP-VK.graphicsfuzz.cov-nested-loop-continue-inner-copy-array-element
 dEQP-VK.graphicsfuzz.cov-nested-loop-decrease-vector-components
 dEQP-VK.graphicsfuzz.cov-nested-loop-initializer-value-increased-inside
@@ -266,6 +278,7 @@ dEQP-VK.graphicsfuzz.cov-nested-loops-global-loop-counter-fragcoord-negative-alw
 dEQP-VK.graphicsfuzz.cov-nested-loops-global-loop-counter-index-array-vec2
 dEQP-VK.graphicsfuzz.cov-nested-loops-global-loop-counter-iterator-dependency
 dEQP-VK.graphicsfuzz.cov-nested-loops-global-loop-counter-output-color-from-backup
+dEQP-VK.graphicsfuzz.cov-nested-loops-global-loop-counter-reached-second-iteration
 dEQP-VK.graphicsfuzz.cov-nested-loops-identical-iterator-names-multiply-divide
 dEQP-VK.graphicsfuzz.cov-nested-loops-identical-iterators-compare-same-array-elements
 dEQP-VK.graphicsfuzz.cov-nested-loops-increase-integer-dot-product
@@ -317,8 +330,10 @@ dEQP-VK.graphicsfuzz.cov-transpose-multiply
 dEQP-VK.graphicsfuzz.cov-trunc-fract-always-zero
 dEQP-VK.graphicsfuzz.cov-two-functions-loops-copy-elements-infinite-loops-never-executed
 dEQP-VK.graphicsfuzz.cov-two-functions-modify-struct-array-element-return-from-loop
+dEQP-VK.graphicsfuzz.cov-two-loops-global-loop-counter-clamp-ivec-elements-index-array
 dEQP-VK.graphicsfuzz.cov-two-loops-global-loop-counter-shift-right-zero-increment-array-element
 dEQP-VK.graphicsfuzz.cov-two-loops-increment-integer-global-counter-break-square-threshold
+dEQP-VK.graphicsfuzz.cov-two-loops-never-iterated
 dEQP-VK.graphicsfuzz.cov-two-nested-loops-switch-case-matrix-array-increment
 dEQP-VK.graphicsfuzz.cov-uadd-carry-bit-count-index-array
 dEQP-VK.graphicsfuzz.cov-ucarryadd-one-and-one
index c887501..20b7897 100644 (file)
@@ -186,18 +186,22 @@ dEQP-VK.graphicsfuzz.cov-function-call-twice-clamp-global-variable
 dEQP-VK.graphicsfuzz.cov-function-divide-argument-until-lt-one
 dEQP-VK.graphicsfuzz.cov-function-find-lsb-ivec2-one
 dEQP-VK.graphicsfuzz.cov-function-fragcoord-condition-always-return
+dEQP-VK.graphicsfuzz.cov-function-global-loop-counter-sample-texture
+dEQP-VK.graphicsfuzz.cov-function-index-array-redundant-clamps
 dEQP-VK.graphicsfuzz.cov-function-infinite-loop-always-return
 dEQP-VK.graphicsfuzz.cov-function-infinite-loop-return-identical-condition
 dEQP-VK.graphicsfuzz.cov-function-large-array-max-clamp
 dEQP-VK.graphicsfuzz.cov-function-large-loop-break-argument-lte-global-loop-bound
 dEQP-VK.graphicsfuzz.cov-function-loop-check-determinant-zero-return-vector
 dEQP-VK.graphicsfuzz.cov-function-loop-clamp-no-effect
+dEQP-VK.graphicsfuzz.cov-function-loop-condition-constant-array-always-false
 dEQP-VK.graphicsfuzz.cov-function-loop-condition-uniform-shift-right
 dEQP-VK.graphicsfuzz.cov-function-loop-condition-variable-less-than-min-itself
 dEQP-VK.graphicsfuzz.cov-function-loop-copy-array-elements-based-on-arguments
 dEQP-VK.graphicsfuzz.cov-function-loop-modify-ivec-components-infinite-loop-never-executed
 dEQP-VK.graphicsfuzz.cov-function-loop-same-conditions-multiple-times-struct-array
 dEQP-VK.graphicsfuzz.cov-function-loop-switch-increment-array-element-return
+dEQP-VK.graphicsfuzz.cov-function-max-all-ones-select-always-true
 dEQP-VK.graphicsfuzz.cov-function-min-integer-large-shift-unused
 dEQP-VK.graphicsfuzz.cov-function-loop-variable-multiplied-unused
 dEQP-VK.graphicsfuzz.cov-function-loops-vector-mul-matrix-never-executed
@@ -208,6 +212,7 @@ dEQP-VK.graphicsfuzz.cov-function-nested-loops-limit-uniform-xor-uniform
 dEQP-VK.graphicsfuzz.cov-function-set-struct-field-zero-loop-reset-first-element
 dEQP-VK.graphicsfuzz.cov-function-parameter-zero-divided-by-uniform
 dEQP-VK.graphicsfuzz.cov-function-round-unpack-half-2x16
+dEQP-VK.graphicsfuzz.cov-function-struct-int-array-loop-check-element
 dEQP-VK.graphicsfuzz.cov-function-switch-case-constant-clamp-transpose-identity-matrices
 dEQP-VK.graphicsfuzz.cov-function-trivial-switch-case
 dEQP-VK.graphicsfuzz.cov-function-two-loops-limit-using-arguments-array-element-copies
@@ -322,9 +327,11 @@ dEQP-VK.graphicsfuzz.cov-loop-array-index-decrement-never-negative
 dEQP-VK.graphicsfuzz.cov-loop-array-struct-field-index-array-with-uniforms
 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-break-fragcoord-x-empty-loop
 dEQP-VK.graphicsfuzz.cov-loop-clamp-to-one-empty-condition
 dEQP-VK.graphicsfuzz.cov-loop-condition-bitfield-extract-set-array-elements
 dEQP-VK.graphicsfuzz.cov-loop-condition-clamp-vec-of-ones
+dEQP-VK.graphicsfuzz.cov-loop-condition-constant-struct-field-data
 dEQP-VK.graphicsfuzz.cov-loop-condition-divide-by-uniform-always-false
 dEQP-VK.graphicsfuzz.cov-loop-condition-double-negate
 dEQP-VK.graphicsfuzz.cov-loop-condition-filter-some-iterations-never-discard
@@ -343,6 +350,7 @@ dEQP-VK.graphicsfuzz.cov-loop-findmsb-findlsb
 dEQP-VK.graphicsfuzz.cov-loop-fragcoord-identical-condition
 dEQP-VK.graphicsfuzz.cov-loop-global-counter-break-set-ivec-elements
 dEQP-VK.graphicsfuzz.cov-loop-function-call-negative-argument
+dEQP-VK.graphicsfuzz.cov-loop-global-counter-increment-iterator-select-uniform
 dEQP-VK.graphicsfuzz.cov-loop-increase-iterator-condition-uniform-copy-array-elements
 dEQP-VK.graphicsfuzz.cov-loop-increment-array-elements-clamp-index
 dEQP-VK.graphicsfuzz.cov-loop-increment-array-index-array-usuborrow-feedback
@@ -360,6 +368,7 @@ dEQP-VK.graphicsfuzz.cov-loop-limiter-min-findlsb
 dEQP-VK.graphicsfuzz.cov-loop-limiter-uniform-bitwise-and-one-always-break
 dEQP-VK.graphicsfuzz.cov-loop-logical-xor
 dEQP-VK.graphicsfuzz.cov-loop-multiple-iterator-variables-copy-array-elements
+dEQP-VK.graphicsfuzz.cov-loop-never-iterated-constant-vector-condition
 dEQP-VK.graphicsfuzz.cov-loop-read-array-index-from-array-data
 dEQP-VK.graphicsfuzz.cov-loop-max-divide-integer-by-ten
 dEQP-VK.graphicsfuzz.cov-loop-overwrite-sample-texture-as-color-output
@@ -368,6 +377,7 @@ dEQP-VK.graphicsfuzz.cov-loop-replace-output-color-restore-original
 dEQP-VK.graphicsfuzz.cov-loop-returns-behind-true-and-false
 dEQP-VK.graphicsfuzz.cov-loop-sampled-texel-integer-counter
 dEQP-VK.graphicsfuzz.cov-loop-set-vector-components-pow-two
+dEQP-VK.graphicsfuzz.cov-loop-start-fragcoord-while-iterates-once
 dEQP-VK.graphicsfuzz.cov-loop-start-from-one-switch-case-invalid-color-never-executed
 dEQP-VK.graphicsfuzz.cov-loop-start-from-one-switch-case-never-executed
 dEQP-VK.graphicsfuzz.cov-loop-struct-array-field-set-value-self-dependency
@@ -404,6 +414,7 @@ dEQP-VK.graphicsfuzz.cov-modf-integer-to-private
 dEQP-VK.graphicsfuzz.cov-modulo-zero-never-executed
 dEQP-VK.graphicsfuzz.cov-multiple-fragcoord-conditions-false-never-return-sample-texture
 dEQP-VK.graphicsfuzz.cov-multiple-fragcoord-conditions-never-return-color-uninitialized
+dEQP-VK.graphicsfuzz.cov-multiple-functions-global-never-change
 dEQP-VK.graphicsfuzz.cov-multiple-loops-same-condition-always-false-global-loop-counter
 dEQP-VK.graphicsfuzz.cov-multiple-one-iteration-loops-global-counter-write-matrices
 dEQP-VK.graphicsfuzz.cov-negative-integer-bitwise-or-uniform-increment-loop
@@ -411,6 +422,7 @@ 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-functions-vec4-array-element-argument
 dEQP-VK.graphicsfuzz.cov-nested-loop-continue-inner-copy-array-element
 dEQP-VK.graphicsfuzz.cov-nested-loop-decrease-vector-components
 dEQP-VK.graphicsfuzz.cov-nested-loop-initializer-value-increased-inside
@@ -436,6 +448,7 @@ dEQP-VK.graphicsfuzz.cov-nested-loops-global-loop-counter-fragcoord-negative-alw
 dEQP-VK.graphicsfuzz.cov-nested-loops-global-loop-counter-index-array-vec2
 dEQP-VK.graphicsfuzz.cov-nested-loops-global-loop-counter-iterator-dependency
 dEQP-VK.graphicsfuzz.cov-nested-loops-global-loop-counter-output-color-from-backup
+dEQP-VK.graphicsfuzz.cov-nested-loops-global-loop-counter-reached-second-iteration
 dEQP-VK.graphicsfuzz.cov-nested-loops-identical-iterator-names-multiply-divide
 dEQP-VK.graphicsfuzz.cov-nested-loops-identical-iterators-compare-same-array-elements
 dEQP-VK.graphicsfuzz.cov-nested-loops-increase-integer-dot-product
@@ -530,8 +543,10 @@ dEQP-VK.graphicsfuzz.cov-transpose-multiply
 dEQP-VK.graphicsfuzz.cov-trunc-fract-always-zero
 dEQP-VK.graphicsfuzz.cov-two-functions-loops-copy-elements-infinite-loops-never-executed
 dEQP-VK.graphicsfuzz.cov-two-functions-modify-struct-array-element-return-from-loop
+dEQP-VK.graphicsfuzz.cov-two-loops-global-loop-counter-clamp-ivec-elements-index-array
 dEQP-VK.graphicsfuzz.cov-two-loops-global-loop-counter-shift-right-zero-increment-array-element
 dEQP-VK.graphicsfuzz.cov-two-loops-increment-integer-global-counter-break-square-threshold
+dEQP-VK.graphicsfuzz.cov-two-loops-never-iterated
 dEQP-VK.graphicsfuzz.cov-two-nested-loops-switch-case-matrix-array-increment
 dEQP-VK.graphicsfuzz.cov-types-return-in-main-never-hit
 dEQP-VK.graphicsfuzz.cov-uadd-carry-bit-count-index-array
diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-function-global-loop-counter-sample-texture.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-function-global-loop-counter-sample-texture.amber
new file mode 100644 (file)
index 0000000..aa177e9
--- /dev/null
@@ -0,0 +1,605 @@
+#!amber
+
+# Copyright 2022 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 texgen_vert PASSTHROUGH
+
+SHADER fragment texgen_frag GLSL
+#version 430
+precision highp float;
+
+layout(location = 0) out vec4 _GLF_color;
+
+void main()
+{
+ _GLF_color = vec4(
+ floor(gl_FragCoord.x) * (1.0 / 255.0),
+ (int(gl_FragCoord.x) ^ int(gl_FragCoord.y)) * (1.0 / 255.0),
+ floor(gl_FragCoord.y) * (1.0 / 255.0),
+ 1.0);
+}
+END
+BUFFER default_texture FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics texgen_pipeline
+  ATTACH texgen_vert
+  ATTACH texgen_frag
+  FRAMEBUFFER_SIZE 256 256
+  BIND BUFFER default_texture AS color LOCATION 0
+END
+
+CLEAR_COLOR texgen_pipeline 0 0 0 255
+CLEAR texgen_pipeline
+RUN texgen_pipeline DRAW_RECT POS 0 0  SIZE 256 256
+
+SHADER vertex variant_vertex_shader PASSTHROUGH
+
+# variant_fragment_shader is derived from the following GLSL:
+# #version 320 es
+#
+# #define _int_1 _GLF_uniform_int_values[0]
+# #define _int_0 _GLF_uniform_int_values[1]
+# #define _int_4 _GLF_uniform_int_values[2]
+# #define _int_2 _GLF_uniform_int_values[3]
+# #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: [1, 0, 4, 2]
+# layout(set = 0, binding = 1) uniform buf1
+# {
+#     int _GLF_uniform_int_values[4];
+# };
+#
+# // Contents of injectionSwitch: [0.0, 1.0]
+# layout(push_constant) uniform buf_push
+# {
+#     highp vec2 injectionSwitch;
+# };
+#
+# layout(set = 0, binding = 2) uniform sampler2D tex;
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# const int _GLF_global_loop_bound = 10;
+# int _GLF_global_loop_count = 0;
+#
+# void func()
+# {
+#     int arr[10] = int[10](_int_0, _int_0, _int_0, _int_0, _int_0, _int_0, _int_0, _int_0, _int_0, _int_0);
+#     int a = _int_1;
+#     int b = _int_1;
+#
+#     // Iterates once.
+#     for(int i = _int_1; i != _int_0; i--)
+#     {
+#         _GLF_global_loop_count++;
+#
+#         // Iterates once.
+#         while(_GLF_global_loop_count < _GLF_global_loop_bound)
+#         {
+#             _GLF_global_loop_count++;
+#
+#             // Always false.
+#             if(b >= _int_4)
+#             {
+#                 break;
+#             }
+#
+#             while(_GLF_global_loop_count < _GLF_global_loop_bound)
+#             {
+#                 _GLF_global_loop_count++;
+#             }
+#
+#             // These array values are not used.
+#             arr[a++] = _int_1;
+#         }
+#     }
+# }
+#
+# void main()
+# {
+#     int a = 1;
+#
+#     // Iterates once.
+#     while(_GLF_global_loop_count < _GLF_global_loop_bound)
+#     {
+#         _GLF_global_loop_count++;
+#
+#         int b = _int_1;
+#
+#         // Iterates four times.
+#         while(_GLF_global_loop_count < _GLF_global_loop_bound)
+#         {
+#             _GLF_global_loop_count++;
+#
+#             if(b >= _int_4)
+#             {
+#                 break;
+#             }
+#
+#             b++;
+#         }
+#
+#         // Always false.
+#         if(a >= 4)
+#         {
+#             break;
+#         }
+#
+#         // Always true.
+#         if(gl_FragCoord.y > _float_0_0)
+#         {
+#             a++;
+#         }
+#
+#         // Always false.
+#         if(gl_FragCoord.y < _float_0_0)
+#         {
+#             return;
+#         }
+#
+#         // Always true.
+#         if(gl_FragCoord.x > _float_0_0)
+#         {
+#             // Iterates once (the global loop bound gets reached inside func()).
+#             for(int i = _int_1; i != int(injectionSwitch.x) && _GLF_global_loop_count < _GLF_global_loop_bound; i++)
+#             {
+#                 _GLF_global_loop_count++;
+#                 func();
+#             }
+#         }
+#     }
+#
+#     // Always true.
+#     if(a == _int_2)
+#     {
+#         // Texture sample is (0, 0, 0, 0).
+#         _GLF_color = texture(tex, vec2(_int_0)) + 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: 238
+; Schema: 0
+               OpCapability Shader
+          %1 = OpExtInstImport "GLSL.std.450"
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %4 "main" %141 %208
+               OpExecutionMode %4 OriginUpperLeft
+               OpSource ESSL 320
+               OpName %4 "main"
+               OpName %6 "func("
+               OpName %10 "_GLF_global_loop_count"
+               OpName %16 "arr"
+               OpName %19 "buf1"
+               OpMemberName %19 0 "_GLF_uniform_int_values"
+               OpName %21 ""
+               OpName %46 "a"
+               OpName %49 "b"
+               OpName %52 "i"
+               OpName %101 "a"
+               OpName %111 "b"
+               OpName %141 "gl_FragCoord"
+               OpName %147 "buf0"
+               OpMemberName %147 0 "_GLF_uniform_float_values"
+               OpName %149 ""
+               OpName %174 "i"
+               OpName %184 "buf_push"
+               OpMemberName %184 0 "injectionSwitch"
+               OpName %186 ""
+               OpName %208 "_GLF_color"
+               OpName %212 "tex"
+               OpDecorate %18 ArrayStride 16
+               OpMemberDecorate %19 0 Offset 0
+               OpDecorate %19 Block
+               OpDecorate %21 DescriptorSet 0
+               OpDecorate %21 Binding 1
+               OpDecorate %141 BuiltIn FragCoord
+               OpDecorate %146 ArrayStride 16
+               OpMemberDecorate %147 0 Offset 0
+               OpDecorate %147 Block
+               OpDecorate %149 DescriptorSet 0
+               OpDecorate %149 Binding 0
+               OpMemberDecorate %184 0 Offset 0
+               OpDecorate %184 Block
+               OpDecorate %208 Location 0
+               OpDecorate %212 RelaxedPrecision
+               OpDecorate %212 DescriptorSet 0
+               OpDecorate %212 Binding 2
+               OpDecorate %213 RelaxedPrecision
+               OpDecorate %216 RelaxedPrecision
+               OpDecorate %217 RelaxedPrecision
+               OpDecorate %218 RelaxedPrecision
+               OpDecorate %221 RelaxedPrecision
+               OpDecorate %224 RelaxedPrecision
+               OpDecorate %227 RelaxedPrecision
+               OpDecorate %230 RelaxedPrecision
+               OpDecorate %231 RelaxedPrecision
+               OpDecorate %232 RelaxedPrecision
+          %2 = OpTypeVoid
+          %3 = OpTypeFunction %2
+          %8 = OpTypeInt 32 1
+          %9 = OpTypePointer Private %8
+         %10 = OpVariable %9 Private
+         %11 = OpConstant %8 0
+         %12 = OpTypeInt 32 0
+         %13 = OpConstant %12 10
+         %14 = OpTypeArray %8 %13
+         %15 = OpTypePointer Function %14
+         %17 = OpConstant %12 4
+         %18 = OpTypeArray %8 %17
+         %19 = OpTypeStruct %18
+         %20 = OpTypePointer Uniform %19
+         %21 = OpVariable %20 Uniform
+         %22 = OpConstant %8 1
+         %23 = OpTypePointer Uniform %8
+         %45 = OpTypePointer Function %8
+         %63 = OpTypeBool
+         %73 = OpConstant %8 10
+         %78 = OpConstant %8 2
+        %133 = OpConstant %8 4
+        %138 = OpTypeFloat 32
+        %139 = OpTypeVector %138 4
+        %140 = OpTypePointer Input %139
+        %141 = OpVariable %140 Input
+        %142 = OpConstant %12 1
+        %143 = OpTypePointer Input %138
+        %146 = OpTypeArray %138 %142
+        %147 = OpTypeStruct %146
+        %148 = OpTypePointer Uniform %147
+        %149 = OpVariable %148 Uniform
+        %150 = OpTypePointer Uniform %138
+        %166 = OpConstant %12 0
+        %183 = OpTypeVector %138 2
+        %184 = OpTypeStruct %183
+        %185 = OpTypePointer PushConstant %184
+        %186 = OpVariable %185 PushConstant
+        %187 = OpTypePointer PushConstant %138
+        %201 = OpConstant %8 3
+        %207 = OpTypePointer Output %139
+        %208 = OpVariable %207 Output
+        %209 = OpTypeImage %138 2D 0 0 0 1 Unknown
+        %210 = OpTypeSampledImage %209
+        %211 = OpTypePointer UniformConstant %210
+        %212 = OpVariable %211 UniformConstant
+          %4 = OpFunction %2 None %3
+          %5 = OpLabel
+        %101 = OpVariable %45 Function
+        %111 = OpVariable %45 Function
+        %174 = OpVariable %45 Function
+               OpStore %10 %11
+               OpStore %101 %22
+               OpBranch %102
+        %102 = OpLabel
+               OpLoopMerge %104 %105 None
+               OpBranch %106
+        %106 = OpLabel
+        %107 = OpLoad %8 %10
+        %108 = OpSLessThan %63 %107 %73
+               OpBranchConditional %108 %103 %104
+        %103 = OpLabel
+        %109 = OpLoad %8 %10
+        %110 = OpIAdd %8 %109 %22
+               OpStore %10 %110
+        %112 = OpAccessChain %23 %21 %11 %11
+        %113 = OpLoad %8 %112
+               OpStore %111 %113
+               OpBranch %114
+        %114 = OpLabel
+               OpLoopMerge %116 %117 None
+               OpBranch %118
+        %118 = OpLabel
+        %119 = OpLoad %8 %10
+        %120 = OpSLessThan %63 %119 %73
+               OpBranchConditional %120 %115 %116
+        %115 = OpLabel
+        %121 = OpLoad %8 %10
+        %122 = OpIAdd %8 %121 %22
+               OpStore %10 %122
+        %123 = OpLoad %8 %111
+        %124 = OpAccessChain %23 %21 %11 %78
+        %125 = OpLoad %8 %124
+        %126 = OpSGreaterThanEqual %63 %123 %125
+               OpSelectionMerge %128 None
+               OpBranchConditional %126 %127 %128
+        %127 = OpLabel
+               OpBranch %116
+        %128 = OpLabel
+        %130 = OpLoad %8 %111
+        %131 = OpIAdd %8 %130 %22
+               OpStore %111 %131
+               OpBranch %117
+        %117 = OpLabel
+               OpBranch %114
+        %116 = OpLabel
+        %132 = OpLoad %8 %101
+        %134 = OpSGreaterThanEqual %63 %132 %133
+               OpSelectionMerge %136 None
+               OpBranchConditional %134 %135 %136
+        %135 = OpLabel
+               OpBranch %104
+        %136 = OpLabel
+        %144 = OpAccessChain %143 %141 %142
+        %145 = OpLoad %138 %144
+        %151 = OpAccessChain %150 %149 %11 %11
+        %152 = OpLoad %138 %151
+        %153 = OpFOrdGreaterThan %63 %145 %152
+               OpSelectionMerge %155 None
+               OpBranchConditional %153 %154 %155
+        %154 = OpLabel
+        %156 = OpLoad %8 %101
+        %157 = OpIAdd %8 %156 %22
+               OpStore %101 %157
+               OpBranch %155
+        %155 = OpLabel
+        %158 = OpAccessChain %143 %141 %142
+        %159 = OpLoad %138 %158
+        %160 = OpAccessChain %150 %149 %11 %11
+        %161 = OpLoad %138 %160
+        %162 = OpFOrdLessThan %63 %159 %161
+               OpSelectionMerge %164 None
+               OpBranchConditional %162 %163 %164
+        %163 = OpLabel
+               OpReturn
+        %164 = OpLabel
+        %167 = OpAccessChain %143 %141 %166
+        %168 = OpLoad %138 %167
+        %169 = OpAccessChain %150 %149 %11 %11
+        %170 = OpLoad %138 %169
+        %171 = OpFOrdGreaterThan %63 %168 %170
+               OpSelectionMerge %173 None
+               OpBranchConditional %171 %172 %173
+        %172 = OpLabel
+        %175 = OpAccessChain %23 %21 %11 %11
+        %176 = OpLoad %8 %175
+               OpStore %174 %176
+               OpBranch %177
+        %177 = OpLabel
+               OpLoopMerge %179 %180 None
+               OpBranch %181
+        %181 = OpLabel
+        %182 = OpLoad %8 %174
+        %188 = OpAccessChain %187 %186 %11 %166
+        %189 = OpLoad %138 %188
+        %190 = OpConvertFToS %8 %189
+        %191 = OpINotEqual %63 %182 %190
+        %192 = OpLoad %8 %10
+        %193 = OpSLessThan %63 %192 %73
+        %194 = OpLogicalAnd %63 %191 %193
+               OpBranchConditional %194 %178 %179
+        %178 = OpLabel
+        %195 = OpLoad %8 %10
+        %196 = OpIAdd %8 %195 %22
+               OpStore %10 %196
+        %197 = OpFunctionCall %2 %6
+               OpBranch %180
+        %180 = OpLabel
+        %198 = OpLoad %8 %174
+        %199 = OpIAdd %8 %198 %22
+               OpStore %174 %199
+               OpBranch %177
+        %179 = OpLabel
+               OpBranch %173
+        %173 = OpLabel
+               OpBranch %105
+        %105 = OpLabel
+               OpBranch %102
+        %104 = OpLabel
+        %200 = OpLoad %8 %101
+        %202 = OpAccessChain %23 %21 %11 %201
+        %203 = OpLoad %8 %202
+        %204 = OpIEqual %63 %200 %203
+               OpSelectionMerge %206 None
+               OpBranchConditional %204 %205 %233
+        %205 = OpLabel
+        %213 = OpLoad %210 %212
+        %214 = OpAccessChain %23 %21 %11 %22
+        %215 = OpLoad %8 %214
+        %216 = OpConvertSToF %138 %215
+        %217 = OpCompositeConstruct %183 %216 %216
+        %218 = OpImageSampleImplicitLod %139 %213 %217
+        %219 = OpAccessChain %23 %21 %11 %11
+        %220 = OpLoad %8 %219
+        %221 = OpConvertSToF %138 %220
+        %222 = OpAccessChain %23 %21 %11 %22
+        %223 = OpLoad %8 %222
+        %224 = OpConvertSToF %138 %223
+        %225 = OpAccessChain %23 %21 %11 %22
+        %226 = OpLoad %8 %225
+        %227 = OpConvertSToF %138 %226
+        %228 = OpAccessChain %23 %21 %11 %11
+        %229 = OpLoad %8 %228
+        %230 = OpConvertSToF %138 %229
+        %231 = OpCompositeConstruct %139 %221 %224 %227 %230
+        %232 = OpFAdd %139 %218 %231
+               OpStore %208 %232
+               OpBranch %206
+        %233 = OpLabel
+        %234 = OpAccessChain %23 %21 %11 %22
+        %235 = OpLoad %8 %234
+        %236 = OpConvertSToF %138 %235
+        %237 = OpCompositeConstruct %139 %236 %236 %236 %236
+               OpStore %208 %237
+               OpBranch %206
+        %206 = OpLabel
+               OpReturn
+               OpFunctionEnd
+          %6 = OpFunction %2 None %3
+          %7 = OpLabel
+         %16 = OpVariable %15 Function
+         %46 = OpVariable %45 Function
+         %49 = OpVariable %45 Function
+         %52 = OpVariable %45 Function
+         %24 = OpAccessChain %23 %21 %11 %22
+         %25 = OpLoad %8 %24
+         %26 = OpAccessChain %23 %21 %11 %22
+         %27 = OpLoad %8 %26
+         %28 = OpAccessChain %23 %21 %11 %22
+         %29 = OpLoad %8 %28
+         %30 = OpAccessChain %23 %21 %11 %22
+         %31 = OpLoad %8 %30
+         %32 = OpAccessChain %23 %21 %11 %22
+         %33 = OpLoad %8 %32
+         %34 = OpAccessChain %23 %21 %11 %22
+         %35 = OpLoad %8 %34
+         %36 = OpAccessChain %23 %21 %11 %22
+         %37 = OpLoad %8 %36
+         %38 = OpAccessChain %23 %21 %11 %22
+         %39 = OpLoad %8 %38
+         %40 = OpAccessChain %23 %21 %11 %22
+         %41 = OpLoad %8 %40
+         %42 = OpAccessChain %23 %21 %11 %22
+         %43 = OpLoad %8 %42
+         %44 = OpCompositeConstruct %14 %25 %27 %29 %31 %33 %35 %37 %39 %41 %43
+               OpStore %16 %44
+         %47 = OpAccessChain %23 %21 %11 %11
+         %48 = OpLoad %8 %47
+               OpStore %46 %48
+         %50 = OpAccessChain %23 %21 %11 %11
+         %51 = OpLoad %8 %50
+               OpStore %49 %51
+         %53 = OpAccessChain %23 %21 %11 %11
+         %54 = OpLoad %8 %53
+               OpStore %52 %54
+               OpBranch %55
+         %55 = OpLabel
+               OpLoopMerge %57 %58 None
+               OpBranch %59
+         %59 = OpLabel
+         %60 = OpLoad %8 %52
+         %61 = OpAccessChain %23 %21 %11 %22
+         %62 = OpLoad %8 %61
+         %64 = OpINotEqual %63 %60 %62
+               OpBranchConditional %64 %56 %57
+         %56 = OpLabel
+         %65 = OpLoad %8 %10
+         %66 = OpIAdd %8 %65 %22
+               OpStore %10 %66
+               OpBranch %67
+         %67 = OpLabel
+               OpLoopMerge %69 %70 None
+               OpBranch %71
+         %71 = OpLabel
+         %72 = OpLoad %8 %10
+         %74 = OpSLessThan %63 %72 %73
+               OpBranchConditional %74 %68 %69
+         %68 = OpLabel
+         %75 = OpLoad %8 %10
+         %76 = OpIAdd %8 %75 %22
+               OpStore %10 %76
+         %77 = OpLoad %8 %49
+         %79 = OpAccessChain %23 %21 %11 %78
+         %80 = OpLoad %8 %79
+         %81 = OpSGreaterThanEqual %63 %77 %80
+               OpSelectionMerge %83 None
+               OpBranchConditional %81 %82 %83
+         %82 = OpLabel
+               OpBranch %69
+         %83 = OpLabel
+               OpBranch %85
+         %85 = OpLabel
+               OpLoopMerge %87 %88 None
+               OpBranch %89
+         %89 = OpLabel
+         %90 = OpLoad %8 %10
+         %91 = OpSLessThan %63 %90 %73
+               OpBranchConditional %91 %86 %87
+         %86 = OpLabel
+         %92 = OpLoad %8 %10
+         %93 = OpIAdd %8 %92 %22
+               OpStore %10 %93
+               OpBranch %88
+         %88 = OpLabel
+               OpBranch %85
+         %87 = OpLabel
+         %94 = OpLoad %8 %46
+         %95 = OpIAdd %8 %94 %22
+               OpStore %46 %95
+         %96 = OpAccessChain %23 %21 %11 %11
+         %97 = OpLoad %8 %96
+         %98 = OpAccessChain %45 %16 %94
+               OpStore %98 %97
+               OpBranch %70
+         %70 = OpLabel
+               OpBranch %67
+         %69 = OpLabel
+               OpBranch %58
+         %58 = OpLabel
+         %99 = OpLoad %8 %52
+        %100 = OpISub %8 %99 %22
+               OpStore %52 %100
+               OpBranch %55
+         %57 = OpLabel
+               OpReturn
+               OpFunctionEnd
+END
+
+# uniforms for variant
+
+# tex
+SAMPLER variant_tex
+
+# injectionSwitch
+BUFFER variant_injectionSwitch DATA_TYPE vec2<float> STD140 DATA
+ 0.0 1.0
+END
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 1 0 4 2
+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 32 32
+  BIND BUFFER variant_framebuffer AS color LOCATION 0
+  BIND BUFFER default_texture AS combined_image_sampler SAMPLER variant_tex DESCRIPTOR_SET 0 BINDING 2
+  BIND BUFFER variant_injectionSwitch 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 32 32
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 255 0 0 255
diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-function-index-array-redundant-clamps.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-function-index-array-redundant-clamps.amber
new file mode 100644 (file)
index 0000000..81ee7b2
--- /dev/null
@@ -0,0 +1,207 @@
+#!amber
+
+# Copyright 2022 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_2 _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: [2, 1, 0]
+# layout(set = 0, binding = 0) uniform buf0
+# {
+#     int _GLF_uniform_int_values[3];
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# // This function always returns two.
+# int func()
+# {
+#     int a = _int_1;
+#
+#     return int[10](_int_1, _int_2, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1)[clamp(clamp(a, 0, 1), 0, 9)];
+# }
+#
+# void main()
+# {
+#     // Always true.
+#     if(func() == _int_2)
+#     {
+#         _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1);
+#     }
+#     else
+#     {
+#         _GLF_color = vec4(_int_0);
+#     }
+# }
+SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 10
+; Bound: 86
+; Schema: 0
+               OpCapability Shader
+          %1 = OpExtInstImport "GLSL.std.450"
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %4 "main" %66
+               OpExecutionMode %4 OriginUpperLeft
+               OpSource ESSL 320
+               OpName %4 "main"
+               OpName %8 "func("
+               OpName %11 "a"
+               OpName %15 "buf0"
+               OpMemberName %15 0 "_GLF_uniform_int_values"
+               OpName %17 ""
+               OpName %51 "indexable"
+               OpName %66 "_GLF_color"
+               OpDecorate %14 ArrayStride 16
+               OpMemberDecorate %15 0 Offset 0
+               OpDecorate %15 Block
+               OpDecorate %17 DescriptorSet 0
+               OpDecorate %17 Binding 0
+               OpDecorate %66 Location 0
+          %2 = OpTypeVoid
+          %3 = OpTypeFunction %2
+          %6 = OpTypeInt 32 1
+          %7 = OpTypeFunction %6
+         %10 = OpTypePointer Function %6
+         %12 = OpTypeInt 32 0
+         %13 = OpConstant %12 3
+         %14 = OpTypeArray %6 %13
+         %15 = OpTypeStruct %14
+         %16 = OpTypePointer Uniform %15
+         %17 = OpVariable %16 Uniform
+         %18 = OpConstant %6 0
+         %19 = OpConstant %6 1
+         %20 = OpTypePointer Uniform %6
+         %43 = OpConstant %12 10
+         %44 = OpTypeArray %6 %43
+         %48 = OpConstant %6 9
+         %50 = OpTypePointer Function %44
+         %59 = OpTypeBool
+         %63 = OpTypeFloat 32
+         %64 = OpTypeVector %63 4
+         %65 = OpTypePointer Output %64
+         %66 = OpVariable %65 Output
+         %70 = OpConstant %6 2
+          %4 = OpFunction %2 None %3
+          %5 = OpLabel
+         %56 = OpFunctionCall %6 %8
+         %57 = OpAccessChain %20 %17 %18 %18
+         %58 = OpLoad %6 %57
+         %60 = OpIEqual %59 %56 %58
+               OpSelectionMerge %62 None
+               OpBranchConditional %60 %61 %81
+         %61 = OpLabel
+         %67 = OpAccessChain %20 %17 %18 %19
+         %68 = OpLoad %6 %67
+         %69 = OpConvertSToF %63 %68
+         %71 = OpAccessChain %20 %17 %18 %70
+         %72 = OpLoad %6 %71
+         %73 = OpConvertSToF %63 %72
+         %74 = OpAccessChain %20 %17 %18 %70
+         %75 = OpLoad %6 %74
+         %76 = OpConvertSToF %63 %75
+         %77 = OpAccessChain %20 %17 %18 %19
+         %78 = OpLoad %6 %77
+         %79 = OpConvertSToF %63 %78
+         %80 = OpCompositeConstruct %64 %69 %73 %76 %79
+               OpStore %66 %80
+               OpBranch %62
+         %81 = OpLabel
+         %82 = OpAccessChain %20 %17 %18 %70
+         %83 = OpLoad %6 %82
+         %84 = OpConvertSToF %63 %83
+         %85 = OpCompositeConstruct %64 %84 %84 %84 %84
+               OpStore %66 %85
+               OpBranch %62
+         %62 = OpLabel
+               OpReturn
+               OpFunctionEnd
+          %8 = OpFunction %6 None %7
+          %9 = OpLabel
+         %11 = OpVariable %10 Function
+         %51 = OpVariable %50 Function
+         %21 = OpAccessChain %20 %17 %18 %19
+         %22 = OpLoad %6 %21
+               OpStore %11 %22
+         %23 = OpAccessChain %20 %17 %18 %19
+         %24 = OpLoad %6 %23
+         %25 = OpAccessChain %20 %17 %18 %18
+         %26 = OpLoad %6 %25
+         %27 = OpAccessChain %20 %17 %18 %19
+         %28 = OpLoad %6 %27
+         %29 = OpAccessChain %20 %17 %18 %19
+         %30 = OpLoad %6 %29
+         %31 = OpAccessChain %20 %17 %18 %19
+         %32 = OpLoad %6 %31
+         %33 = OpAccessChain %20 %17 %18 %19
+         %34 = OpLoad %6 %33
+         %35 = OpAccessChain %20 %17 %18 %19
+         %36 = OpLoad %6 %35
+         %37 = OpAccessChain %20 %17 %18 %19
+         %38 = OpLoad %6 %37
+         %39 = OpAccessChain %20 %17 %18 %19
+         %40 = OpLoad %6 %39
+         %41 = OpAccessChain %20 %17 %18 %19
+         %42 = OpLoad %6 %41
+         %45 = OpCompositeConstruct %44 %24 %26 %28 %30 %32 %34 %36 %38 %40 %42
+         %46 = OpLoad %6 %11
+         %47 = OpExtInst %6 %1 SClamp %46 %18 %19
+         %49 = OpExtInst %6 %1 SClamp %47 %18 %48
+               OpStore %51 %45
+         %52 = OpAccessChain %10 %51 %49
+         %53 = OpLoad %6 %52
+               OpReturnValue %53
+               OpFunctionEnd
+END
+
+# uniforms for variant
+
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 2 1 0
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+  ATTACH variant_vertex_shader
+  ATTACH variant_fragment_shader
+  FRAMEBUFFER_SIZE 32 32
+  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 32 32
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 255 0 0 255
diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-function-loop-condition-constant-array-always-false.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-function-loop-condition-constant-array-always-false.amber
new file mode 100644 (file)
index 0000000..bf980a8
--- /dev/null
@@ -0,0 +1,344 @@
+#!amber
+
+# Copyright 2022 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]
+#
+# 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];
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# int data0[10] = int[10](5, 5, 5, 5, 5, 5, 5, 5, 5, 5);
+# int data1[10] = int[10](9, 8, 7, 6, 5, 4, 3, 2, 1, 0);
+#
+# void func(int i)
+# {
+#     int j = 0, k = _int_0;
+#
+#     // Iterates twice.
+#     while(i <= 1 && j <= 1)
+#     {
+#         // Always false.
+#         if(int[10](_int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1)[i] < _int_1)
+#         {
+#             data1[k++] = i++;
+#         }
+#         else
+#         {
+#             data1[k++] = j++;
+#         }
+#
+#         // Always false.
+#         if(_int_1 < _int_0)
+#         {
+#             discard;
+#         }
+#     }
+#
+#     // Never iterated.
+#     while(i < 1)
+#     {
+#         data1[k++] = data0[i++];
+#     }
+#
+#     data0[_int_1] = data1[_int_1];
+# }
+#
+# void main()
+# {
+#     func(0);
+#
+#     // Always true.
+#     if(data0[_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: 156
+; Schema: 0
+               OpCapability Shader
+          %1 = OpExtInstImport "GLSL.std.450"
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %4 "main" %137
+               OpExecutionMode %4 OriginUpperLeft
+               OpSource ESSL 320
+               OpName %4 "main"
+               OpName %10 "func(i1;"
+               OpName %9 "i"
+               OpName %16 "data0"
+               OpName %19 "data1"
+               OpName %30 "j"
+               OpName %31 "k"
+               OpName %34 "buf0"
+               OpMemberName %34 0 "_GLF_uniform_int_values"
+               OpName %36 ""
+               OpName %74 "indexable"
+               OpName %123 "param"
+               OpName %137 "_GLF_color"
+               OpDecorate %33 ArrayStride 16
+               OpMemberDecorate %34 0 Offset 0
+               OpDecorate %34 Block
+               OpDecorate %36 DescriptorSet 0
+               OpDecorate %36 Binding 0
+               OpDecorate %137 Location 0
+          %2 = OpTypeVoid
+          %3 = OpTypeFunction %2
+          %6 = OpTypeInt 32 1
+          %7 = OpTypePointer Function %6
+          %8 = OpTypeFunction %2 %7
+         %12 = OpTypeInt 32 0
+         %13 = OpConstant %12 10
+         %14 = OpTypeArray %6 %13
+         %15 = OpTypePointer Private %14
+         %16 = OpVariable %15 Private
+         %17 = OpConstant %6 5
+         %18 = OpConstantComposite %14 %17 %17 %17 %17 %17 %17 %17 %17 %17 %17
+         %19 = OpVariable %15 Private
+         %20 = OpConstant %6 9
+         %21 = OpConstant %6 8
+         %22 = OpConstant %6 7
+         %23 = OpConstant %6 6
+         %24 = OpConstant %6 4
+         %25 = OpConstant %6 3
+         %26 = OpConstant %6 2
+         %27 = OpConstant %6 1
+         %28 = OpConstant %6 0
+         %29 = OpConstantComposite %14 %20 %21 %22 %23 %17 %24 %25 %26 %27 %28
+         %32 = OpConstant %12 2
+         %33 = OpTypeArray %6 %32
+         %34 = OpTypeStruct %33
+         %35 = OpTypePointer Uniform %34
+         %36 = OpVariable %35 Uniform
+         %37 = OpTypePointer Uniform %6
+         %46 = OpTypeBool
+         %73 = OpTypePointer Function %14
+         %86 = OpTypePointer Private %6
+        %134 = OpTypeFloat 32
+        %135 = OpTypeVector %134 4
+        %136 = OpTypePointer Output %135
+        %137 = OpVariable %136 Output
+          %4 = OpFunction %2 None %3
+          %5 = OpLabel
+        %123 = OpVariable %7 Function
+               OpStore %16 %18
+               OpStore %19 %29
+               OpStore %123 %28
+        %124 = OpFunctionCall %2 %10 %123
+        %125 = OpAccessChain %37 %36 %28 %28
+        %126 = OpLoad %6 %125
+        %127 = OpAccessChain %86 %16 %126
+        %128 = OpLoad %6 %127
+        %129 = OpAccessChain %37 %36 %28 %28
+        %130 = OpLoad %6 %129
+        %131 = OpIEqual %46 %128 %130
+               OpSelectionMerge %133 None
+               OpBranchConditional %131 %132 %151
+        %132 = OpLabel
+        %138 = OpAccessChain %37 %36 %28 %28
+        %139 = OpLoad %6 %138
+        %140 = OpConvertSToF %134 %139
+        %141 = OpAccessChain %37 %36 %28 %27
+        %142 = OpLoad %6 %141
+        %143 = OpConvertSToF %134 %142
+        %144 = OpAccessChain %37 %36 %28 %27
+        %145 = OpLoad %6 %144
+        %146 = OpConvertSToF %134 %145
+        %147 = OpAccessChain %37 %36 %28 %28
+        %148 = OpLoad %6 %147
+        %149 = OpConvertSToF %134 %148
+        %150 = OpCompositeConstruct %135 %140 %143 %146 %149
+               OpStore %137 %150
+               OpBranch %133
+        %151 = OpLabel
+        %152 = OpAccessChain %37 %36 %28 %27
+        %153 = OpLoad %6 %152
+        %154 = OpConvertSToF %134 %153
+        %155 = OpCompositeConstruct %135 %154 %154 %154 %154
+               OpStore %137 %155
+               OpBranch %133
+        %133 = OpLabel
+               OpReturn
+               OpFunctionEnd
+         %10 = OpFunction %2 None %8
+          %9 = OpFunctionParameter %7
+         %11 = OpLabel
+         %30 = OpVariable %7 Function
+         %31 = OpVariable %7 Function
+         %74 = OpVariable %73 Function
+               OpStore %30 %28
+         %38 = OpAccessChain %37 %36 %28 %27
+         %39 = OpLoad %6 %38
+               OpStore %31 %39
+               OpBranch %40
+         %40 = OpLabel
+               OpLoopMerge %42 %43 None
+               OpBranch %44
+         %44 = OpLabel
+         %45 = OpLoad %6 %9
+         %47 = OpSLessThanEqual %46 %45 %27
+         %48 = OpLoad %6 %30
+         %49 = OpSLessThanEqual %46 %48 %27
+         %50 = OpLogicalAnd %46 %47 %49
+               OpBranchConditional %50 %41 %42
+         %41 = OpLabel
+         %51 = OpAccessChain %37 %36 %28 %28
+         %52 = OpLoad %6 %51
+         %53 = OpAccessChain %37 %36 %28 %28
+         %54 = OpLoad %6 %53
+         %55 = OpAccessChain %37 %36 %28 %28
+         %56 = OpLoad %6 %55
+         %57 = OpAccessChain %37 %36 %28 %28
+         %58 = OpLoad %6 %57
+         %59 = OpAccessChain %37 %36 %28 %28
+         %60 = OpLoad %6 %59
+         %61 = OpAccessChain %37 %36 %28 %28
+         %62 = OpLoad %6 %61
+         %63 = OpAccessChain %37 %36 %28 %28
+         %64 = OpLoad %6 %63
+         %65 = OpAccessChain %37 %36 %28 %28
+         %66 = OpLoad %6 %65
+         %67 = OpAccessChain %37 %36 %28 %28
+         %68 = OpLoad %6 %67
+         %69 = OpAccessChain %37 %36 %28 %28
+         %70 = OpLoad %6 %69
+         %71 = OpCompositeConstruct %14 %52 %54 %56 %58 %60 %62 %64 %66 %68 %70
+         %72 = OpLoad %6 %9
+               OpStore %74 %71
+         %75 = OpAccessChain %7 %74 %72
+         %76 = OpLoad %6 %75
+         %77 = OpAccessChain %37 %36 %28 %28
+         %78 = OpLoad %6 %77
+         %79 = OpSLessThan %46 %76 %78
+               OpSelectionMerge %81 None
+               OpBranchConditional %79 %80 %88
+         %80 = OpLabel
+         %82 = OpLoad %6 %31
+         %83 = OpIAdd %6 %82 %27
+               OpStore %31 %83
+         %84 = OpLoad %6 %9
+         %85 = OpIAdd %6 %84 %27
+               OpStore %9 %85
+         %87 = OpAccessChain %86 %19 %82
+               OpStore %87 %84
+               OpBranch %81
+         %88 = OpLabel
+         %89 = OpLoad %6 %31
+         %90 = OpIAdd %6 %89 %27
+               OpStore %31 %90
+         %91 = OpLoad %6 %30
+         %92 = OpIAdd %6 %91 %27
+               OpStore %30 %92
+         %93 = OpAccessChain %86 %19 %89
+               OpStore %93 %91
+               OpBranch %81
+         %81 = OpLabel
+         %94 = OpAccessChain %37 %36 %28 %28
+         %95 = OpLoad %6 %94
+         %96 = OpAccessChain %37 %36 %28 %27
+         %97 = OpLoad %6 %96
+         %98 = OpSLessThan %46 %95 %97
+               OpSelectionMerge %100 None
+               OpBranchConditional %98 %99 %100
+         %99 = OpLabel
+               OpKill
+        %100 = OpLabel
+               OpBranch %43
+         %43 = OpLabel
+               OpBranch %40
+         %42 = OpLabel
+               OpBranch %102
+        %102 = OpLabel
+               OpLoopMerge %104 %105 None
+               OpBranch %106
+        %106 = OpLabel
+        %107 = OpLoad %6 %9
+        %108 = OpSLessThan %46 %107 %27
+               OpBranchConditional %108 %103 %104
+        %103 = OpLabel
+        %109 = OpLoad %6 %31
+        %110 = OpIAdd %6 %109 %27
+               OpStore %31 %110
+        %111 = OpLoad %6 %9
+        %112 = OpIAdd %6 %111 %27
+               OpStore %9 %112
+        %113 = OpAccessChain %86 %16 %111
+        %114 = OpLoad %6 %113
+        %115 = OpAccessChain %86 %19 %109
+               OpStore %115 %114
+               OpBranch %105
+        %105 = OpLabel
+               OpBranch %102
+        %104 = OpLabel
+        %116 = OpAccessChain %37 %36 %28 %28
+        %117 = OpLoad %6 %116
+        %118 = OpAccessChain %37 %36 %28 %28
+        %119 = OpLoad %6 %118
+        %120 = OpAccessChain %86 %19 %119
+        %121 = OpLoad %6 %120
+        %122 = OpAccessChain %86 %16 %117
+               OpStore %122 %121
+               OpReturn
+               OpFunctionEnd
+END
+
+# uniforms for variant
+
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 1 0
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+  ATTACH variant_vertex_shader
+  ATTACH variant_fragment_shader
+  FRAMEBUFFER_SIZE 32 32
+  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 32 32
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 255 0 0 255
diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-function-max-all-ones-select-always-true.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-function-max-all-ones-select-always-true.amber
new file mode 100644 (file)
index 0000000..84fa4a7
--- /dev/null
@@ -0,0 +1,242 @@
+#!amber
+
+# Copyright 2022 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:
+# '--eliminate-dead-branches'
+# '--inline-entry-points-exhaustive'
+# '--reduce-load-size'
+# '--eliminate-local-single-block'
+# '--vector-dce'
+# '--eliminate-dead-branches'
+# '--simplify-instructions'
+# '--inline-entry-points-exhaustive'
+# '--if-conversion'
+# '--redundancy-elimination'
+# '--eliminate-local-single-block'
+# '--vector-dce'
+# '--eliminate-dead-branches'
+# '--vector-dce'
+# '--if-conversion'
+# '--vector-dce'
+# '--combine-access-chains'
+# '--simplify-instructions'
+# '--eliminate-dead-code-aggressive'
+# '--inline-entry-points-exhaustive'
+# '--eliminate-dead-inserts'
+# '--eliminate-local-single-store'
+# '--ccp'
+# '--reduce-load-size'
+# '--eliminate-dead-branches'
+# '--merge-blocks'
+# '--if-conversion'
+# '--combine-access-chains'
+# '--copy-propagate-arrays'
+# '--eliminate-dead-branches'
+# '--merge-return'
+# '--inline-entry-points-exhaustive'
+# 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_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, 0]
+# layout(set = 0, binding = 1) uniform buf1
+# {
+#     int _GLF_uniform_int_values[2];
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# vec3 func()
+# {
+#     int a = _int_1;
+#     // b becomes one.
+#     int b = int(max(ivec2(1, true ? a : _int_1), ivec2(1, true ? a : _int_1)));
+#     // Returns vec3(1, 1, 1).
+#     return vec3(max(_float_1_0, b == _int_1 ? _float_0_0 : _float_1_0));
+# }
+#
+# void main()
+# {
+#     // Always true.
+#     if(func() == vec3(_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: 144
+; Schema: 0
+               OpCapability Shader
+          %1 = OpExtInstImport "GLSL.std.450"
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %4 "main" %86
+               OpExecutionMode %4 OriginUpperLeft
+               OpSource ESSL 320
+               OpName %4 "main"
+               OpName %17 "buf1"
+               OpMemberName %17 0 "_GLF_uniform_int_values"
+               OpName %19 ""
+               OpName %50 "buf0"
+               OpMemberName %50 0 "_GLF_uniform_float_values"
+               OpName %52 ""
+               OpName %86 "_GLF_color"
+               OpDecorate %16 ArrayStride 16
+               OpMemberDecorate %17 0 Offset 0
+               OpDecorate %17 Block
+               OpDecorate %19 DescriptorSet 0
+               OpDecorate %19 Binding 1
+               OpDecorate %49 ArrayStride 16
+               OpMemberDecorate %50 0 Offset 0
+               OpDecorate %50 Block
+               OpDecorate %52 DescriptorSet 0
+               OpDecorate %52 Binding 0
+               OpDecorate %86 Location 0
+          %2 = OpTypeVoid
+          %3 = OpTypeFunction %2
+          %6 = OpTypeFloat 32
+          %7 = OpTypeVector %6 3
+         %11 = OpTypeInt 32 1
+         %14 = OpTypeInt 32 0
+         %15 = OpConstant %14 2
+         %16 = OpTypeArray %11 %15
+         %17 = OpTypeStruct %16
+         %18 = OpTypePointer Uniform %17
+         %19 = OpVariable %18 Uniform
+         %20 = OpConstant %11 0
+         %21 = OpTypePointer Uniform %11
+         %25 = OpConstant %11 1
+         %26 = OpTypeBool
+         %36 = OpTypeVector %11 2
+         %49 = OpTypeArray %6 %15
+         %50 = OpTypeStruct %49
+         %51 = OpTypePointer Uniform %50
+         %52 = OpVariable %51 Uniform
+         %53 = OpTypePointer Uniform %6
+         %60 = OpTypePointer Function %6
+         %79 = OpTypeVector %26 3
+         %84 = OpTypeVector %6 4
+         %85 = OpTypePointer Output %84
+         %86 = OpVariable %85 Output
+        %143 = OpUndef %11
+          %4 = OpFunction %2 None %3
+          %5 = OpLabel
+        %109 = OpVariable %60 Function
+        %113 = OpAccessChain %21 %19 %20 %20
+        %114 = OpLoad %11 %113
+        %119 = OpCompositeConstruct %36 %25 %143
+        %125 = OpExtInst %36 %1 SMax %119 %119
+        %126 = OpCompositeExtract %11 %125 0
+        %127 = OpAccessChain %53 %52 %20 %20
+        %128 = OpLoad %6 %127
+        %132 = OpIEqual %26 %126 %114
+               OpSelectionMerge %139 None
+               OpBranchConditional %132 %136 %133
+        %133 = OpLabel
+               OpStore %109 %128
+               OpBranch %139
+        %136 = OpLabel
+        %137 = OpAccessChain %53 %52 %20 %25
+        %138 = OpLoad %6 %137
+               OpStore %109 %138
+               OpBranch %139
+        %139 = OpLabel
+        %140 = OpLoad %6 %109
+        %141 = OpExtInst %6 %1 FMax %128 %140
+        %142 = OpCompositeConstruct %7 %141 %141 %141
+         %77 = OpConvertSToF %6 %114
+         %78 = OpCompositeConstruct %7 %77 %77 %77
+         %80 = OpFOrdEqual %79 %142 %78
+         %81 = OpAll %26 %80
+               OpSelectionMerge %83 None
+               OpBranchConditional %81 %82 %100
+        %100 = OpLabel
+        %101 = OpAccessChain %21 %19 %20 %25
+        %102 = OpLoad %11 %101
+        %103 = OpConvertSToF %6 %102
+        %104 = OpCompositeConstruct %84 %103 %103 %103 %103
+               OpStore %86 %104
+               OpBranch %83
+         %82 = OpLabel
+         %90 = OpAccessChain %21 %19 %20 %25
+         %91 = OpLoad %11 %90
+         %92 = OpConvertSToF %6 %91
+         %99 = OpCompositeConstruct %84 %77 %92 %92 %77
+               OpStore %86 %99
+               OpBranch %83
+         %83 = OpLabel
+               OpReturn
+               OpFunctionEnd
+END
+
+# uniforms for variant
+
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 1 0
+END
+# _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 32 32
+  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 32 32
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 255 0 0 255
diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-function-struct-int-array-loop-check-element.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-function-struct-int-array-loop-check-element.amber
new file mode 100644 (file)
index 0000000..3f8e2ca
--- /dev/null
@@ -0,0 +1,292 @@
+#!amber
+
+# Copyright 2022 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:
+# '--ccp'
+# '--eliminate-local-single-store'
+# '--eliminate-dead-branches'
+# '--merge-return'
+# '--eliminate-dead-branches'
+# '--eliminate-dead-branches'
+# '--merge-return'
+# '--eliminate-dead-code-aggressive'
+# '--private-to-local'
+# '--private-to-local'
+# '--eliminate-dead-inserts'
+# '--copy-propagate-arrays'
+# '--eliminate-local-multi-store'
+# '--eliminate-dead-inserts'
+# spirv-opt commit hash: a0370efd589be33d5d9a85cfde2f85841b3755af
+
+
+
+SHADER vertex variant_vertex_shader PASSTHROUGH
+
+# variant_fragment_shader is derived from the following GLSL:
+# #version 320 es
+#
+# #define _int_1 _GLF_uniform_int_values[0]
+# #define _int_0 _GLF_uniform_int_values[1]
+# #define _int_2 _GLF_uniform_int_values[2]
+# #define _int_9 _GLF_uniform_int_values[3]
+#
+# precision highp float;
+# precision highp int;
+#
+# // Contents of _GLF_uniform_int_values: [1, 0, 2, 9]
+# layout(set = 0, binding = 0) uniform buf0
+# {
+#     int _GLF_uniform_int_values[4];
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# struct S
+# {
+#     int arr[10];
+# };
+#
+# int func(S s)
+# {
+#     int a = _int_0;
+#
+#     // Iterates twice.
+#     for(int i = _int_0; i < _int_2; i++)
+#     {
+#         // True during the second iteration when a = 1.
+#         if(s.arr[(a + _int_9) / _int_2] == 1)
+#         {
+#             return i;
+#         }
+#
+#         a = _int_1;
+#     }
+#
+#     // Never executed.
+#     return _int_0;
+# }
+#
+# void main()
+# {
+#     S s = S(int[10](1, 1, 1, 1, -1, 1, 1, 1, 1, 1));
+#
+#     // Always true.
+#     if(func(s) == _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: 118
+; Schema: 0
+               OpCapability Shader
+          %1 = OpExtInstImport "GLSL.std.450"
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %4 "main" %80
+               OpExecutionMode %4 OriginUpperLeft
+               OpSource ESSL 320
+               OpName %4 "main"
+               OpName %10 "S"
+               OpMemberName %10 0 "arr"
+               OpName %14 "func(struct-S-i1[10]1;"
+               OpName %13 "s"
+               OpName %17 "a"
+               OpName %20 "buf0"
+               OpMemberName %20 0 "_GLF_uniform_int_values"
+               OpName %22 ""
+               OpName %28 "i"
+               OpName %69 "param"
+               OpName %80 "_GLF_color"
+               OpDecorate %19 ArrayStride 16
+               OpMemberDecorate %20 0 Offset 0
+               OpDecorate %20 Block
+               OpDecorate %22 DescriptorSet 0
+               OpDecorate %22 Binding 0
+               OpDecorate %80 Location 0
+          %2 = OpTypeVoid
+          %3 = OpTypeFunction %2
+          %6 = OpTypeInt 32 1
+          %7 = OpTypeInt 32 0
+          %8 = OpConstant %7 10
+          %9 = OpTypeArray %6 %8
+         %10 = OpTypeStruct %9
+         %11 = OpTypePointer Function %10
+         %12 = OpTypeFunction %6 %11
+         %16 = OpTypePointer Function %6
+         %18 = OpConstant %7 4
+         %19 = OpTypeArray %6 %18
+         %20 = OpTypeStruct %19
+         %21 = OpTypePointer Uniform %20
+         %22 = OpVariable %21 Uniform
+         %23 = OpConstant %6 0
+         %24 = OpConstant %6 1
+         %25 = OpTypePointer Uniform %6
+         %37 = OpConstant %6 2
+         %40 = OpTypeBool
+         %43 = OpConstant %6 3
+         %66 = OpConstant %6 -1
+         %67 = OpConstantComposite %9 %24 %24 %24 %24 %66 %24 %24 %24 %24 %24
+         %68 = OpConstantComposite %10 %67
+         %77 = OpTypeFloat 32
+         %78 = OpTypeVector %77 4
+         %79 = OpTypePointer Output %78
+         %80 = OpVariable %79 Output
+        %103 = OpConstant %7 0
+        %104 = OpConstantFalse %40
+        %105 = OpTypePointer Function %40
+        %107 = OpConstantTrue %40
+        %117 = OpUndef %6
+          %4 = OpFunction %2 None %3
+          %5 = OpLabel
+         %69 = OpVariable %11 Function
+               OpStore %69 %68
+         %71 = OpFunctionCall %6 %14 %69
+         %72 = OpAccessChain %25 %22 %23 %23
+         %73 = OpLoad %6 %72
+         %74 = OpIEqual %40 %71 %73
+               OpSelectionMerge %76 None
+               OpBranchConditional %74 %75 %94
+         %75 = OpLabel
+         %81 = OpAccessChain %25 %22 %23 %23
+         %82 = OpLoad %6 %81
+         %83 = OpConvertSToF %77 %82
+         %84 = OpAccessChain %25 %22 %23 %24
+         %85 = OpLoad %6 %84
+         %86 = OpConvertSToF %77 %85
+         %87 = OpAccessChain %25 %22 %23 %24
+         %88 = OpLoad %6 %87
+         %89 = OpConvertSToF %77 %88
+         %90 = OpAccessChain %25 %22 %23 %23
+         %91 = OpLoad %6 %90
+         %92 = OpConvertSToF %77 %91
+         %93 = OpCompositeConstruct %78 %83 %86 %89 %92
+               OpStore %80 %93
+               OpBranch %76
+         %94 = OpLabel
+         %95 = OpAccessChain %25 %22 %23 %24
+         %96 = OpLoad %6 %95
+         %97 = OpConvertSToF %77 %96
+         %98 = OpCompositeConstruct %78 %97 %97 %97 %97
+               OpStore %80 %98
+               OpBranch %76
+         %76 = OpLabel
+               OpReturn
+               OpFunctionEnd
+         %14 = OpFunction %6 None %12
+         %13 = OpFunctionParameter %11
+         %15 = OpLabel
+        %106 = OpVariable %105 Function %104
+        %100 = OpVariable %16 Function
+         %17 = OpVariable %16 Function
+         %28 = OpVariable %16 Function
+               OpSelectionMerge %99 None
+               OpSwitch %103 %102
+        %102 = OpLabel
+         %26 = OpAccessChain %25 %22 %23 %24
+         %27 = OpLoad %6 %26
+               OpStore %17 %27
+         %29 = OpAccessChain %25 %22 %23 %24
+         %30 = OpLoad %6 %29
+               OpStore %28 %30
+               OpBranch %31
+         %31 = OpLabel
+        %111 = OpPhi %6 %27 %102 %58 %34
+        %110 = OpPhi %6 %30 %102 %60 %34
+               OpLoopMerge %33 %34 None
+               OpBranch %35
+         %35 = OpLabel
+         %38 = OpAccessChain %25 %22 %23 %37
+         %39 = OpLoad %6 %38
+         %41 = OpSLessThan %40 %110 %39
+               OpBranchConditional %41 %32 %33
+         %32 = OpLabel
+         %44 = OpAccessChain %25 %22 %23 %43
+         %45 = OpLoad %6 %44
+         %46 = OpIAdd %6 %111 %45
+         %47 = OpAccessChain %25 %22 %23 %37
+         %48 = OpLoad %6 %47
+         %49 = OpSDiv %6 %46 %48
+         %50 = OpAccessChain %16 %13 %23 %49
+         %51 = OpLoad %6 %50
+         %52 = OpIEqual %40 %51 %24
+               OpSelectionMerge %54 None
+               OpBranchConditional %52 %53 %54
+         %53 = OpLabel
+               OpStore %106 %107
+               OpStore %100 %110
+               OpBranch %33
+         %54 = OpLabel
+         %57 = OpAccessChain %25 %22 %23 %23
+         %58 = OpLoad %6 %57
+               OpStore %17 %58
+               OpBranch %34
+         %34 = OpLabel
+         %60 = OpIAdd %6 %110 %24
+               OpStore %28 %60
+               OpBranch %31
+         %33 = OpLabel
+        %115 = OpPhi %6 %117 %35 %110 %53
+        %112 = OpPhi %40 %104 %35 %107 %53
+               OpSelectionMerge %108 None
+               OpBranchConditional %112 %99 %108
+        %108 = OpLabel
+         %61 = OpAccessChain %25 %22 %23 %24
+         %62 = OpLoad %6 %61
+               OpStore %106 %107
+               OpStore %100 %62
+               OpBranch %99
+         %99 = OpLabel
+        %114 = OpPhi %6 %115 %33 %62 %108
+               OpReturnValue %114
+               OpFunctionEnd
+END
+
+# uniforms for variant
+
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 1 0 2 9
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+  ATTACH variant_vertex_shader
+  ATTACH variant_fragment_shader
+  FRAMEBUFFER_SIZE 32 32
+  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 32 32
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 255 0 0 255
diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-loop-break-fragcoord-x-empty-loop.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-loop-break-fragcoord-x-empty-loop.amber
new file mode 100644 (file)
index 0000000..0500273
--- /dev/null
@@ -0,0 +1,229 @@
+#!amber
+
+# Copyright 2022 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_32 _GLF_uniform_int_values[2]
+# #define _int_8 _GLF_uniform_int_values[3]
+#
+# precision highp float;
+# precision highp int;
+#
+# // Contents of _GLF_uniform_int_values: [0, 1, 32, 8]
+# layout(set = 0, binding = 0) uniform buf0
+# {
+#     int _GLF_uniform_int_values[4];
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# void main()
+# {
+#     int i = 0;
+#
+#     do
+#     {
+#         if(i <= int(gl_FragCoord.x))
+#         {
+#             break;
+#         }
+#
+#         // Iterates empty code block for seven times.
+#         for(int j = _int_1; j < _int_8; j++) { }
+#
+#         i++;
+#     }
+#     while(i < 50);
+#
+#     // Always true because of the framebuffer resolution of 32x32.
+#     if(i < _int_32)
+#     {
+#         _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1);
+#     }
+#     else
+#     {
+#         _GLF_color = vec4(_int_0);
+#     }
+# }
+SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 10
+; Bound: 84
+; Schema: 0
+               OpCapability Shader
+          %1 = OpExtInstImport "GLSL.std.450"
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %4 "main" %18 %65
+               OpExecutionMode %4 OriginUpperLeft
+               OpSource ESSL 320
+               OpName %4 "main"
+               OpName %8 "i"
+               OpName %18 "gl_FragCoord"
+               OpName %30 "j"
+               OpName %33 "buf0"
+               OpMemberName %33 0 "_GLF_uniform_int_values"
+               OpName %35 ""
+               OpName %65 "_GLF_color"
+               OpDecorate %18 BuiltIn FragCoord
+               OpDecorate %32 ArrayStride 16
+               OpMemberDecorate %33 0 Offset 0
+               OpDecorate %33 Block
+               OpDecorate %35 DescriptorSet 0
+               OpDecorate %35 Binding 0
+               OpDecorate %65 Location 0
+          %2 = OpTypeVoid
+          %3 = OpTypeFunction %2
+          %6 = OpTypeInt 32 1
+          %7 = OpTypePointer Function %6
+          %9 = OpConstant %6 0
+         %15 = OpTypeFloat 32
+         %16 = OpTypeVector %15 4
+         %17 = OpTypePointer Input %16
+         %18 = OpVariable %17 Input
+         %19 = OpTypeInt 32 0
+         %20 = OpConstant %19 0
+         %21 = OpTypePointer Input %15
+         %25 = OpTypeBool
+         %31 = OpConstant %19 4
+         %32 = OpTypeArray %6 %31
+         %33 = OpTypeStruct %32
+         %34 = OpTypePointer Uniform %33
+         %35 = OpVariable %34 Uniform
+         %36 = OpConstant %6 1
+         %37 = OpTypePointer Uniform %6
+         %46 = OpConstant %6 3
+         %55 = OpConstant %6 50
+         %58 = OpConstant %6 2
+         %64 = OpTypePointer Output %16
+         %65 = OpVariable %64 Output
+          %4 = OpFunction %2 None %3
+          %5 = OpLabel
+          %8 = OpVariable %7 Function
+         %30 = OpVariable %7 Function
+               OpStore %8 %9
+               OpBranch %10
+         %10 = OpLabel
+               OpLoopMerge %12 %13 None
+               OpBranch %11
+         %11 = OpLabel
+         %14 = OpLoad %6 %8
+         %22 = OpAccessChain %21 %18 %20
+         %23 = OpLoad %15 %22
+         %24 = OpConvertFToS %6 %23
+         %26 = OpSLessThanEqual %25 %14 %24
+               OpSelectionMerge %28 None
+               OpBranchConditional %26 %27 %28
+         %27 = OpLabel
+               OpBranch %12
+         %28 = OpLabel
+         %38 = OpAccessChain %37 %35 %9 %36
+         %39 = OpLoad %6 %38
+               OpStore %30 %39
+               OpBranch %40
+         %40 = OpLabel
+               OpLoopMerge %42 %43 None
+               OpBranch %44
+         %44 = OpLabel
+         %45 = OpLoad %6 %30
+         %47 = OpAccessChain %37 %35 %9 %46
+         %48 = OpLoad %6 %47
+         %49 = OpSLessThan %25 %45 %48
+               OpBranchConditional %49 %41 %42
+         %41 = OpLabel
+               OpBranch %43
+         %43 = OpLabel
+         %50 = OpLoad %6 %30
+         %51 = OpIAdd %6 %50 %36
+               OpStore %30 %51
+               OpBranch %40
+         %42 = OpLabel
+         %52 = OpLoad %6 %8
+         %53 = OpIAdd %6 %52 %36
+               OpStore %8 %53
+               OpBranch %13
+         %13 = OpLabel
+         %54 = OpLoad %6 %8
+         %56 = OpSLessThan %25 %54 %55
+               OpBranchConditional %56 %10 %12
+         %12 = OpLabel
+         %57 = OpLoad %6 %8
+         %59 = OpAccessChain %37 %35 %9 %58
+         %60 = OpLoad %6 %59
+         %61 = OpSLessThan %25 %57 %60
+               OpSelectionMerge %63 None
+               OpBranchConditional %61 %62 %79
+         %62 = OpLabel
+         %66 = OpAccessChain %37 %35 %9 %36
+         %67 = OpLoad %6 %66
+         %68 = OpConvertSToF %15 %67
+         %69 = OpAccessChain %37 %35 %9 %9
+         %70 = OpLoad %6 %69
+         %71 = OpConvertSToF %15 %70
+         %72 = OpAccessChain %37 %35 %9 %9
+         %73 = OpLoad %6 %72
+         %74 = OpConvertSToF %15 %73
+         %75 = OpAccessChain %37 %35 %9 %36
+         %76 = OpLoad %6 %75
+         %77 = OpConvertSToF %15 %76
+         %78 = OpCompositeConstruct %16 %68 %71 %74 %77
+               OpStore %65 %78
+               OpBranch %63
+         %79 = OpLabel
+         %80 = OpAccessChain %37 %35 %9 %9
+         %81 = OpLoad %6 %80
+         %82 = OpConvertSToF %15 %81
+         %83 = OpCompositeConstruct %16 %82 %82 %82 %82
+               OpStore %65 %83
+               OpBranch %63
+         %63 = OpLabel
+               OpReturn
+               OpFunctionEnd
+END
+
+# uniforms for variant
+
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 0 1 32 8
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+  ATTACH variant_vertex_shader
+  ATTACH variant_fragment_shader
+  FRAMEBUFFER_SIZE 32 32
+  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 32 32
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 255 0 0 255
diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-loop-condition-constant-struct-field-data.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-loop-condition-constant-struct-field-data.amber
new file mode 100644 (file)
index 0000000..84dd1ba
--- /dev/null
@@ -0,0 +1,232 @@
+#!amber
+
+# Copyright 2022 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:
+# '--eliminate-dead-branches'
+# '--if-conversion'
+# '--redundancy-elimination'
+# spirv-opt commit hash: a0370efd589be33d5d9a85cfde2f85841b3755af
+
+
+
+SHADER vertex variant_vertex_shader PASSTHROUGH
+
+# variant_fragment_shader is derived from the following GLSL:
+# #version 320 es
+# #define _int_0 _GLF_uniform_int_values[0]
+# #define _int_1 _GLF_uniform_int_values[1]
+# #define _int_2 _GLF_uniform_int_values[2]
+#
+# 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];
+# };
+#
+# 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;
+# };
+#
+# void main()
+# {
+#     int a = _int_0;
+#
+#     // Iterates once.
+#     while(_GLF_global_loop_count < _GLF_global_loop_bound)
+#     {
+#         _GLF_global_loop_count++;
+#
+#         // Iterates until the global loop count is reached.
+#         while(a != 1 && _GLF_global_loop_count < _GLF_global_loop_bound)
+#         {
+#             _GLF_global_loop_count++;
+#
+#             // a becomes 2.
+#             a = S(_int_1, 2).data1;
+#         }
+#     }
+#
+#     // Always true.
+#     if(a == _int_2)
+#     {
+#         _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1);
+#     }
+#     else
+#     {
+#         _GLF_color = vec4(_int_0);
+#     }
+# }
+SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 10
+; Bound: 79
+; Schema: 0
+               OpCapability Shader
+          %1 = OpExtInstImport "GLSL.std.450"
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %4 "main" %60
+               OpExecutionMode %4 OriginUpperLeft
+               OpSource ESSL 320
+               OpName %4 "main"
+               OpName %8 "_GLF_global_loop_count"
+               OpName %11 "a"
+               OpName %15 "buf0"
+               OpMemberName %15 0 "_GLF_uniform_int_values"
+               OpName %17 ""
+               OpName %48 "S"
+               OpMemberName %48 0 "data0"
+               OpMemberName %48 1 "data1"
+               OpName %60 "_GLF_color"
+               OpDecorate %14 ArrayStride 16
+               OpMemberDecorate %15 0 Offset 0
+               OpDecorate %15 Block
+               OpDecorate %17 DescriptorSet 0
+               OpDecorate %17 Binding 0
+               OpDecorate %60 Location 0
+          %2 = OpTypeVoid
+          %3 = OpTypeFunction %2
+          %6 = OpTypeInt 32 1
+          %7 = OpTypePointer Private %6
+          %8 = OpVariable %7 Private
+          %9 = OpConstant %6 0
+         %10 = OpTypePointer Function %6
+         %12 = OpTypeInt 32 0
+         %13 = OpConstant %12 3
+         %14 = OpTypeArray %6 %13
+         %15 = OpTypeStruct %14
+         %16 = OpTypePointer Uniform %15
+         %17 = OpVariable %16 Uniform
+         %18 = OpTypePointer Uniform %6
+         %27 = OpConstant %6 10
+         %28 = OpTypeBool
+         %31 = OpConstant %6 1
+         %47 = OpConstant %6 2
+         %48 = OpTypeStruct %6 %6
+         %57 = OpTypeFloat 32
+         %58 = OpTypeVector %57 4
+         %59 = OpTypePointer Output %58
+         %60 = OpVariable %59 Output
+          %4 = OpFunction %2 None %3
+          %5 = OpLabel
+         %11 = OpVariable %10 Function
+               OpStore %8 %9
+         %19 = OpAccessChain %18 %17 %9 %9
+         %20 = OpLoad %6 %19
+               OpStore %11 %20
+               OpBranch %21
+         %21 = OpLabel
+               OpLoopMerge %23 %24 None
+               OpBranch %25
+         %25 = OpLabel
+         %26 = OpLoad %6 %8
+         %29 = OpSLessThan %28 %26 %27
+               OpBranchConditional %29 %22 %23
+         %22 = OpLabel
+         %30 = OpLoad %6 %8
+         %32 = OpIAdd %6 %30 %31
+               OpStore %8 %32
+               OpBranch %33
+         %33 = OpLabel
+               OpLoopMerge %35 %36 None
+               OpBranch %37
+         %37 = OpLabel
+         %38 = OpLoad %6 %11
+         %39 = OpINotEqual %28 %38 %31
+         %40 = OpLoad %6 %8
+         %41 = OpSLessThan %28 %40 %27
+         %42 = OpLogicalAnd %28 %39 %41
+               OpBranchConditional %42 %34 %35
+         %34 = OpLabel
+         %43 = OpLoad %6 %8
+         %44 = OpIAdd %6 %43 %31
+               OpStore %8 %44
+         %45 = OpAccessChain %18 %17 %9 %31
+         %46 = OpLoad %6 %45
+         %49 = OpCompositeConstruct %48 %46 %47
+         %50 = OpCompositeExtract %6 %49 1
+               OpStore %11 %50
+               OpBranch %36
+         %36 = OpLabel
+               OpBranch %33
+         %35 = OpLabel
+               OpBranch %24
+         %24 = OpLabel
+               OpBranch %21
+         %23 = OpLabel
+         %51 = OpLoad %6 %11
+         %52 = OpAccessChain %18 %17 %9 %47
+         %53 = OpLoad %6 %52
+         %54 = OpIEqual %28 %51 %53
+               OpSelectionMerge %56 None
+               OpBranchConditional %54 %55 %74
+         %55 = OpLabel
+         %61 = OpAccessChain %18 %17 %9 %31
+         %62 = OpLoad %6 %61
+         %63 = OpConvertSToF %57 %62
+         %66 = OpConvertSToF %57 %20
+         %73 = OpCompositeConstruct %58 %63 %66 %66 %63
+               OpStore %60 %73
+               OpBranch %56
+         %74 = OpLabel
+         %77 = OpConvertSToF %57 %20
+         %78 = OpCompositeConstruct %58 %77 %77 %77 %77
+               OpStore %60 %78
+               OpBranch %56
+         %56 = OpLabel
+               OpReturn
+               OpFunctionEnd
+END
+
+# uniforms for variant
+
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 0 1 2
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+  ATTACH variant_vertex_shader
+  ATTACH variant_fragment_shader
+  FRAMEBUFFER_SIZE 32 32
+  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 32 32
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 255 0 0 255
diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-loop-global-counter-increment-iterator-select-uniform.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-loop-global-counter-increment-iterator-select-uniform.amber
new file mode 100644 (file)
index 0000000..6f55bd5
--- /dev/null
@@ -0,0 +1,337 @@
+#!amber
+
+# Copyright 2022 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_20 _GLF_uniform_int_values[2]
+# #define _int_4 _GLF_uniform_int_values[3]
+#
+# precision highp float;
+# precision highp int;
+#
+# // Contents of _GLF_uniform_int_values: [0, 1, 20, 4]
+# layout(set = 0, binding = 0) uniform buf0
+# {
+#     int _GLF_uniform_int_values[4];
+# };
+#
+# const int _GLF_global_loop_bound = 10;
+# int _GLF_global_loop_count = 0;
+#
+# // Contents of zero: 0
+# layout(set = 0, binding = 1) uniform buf1
+# {
+#     int zero;
+# };
+#
+# // Contents of two: 2
+# layout(set = 0, binding = 2) uniform buf2
+# {
+#     int two;
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# void main()
+# {
+#     int arr[10] = int[10](_int_0, _int_0, _int_0, _int_0, _int_0, _int_0, _int_0, _int_0, _int_0, _int_0);
+#
+#     // Iterates ten times because of the global loop bound.
+#     for(int i = 0; i < _int_20 && _GLF_global_loop_count < _GLF_global_loop_bound; (zero < _int_1) ? i++ : _int_1)
+#     {
+#         _GLF_global_loop_count++;
+#
+#         // Always false.
+#         if(two <= _int_1)
+#         {
+#             break;
+#         }
+#
+#         // True when i == 0.
+#         if((i / 4) == i)
+#         {
+#             arr[i / _int_4] = _int_1;
+#         }
+#     }
+#
+#     arr[_int_1]++;
+#
+#     // Always true.
+#     if(arr[_int_0] == _int_1)
+#     {
+#         _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1);
+#     }
+#     else
+#     {
+#         _GLF_color = vec4(_int_0);
+#     }
+# }
+SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 10
+; Bound: 140
+; Schema: 0
+               OpCapability Shader
+          %1 = OpExtInstImport "GLSL.std.450"
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %4 "main" %121
+               OpExecutionMode %4 OriginUpperLeft
+               OpSource ESSL 320
+               OpName %4 "main"
+               OpName %8 "_GLF_global_loop_count"
+               OpName %14 "arr"
+               OpName %17 "buf0"
+               OpMemberName %17 0 "_GLF_uniform_int_values"
+               OpName %19 ""
+               OpName %43 "i"
+               OpName %62 "buf2"
+               OpMemberName %62 0 "two"
+               OpName %64 ""
+               OpName %88 "buf1"
+               OpMemberName %88 0 "zero"
+               OpName %90 ""
+               OpName %121 "_GLF_color"
+               OpDecorate %16 ArrayStride 16
+               OpMemberDecorate %17 0 Offset 0
+               OpDecorate %17 Block
+               OpDecorate %19 DescriptorSet 0
+               OpDecorate %19 Binding 0
+               OpMemberDecorate %62 0 Offset 0
+               OpDecorate %62 Block
+               OpDecorate %64 DescriptorSet 0
+               OpDecorate %64 Binding 2
+               OpMemberDecorate %88 0 Offset 0
+               OpDecorate %88 Block
+               OpDecorate %90 DescriptorSet 0
+               OpDecorate %90 Binding 1
+               OpDecorate %121 Location 0
+          %2 = OpTypeVoid
+          %3 = OpTypeFunction %2
+          %6 = OpTypeInt 32 1
+          %7 = OpTypePointer Private %6
+          %8 = OpVariable %7 Private
+          %9 = OpConstant %6 0
+         %10 = OpTypeInt 32 0
+         %11 = OpConstant %10 10
+         %12 = OpTypeArray %6 %11
+         %13 = OpTypePointer Function %12
+         %15 = OpConstant %10 4
+         %16 = OpTypeArray %6 %15
+         %17 = OpTypeStruct %16
+         %18 = OpTypePointer Uniform %17
+         %19 = OpVariable %18 Uniform
+         %20 = OpTypePointer Uniform %6
+         %42 = OpTypePointer Function %6
+         %50 = OpConstant %6 2
+         %53 = OpTypeBool
+         %56 = OpConstant %6 10
+         %60 = OpConstant %6 1
+         %62 = OpTypeStruct %6
+         %63 = OpTypePointer Uniform %62
+         %64 = OpVariable %63 Uniform
+         %74 = OpConstant %6 4
+         %81 = OpConstant %6 3
+         %88 = OpTypeStruct %6
+         %89 = OpTypePointer Uniform %88
+         %90 = OpVariable %89 Uniform
+        %118 = OpTypeFloat 32
+        %119 = OpTypeVector %118 4
+        %120 = OpTypePointer Output %119
+        %121 = OpVariable %120 Output
+          %4 = OpFunction %2 None %3
+          %5 = OpLabel
+         %14 = OpVariable %13 Function
+         %43 = OpVariable %42 Function
+         %96 = OpVariable %42 Function
+               OpStore %8 %9
+         %21 = OpAccessChain %20 %19 %9 %9
+         %22 = OpLoad %6 %21
+         %23 = OpAccessChain %20 %19 %9 %9
+         %24 = OpLoad %6 %23
+         %25 = OpAccessChain %20 %19 %9 %9
+         %26 = OpLoad %6 %25
+         %27 = OpAccessChain %20 %19 %9 %9
+         %28 = OpLoad %6 %27
+         %29 = OpAccessChain %20 %19 %9 %9
+         %30 = OpLoad %6 %29
+         %31 = OpAccessChain %20 %19 %9 %9
+         %32 = OpLoad %6 %31
+         %33 = OpAccessChain %20 %19 %9 %9
+         %34 = OpLoad %6 %33
+         %35 = OpAccessChain %20 %19 %9 %9
+         %36 = OpLoad %6 %35
+         %37 = OpAccessChain %20 %19 %9 %9
+         %38 = OpLoad %6 %37
+         %39 = OpAccessChain %20 %19 %9 %9
+         %40 = OpLoad %6 %39
+         %41 = OpCompositeConstruct %12 %22 %24 %26 %28 %30 %32 %34 %36 %38 %40
+               OpStore %14 %41
+               OpStore %43 %9
+               OpBranch %44
+         %44 = OpLabel
+               OpLoopMerge %46 %47 None
+               OpBranch %48
+         %48 = OpLabel
+         %49 = OpLoad %6 %43
+         %51 = OpAccessChain %20 %19 %9 %50
+         %52 = OpLoad %6 %51
+         %54 = OpSLessThan %53 %49 %52
+         %55 = OpLoad %6 %8
+         %57 = OpSLessThan %53 %55 %56
+         %58 = OpLogicalAnd %53 %54 %57
+               OpBranchConditional %58 %45 %46
+         %45 = OpLabel
+         %59 = OpLoad %6 %8
+         %61 = OpIAdd %6 %59 %60
+               OpStore %8 %61
+         %65 = OpAccessChain %20 %64 %9
+         %66 = OpLoad %6 %65
+         %67 = OpAccessChain %20 %19 %9 %60
+         %68 = OpLoad %6 %67
+         %69 = OpSLessThanEqual %53 %66 %68
+               OpSelectionMerge %71 None
+               OpBranchConditional %69 %70 %71
+         %70 = OpLabel
+               OpBranch %46
+         %71 = OpLabel
+         %73 = OpLoad %6 %43
+         %75 = OpSDiv %6 %73 %74
+         %76 = OpLoad %6 %43
+         %77 = OpIEqual %53 %75 %76
+               OpSelectionMerge %79 None
+               OpBranchConditional %77 %78 %79
+         %78 = OpLabel
+         %80 = OpLoad %6 %43
+         %82 = OpAccessChain %20 %19 %9 %81
+         %83 = OpLoad %6 %82
+         %84 = OpSDiv %6 %80 %83
+         %85 = OpAccessChain %20 %19 %9 %60
+         %86 = OpLoad %6 %85
+         %87 = OpAccessChain %42 %14 %84
+               OpStore %87 %86
+               OpBranch %79
+         %79 = OpLabel
+               OpBranch %47
+         %47 = OpLabel
+         %91 = OpAccessChain %20 %90 %9
+         %92 = OpLoad %6 %91
+         %93 = OpAccessChain %20 %19 %9 %60
+         %94 = OpLoad %6 %93
+         %95 = OpSLessThan %53 %92 %94
+               OpSelectionMerge %98 None
+               OpBranchConditional %95 %97 %101
+         %97 = OpLabel
+         %99 = OpLoad %6 %43
+        %100 = OpIAdd %6 %99 %60
+               OpStore %43 %100
+               OpStore %96 %99
+               OpBranch %98
+        %101 = OpLabel
+        %102 = OpAccessChain %20 %19 %9 %60
+        %103 = OpLoad %6 %102
+               OpStore %96 %103
+               OpBranch %98
+         %98 = OpLabel
+               OpBranch %44
+         %46 = OpLabel
+        %104 = OpAccessChain %20 %19 %9 %60
+        %105 = OpLoad %6 %104
+        %106 = OpAccessChain %42 %14 %105
+        %107 = OpLoad %6 %106
+        %108 = OpIAdd %6 %107 %60
+               OpStore %106 %108
+        %109 = OpAccessChain %20 %19 %9 %9
+        %110 = OpLoad %6 %109
+        %111 = OpAccessChain %42 %14 %110
+        %112 = OpLoad %6 %111
+        %113 = OpAccessChain %20 %19 %9 %60
+        %114 = OpLoad %6 %113
+        %115 = OpIEqual %53 %112 %114
+               OpSelectionMerge %117 None
+               OpBranchConditional %115 %116 %135
+        %116 = OpLabel
+        %122 = OpAccessChain %20 %19 %9 %60
+        %123 = OpLoad %6 %122
+        %124 = OpConvertSToF %118 %123
+        %125 = OpAccessChain %20 %19 %9 %9
+        %126 = OpLoad %6 %125
+        %127 = OpConvertSToF %118 %126
+        %128 = OpAccessChain %20 %19 %9 %9
+        %129 = OpLoad %6 %128
+        %130 = OpConvertSToF %118 %129
+        %131 = OpAccessChain %20 %19 %9 %60
+        %132 = OpLoad %6 %131
+        %133 = OpConvertSToF %118 %132
+        %134 = OpCompositeConstruct %119 %124 %127 %130 %133
+               OpStore %121 %134
+               OpBranch %117
+        %135 = OpLabel
+        %136 = OpAccessChain %20 %19 %9 %9
+        %137 = OpLoad %6 %136
+        %138 = OpConvertSToF %118 %137
+        %139 = OpCompositeConstruct %119 %138 %138 %138 %138
+               OpStore %121 %139
+               OpBranch %117
+        %117 = OpLabel
+               OpReturn
+               OpFunctionEnd
+END
+
+# uniforms for variant
+
+# zero
+BUFFER variant_zero DATA_TYPE int32 STD140 DATA
+ 0
+END
+# 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 1 20 4
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+  ATTACH variant_vertex_shader
+  ATTACH variant_fragment_shader
+  FRAMEBUFFER_SIZE 32 32
+  BIND BUFFER variant_framebuffer AS color LOCATION 0
+  BIND BUFFER variant_zero AS uniform DESCRIPTOR_SET 0 BINDING 1
+  BIND BUFFER variant_two AS uniform DESCRIPTOR_SET 0 BINDING 2
+  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 32 32
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 255 0 0 255
diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-loop-never-iterated-constant-vector-condition.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-loop-never-iterated-constant-vector-condition.amber
new file mode 100644 (file)
index 0000000..a7a01fa
--- /dev/null
@@ -0,0 +1,256 @@
+#!amber
+
+# Copyright 2022 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 _float_2_0 _GLF_uniform_float_values[0]
+# #define _float_923_2 _GLF_uniform_float_values[1]
+# #define _float_9_9 _GLF_uniform_float_values[2]
+# #define _float_802_849 _GLF_uniform_float_values[3]
+# #define _float_1_0 _GLF_uniform_float_values[4]
+#
+# 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: [2.0, 923.2, 9.9, 802.849, 1.0]
+# layout(set = 0, binding = 1) uniform buf1
+# {
+#     float _GLF_uniform_float_values[5];
+# };
+#
+# const int _GLF_global_loop_bound = 10;
+# int _GLF_global_loop_count = 0;
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# void main()
+# {
+#     // This will be replaced later.
+#     _GLF_color = vec4(_float_923_2, _float_9_9, _float_802_849, _float_2_0);
+#     vec2 v = vec2(1.0);
+#
+#     // Never iterated.
+#     while((v.x > 1.0 || v.y > 1.0) && (_GLF_global_loop_count < _GLF_global_loop_bound))
+#     {
+#         _GLF_global_loop_count++;
+#         v *= _float_2_0;
+#         _GLF_color = vec4(_float_1_0);
+#     }
+#
+#     // Always true.
+#     if(v == vec2(_int_1))
+#     {
+#         _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: 100
+; Schema: 0
+               OpCapability Shader
+          %1 = OpExtInstImport "GLSL.std.450"
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %4 "main" %13
+               OpExecutionMode %4 OriginUpperLeft
+               OpSource ESSL 320
+               OpName %4 "main"
+               OpName %8 "_GLF_global_loop_count"
+               OpName %13 "_GLF_color"
+               OpName %17 "buf1"
+               OpMemberName %17 0 "_GLF_uniform_float_values"
+               OpName %19 ""
+               OpName %35 "v"
+               OpName %74 "buf0"
+               OpMemberName %74 0 "_GLF_uniform_int_values"
+               OpName %76 ""
+               OpDecorate %13 Location 0
+               OpDecorate %16 ArrayStride 16
+               OpMemberDecorate %17 0 Offset 0
+               OpDecorate %17 Block
+               OpDecorate %19 DescriptorSet 0
+               OpDecorate %19 Binding 1
+               OpDecorate %73 ArrayStride 16
+               OpMemberDecorate %74 0 Offset 0
+               OpDecorate %74 Block
+               OpDecorate %76 DescriptorSet 0
+               OpDecorate %76 Binding 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 Output %11
+         %13 = OpVariable %12 Output
+         %14 = OpTypeInt 32 0
+         %15 = OpConstant %14 5
+         %16 = OpTypeArray %10 %15
+         %17 = OpTypeStruct %16
+         %18 = OpTypePointer Uniform %17
+         %19 = OpVariable %18 Uniform
+         %20 = OpConstant %6 1
+         %21 = OpTypePointer Uniform %10
+         %24 = OpConstant %6 2
+         %27 = OpConstant %6 3
+         %33 = OpTypeVector %10 2
+         %34 = OpTypePointer Function %33
+         %36 = OpConstant %10 1
+         %37 = OpConstantComposite %33 %36 %36
+         %43 = OpTypeBool
+         %44 = OpConstant %14 0
+         %45 = OpTypePointer Function %10
+         %52 = OpConstant %14 1
+         %58 = OpConstant %6 10
+         %67 = OpConstant %6 4
+         %72 = OpConstant %14 2
+         %73 = OpTypeArray %6 %72
+         %74 = OpTypeStruct %73
+         %75 = OpTypePointer Uniform %74
+         %76 = OpVariable %75 Uniform
+         %77 = OpTypePointer Uniform %6
+         %82 = OpTypeVector %43 2
+          %4 = OpFunction %2 None %3
+          %5 = OpLabel
+         %35 = OpVariable %34 Function
+               OpStore %8 %9
+         %22 = OpAccessChain %21 %19 %9 %20
+         %23 = OpLoad %10 %22
+         %25 = OpAccessChain %21 %19 %9 %24
+         %26 = OpLoad %10 %25
+         %28 = OpAccessChain %21 %19 %9 %27
+         %29 = OpLoad %10 %28
+         %30 = OpAccessChain %21 %19 %9 %9
+         %31 = OpLoad %10 %30
+         %32 = OpCompositeConstruct %11 %23 %26 %29 %31
+               OpStore %13 %32
+               OpStore %35 %37
+               OpBranch %38
+         %38 = OpLabel
+               OpLoopMerge %40 %41 None
+               OpBranch %42
+         %42 = OpLabel
+         %46 = OpAccessChain %45 %35 %44
+         %47 = OpLoad %10 %46
+         %48 = OpFOrdGreaterThan %43 %47 %36
+         %49 = OpLogicalNot %43 %48
+               OpSelectionMerge %51 None
+               OpBranchConditional %49 %50 %51
+         %50 = OpLabel
+         %53 = OpAccessChain %45 %35 %52
+         %54 = OpLoad %10 %53
+         %55 = OpFOrdGreaterThan %43 %54 %36
+               OpBranch %51
+         %51 = OpLabel
+         %56 = OpPhi %43 %48 %42 %55 %50
+         %57 = OpLoad %6 %8
+         %59 = OpSLessThan %43 %57 %58
+         %60 = OpLogicalAnd %43 %56 %59
+               OpBranchConditional %60 %39 %40
+         %39 = OpLabel
+         %61 = OpLoad %6 %8
+         %62 = OpIAdd %6 %61 %20
+               OpStore %8 %62
+         %63 = OpAccessChain %21 %19 %9 %9
+         %64 = OpLoad %10 %63
+         %65 = OpLoad %33 %35
+         %66 = OpVectorTimesScalar %33 %65 %64
+               OpStore %35 %66
+         %68 = OpAccessChain %21 %19 %9 %67
+         %69 = OpLoad %10 %68
+         %70 = OpCompositeConstruct %11 %69 %69 %69 %69
+               OpStore %13 %70
+               OpBranch %41
+         %41 = OpLabel
+               OpBranch %38
+         %40 = OpLabel
+         %71 = OpLoad %33 %35
+         %78 = OpAccessChain %77 %76 %9 %9
+         %79 = OpLoad %6 %78
+         %80 = OpConvertSToF %10 %79
+         %81 = OpCompositeConstruct %33 %80 %80
+         %83 = OpFOrdEqual %82 %71 %81
+         %84 = OpAll %43 %83
+               OpSelectionMerge %86 None
+               OpBranchConditional %84 %85 %86
+         %85 = OpLabel
+         %87 = OpAccessChain %77 %76 %9 %9
+         %88 = OpLoad %6 %87
+         %89 = OpConvertSToF %10 %88
+         %90 = OpAccessChain %77 %76 %9 %20
+         %91 = OpLoad %6 %90
+         %92 = OpConvertSToF %10 %91
+         %93 = OpAccessChain %77 %76 %9 %20
+         %94 = OpLoad %6 %93
+         %95 = OpConvertSToF %10 %94
+         %96 = OpAccessChain %77 %76 %9 %9
+         %97 = OpLoad %6 %96
+         %98 = OpConvertSToF %10 %97
+         %99 = OpCompositeConstruct %11 %89 %92 %95 %98
+               OpStore %13 %99
+               OpBranch %86
+         %86 = OpLabel
+               OpReturn
+               OpFunctionEnd
+END
+
+# uniforms for variant
+
+# _GLF_uniform_float_values
+BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA
+ 2.0 923.2 9.9 802.849 1.0
+END
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 1 0
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+  ATTACH variant_vertex_shader
+  ATTACH variant_fragment_shader
+  FRAMEBUFFER_SIZE 32 32
+  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 32 32
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 255 0 0 255
diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-loop-start-fragcoord-while-iterates-once.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-loop-start-fragcoord-while-iterates-once.amber
new file mode 100644 (file)
index 0000000..39f9faf
--- /dev/null
@@ -0,0 +1,287 @@
+#!amber
+
+# Copyright 2022 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_10 _GLF_uniform_int_values[2]
+# #define _int_2 _GLF_uniform_int_values[3]
+# #define _float_0_0 _GLF_uniform_float_values[0]
+#
+# precision highp float;
+# precision highp int;
+#
+# // Contents of _GLF_uniform_float_values: 0.0
+# layout(set = 0, binding = 0) uniform buf0
+# {
+#     float _GLF_uniform_float_values[1];
+# };
+#
+# // Contents of _GLF_uniform_int_values: [0, 1, 10, 2]
+# layout(set = 0, binding = 1) uniform buf1
+# {
+#     int _GLF_uniform_int_values[4];
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# void main()
+# {
+#     int a = -1;
+#     int b = _int_0;
+#
+#     // i starts at -1.
+#     for(int i = (gl_FragCoord.y > _float_0_0) ? a : 1; i < _int_1 && b < _int_10; i++)
+#     {
+#         int c = _int_0;
+#
+#         // Iterates once.
+#         while(c != _int_1)
+#         {
+#             b++;
+#             c = _int_1;
+#         }
+#     }
+#
+#     // Always true.
+#     if(a == -_int_1 && b == _int_2)
+#     {
+#         _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1);
+#     }
+#     else
+#     {
+#         _GLF_color = vec4(_int_0);
+#     }
+# }
+SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 10
+; Bound: 112
+; Schema: 0
+               OpCapability Shader
+          %1 = OpExtInstImport "GLSL.std.450"
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %4 "main" %25 %93
+               OpExecutionMode %4 OriginUpperLeft
+               OpSource ESSL 320
+               OpName %4 "main"
+               OpName %8 "a"
+               OpName %10 "b"
+               OpName %14 "buf1"
+               OpMemberName %14 0 "_GLF_uniform_int_values"
+               OpName %16 ""
+               OpName %21 "i"
+               OpName %25 "gl_FragCoord"
+               OpName %31 "buf0"
+               OpMemberName %31 0 "_GLF_uniform_float_values"
+               OpName %33 ""
+               OpName %59 "c"
+               OpName %93 "_GLF_color"
+               OpDecorate %13 ArrayStride 16
+               OpMemberDecorate %14 0 Offset 0
+               OpDecorate %14 Block
+               OpDecorate %16 DescriptorSet 0
+               OpDecorate %16 Binding 1
+               OpDecorate %25 BuiltIn FragCoord
+               OpDecorate %30 ArrayStride 16
+               OpMemberDecorate %31 0 Offset 0
+               OpDecorate %31 Block
+               OpDecorate %33 DescriptorSet 0
+               OpDecorate %33 Binding 0
+               OpDecorate %93 Location 0
+          %2 = OpTypeVoid
+          %3 = OpTypeFunction %2
+          %6 = OpTypeInt 32 1
+          %7 = OpTypePointer Function %6
+          %9 = OpConstant %6 -1
+         %11 = OpTypeInt 32 0
+         %12 = OpConstant %11 4
+         %13 = OpTypeArray %6 %12
+         %14 = OpTypeStruct %13
+         %15 = OpTypePointer Uniform %14
+         %16 = OpVariable %15 Uniform
+         %17 = OpConstant %6 0
+         %18 = OpTypePointer Uniform %6
+         %22 = OpTypeFloat 32
+         %23 = OpTypeVector %22 4
+         %24 = OpTypePointer Input %23
+         %25 = OpVariable %24 Input
+         %26 = OpConstant %11 1
+         %27 = OpTypePointer Input %22
+         %30 = OpTypeArray %22 %26
+         %31 = OpTypeStruct %30
+         %32 = OpTypePointer Uniform %31
+         %33 = OpVariable %32 Uniform
+         %34 = OpTypePointer Uniform %22
+         %37 = OpTypeBool
+         %40 = OpConstant %6 1
+         %54 = OpConstant %6 2
+         %85 = OpConstant %6 3
+         %92 = OpTypePointer Output %23
+         %93 = OpVariable %92 Output
+          %4 = OpFunction %2 None %3
+          %5 = OpLabel
+          %8 = OpVariable %7 Function
+         %10 = OpVariable %7 Function
+         %21 = OpVariable %7 Function
+         %59 = OpVariable %7 Function
+               OpStore %8 %9
+         %19 = OpAccessChain %18 %16 %17 %17
+         %20 = OpLoad %6 %19
+               OpStore %10 %20
+         %28 = OpAccessChain %27 %25 %26
+         %29 = OpLoad %22 %28
+         %35 = OpAccessChain %34 %33 %17 %17
+         %36 = OpLoad %22 %35
+         %38 = OpFOrdGreaterThan %37 %29 %36
+         %39 = OpLoad %6 %8
+         %41 = OpSelect %6 %38 %39 %40
+               OpStore %21 %41
+               OpBranch %42
+         %42 = OpLabel
+               OpLoopMerge %44 %45 None
+               OpBranch %46
+         %46 = OpLabel
+         %47 = OpLoad %6 %21
+         %48 = OpAccessChain %18 %16 %17 %40
+         %49 = OpLoad %6 %48
+         %50 = OpSLessThan %37 %47 %49
+               OpSelectionMerge %52 None
+               OpBranchConditional %50 %51 %52
+         %51 = OpLabel
+         %53 = OpLoad %6 %10
+         %55 = OpAccessChain %18 %16 %17 %54
+         %56 = OpLoad %6 %55
+         %57 = OpSLessThan %37 %53 %56
+               OpBranch %52
+         %52 = OpLabel
+         %58 = OpPhi %37 %50 %46 %57 %51
+               OpBranchConditional %58 %43 %44
+         %43 = OpLabel
+         %60 = OpAccessChain %18 %16 %17 %17
+         %61 = OpLoad %6 %60
+               OpStore %59 %61
+               OpBranch %62
+         %62 = OpLabel
+               OpLoopMerge %64 %65 None
+               OpBranch %66
+         %66 = OpLabel
+         %67 = OpLoad %6 %59
+         %68 = OpAccessChain %18 %16 %17 %40
+         %69 = OpLoad %6 %68
+         %70 = OpINotEqual %37 %67 %69
+               OpBranchConditional %70 %63 %64
+         %63 = OpLabel
+         %71 = OpLoad %6 %10
+         %72 = OpIAdd %6 %71 %40
+               OpStore %10 %72
+         %73 = OpAccessChain %18 %16 %17 %40
+         %74 = OpLoad %6 %73
+               OpStore %59 %74
+               OpBranch %65
+         %65 = OpLabel
+               OpBranch %62
+         %64 = OpLabel
+               OpBranch %45
+         %45 = OpLabel
+         %75 = OpLoad %6 %21
+         %76 = OpIAdd %6 %75 %40
+               OpStore %21 %76
+               OpBranch %42
+         %44 = OpLabel
+         %77 = OpLoad %6 %8
+         %78 = OpAccessChain %18 %16 %17 %40
+         %79 = OpLoad %6 %78
+         %80 = OpSNegate %6 %79
+         %81 = OpIEqual %37 %77 %80
+               OpSelectionMerge %83 None
+               OpBranchConditional %81 %82 %83
+         %82 = OpLabel
+         %84 = OpLoad %6 %10
+         %86 = OpAccessChain %18 %16 %17 %85
+         %87 = OpLoad %6 %86
+         %88 = OpIEqual %37 %84 %87
+               OpBranch %83
+         %83 = OpLabel
+         %89 = OpPhi %37 %81 %44 %88 %82
+               OpSelectionMerge %91 None
+               OpBranchConditional %89 %90 %107
+         %90 = OpLabel
+         %94 = OpAccessChain %18 %16 %17 %40
+         %95 = OpLoad %6 %94
+         %96 = OpConvertSToF %22 %95
+         %97 = OpAccessChain %18 %16 %17 %17
+         %98 = OpLoad %6 %97
+         %99 = OpConvertSToF %22 %98
+        %100 = OpAccessChain %18 %16 %17 %17
+        %101 = OpLoad %6 %100
+        %102 = OpConvertSToF %22 %101
+        %103 = OpAccessChain %18 %16 %17 %40
+        %104 = OpLoad %6 %103
+        %105 = OpConvertSToF %22 %104
+        %106 = OpCompositeConstruct %23 %96 %99 %102 %105
+               OpStore %93 %106
+               OpBranch %91
+        %107 = OpLabel
+        %108 = OpAccessChain %18 %16 %17 %17
+        %109 = OpLoad %6 %108
+        %110 = OpConvertSToF %22 %109
+        %111 = OpCompositeConstruct %23 %110 %110 %110 %110
+               OpStore %93 %111
+               OpBranch %91
+         %91 = OpLabel
+               OpReturn
+               OpFunctionEnd
+END
+
+# uniforms for variant
+
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 0 1 10 2
+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 32 32
+  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 32 32
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 255 0 0 255
diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-multiple-functions-global-never-change.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-multiple-functions-global-never-change.amber
new file mode 100644 (file)
index 0000000..786e71f
--- /dev/null
@@ -0,0 +1,666 @@
+#!amber
+
+# Copyright 2022 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_100 _GLF_uniform_int_values[2]
+# #define _int_30 _GLF_uniform_int_values[3]
+# #define _int_6 _GLF_uniform_int_values[4]
+# #define _int_35 _GLF_uniform_int_values[5]
+# #define _int_8 _GLF_uniform_int_values[6]
+# #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, 0, 100, 30, 6, 35, 8]
+# layout(set = 0, binding = 1) uniform buf1
+# {
+#     int _GLF_uniform_int_values[7];
+# };
+#
+# // Contents of injectionSwitch: [0.0, 1.0]
+# layout(set = 0, binding = 2) uniform buf2
+# {
+#     vec2 injectionSwitch;
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# int arr[10] = int[10](1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
+#
+# void func0(int x)
+# {
+#     int a = _int_1;
+#
+#     for(int i = 0; i < 4; i ++)
+#     {
+#         // Always false.
+#         if(x == 1)
+#         {
+#             return;
+#         }
+#
+#         // a stays at value one.
+#         a = arr[a];
+#
+#         // Always false.
+#         if(injectionSwitch.x > injectionSwitch.y)
+#         {
+#             frexp(1.0, x);
+#
+#             for(int j = _int_8; a < 10; j ++)
+#             {
+#                 if(float[10](_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)[a] > _float_0_0)
+#                 {
+#                     a = j;
+#                 }
+#             }
+#         }
+#     }
+# }
+#
+# // This value never changes.
+# float f = 1.0;
+#
+# // This function always returns vec3(1, 1, 1).
+# vec3 func1(vec2 v)
+# {
+#     if(v.x > _float_1_0)
+#     {
+#         return vec3(_int_1);
+#     }
+#
+#     if(v.y < _float_1_0)
+#     {
+#         // f stays at value one.
+#         f = min(_float_1_0, f);
+#
+#         return vec3(_int_1, _int_1, f);
+#     }
+#
+#     if(v.y > _float_1_0)
+#     {
+#         // f stays at value one.
+#         f = clamp(_float_1_0, _float_1_0, f);
+#     }
+#
+#     return vec3(_int_1);
+# }
+#
+# // This function is always called with a zero matrix
+# // and always returns vec3(1, 1, 1).
+# vec3 func2(mat2 m)
+# {
+#     func0(_int_6);
+#     func0(30);
+#
+#     // v0 = vec2(0, 0).
+#     vec2 v0 = vec2(_float_1_0) * m;
+#     vec3 v1 = vec3(_float_1_0);
+#
+#     for(int i = _int_0; i < _int_35; i ++)
+#     {
+#         // v2 = vec3(1, 1, 1);
+#         vec3 v2 = func1(v0);
+#
+#         // Always false.
+#         if(length(v2) <= _float_1_0)
+#         {
+#             continue;
+#         }
+#
+#         // v1 stays at value (1, 1, 1).
+#         v1 = v2;
+#     }
+#
+#
+#     return v1;
+# }
+#
+# void main()
+# {
+#     // Always false.
+#     if(injectionSwitch.x > injectionSwitch.y)
+#     {
+#         return;
+#     }
+#
+#     // v = vec3(1, 1, 1).
+#     vec3 v = func2(mat2(_float_0_0, cos(_float_0_0), _float_0_0, _float_0_0));
+#     func2(mat2(_int_0));
+#     func0(_int_100);
+#     func0(_int_30);
+#     func2(mat2(_int_0));
+#
+#     // Always true.
+#     if(f == _float_1_0)
+#     {
+#         _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1);
+#     }
+#     else
+#     {
+#         _GLF_color = vec4(v, _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: 318
+; Schema: 0
+               OpCapability Shader
+          %1 = OpExtInstImport "GLSL.std.450"
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %4 "main" %295
+               OpExecutionMode %4 OriginUpperLeft
+               OpSource ESSL 320
+               OpName %4 "main"
+               OpName %10 "func0(i1;"
+               OpName %9 "x"
+               OpName %18 "func1(vf2;"
+               OpName %17 "v"
+               OpName %24 "func2(mf22;"
+               OpName %23 "m"
+               OpName %30 "arr"
+               OpName %34 "f"
+               OpName %36 "a"
+               OpName %39 "buf1"
+               OpMemberName %39 0 "_GLF_uniform_int_values"
+               OpName %41 ""
+               OpName %46 "i"
+               OpName %65 "buf2"
+               OpMemberName %65 0 "injectionSwitch"
+               OpName %67 ""
+               OpName %78 "ResType"
+               OpName %82 "j"
+               OpName %96 "buf0"
+               OpMemberName %96 0 "_GLF_uniform_float_values"
+               OpName %98 ""
+               OpName %123 "indexable"
+               OpName %188 "param"
+               OpName %193 "param"
+               OpName %195 "v0"
+               OpName %202 "v1"
+               OpName %206 "i"
+               OpName %219 "v2"
+               OpName %220 "param"
+               OpName %245 "v"
+               OpName %259 "param"
+               OpName %267 "param"
+               OpName %270 "param"
+               OpName %275 "param"
+               OpName %285 "param"
+               OpName %295 "_GLF_color"
+               OpDecorate %38 ArrayStride 16
+               OpMemberDecorate %39 0 Offset 0
+               OpDecorate %39 Block
+               OpDecorate %41 DescriptorSet 0
+               OpDecorate %41 Binding 1
+               OpMemberDecorate %65 0 Offset 0
+               OpDecorate %65 Block
+               OpDecorate %67 DescriptorSet 0
+               OpDecorate %67 Binding 2
+               OpDecorate %95 ArrayStride 16
+               OpMemberDecorate %96 0 Offset 0
+               OpDecorate %96 Block
+               OpDecorate %98 DescriptorSet 0
+               OpDecorate %98 Binding 0
+               OpDecorate %295 Location 0
+          %2 = OpTypeVoid
+          %3 = OpTypeFunction %2
+          %6 = OpTypeInt 32 1
+          %7 = OpTypePointer Function %6
+          %8 = OpTypeFunction %2 %7
+         %12 = OpTypeFloat 32
+         %13 = OpTypeVector %12 2
+         %14 = OpTypePointer Function %13
+         %15 = OpTypeVector %12 3
+         %16 = OpTypeFunction %15 %14
+         %20 = OpTypeMatrix %13 2
+         %21 = OpTypePointer Function %20
+         %22 = OpTypeFunction %15 %21
+         %26 = OpTypeInt 32 0
+         %27 = OpConstant %26 10
+         %28 = OpTypeArray %6 %27
+         %29 = OpTypePointer Private %28
+         %30 = OpVariable %29 Private
+         %31 = OpConstant %6 1
+         %32 = OpConstantComposite %28 %31 %31 %31 %31 %31 %31 %31 %31 %31 %31
+         %33 = OpTypePointer Private %12
+         %34 = OpVariable %33 Private
+         %35 = OpConstant %12 1
+         %37 = OpConstant %26 7
+         %38 = OpTypeArray %6 %37
+         %39 = OpTypeStruct %38
+         %40 = OpTypePointer Uniform %39
+         %41 = OpVariable %40 Uniform
+         %42 = OpConstant %6 0
+         %43 = OpTypePointer Uniform %6
+         %53 = OpConstant %6 4
+         %54 = OpTypeBool
+         %62 = OpTypePointer Private %6
+         %65 = OpTypeStruct %13
+         %66 = OpTypePointer Uniform %65
+         %67 = OpVariable %66 Uniform
+         %68 = OpConstant %26 0
+         %69 = OpTypePointer Uniform %12
+         %72 = OpConstant %26 1
+         %78 = OpTypeStruct %12 %6
+         %83 = OpConstant %6 6
+         %92 = OpConstant %6 10
+         %94 = OpConstant %26 2
+         %95 = OpTypeArray %12 %94
+         %96 = OpTypeStruct %95
+         %97 = OpTypePointer Uniform %96
+         %98 = OpVariable %97 Uniform
+        %119 = OpTypeArray %12 %27
+        %122 = OpTypePointer Function %119
+        %124 = OpTypePointer Function %12
+        %192 = OpConstant %6 30
+        %201 = OpTypePointer Function %15
+        %215 = OpConstant %6 5
+        %255 = OpConstant %12 0
+        %269 = OpConstant %6 2
+        %274 = OpConstant %6 3
+        %293 = OpTypeVector %12 4
+        %294 = OpTypePointer Output %293
+        %295 = OpVariable %294 Output
+          %4 = OpFunction %2 None %3
+          %5 = OpLabel
+        %245 = OpVariable %201 Function
+        %259 = OpVariable %21 Function
+        %267 = OpVariable %21 Function
+        %270 = OpVariable %7 Function
+        %275 = OpVariable %7 Function
+        %285 = OpVariable %21 Function
+               OpStore %30 %32
+               OpStore %34 %35
+        %237 = OpAccessChain %69 %67 %42 %68
+        %238 = OpLoad %12 %237
+        %239 = OpAccessChain %69 %67 %42 %72
+        %240 = OpLoad %12 %239
+        %241 = OpFOrdGreaterThan %54 %238 %240
+               OpSelectionMerge %243 None
+               OpBranchConditional %241 %242 %243
+        %242 = OpLabel
+               OpReturn
+        %243 = OpLabel
+        %246 = OpAccessChain %69 %98 %42 %31
+        %247 = OpLoad %12 %246
+        %248 = OpAccessChain %69 %98 %42 %31
+        %249 = OpLoad %12 %248
+        %250 = OpExtInst %12 %1 Cos %249
+        %251 = OpAccessChain %69 %98 %42 %31
+        %252 = OpLoad %12 %251
+        %253 = OpAccessChain %69 %98 %42 %31
+        %254 = OpLoad %12 %253
+        %256 = OpCompositeConstruct %13 %247 %250
+        %257 = OpCompositeConstruct %13 %252 %254
+        %258 = OpCompositeConstruct %20 %256 %257
+               OpStore %259 %258
+        %260 = OpFunctionCall %15 %24 %259
+               OpStore %245 %260
+        %261 = OpAccessChain %43 %41 %42 %31
+        %262 = OpLoad %6 %261
+        %263 = OpConvertSToF %12 %262
+        %264 = OpCompositeConstruct %13 %263 %255
+        %265 = OpCompositeConstruct %13 %255 %263
+        %266 = OpCompositeConstruct %20 %264 %265
+               OpStore %267 %266
+        %268 = OpFunctionCall %15 %24 %267
+        %271 = OpAccessChain %43 %41 %42 %269
+        %272 = OpLoad %6 %271
+               OpStore %270 %272
+        %273 = OpFunctionCall %2 %10 %270
+        %276 = OpAccessChain %43 %41 %42 %274
+        %277 = OpLoad %6 %276
+               OpStore %275 %277
+        %278 = OpFunctionCall %2 %10 %275
+        %279 = OpAccessChain %43 %41 %42 %31
+        %280 = OpLoad %6 %279
+        %281 = OpConvertSToF %12 %280
+        %282 = OpCompositeConstruct %13 %281 %255
+        %283 = OpCompositeConstruct %13 %255 %281
+        %284 = OpCompositeConstruct %20 %282 %283
+               OpStore %285 %284
+        %286 = OpFunctionCall %15 %24 %285
+        %287 = OpLoad %12 %34
+        %288 = OpAccessChain %69 %98 %42 %42
+        %289 = OpLoad %12 %288
+        %290 = OpFOrdEqual %54 %287 %289
+               OpSelectionMerge %292 None
+               OpBranchConditional %290 %291 %309
+        %291 = OpLabel
+        %296 = OpAccessChain %43 %41 %42 %42
+        %297 = OpLoad %6 %296
+        %298 = OpConvertSToF %12 %297
+        %299 = OpAccessChain %43 %41 %42 %31
+        %300 = OpLoad %6 %299
+        %301 = OpConvertSToF %12 %300
+        %302 = OpAccessChain %43 %41 %42 %31
+        %303 = OpLoad %6 %302
+        %304 = OpConvertSToF %12 %303
+        %305 = OpAccessChain %43 %41 %42 %42
+        %306 = OpLoad %6 %305
+        %307 = OpConvertSToF %12 %306
+        %308 = OpCompositeConstruct %293 %298 %301 %304 %307
+               OpStore %295 %308
+               OpBranch %292
+        %309 = OpLabel
+        %310 = OpLoad %15 %245
+        %311 = OpAccessChain %43 %41 %42 %31
+        %312 = OpLoad %6 %311
+        %313 = OpConvertSToF %12 %312
+        %314 = OpCompositeExtract %12 %310 0
+        %315 = OpCompositeExtract %12 %310 1
+        %316 = OpCompositeExtract %12 %310 2
+        %317 = OpCompositeConstruct %293 %314 %315 %316 %313
+               OpStore %295 %317
+               OpBranch %292
+        %292 = OpLabel
+               OpReturn
+               OpFunctionEnd
+         %10 = OpFunction %2 None %8
+          %9 = OpFunctionParameter %7
+         %11 = OpLabel
+         %36 = OpVariable %7 Function
+         %46 = OpVariable %7 Function
+         %82 = OpVariable %7 Function
+        %123 = OpVariable %122 Function
+         %44 = OpAccessChain %43 %41 %42 %42
+         %45 = OpLoad %6 %44
+               OpStore %36 %45
+               OpStore %46 %42
+               OpBranch %47
+         %47 = OpLabel
+               OpLoopMerge %49 %50 None
+               OpBranch %51
+         %51 = OpLabel
+         %52 = OpLoad %6 %46
+         %55 = OpSLessThan %54 %52 %53
+               OpBranchConditional %55 %48 %49
+         %48 = OpLabel
+         %56 = OpLoad %6 %9
+         %57 = OpIEqual %54 %56 %31
+               OpSelectionMerge %59 None
+               OpBranchConditional %57 %58 %59
+         %58 = OpLabel
+               OpReturn
+         %59 = OpLabel
+         %61 = OpLoad %6 %36
+         %63 = OpAccessChain %62 %30 %61
+         %64 = OpLoad %6 %63
+               OpStore %36 %64
+         %70 = OpAccessChain %69 %67 %42 %68
+         %71 = OpLoad %12 %70
+         %73 = OpAccessChain %69 %67 %42 %72
+         %74 = OpLoad %12 %73
+         %75 = OpFOrdGreaterThan %54 %71 %74
+               OpSelectionMerge %77 None
+               OpBranchConditional %75 %76 %77
+         %76 = OpLabel
+         %79 = OpExtInst %78 %1 FrexpStruct %35
+         %80 = OpCompositeExtract %6 %79 1
+               OpStore %9 %80
+         %81 = OpCompositeExtract %12 %79 0
+         %84 = OpAccessChain %43 %41 %42 %83
+         %85 = OpLoad %6 %84
+               OpStore %82 %85
+               OpBranch %86
+         %86 = OpLabel
+               OpLoopMerge %88 %89 None
+               OpBranch %90
+         %90 = OpLabel
+         %91 = OpLoad %6 %36
+         %93 = OpSLessThan %54 %91 %92
+               OpBranchConditional %93 %87 %88
+         %87 = OpLabel
+         %99 = OpAccessChain %69 %98 %42 %42
+        %100 = OpLoad %12 %99
+        %101 = OpAccessChain %69 %98 %42 %42
+        %102 = OpLoad %12 %101
+        %103 = OpAccessChain %69 %98 %42 %42
+        %104 = OpLoad %12 %103
+        %105 = OpAccessChain %69 %98 %42 %42
+        %106 = OpLoad %12 %105
+        %107 = OpAccessChain %69 %98 %42 %42
+        %108 = OpLoad %12 %107
+        %109 = OpAccessChain %69 %98 %42 %42
+        %110 = OpLoad %12 %109
+        %111 = OpAccessChain %69 %98 %42 %42
+        %112 = OpLoad %12 %111
+        %113 = OpAccessChain %69 %98 %42 %42
+        %114 = OpLoad %12 %113
+        %115 = OpAccessChain %69 %98 %42 %42
+        %116 = OpLoad %12 %115
+        %117 = OpAccessChain %69 %98 %42 %42
+        %118 = OpLoad %12 %117
+        %120 = OpCompositeConstruct %119 %100 %102 %104 %106 %108 %110 %112 %114 %116 %118
+        %121 = OpLoad %6 %36
+               OpStore %123 %120
+        %125 = OpAccessChain %124 %123 %121
+        %126 = OpLoad %12 %125
+        %127 = OpAccessChain %69 %98 %42 %31
+        %128 = OpLoad %12 %127
+        %129 = OpFOrdGreaterThan %54 %126 %128
+               OpSelectionMerge %131 None
+               OpBranchConditional %129 %130 %131
+        %130 = OpLabel
+        %132 = OpLoad %6 %82
+               OpStore %36 %132
+               OpBranch %131
+        %131 = OpLabel
+               OpBranch %89
+         %89 = OpLabel
+        %133 = OpLoad %6 %82
+        %134 = OpIAdd %6 %133 %31
+               OpStore %82 %134
+               OpBranch %86
+         %88 = OpLabel
+               OpBranch %77
+         %77 = OpLabel
+               OpBranch %50
+         %50 = OpLabel
+        %135 = OpLoad %6 %46
+        %136 = OpIAdd %6 %135 %31
+               OpStore %46 %136
+               OpBranch %47
+         %49 = OpLabel
+               OpReturn
+               OpFunctionEnd
+         %18 = OpFunction %15 None %16
+         %17 = OpFunctionParameter %14
+         %19 = OpLabel
+        %137 = OpAccessChain %124 %17 %68
+        %138 = OpLoad %12 %137
+        %139 = OpAccessChain %69 %98 %42 %42
+        %140 = OpLoad %12 %139
+        %141 = OpFOrdGreaterThan %54 %138 %140
+               OpSelectionMerge %143 None
+               OpBranchConditional %141 %142 %143
+        %142 = OpLabel
+        %144 = OpAccessChain %43 %41 %42 %42
+        %145 = OpLoad %6 %144
+        %146 = OpConvertSToF %12 %145
+        %147 = OpCompositeConstruct %15 %146 %146 %146
+               OpReturnValue %147
+        %143 = OpLabel
+        %149 = OpAccessChain %124 %17 %72
+        %150 = OpLoad %12 %149
+        %151 = OpAccessChain %69 %98 %42 %42
+        %152 = OpLoad %12 %151
+        %153 = OpFOrdLessThan %54 %150 %152
+               OpSelectionMerge %155 None
+               OpBranchConditional %153 %154 %155
+        %154 = OpLabel
+        %156 = OpAccessChain %69 %98 %42 %42
+        %157 = OpLoad %12 %156
+        %158 = OpLoad %12 %34
+        %159 = OpExtInst %12 %1 FMin %157 %158
+               OpStore %34 %159
+        %160 = OpAccessChain %43 %41 %42 %42
+        %161 = OpLoad %6 %160
+        %162 = OpConvertSToF %12 %161
+        %163 = OpAccessChain %43 %41 %42 %42
+        %164 = OpLoad %6 %163
+        %165 = OpConvertSToF %12 %164
+        %166 = OpLoad %12 %34
+        %167 = OpCompositeConstruct %15 %162 %165 %166
+               OpReturnValue %167
+        %155 = OpLabel
+        %169 = OpAccessChain %124 %17 %72
+        %170 = OpLoad %12 %169
+        %171 = OpAccessChain %69 %98 %42 %42
+        %172 = OpLoad %12 %171
+        %173 = OpFOrdGreaterThan %54 %170 %172
+               OpSelectionMerge %175 None
+               OpBranchConditional %173 %174 %175
+        %174 = OpLabel
+        %176 = OpAccessChain %69 %98 %42 %42
+        %177 = OpLoad %12 %176
+        %178 = OpAccessChain %69 %98 %42 %42
+        %179 = OpLoad %12 %178
+        %180 = OpLoad %12 %34
+        %181 = OpExtInst %12 %1 FClamp %177 %179 %180
+               OpStore %34 %181
+               OpBranch %175
+        %175 = OpLabel
+        %182 = OpAccessChain %43 %41 %42 %42
+        %183 = OpLoad %6 %182
+        %184 = OpConvertSToF %12 %183
+        %185 = OpCompositeConstruct %15 %184 %184 %184
+               OpReturnValue %185
+               OpFunctionEnd
+         %24 = OpFunction %15 None %22
+         %23 = OpFunctionParameter %21
+         %25 = OpLabel
+        %188 = OpVariable %7 Function
+        %193 = OpVariable %7 Function
+        %195 = OpVariable %14 Function
+        %202 = OpVariable %201 Function
+        %206 = OpVariable %7 Function
+        %219 = OpVariable %201 Function
+        %220 = OpVariable %14 Function
+        %189 = OpAccessChain %43 %41 %42 %53
+        %190 = OpLoad %6 %189
+               OpStore %188 %190
+        %191 = OpFunctionCall %2 %10 %188
+               OpStore %193 %192
+        %194 = OpFunctionCall %2 %10 %193
+        %196 = OpAccessChain %69 %98 %42 %42
+        %197 = OpLoad %12 %196
+        %198 = OpCompositeConstruct %13 %197 %197
+        %199 = OpLoad %20 %23
+        %200 = OpVectorTimesMatrix %13 %198 %199
+               OpStore %195 %200
+        %203 = OpAccessChain %69 %98 %42 %42
+        %204 = OpLoad %12 %203
+        %205 = OpCompositeConstruct %15 %204 %204 %204
+               OpStore %202 %205
+        %207 = OpAccessChain %43 %41 %42 %31
+        %208 = OpLoad %6 %207
+               OpStore %206 %208
+               OpBranch %209
+        %209 = OpLabel
+               OpLoopMerge %211 %212 None
+               OpBranch %213
+        %213 = OpLabel
+        %214 = OpLoad %6 %206
+        %216 = OpAccessChain %43 %41 %42 %215
+        %217 = OpLoad %6 %216
+        %218 = OpSLessThan %54 %214 %217
+               OpBranchConditional %218 %210 %211
+        %210 = OpLabel
+        %221 = OpLoad %13 %195
+               OpStore %220 %221
+        %222 = OpFunctionCall %15 %18 %220
+               OpStore %219 %222
+        %223 = OpLoad %15 %219
+        %224 = OpExtInst %12 %1 Length %223
+        %225 = OpAccessChain %69 %98 %42 %42
+        %226 = OpLoad %12 %225
+        %227 = OpFOrdLessThanEqual %54 %224 %226
+               OpSelectionMerge %229 None
+               OpBranchConditional %227 %228 %229
+        %228 = OpLabel
+               OpBranch %212
+        %229 = OpLabel
+        %231 = OpLoad %15 %219
+               OpStore %202 %231
+               OpBranch %212
+        %212 = OpLabel
+        %232 = OpLoad %6 %206
+        %233 = OpIAdd %6 %232 %31
+               OpStore %206 %233
+               OpBranch %209
+        %211 = OpLabel
+        %234 = OpLoad %15 %202
+               OpReturnValue %234
+               OpFunctionEnd
+END
+
+# uniforms for variant
+
+# injectionSwitch
+BUFFER variant_injectionSwitch DATA_TYPE vec2<float> STD140 DATA
+ 0.0 1.0
+END
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 1 0 100 30 6 35 8
+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 32 32
+  BIND BUFFER variant_framebuffer AS color LOCATION 0
+  BIND BUFFER variant_injectionSwitch AS uniform DESCRIPTOR_SET 0 BINDING 2
+  BIND BUFFER variant__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 1
+  BIND BUFFER variant__GLF_uniform_float_values AS uniform DESCRIPTOR_SET 0 BINDING 0
+END
+CLEAR_COLOR variant_pipeline 0 0 0 255
+
+CLEAR variant_pipeline
+RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 32 32
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 255 0 0 255
diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-nested-functions-vec4-array-element-argument.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-nested-functions-vec4-array-element-argument.amber
new file mode 100644 (file)
index 0000000..f3865f7
--- /dev/null
@@ -0,0 +1,308 @@
+#!amber
+
+# Copyright 2022 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_8 _GLF_uniform_int_values[0]
+# #define _int_2 _GLF_uniform_int_values[1]
+# #define _int_0 _GLF_uniform_int_values[2]
+# #define _int_1 _GLF_uniform_int_values[3]
+# #define _int_3 _GLF_uniform_int_values[4]
+# #define _float_0_0 _GLF_uniform_float_values[0]
+# #define _float_2_0 _GLF_uniform_float_values[1]
+#
+# precision highp float;
+# precision highp int;
+#
+# // Contents of _GLF_uniform_int_values: [8, 2, 0, 1, 3]
+# layout(set = 0, binding = 0) uniform buf0
+# {
+#     int _GLF_uniform_int_values[5];
+# };
+#
+# // Contents of _GLF_uniform_float_values: [0.0, 2.0]
+# layout(set = 0, binding = 1) uniform buf1
+# {
+#     float _GLF_uniform_float_values[2];
+# };
+#
+# // Contents of injectionSwitch: [0.0, 1.0]
+# layout(set = 0, binding = 2) uniform buf2
+# {
+#     highp vec2 injectionSwitch;
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# // Returns true if v.y >= 2.0.
+# bool func0(vec4 v)
+# {
+#     // Always false.
+#     while(injectionSwitch.x < _float_0_0)
+#     {
+#         return false;
+#     }
+#
+#     if(v.y < _float_2_0)
+#     {
+#         return false;
+#     }
+#
+#     return true;
+# }
+#
+# // Returns 2.
+# int func1()
+# {
+#     int a = _int_0;
+#
+#     // Iterates seven times.
+#     for(int i = _int_1; i < _int_8; i++)
+#     {
+#         if(func0(vec4[8](vec4(_int_1), vec4(_int_1), vec4(_int_3), vec4(_int_1), vec4(_int_1), vec4(_int_1), vec4(_int_1), vec4(_int_1))[i]))
+#         {
+#             a = i;
+#         }
+#     }
+#
+#     return a;
+# }
+#
+# void main()
+# {
+#     // Always true.
+#     if(func1() == _int_2)
+#     {
+#         _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1);
+#     }
+#     else
+#     {
+#         _GLF_color = vec4(_int_0);
+#     }
+# }
+SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 10
+; Bound: 275
+; Schema: 0
+               OpCapability Shader
+          %1 = OpExtInstImport "GLSL.std.450"
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %4 "main" %139
+               OpExecutionMode %4 OriginUpperLeft
+               OpSource ESSL 320
+               OpName %4 "main"
+               OpName %24 "buf2"
+               OpMemberName %24 0 "injectionSwitch"
+               OpName %26 ""
+               OpName %35 "buf1"
+               OpMemberName %35 0 "_GLF_uniform_float_values"
+               OpName %37 ""
+               OpName %61 "buf0"
+               OpMemberName %61 0 "_GLF_uniform_int_values"
+               OpName %63 ""
+               OpName %139 "_GLF_color"
+               OpMemberDecorate %24 0 Offset 0
+               OpDecorate %24 Block
+               OpDecorate %26 DescriptorSet 0
+               OpDecorate %26 Binding 2
+               OpDecorate %34 ArrayStride 16
+               OpMemberDecorate %35 0 Offset 0
+               OpDecorate %35 Block
+               OpDecorate %37 DescriptorSet 0
+               OpDecorate %37 Binding 1
+               OpDecorate %60 ArrayStride 16
+               OpMemberDecorate %61 0 Offset 0
+               OpDecorate %61 Block
+               OpDecorate %63 DescriptorSet 0
+               OpDecorate %63 Binding 0
+               OpDecorate %139 Location 0
+          %2 = OpTypeVoid
+          %3 = OpTypeFunction %2
+          %6 = OpTypeFloat 32
+          %7 = OpTypeVector %6 4
+          %8 = OpTypePointer Function %7
+          %9 = OpTypeBool
+         %14 = OpTypeInt 32 1
+         %23 = OpTypeVector %6 2
+         %24 = OpTypeStruct %23
+         %25 = OpTypePointer Uniform %24
+         %26 = OpVariable %25 Uniform
+         %27 = OpConstant %14 0
+         %28 = OpTypeInt 32 0
+         %29 = OpConstant %28 0
+         %30 = OpTypePointer Uniform %6
+         %33 = OpConstant %28 2
+         %34 = OpTypeArray %6 %33
+         %35 = OpTypeStruct %34
+         %36 = OpTypePointer Uniform %35
+         %37 = OpVariable %36 Uniform
+         %41 = OpConstantFalse %9
+         %47 = OpConstant %14 1
+         %54 = OpConstantTrue %9
+         %59 = OpConstant %28 5
+         %60 = OpTypeArray %14 %59
+         %61 = OpTypeStruct %60
+         %62 = OpTypePointer Uniform %61
+         %63 = OpVariable %62 Uniform
+         %64 = OpConstant %14 2
+         %65 = OpTypePointer Uniform %14
+         %69 = OpConstant %14 3
+         %89 = OpConstant %14 4
+        %114 = OpConstant %28 8
+        %115 = OpTypeArray %7 %114
+        %119 = OpTypePointer Function %115
+        %138 = OpTypePointer Output %7
+        %139 = OpVariable %138 Output
+        %263 = OpUndef %9
+          %4 = OpFunction %2 None %3
+          %5 = OpLabel
+        %169 = OpVariable %119 Function
+        %172 = OpAccessChain %65 %63 %27 %64
+        %173 = OpLoad %14 %172
+        %174 = OpAccessChain %65 %63 %27 %69
+        %175 = OpLoad %14 %174
+               OpBranch %176
+        %176 = OpLabel
+        %262 = OpPhi %9 %263 %5 %259 %223
+        %256 = OpPhi %14 %173 %5 %274 %223
+        %255 = OpPhi %14 %175 %5 %225 %223
+        %179 = OpAccessChain %65 %63 %27 %27
+        %180 = OpLoad %14 %179
+        %181 = OpSLessThan %9 %255 %180
+               OpLoopMerge %226 %223 None
+               OpBranchConditional %181 %182 %226
+        %182 = OpLabel
+        %185 = OpConvertSToF %6 %175
+        %186 = OpCompositeConstruct %7 %185 %185 %185 %185
+        %191 = OpAccessChain %65 %63 %27 %89
+        %192 = OpLoad %14 %191
+        %193 = OpConvertSToF %6 %192
+        %194 = OpCompositeConstruct %7 %193 %193 %193 %193
+        %215 = OpCompositeConstruct %115 %186 %186 %194 %186 %186 %186 %186 %186
+               OpStore %169 %215
+        %217 = OpAccessChain %8 %169 %255
+        %218 = OpLoad %7 %217
+               OpSelectionMerge %252 None
+               OpSwitch %29 %232
+        %232 = OpLabel
+               OpBranch %233
+        %233 = OpLabel
+        %235 = OpAccessChain %30 %26 %27 %29
+        %236 = OpLoad %6 %235
+        %237 = OpAccessChain %30 %37 %27 %27
+        %238 = OpLoad %6 %237
+        %239 = OpFOrdLessThan %9 %236 %238
+               OpLoopMerge %242 %241 None
+               OpBranchConditional %239 %240 %242
+        %240 = OpLabel
+               OpBranch %242
+        %241 = OpLabel
+               OpBranch %233
+        %242 = OpLabel
+        %260 = OpPhi %9 %262 %233 %41 %240
+        %257 = OpPhi %9 %41 %233 %54 %240
+               OpSelectionMerge %244 None
+               OpBranchConditional %257 %252 %244
+        %244 = OpLabel
+        %246 = OpCompositeExtract %6 %218 1
+        %247 = OpAccessChain %30 %37 %27 %47
+        %248 = OpLoad %6 %247
+        %249 = OpFOrdLessThan %9 %246 %248
+               OpSelectionMerge %251 None
+               OpBranchConditional %249 %250 %251
+        %250 = OpLabel
+               OpBranch %252
+        %251 = OpLabel
+               OpBranch %252
+        %252 = OpLabel
+        %259 = OpPhi %9 %260 %242 %41 %250 %54 %251
+        %274 = OpSelect %14 %259 %255 %256
+               OpBranch %223
+        %223 = OpLabel
+        %225 = OpIAdd %14 %255 %47
+               OpBranch %176
+        %226 = OpLabel
+        %133 = OpAccessChain %65 %63 %27 %47
+        %134 = OpLoad %14 %133
+        %135 = OpIEqual %9 %256 %134
+               OpSelectionMerge %137 None
+               OpBranchConditional %135 %136 %153
+        %153 = OpLabel
+        %156 = OpConvertSToF %6 %173
+        %157 = OpCompositeConstruct %7 %156 %156 %156 %156
+               OpStore %139 %157
+               OpBranch %137
+        %136 = OpLabel
+        %142 = OpConvertSToF %6 %175
+        %145 = OpConvertSToF %6 %173
+        %152 = OpCompositeConstruct %7 %142 %145 %145 %142
+               OpStore %139 %152
+               OpBranch %137
+        %137 = OpLabel
+               OpReturn
+               OpFunctionEnd
+END
+
+# uniforms for variant
+
+# injectionSwitch
+BUFFER variant_injectionSwitch DATA_TYPE vec2<float> STD140 DATA
+ 0.0 1.0
+END
+# _GLF_uniform_float_values
+BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA
+ 0.0 2.0
+END
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 8 2 0 1 3
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+  ATTACH variant_vertex_shader
+  ATTACH variant_fragment_shader
+  FRAMEBUFFER_SIZE 32 32
+  BIND BUFFER variant_framebuffer AS color LOCATION 0
+  BIND BUFFER variant_injectionSwitch AS uniform DESCRIPTOR_SET 0 BINDING 2
+  BIND BUFFER variant__GLF_uniform_float_values AS uniform DESCRIPTOR_SET 0 BINDING 1
+  BIND BUFFER variant__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 0
+END
+CLEAR_COLOR variant_pipeline 0 0 0 255
+
+CLEAR variant_pipeline
+RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 32 32
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 255 0 0 255
diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-nested-loops-global-loop-counter-reached-second-iteration.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-nested-loops-global-loop-counter-reached-second-iteration.amber
new file mode 100644 (file)
index 0000000..d6ce092
--- /dev/null
@@ -0,0 +1,309 @@
+#!amber
+
+# Copyright 2022 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_2 _GLF_uniform_int_values[2]
+#
+# precision highp float;
+# precision highp int;
+#
+# // Contents of _GLF_uniform_int_values: [1, 0, 2]
+# layout(set = 0, binding = 0) uniform buf0
+# {
+#     int _GLF_uniform_int_values[3];
+# };
+#
+# const int _GLF_global_loop_bound = 10;
+# int _GLF_global_loop_count = 0;
+#
+# // Contents of injectionSwitch: [0.0, 1.0]
+# layout(set = 0, binding = 1) uniform buf1
+# {
+#     vec2 injectionSwitch;
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# void main()
+# {
+#     int a = _int_0;
+#
+#     // Iterates twice.
+#     for(int i = _int_1; _GLF_global_loop_count < _GLF_global_loop_bound; i = _int_2)
+#     {
+#         _GLF_global_loop_count++;
+#
+#         int b = i - int(injectionSwitch.x) + int(max(injectionSwitch, injectionSwitch).x) - 1;
+#
+#         // Loops until the global loop bound is reached, but only during the second iteration
+#         // when i == 2.
+#         while(b >= _int_1 && _GLF_global_loop_count < _GLF_global_loop_bound)
+#         {
+#             _GLF_global_loop_count++;
+#         }
+#
+#         // Iterates once when i == 1. The global loop bound is already reached when i == 2.
+#         for(int j = _int_1; j <= i && _GLF_global_loop_count < _GLF_global_loop_bound; j++)
+#         {
+#             _GLF_global_loop_count++;
+#             a++;
+#         }
+#     }
+#
+#     // Always true.
+#     if(a == _int_1)
+#     {
+#         _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1);
+#     }
+#     else
+#     {
+#         _GLF_color = vec4(_int_0);
+#     }
+# }
+SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 10
+; Bound: 123
+; Schema: 0
+               OpCapability Shader
+          %1 = OpExtInstImport "GLSL.std.450"
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %4 "main" %104
+               OpExecutionMode %4 OriginUpperLeft
+               OpSource ESSL 320
+               OpName %4 "main"
+               OpName %8 "_GLF_global_loop_count"
+               OpName %11 "a"
+               OpName %15 "buf0"
+               OpMemberName %15 0 "_GLF_uniform_int_values"
+               OpName %17 ""
+               OpName %22 "i"
+               OpName %36 "b"
+               OpName %40 "buf1"
+               OpMemberName %40 0 "injectionSwitch"
+               OpName %42 ""
+               OpName %73 "j"
+               OpName %104 "_GLF_color"
+               OpDecorate %14 ArrayStride 16
+               OpMemberDecorate %15 0 Offset 0
+               OpDecorate %15 Block
+               OpDecorate %17 DescriptorSet 0
+               OpDecorate %17 Binding 0
+               OpMemberDecorate %40 0 Offset 0
+               OpDecorate %40 Block
+               OpDecorate %42 DescriptorSet 0
+               OpDecorate %42 Binding 1
+               OpDecorate %104 Location 0
+          %2 = OpTypeVoid
+          %3 = OpTypeFunction %2
+          %6 = OpTypeInt 32 1
+          %7 = OpTypePointer Private %6
+          %8 = OpVariable %7 Private
+          %9 = OpConstant %6 0
+         %10 = OpTypePointer Function %6
+         %12 = OpTypeInt 32 0
+         %13 = OpConstant %12 3
+         %14 = OpTypeArray %6 %13
+         %15 = OpTypeStruct %14
+         %16 = OpTypePointer Uniform %15
+         %17 = OpVariable %16 Uniform
+         %18 = OpConstant %6 1
+         %19 = OpTypePointer Uniform %6
+         %31 = OpConstant %6 10
+         %32 = OpTypeBool
+         %38 = OpTypeFloat 32
+         %39 = OpTypeVector %38 2
+         %40 = OpTypeStruct %39
+         %41 = OpTypePointer Uniform %40
+         %42 = OpVariable %41 Uniform
+         %43 = OpConstant %12 0
+         %44 = OpTypePointer Uniform %38
+         %49 = OpTypePointer Uniform %39
+         %93 = OpConstant %6 2
+        %102 = OpTypeVector %38 4
+        %103 = OpTypePointer Output %102
+        %104 = OpVariable %103 Output
+          %4 = OpFunction %2 None %3
+          %5 = OpLabel
+         %11 = OpVariable %10 Function
+         %22 = OpVariable %10 Function
+         %36 = OpVariable %10 Function
+         %73 = OpVariable %10 Function
+               OpStore %8 %9
+         %20 = OpAccessChain %19 %17 %9 %18
+         %21 = OpLoad %6 %20
+               OpStore %11 %21
+         %23 = OpAccessChain %19 %17 %9 %9
+         %24 = OpLoad %6 %23
+               OpStore %22 %24
+               OpBranch %25
+         %25 = OpLabel
+               OpLoopMerge %27 %28 None
+               OpBranch %29
+         %29 = OpLabel
+         %30 = OpLoad %6 %8
+         %33 = OpSLessThan %32 %30 %31
+               OpBranchConditional %33 %26 %27
+         %26 = OpLabel
+         %34 = OpLoad %6 %8
+         %35 = OpIAdd %6 %34 %18
+               OpStore %8 %35
+         %37 = OpLoad %6 %22
+         %45 = OpAccessChain %44 %42 %9 %43
+         %46 = OpLoad %38 %45
+         %47 = OpConvertFToS %6 %46
+         %48 = OpISub %6 %37 %47
+         %50 = OpAccessChain %49 %42 %9
+         %51 = OpLoad %39 %50
+         %52 = OpAccessChain %49 %42 %9
+         %53 = OpLoad %39 %52
+         %54 = OpExtInst %39 %1 FMax %51 %53
+         %55 = OpCompositeExtract %38 %54 0
+         %56 = OpConvertFToS %6 %55
+         %57 = OpIAdd %6 %48 %56
+         %58 = OpISub %6 %57 %18
+               OpStore %36 %58
+               OpBranch %59
+         %59 = OpLabel
+               OpLoopMerge %61 %62 None
+               OpBranch %63
+         %63 = OpLabel
+         %64 = OpLoad %6 %36
+         %65 = OpAccessChain %19 %17 %9 %9
+         %66 = OpLoad %6 %65
+         %67 = OpSGreaterThanEqual %32 %64 %66
+         %68 = OpLoad %6 %8
+         %69 = OpSLessThan %32 %68 %31
+         %70 = OpLogicalAnd %32 %67 %69
+               OpBranchConditional %70 %60 %61
+         %60 = OpLabel
+         %71 = OpLoad %6 %8
+         %72 = OpIAdd %6 %71 %18
+               OpStore %8 %72
+               OpBranch %62
+         %62 = OpLabel
+               OpBranch %59
+         %61 = OpLabel
+         %74 = OpAccessChain %19 %17 %9 %9
+         %75 = OpLoad %6 %74
+               OpStore %73 %75
+               OpBranch %76
+         %76 = OpLabel
+               OpLoopMerge %78 %79 None
+               OpBranch %80
+         %80 = OpLabel
+         %81 = OpLoad %6 %73
+         %82 = OpLoad %6 %22
+         %83 = OpSLessThanEqual %32 %81 %82
+         %84 = OpLoad %6 %8
+         %85 = OpSLessThan %32 %84 %31
+         %86 = OpLogicalAnd %32 %83 %85
+               OpBranchConditional %86 %77 %78
+         %77 = OpLabel
+         %87 = OpLoad %6 %8
+         %88 = OpIAdd %6 %87 %18
+               OpStore %8 %88
+         %89 = OpLoad %6 %11
+         %90 = OpIAdd %6 %89 %18
+               OpStore %11 %90
+               OpBranch %79
+         %79 = OpLabel
+         %91 = OpLoad %6 %73
+         %92 = OpIAdd %6 %91 %18
+               OpStore %73 %92
+               OpBranch %76
+         %78 = OpLabel
+               OpBranch %28
+         %28 = OpLabel
+         %94 = OpAccessChain %19 %17 %9 %93
+         %95 = OpLoad %6 %94
+               OpStore %22 %95
+               OpBranch %25
+         %27 = OpLabel
+         %96 = OpLoad %6 %11
+         %97 = OpAccessChain %19 %17 %9 %9
+         %98 = OpLoad %6 %97
+         %99 = OpIEqual %32 %96 %98
+               OpSelectionMerge %101 None
+               OpBranchConditional %99 %100 %118
+        %100 = OpLabel
+        %105 = OpAccessChain %19 %17 %9 %9
+        %106 = OpLoad %6 %105
+        %107 = OpConvertSToF %38 %106
+        %108 = OpAccessChain %19 %17 %9 %18
+        %109 = OpLoad %6 %108
+        %110 = OpConvertSToF %38 %109
+        %111 = OpAccessChain %19 %17 %9 %18
+        %112 = OpLoad %6 %111
+        %113 = OpConvertSToF %38 %112
+        %114 = OpAccessChain %19 %17 %9 %9
+        %115 = OpLoad %6 %114
+        %116 = OpConvertSToF %38 %115
+        %117 = OpCompositeConstruct %102 %107 %110 %113 %116
+               OpStore %104 %117
+               OpBranch %101
+        %118 = OpLabel
+        %119 = OpAccessChain %19 %17 %9 %18
+        %120 = OpLoad %6 %119
+        %121 = OpConvertSToF %38 %120
+        %122 = OpCompositeConstruct %102 %121 %121 %121 %121
+               OpStore %104 %122
+               OpBranch %101
+        %101 = OpLabel
+               OpReturn
+               OpFunctionEnd
+END
+
+# uniforms for variant
+
+# injectionSwitch
+BUFFER variant_injectionSwitch DATA_TYPE vec2<float> STD140 DATA
+ 0.0 1.0
+END
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 1 0 2
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+  ATTACH variant_vertex_shader
+  ATTACH variant_fragment_shader
+  FRAMEBUFFER_SIZE 32 32
+  BIND BUFFER variant_framebuffer AS color LOCATION 0
+  BIND BUFFER variant_injectionSwitch 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 32 32
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 255 0 0 255
diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-two-loops-global-loop-counter-clamp-ivec-elements-index-array.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-two-loops-global-loop-counter-clamp-ivec-elements-index-array.amber
new file mode 100644 (file)
index 0000000..1fab690
--- /dev/null
@@ -0,0 +1,394 @@
+#!amber
+
+# Copyright 2022 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_0_0 _GLF_uniform_float_values[0]
+# #define _float_1_0 _GLF_uniform_float_values[1]
+#
+# precision highp float;
+# precision highp int;
+#
+# // Contents of _GLF_uniform_float_values: [0.0, 1.0]
+# layout(set = 0, binding = 0) uniform buf0
+# {
+#     float _GLF_uniform_float_values[2];
+# };
+#
+# // 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 = 90;
+# int _GLF_global_loop_count = 0;
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# void main()
+# {
+#     int arr0[20] = int[20](_int_0, _int_1, _int_0, _int_0, _int_0, _int_0, _int_0, _int_0, _int_0, _int_0, _int_0, _int_0, _int_0, _int_0, _int_0, _int_0, _int_0, _int_0, _int_0, _int_0);
+#     float arr1[2] = float[2](_float_0_0, _float_1_0);
+#     int a = 1;
+#
+#     // Iterates six times.
+#     do
+#     {
+#         _GLF_global_loop_count++;
+#
+#         if(a++ >= 6)
+#         {
+#             break;
+#         }
+#
+#         arr1[_int_0] = arr1[_int_1];
+#     }
+#     while(_GLF_global_loop_count < _GLF_global_loop_bound);
+#
+#     // Iterates until global loop count is reached.
+#     while(_GLF_global_loop_count < _GLF_global_loop_bound)
+#     {
+#         _GLF_global_loop_count++;
+#         ivec2 v = ivec2(1, 20);
+#
+#         // Always true.
+#         if(arr0[_int_1] == _int_1)
+#         {
+#             v.x -= 1;
+#         }
+#
+#         // Always true.
+#         if(arr0[19] == 0)
+#         {
+#             // arr0[19] = 1.
+#             arr0[clamp(v.x + v.y * 16, _int_0, 19)] = 1;
+#         }
+#     }
+#
+#     // Always true.
+#     if(arr0[19] == _int_1 && arr1[_int_0] == _float_1_0)
+#     {
+#         _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1);
+#     }
+#     else
+#     {
+#         _GLF_color = vec4(_int_0);
+#     }
+# }
+SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 10
+; Bound: 188
+; Schema: 0
+               OpCapability Shader
+          %1 = OpExtInstImport "GLSL.std.450"
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %4 "main" %169
+               OpExecutionMode %4 OriginUpperLeft
+               OpSource ESSL 320
+               OpName %4 "main"
+               OpName %8 "_GLF_global_loop_count"
+               OpName %14 "arr0"
+               OpName %17 "buf1"
+               OpMemberName %17 0 "_GLF_uniform_int_values"
+               OpName %19 ""
+               OpName %66 "arr1"
+               OpName %68 "buf0"
+               OpMemberName %68 0 "_GLF_uniform_float_values"
+               OpName %70 ""
+               OpName %78 "a"
+               OpName %115 "v"
+               OpName %169 "_GLF_color"
+               OpDecorate %16 ArrayStride 16
+               OpMemberDecorate %17 0 Offset 0
+               OpDecorate %17 Block
+               OpDecorate %19 DescriptorSet 0
+               OpDecorate %19 Binding 1
+               OpDecorate %67 ArrayStride 16
+               OpMemberDecorate %68 0 Offset 0
+               OpDecorate %68 Block
+               OpDecorate %70 DescriptorSet 0
+               OpDecorate %70 Binding 0
+               OpDecorate %169 Location 0
+          %2 = OpTypeVoid
+          %3 = OpTypeFunction %2
+          %6 = OpTypeInt 32 1
+          %7 = OpTypePointer Private %6
+          %8 = OpVariable %7 Private
+          %9 = OpConstant %6 0
+         %10 = OpTypeInt 32 0
+         %11 = OpConstant %10 20
+         %12 = OpTypeArray %6 %11
+         %13 = OpTypePointer Function %12
+         %15 = OpConstant %10 2
+         %16 = OpTypeArray %6 %15
+         %17 = OpTypeStruct %16
+         %18 = OpTypePointer Uniform %17
+         %19 = OpVariable %18 Uniform
+         %20 = OpTypePointer Uniform %6
+         %23 = OpConstant %6 1
+         %63 = OpTypeFloat 32
+         %64 = OpTypeArray %63 %15
+         %65 = OpTypePointer Function %64
+         %67 = OpTypeArray %63 %15
+         %68 = OpTypeStruct %67
+         %69 = OpTypePointer Uniform %68
+         %70 = OpVariable %69 Uniform
+         %71 = OpTypePointer Uniform %63
+         %77 = OpTypePointer Function %6
+         %87 = OpConstant %6 6
+         %88 = OpTypeBool
+         %97 = OpTypePointer Function %63
+        %102 = OpConstant %6 90
+        %113 = OpTypeVector %6 2
+        %114 = OpTypePointer Function %113
+        %116 = OpConstant %6 20
+        %117 = OpConstantComposite %113 %23 %116
+        %127 = OpConstant %10 0
+        %132 = OpConstant %6 19
+        %140 = OpConstant %10 1
+        %143 = OpConstant %6 16
+        %167 = OpTypeVector %63 4
+        %168 = OpTypePointer Output %167
+        %169 = OpVariable %168 Output
+          %4 = OpFunction %2 None %3
+          %5 = OpLabel
+         %14 = OpVariable %13 Function
+         %66 = OpVariable %65 Function
+         %78 = OpVariable %77 Function
+        %115 = OpVariable %114 Function
+               OpStore %8 %9
+         %21 = OpAccessChain %20 %19 %9 %9
+         %22 = OpLoad %6 %21
+         %24 = OpAccessChain %20 %19 %9 %23
+         %25 = OpLoad %6 %24
+         %26 = OpAccessChain %20 %19 %9 %9
+         %27 = OpLoad %6 %26
+         %28 = OpAccessChain %20 %19 %9 %9
+         %29 = OpLoad %6 %28
+         %30 = OpAccessChain %20 %19 %9 %9
+         %31 = OpLoad %6 %30
+         %32 = OpAccessChain %20 %19 %9 %9
+         %33 = OpLoad %6 %32
+         %34 = OpAccessChain %20 %19 %9 %9
+         %35 = OpLoad %6 %34
+         %36 = OpAccessChain %20 %19 %9 %9
+         %37 = OpLoad %6 %36
+         %38 = OpAccessChain %20 %19 %9 %9
+         %39 = OpLoad %6 %38
+         %40 = OpAccessChain %20 %19 %9 %9
+         %41 = OpLoad %6 %40
+         %42 = OpAccessChain %20 %19 %9 %9
+         %43 = OpLoad %6 %42
+         %44 = OpAccessChain %20 %19 %9 %9
+         %45 = OpLoad %6 %44
+         %46 = OpAccessChain %20 %19 %9 %9
+         %47 = OpLoad %6 %46
+         %48 = OpAccessChain %20 %19 %9 %9
+         %49 = OpLoad %6 %48
+         %50 = OpAccessChain %20 %19 %9 %9
+         %51 = OpLoad %6 %50
+         %52 = OpAccessChain %20 %19 %9 %9
+         %53 = OpLoad %6 %52
+         %54 = OpAccessChain %20 %19 %9 %9
+         %55 = OpLoad %6 %54
+         %56 = OpAccessChain %20 %19 %9 %9
+         %57 = OpLoad %6 %56
+         %58 = OpAccessChain %20 %19 %9 %9
+         %59 = OpLoad %6 %58
+         %60 = OpAccessChain %20 %19 %9 %9
+         %61 = OpLoad %6 %60
+         %62 = OpCompositeConstruct %12 %22 %25 %27 %29 %31 %33 %35 %37 %39 %41 %43 %45 %47 %49 %51 %53 %55 %57 %59 %61
+               OpStore %14 %62
+         %72 = OpAccessChain %71 %70 %9 %9
+         %73 = OpLoad %63 %72
+         %74 = OpAccessChain %71 %70 %9 %23
+         %75 = OpLoad %63 %74
+         %76 = OpCompositeConstruct %64 %73 %75
+               OpStore %66 %76
+               OpStore %78 %23
+               OpBranch %79
+         %79 = OpLabel
+               OpLoopMerge %81 %82 None
+               OpBranch %80
+         %80 = OpLabel
+         %83 = OpLoad %6 %8
+         %84 = OpIAdd %6 %83 %23
+               OpStore %8 %84
+         %85 = OpLoad %6 %78
+         %86 = OpIAdd %6 %85 %23
+               OpStore %78 %86
+         %89 = OpSGreaterThanEqual %88 %85 %87
+               OpSelectionMerge %91 None
+               OpBranchConditional %89 %90 %91
+         %90 = OpLabel
+               OpBranch %81
+         %91 = OpLabel
+         %93 = OpAccessChain %20 %19 %9 %9
+         %94 = OpLoad %6 %93
+         %95 = OpAccessChain %20 %19 %9 %23
+         %96 = OpLoad %6 %95
+         %98 = OpAccessChain %97 %66 %96
+         %99 = OpLoad %63 %98
+        %100 = OpAccessChain %97 %66 %94
+               OpStore %100 %99
+               OpBranch %82
+         %82 = OpLabel
+        %101 = OpLoad %6 %8
+        %103 = OpSLessThan %88 %101 %102
+               OpBranchConditional %103 %79 %81
+         %81 = OpLabel
+               OpBranch %104
+        %104 = OpLabel
+               OpLoopMerge %106 %107 None
+               OpBranch %108
+        %108 = OpLabel
+        %109 = OpLoad %6 %8
+        %110 = OpSLessThan %88 %109 %102
+               OpBranchConditional %110 %105 %106
+        %105 = OpLabel
+        %111 = OpLoad %6 %8
+        %112 = OpIAdd %6 %111 %23
+               OpStore %8 %112
+               OpStore %115 %117
+        %118 = OpAccessChain %20 %19 %9 %23
+        %119 = OpLoad %6 %118
+        %120 = OpAccessChain %77 %14 %119
+        %121 = OpLoad %6 %120
+        %122 = OpAccessChain %20 %19 %9 %23
+        %123 = OpLoad %6 %122
+        %124 = OpIEqual %88 %121 %123
+               OpSelectionMerge %126 None
+               OpBranchConditional %124 %125 %126
+        %125 = OpLabel
+        %128 = OpAccessChain %77 %115 %127
+        %129 = OpLoad %6 %128
+        %130 = OpISub %6 %129 %23
+        %131 = OpAccessChain %77 %115 %127
+               OpStore %131 %130
+               OpBranch %126
+        %126 = OpLabel
+        %133 = OpAccessChain %77 %14 %132
+        %134 = OpLoad %6 %133
+        %135 = OpIEqual %88 %134 %9
+               OpSelectionMerge %137 None
+               OpBranchConditional %135 %136 %137
+        %136 = OpLabel
+        %138 = OpAccessChain %77 %115 %127
+        %139 = OpLoad %6 %138
+        %141 = OpAccessChain %77 %115 %140
+        %142 = OpLoad %6 %141
+        %144 = OpIMul %6 %142 %143
+        %145 = OpIAdd %6 %139 %144
+        %146 = OpAccessChain %20 %19 %9 %9
+        %147 = OpLoad %6 %146
+        %148 = OpExtInst %6 %1 SClamp %145 %147 %132
+        %149 = OpAccessChain %77 %14 %148
+               OpStore %149 %23
+               OpBranch %137
+        %137 = OpLabel
+               OpBranch %107
+        %107 = OpLabel
+               OpBranch %104
+        %106 = OpLabel
+        %150 = OpAccessChain %77 %14 %132
+        %151 = OpLoad %6 %150
+        %152 = OpAccessChain %20 %19 %9 %23
+        %153 = OpLoad %6 %152
+        %154 = OpIEqual %88 %151 %153
+               OpSelectionMerge %156 None
+               OpBranchConditional %154 %155 %156
+        %155 = OpLabel
+        %157 = OpAccessChain %20 %19 %9 %9
+        %158 = OpLoad %6 %157
+        %159 = OpAccessChain %97 %66 %158
+        %160 = OpLoad %63 %159
+        %161 = OpAccessChain %71 %70 %9 %23
+        %162 = OpLoad %63 %161
+        %163 = OpFOrdEqual %88 %160 %162
+               OpBranch %156
+        %156 = OpLabel
+        %164 = OpPhi %88 %154 %106 %163 %155
+               OpSelectionMerge %166 None
+               OpBranchConditional %164 %165 %183
+        %165 = OpLabel
+        %170 = OpAccessChain %20 %19 %9 %23
+        %171 = OpLoad %6 %170
+        %172 = OpConvertSToF %63 %171
+        %173 = OpAccessChain %20 %19 %9 %9
+        %174 = OpLoad %6 %173
+        %175 = OpConvertSToF %63 %174
+        %176 = OpAccessChain %20 %19 %9 %9
+        %177 = OpLoad %6 %176
+        %178 = OpConvertSToF %63 %177
+        %179 = OpAccessChain %20 %19 %9 %23
+        %180 = OpLoad %6 %179
+        %181 = OpConvertSToF %63 %180
+        %182 = OpCompositeConstruct %167 %172 %175 %178 %181
+               OpStore %169 %182
+               OpBranch %166
+        %183 = OpLabel
+        %184 = OpAccessChain %20 %19 %9 %9
+        %185 = OpLoad %6 %184
+        %186 = OpConvertSToF %63 %185
+        %187 = OpCompositeConstruct %167 %186 %186 %186 %186
+               OpStore %169 %187
+               OpBranch %166
+        %166 = OpLabel
+               OpReturn
+               OpFunctionEnd
+END
+
+# uniforms for variant
+
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 0 1
+END
+# _GLF_uniform_float_values
+BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA
+ 0.0 1.0
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+  ATTACH variant_vertex_shader
+  ATTACH variant_fragment_shader
+  FRAMEBUFFER_SIZE 32 32
+  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 32 32
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 255 0 0 255
diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-two-loops-never-iterated.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/cov-two-loops-never-iterated.amber
new file mode 100644 (file)
index 0000000..4719392
--- /dev/null
@@ -0,0 +1,215 @@
+#!amber
+
+# Copyright 2022 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]
+#
+# precision highp float;
+# precision highp int;
+#
+# // Contents of _GLF_uniform_int_values: [1, 0]
+# layout(set = 0, binding = 0) uniform buf0
+# {
+#     int _GLF_uniform_int_values[2];
+# };
+#
+# // Contents of one: 1
+# layout(set = 0, binding = 1) uniform buf1
+# {
+#     int one;
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# void main()
+# {
+#     _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1);
+#
+#     // Never iterated.
+#     for(int i = _int_1; one != _int_1; _int_1)
+#     {
+#         _GLF_color = vec4(_int_0);
+#     }
+#
+#     // Never iterated.
+#     for(int i = _int_1; i < one; 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: 73
+; Schema: 0
+               OpCapability Shader
+          %1 = OpExtInstImport "GLSL.std.450"
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %4 "main" %9
+               OpExecutionMode %4 OriginUpperLeft
+               OpSource ESSL 320
+               OpName %4 "main"
+               OpName %9 "_GLF_color"
+               OpName %14 "buf0"
+               OpMemberName %14 0 "_GLF_uniform_int_values"
+               OpName %16 ""
+               OpName %34 "i"
+               OpName %42 "buf1"
+               OpMemberName %42 0 "one"
+               OpName %44 ""
+               OpName %55 "i"
+               OpDecorate %9 Location 0
+               OpDecorate %13 ArrayStride 16
+               OpMemberDecorate %14 0 Offset 0
+               OpDecorate %14 Block
+               OpDecorate %16 DescriptorSet 0
+               OpDecorate %16 Binding 0
+               OpMemberDecorate %42 0 Offset 0
+               OpDecorate %42 Block
+               OpDecorate %44 DescriptorSet 0
+               OpDecorate %44 Binding 1
+          %2 = OpTypeVoid
+          %3 = OpTypeFunction %2
+          %6 = OpTypeFloat 32
+          %7 = OpTypeVector %6 4
+          %8 = OpTypePointer Output %7
+          %9 = OpVariable %8 Output
+         %10 = OpTypeInt 32 1
+         %11 = OpTypeInt 32 0
+         %12 = OpConstant %11 2
+         %13 = OpTypeArray %10 %12
+         %14 = OpTypeStruct %13
+         %15 = OpTypePointer Uniform %14
+         %16 = OpVariable %15 Uniform
+         %17 = OpConstant %10 0
+         %18 = OpTypePointer Uniform %10
+         %22 = OpConstant %10 1
+         %33 = OpTypePointer Function %10
+         %42 = OpTypeStruct %10
+         %43 = OpTypePointer Uniform %42
+         %44 = OpVariable %43 Uniform
+         %49 = OpTypeBool
+          %4 = OpFunction %2 None %3
+          %5 = OpLabel
+         %34 = OpVariable %33 Function
+         %55 = OpVariable %33 Function
+         %19 = OpAccessChain %18 %16 %17 %17
+         %20 = OpLoad %10 %19
+         %21 = OpConvertSToF %6 %20
+         %23 = OpAccessChain %18 %16 %17 %22
+         %24 = OpLoad %10 %23
+         %25 = OpConvertSToF %6 %24
+         %26 = OpAccessChain %18 %16 %17 %22
+         %27 = OpLoad %10 %26
+         %28 = OpConvertSToF %6 %27
+         %29 = OpAccessChain %18 %16 %17 %17
+         %30 = OpLoad %10 %29
+         %31 = OpConvertSToF %6 %30
+         %32 = OpCompositeConstruct %7 %21 %25 %28 %31
+               OpStore %9 %32
+         %35 = OpAccessChain %18 %16 %17 %17
+         %36 = OpLoad %10 %35
+               OpStore %34 %36
+               OpBranch %37
+         %37 = OpLabel
+               OpLoopMerge %39 %40 None
+               OpBranch %41
+         %41 = OpLabel
+         %45 = OpAccessChain %18 %44 %17
+         %46 = OpLoad %10 %45
+         %47 = OpAccessChain %18 %16 %17 %17
+         %48 = OpLoad %10 %47
+         %50 = OpINotEqual %49 %46 %48
+               OpBranchConditional %50 %38 %39
+         %38 = OpLabel
+         %51 = OpAccessChain %18 %16 %17 %22
+         %52 = OpLoad %10 %51
+         %53 = OpConvertSToF %6 %52
+         %54 = OpCompositeConstruct %7 %53 %53 %53 %53
+               OpStore %9 %54
+               OpBranch %40
+         %40 = OpLabel
+               OpBranch %37
+         %39 = OpLabel
+         %56 = OpAccessChain %18 %16 %17 %17
+         %57 = OpLoad %10 %56
+               OpStore %55 %57
+               OpBranch %58
+         %58 = OpLabel
+               OpLoopMerge %60 %61 None
+               OpBranch %62
+         %62 = OpLabel
+         %63 = OpLoad %10 %55
+         %64 = OpAccessChain %18 %44 %17
+         %65 = OpLoad %10 %64
+         %66 = OpSLessThan %49 %63 %65
+               OpBranchConditional %66 %59 %60
+         %59 = OpLabel
+         %67 = OpAccessChain %18 %16 %17 %22
+         %68 = OpLoad %10 %67
+         %69 = OpConvertSToF %6 %68
+         %70 = OpCompositeConstruct %7 %69 %69 %69 %69
+               OpStore %9 %70
+               OpBranch %61
+         %61 = OpLabel
+         %71 = OpLoad %10 %55
+         %72 = OpIAdd %10 %71 %22
+               OpStore %55 %72
+               OpBranch %58
+         %60 = OpLabel
+               OpReturn
+               OpFunctionEnd
+END
+
+# uniforms for variant
+
+# one
+BUFFER variant_one DATA_TYPE int32 STD140 DATA
+ 1
+END
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 1 0
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+  ATTACH variant_vertex_shader
+  ATTACH variant_fragment_shader
+  FRAMEBUFFER_SIZE 32 32
+  BIND BUFFER variant_framebuffer AS color LOCATION 0
+  BIND BUFFER variant_one AS uniform DESCRIPTOR_SET 0 BINDING 1
+  BIND BUFFER variant__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 0
+END
+CLEAR_COLOR variant_pipeline 0 0 0 255
+
+CLEAR variant_pipeline
+RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 32 32
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 255 0 0 255
index 9fecd25..144def6 100644 (file)
 {      "cov-function-divide-argument-until-lt-one.amber",                                                                                      "cov-function-divide-argument-until-lt-one",                                                                            "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-global-loop-counter-sample-texture.amber",                                                                        "cov-function-global-loop-counter-sample-texture",                                                                      "A fragment shader that covers specific LLVM code paths"                                                        },
+{      "cov-function-index-array-redundant-clamps.amber",                                                                                      "cov-function-index-array-redundant-clamps",                                                                            "A fragment shader that covers specific LLVM code paths"                                                        },
 {      "cov-function-infinite-loop-always-return.amber",                                                                                       "cov-function-infinite-loop-always-return",                                                                                     "A fragment shader that covers specific LLVM code paths"                                                        },
 {      "cov-function-infinite-loop-return-identical-condition.amber",                                                          "cov-function-infinite-loop-return-identical-condition",                                                        "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-large-loop-break-argument-lte-global-loop-bound.amber",                                           "cov-function-large-loop-break-argument-lte-global-loop-bound",                                         "A fragment shader that covers specific LLVM code paths"                                                        },
 {      "cov-function-loop-check-determinant-zero-return-vector.amber",                                                         "cov-function-loop-check-determinant-zero-return-vector",                                                       "A fragment shader that covers specific LLVM code paths"                                                        },
 {      "cov-function-loop-clamp-no-effect.amber",                                                                                                      "cov-function-loop-clamp-no-effect",                                                                                            "A fragment shader that covers specific LLVM code paths"                                                        },
+{      "cov-function-loop-condition-constant-array-always-false.amber",                                                        "cov-function-loop-condition-constant-array-always-false",                                                      "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-loop-condition-variable-less-than-min-itself.amber",                                                      "cov-function-loop-condition-variable-less-than-min-itself",                                            "A fragment shader that covers specific LLVM code paths"                                                        },
 {      "cov-function-loop-copy-array-elements-based-on-arguments.amber",                                                       "cov-function-loop-copy-array-elements-based-on-arguments",                                                     "A fragment shader that covers specific LLVM code paths"                                                        },
 {      "cov-function-loop-modify-ivec-components-infinite-loop-never-executed.amber",                          "cov-function-loop-modify-ivec-components-infinite-loop-never-executed",                        "A fragment shader that covers specific LLVM code paths"                                                        },
 {      "cov-function-loop-same-conditions-multiple-times-struct-array.amber",                                          "cov-function-loop-same-conditions-multiple-times-struct-array",                                        "A fragment shader that covers specific LLVM code paths"                                                        },
 {      "cov-function-loop-switch-increment-array-element-return.amber",                                                        "cov-function-loop-switch-increment-array-element-return",                                                      "A fragment shader that covers specific LLVM code paths"                                                        },
+{      "cov-function-max-all-ones-select-always-true.amber",                                                                           "cov-function-max-all-ones-select-always-true",                                                                         "A fragment shader that covers specific LLVM code paths"                                                        },
 {      "cov-function-min-integer-large-shift-unused.amber",                                                                            "cov-function-min-integer-large-shift-unused",                                                                          "A fragment shader that covers specific LLVM code paths"                                                        },
 {      "cov-function-loop-variable-multiplied-unused.amber",                                                                           "cov-function-loop-variable-multiplied-unused",                                                                         "A fragment shader that covers specific LLVM code paths"                                                        },
 {      "cov-function-loops-vector-mul-matrix-never-executed.amber",                                                            "cov-function-loops-vector-mul-matrix-never-executed",                                                          "A fragment shader that covers specific LLVM code paths"                                                        },
 {      "cov-function-set-struct-field-zero-loop-reset-first-element.amber",                                            "cov-function-set-struct-field-zero-loop-reset-first-element",                                          "A fragment shader that covers specific LLVM code paths"                                                        },
 {      "cov-function-parameter-zero-divided-by-uniform.amber",                                                                         "cov-function-parameter-zero-divided-by-uniform",                                                                       "A fragment shader that covers specific LLVM code paths"                                                        },
 {      "cov-function-round-unpack-half-2x16.amber",                                                                                            "cov-function-round-unpack-half-2x16",                                                                                          "A fragment shader that covers specific LLVM code paths"                                                        },
+{      "cov-function-struct-int-array-loop-check-element.amber",                                                                       "cov-function-struct-int-array-loop-check-element",                                                                     "A fragment shader that covers specific LLVM code paths"                                                        },
 {      "cov-function-switch-case-constant-clamp-transpose-identity-matrices.amber",                            "cov-function-switch-case-constant-clamp-transpose-identity-matrices",                          "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-loop-array-struct-field-index-array-with-uniforms.amber",                                                          "cov-loop-array-struct-field-index-array-with-uniforms",                                                        "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-break-fragcoord-x-empty-loop.amber",                                                                                          "cov-loop-break-fragcoord-x-empty-loop",                                                                                        "A fragment shader that covers specific LLVM code paths"                                                        },
 {      "cov-loop-clamp-to-one-empty-condition.amber",                                                                                          "cov-loop-clamp-to-one-empty-condition",                                                                                        "A fragment shader that covers specific NIR code paths"                                                         },
 {      "cov-loop-condition-bitfield-extract-set-array-elements.amber",                                                         "cov-loop-condition-bitfield-extract-set-array-elements",                                                       "A fragment shader that covers specific LLVM code paths"                                                        },
 {      "cov-loop-condition-clamp-vec-of-ones.amber",                                                                                           "cov-loop-condition-clamp-vec-of-ones",                                                                                         "A fragment shader that covers specific NIR code paths"                                                         },
+{      "cov-loop-condition-constant-struct-field-data.amber",                                                                          "cov-loop-condition-constant-struct-field-data",                                                                        "A fragment shader that covers specific LLVM code paths"                                                        },
 {      "cov-loop-condition-divide-by-uniform-always-false.amber",                                                                      "cov-loop-condition-divide-by-uniform-always-false",                                                            "A fragment shader that covers specific LLVM code paths"                                                        },
 {      "cov-loop-condition-double-negate.amber",                                                                                                       "cov-loop-condition-double-negate",                                                                                                     "A fragment shader that covers specific NIR code paths"                                                         },
 {      "cov-loop-condition-filter-some-iterations-never-discard.amber",                                                        "cov-loop-condition-filter-some-iterations-never-discard",                                                      "A fragment shader that covers specific LLVM code paths"                                                        },
 {      "cov-loop-fragcoord-identical-condition.amber",                                                                                         "cov-loop-fragcoord-identical-condition",                                                                                       "A fragment shader that covers specific LLVM code paths"                                                        },
 {      "cov-loop-global-counter-break-set-ivec-elements.amber",                                                                        "cov-loop-global-counter-break-set-ivec-elements",                                                                      "A fragment shader that covers specific LLVM code paths"                                                        },
 {      "cov-loop-function-call-negative-argument.amber",                                                                                       "cov-loop-function-call-negative-argument",                                                                                     "A fragment shader that covers specific LLVM code paths"                                                        },
+{      "cov-loop-global-counter-increment-iterator-select-uniform.amber",                                                      "cov-loop-global-counter-increment-iterator-select-uniform",                                            "A fragment shader that covers specific LLVM code paths"                                                        },
 {      "cov-loop-increase-iterator-condition-uniform-copy-array-elements.amber",                                       "cov-loop-increase-iterator-condition-uniform-copy-array-elements",                                     "A fragment shader that covers specific LLVM code paths"                                                        },
 {      "cov-loop-increment-array-elements-clamp-index.amber",                                                                          "cov-loop-increment-array-elements-clamp-index",                                                                        "A fragment shader that covers specific LLVM code paths"                                                        },
 {      "cov-loop-increment-array-index-array-usuborrow-feedback.amber",                                                        "cov-loop-increment-array-index-array-usuborrow-feedback",                                                      "A fragment shader that covers specific LLVM code paths"                                                        },
 {      "cov-loop-limiter-uniform-bitwise-and-one-always-break.amber",                                                          "cov-loop-limiter-uniform-bitwise-and-one-always-break",                                                        "A fragment shader that covers specific LLVM code paths"                                                        },
 {      "cov-loop-logical-xor.amber",                                                                                                                           "cov-loop-logical-xor",                                                                                                                         "A fragment shader that covers specific NIR code paths"                                                         },
 {      "cov-loop-multiple-iterator-variables-copy-array-elements.amber",                                                       "cov-loop-multiple-iterator-variables-copy-array-elements",                                                     "A fragment shader that covers specific LLVM code paths"                                                        },
+{      "cov-loop-never-iterated-constant-vector-condition.amber",                                                                      "cov-loop-never-iterated-constant-vector-condition",                                                            "A fragment shader that covers specific LLVM code paths"                                                        },
 {      "cov-loop-read-array-index-from-array-data.amber",                                                                                      "cov-loop-read-array-index-from-array-data",                                                                            "A fragment shader that covers specific LLVM code paths"                                                        },
 {      "cov-loop-max-divide-integer-by-ten.amber",                                                                                                     "cov-loop-max-divide-integer-by-ten",                                                                                           "A fragment shader that covers specific LLVM code paths"                                                        },
 {      "cov-loop-overwrite-sample-texture-as-color-output.amber",                                                                      "cov-loop-overwrite-sample-texture-as-color-output",                                                            "A fragment shader that covers specific LLVM 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-sampled-texel-integer-counter.amber",                                                                                         "cov-loop-sampled-texel-integer-counter",                                                                                       "A fragment shader that covers specific LLVM 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-fragcoord-while-iterates-once.amber",                                                                           "cov-loop-start-fragcoord-while-iterates-once",                                                                         "A fragment shader that covers specific LLVM code paths"                                                        },
 {      "cov-loop-start-from-one-switch-case-invalid-color-never-executed.amber",                                       "cov-loop-start-from-one-switch-case-invalid-color-never-executed",                                     "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-modulo-zero-never-executed.amber",                                                                                                         "cov-modulo-zero-never-executed",                                                                                                       "A fragment shader that covers specific NIR code paths"                                                         },
 {      "cov-multiple-fragcoord-conditions-false-never-return-sample-texture.amber",                            "cov-multiple-fragcoord-conditions-false-never-return-sample-texture",                          "A fragment shader that covers specific LLVM code paths"                                                        },
 {      "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-functions-global-never-change.amber",                                                                                     "cov-multiple-functions-global-never-change",                                                                           "A fragment shader that covers specific LLVM code paths"                                                        },
 {      "cov-multiple-loops-same-condition-always-false-global-loop-counter.amber",                                     "cov-multiple-loops-same-condition-always-false-global-loop-counter",                           "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-negative-integer-bitwise-or-uniform-increment-loop.amber",                                                         "cov-negative-integer-bitwise-or-uniform-increment-loop",                                                       "A fragment shader that covers specific LLVM 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-functions-vec4-array-element-argument.amber",                                                                       "cov-nested-functions-vec4-array-element-argument",                                                                     "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"                                                        },
 {      "cov-nested-loop-decrease-vector-components.amber",                                                                                     "cov-nested-loop-decrease-vector-components",                                                                           "A fragment shader that covers specific LLVM code paths"                                                        },
 {      "cov-nested-loop-initializer-value-increased-inside.amber",                                                                     "cov-nested-loop-initializer-value-increased-inside",                                                           "A fragment shader that covers specific LLVM code paths"                                                        },
 {      "cov-nested-loops-global-loop-counter-index-array-vec2.amber",                                                          "cov-nested-loops-global-loop-counter-index-array-vec2",                                                        "A fragment shader that covers specific LLVM code paths"                                                        },
 {      "cov-nested-loops-global-loop-counter-iterator-dependency.amber",                                                       "cov-nested-loops-global-loop-counter-iterator-dependency",                                                     "A fragment shader that covers specific LLVM code paths"                                                        },
 {      "cov-nested-loops-global-loop-counter-output-color-from-backup.amber",                                          "cov-nested-loops-global-loop-counter-output-color-from-backup",                                        "A fragment shader that covers specific LLVM code paths"                                                        },
+{      "cov-nested-loops-global-loop-counter-reached-second-iteration.amber",                                          "cov-nested-loops-global-loop-counter-reached-second-iteration",                                        "A fragment shader that covers specific LLVM code paths"                                                        },
 {      "cov-nested-loops-identical-iterator-names-multiply-divide.amber",                                                      "cov-nested-loops-identical-iterator-names-multiply-divide",                                            "A fragment shader that covers specific LLVM code paths"                                                        },
 {      "cov-nested-loops-identical-iterators-compare-same-array-elements.amber",                                       "cov-nested-loops-identical-iterators-compare-same-array-elements",                                     "A fragment shader that covers specific LLVM code paths"                                                        },
 {      "cov-nested-loops-increase-integer-dot-product.amber",                                                                          "cov-nested-loops-increase-integer-dot-product",                                                                        "A fragment shader that covers specific LLVM code paths"                                                        },
 {      "cov-trunc-fract-always-zero.amber",                                                                                                            "cov-trunc-fract-always-zero",                                                                                                          "A fragment shader that covers specific NIR code paths"                                                         },
 {      "cov-two-functions-loops-copy-elements-infinite-loops-never-executed.amber",                            "cov-two-functions-loops-copy-elements-infinite-loops-never-executed",                          "A fragment shader that covers specific LLVM code paths"                                                        },
 {      "cov-two-functions-modify-struct-array-element-return-from-loop.amber",                                         "cov-two-functions-modify-struct-array-element-return-from-loop",                                       "A fragment shader that covers specific LLVM code paths"                                                        },
+{      "cov-two-loops-global-loop-counter-clamp-ivec-elements-index-array.amber",                                      "cov-two-loops-global-loop-counter-clamp-ivec-elements-index-array",                            "A fragment shader that covers specific LLVM code paths"                                                        },
 {      "cov-two-loops-global-loop-counter-shift-right-zero-increment-array-element.amber",                     "cov-two-loops-global-loop-counter-shift-right-zero-increment-array-element",           "A fragment shader that covers specific LLVM code paths"                                                        },
 {      "cov-two-loops-increment-integer-global-counter-break-square-threshold.amber",                          "cov-two-loops-increment-integer-global-counter-break-square-threshold",                        "A fragment shader that covers specific LLVM code paths"                                                        },
+{      "cov-two-loops-never-iterated.amber",                                                                                                           "cov-two-loops-never-iterated",                                                                                                         "A fragment shader that covers specific LLVM code paths"                                                        },
 {      "cov-two-nested-loops-switch-case-matrix-array-increment.amber",                                                        "cov-two-nested-loops-switch-case-matrix-array-increment",                                                      "A fragment shader that covers specific LLVM code paths"                                                        },
 {      "cov-types-return-in-main-never-hit.amber",                                                                                                     "cov-types-return-in-main-never-hit",                                                                                           "A fragment shader that covers a specific types optimization path."                                     },
 {      "cov-uadd-carry-bit-count-index-array.amber",                                                                                           "cov-uadd-carry-bit-count-index-array",                                                                                         "A fragment shader that covers specific LLVM code paths"                                                        },
index c887501..20b7897 100644 (file)
@@ -186,18 +186,22 @@ dEQP-VK.graphicsfuzz.cov-function-call-twice-clamp-global-variable
 dEQP-VK.graphicsfuzz.cov-function-divide-argument-until-lt-one
 dEQP-VK.graphicsfuzz.cov-function-find-lsb-ivec2-one
 dEQP-VK.graphicsfuzz.cov-function-fragcoord-condition-always-return
+dEQP-VK.graphicsfuzz.cov-function-global-loop-counter-sample-texture
+dEQP-VK.graphicsfuzz.cov-function-index-array-redundant-clamps
 dEQP-VK.graphicsfuzz.cov-function-infinite-loop-always-return
 dEQP-VK.graphicsfuzz.cov-function-infinite-loop-return-identical-condition
 dEQP-VK.graphicsfuzz.cov-function-large-array-max-clamp
 dEQP-VK.graphicsfuzz.cov-function-large-loop-break-argument-lte-global-loop-bound
 dEQP-VK.graphicsfuzz.cov-function-loop-check-determinant-zero-return-vector
 dEQP-VK.graphicsfuzz.cov-function-loop-clamp-no-effect
+dEQP-VK.graphicsfuzz.cov-function-loop-condition-constant-array-always-false
 dEQP-VK.graphicsfuzz.cov-function-loop-condition-uniform-shift-right
 dEQP-VK.graphicsfuzz.cov-function-loop-condition-variable-less-than-min-itself
 dEQP-VK.graphicsfuzz.cov-function-loop-copy-array-elements-based-on-arguments
 dEQP-VK.graphicsfuzz.cov-function-loop-modify-ivec-components-infinite-loop-never-executed
 dEQP-VK.graphicsfuzz.cov-function-loop-same-conditions-multiple-times-struct-array
 dEQP-VK.graphicsfuzz.cov-function-loop-switch-increment-array-element-return
+dEQP-VK.graphicsfuzz.cov-function-max-all-ones-select-always-true
 dEQP-VK.graphicsfuzz.cov-function-min-integer-large-shift-unused
 dEQP-VK.graphicsfuzz.cov-function-loop-variable-multiplied-unused
 dEQP-VK.graphicsfuzz.cov-function-loops-vector-mul-matrix-never-executed
@@ -208,6 +212,7 @@ dEQP-VK.graphicsfuzz.cov-function-nested-loops-limit-uniform-xor-uniform
 dEQP-VK.graphicsfuzz.cov-function-set-struct-field-zero-loop-reset-first-element
 dEQP-VK.graphicsfuzz.cov-function-parameter-zero-divided-by-uniform
 dEQP-VK.graphicsfuzz.cov-function-round-unpack-half-2x16
+dEQP-VK.graphicsfuzz.cov-function-struct-int-array-loop-check-element
 dEQP-VK.graphicsfuzz.cov-function-switch-case-constant-clamp-transpose-identity-matrices
 dEQP-VK.graphicsfuzz.cov-function-trivial-switch-case
 dEQP-VK.graphicsfuzz.cov-function-two-loops-limit-using-arguments-array-element-copies
@@ -322,9 +327,11 @@ dEQP-VK.graphicsfuzz.cov-loop-array-index-decrement-never-negative
 dEQP-VK.graphicsfuzz.cov-loop-array-struct-field-index-array-with-uniforms
 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-break-fragcoord-x-empty-loop
 dEQP-VK.graphicsfuzz.cov-loop-clamp-to-one-empty-condition
 dEQP-VK.graphicsfuzz.cov-loop-condition-bitfield-extract-set-array-elements
 dEQP-VK.graphicsfuzz.cov-loop-condition-clamp-vec-of-ones
+dEQP-VK.graphicsfuzz.cov-loop-condition-constant-struct-field-data
 dEQP-VK.graphicsfuzz.cov-loop-condition-divide-by-uniform-always-false
 dEQP-VK.graphicsfuzz.cov-loop-condition-double-negate
 dEQP-VK.graphicsfuzz.cov-loop-condition-filter-some-iterations-never-discard
@@ -343,6 +350,7 @@ dEQP-VK.graphicsfuzz.cov-loop-findmsb-findlsb
 dEQP-VK.graphicsfuzz.cov-loop-fragcoord-identical-condition
 dEQP-VK.graphicsfuzz.cov-loop-global-counter-break-set-ivec-elements
 dEQP-VK.graphicsfuzz.cov-loop-function-call-negative-argument
+dEQP-VK.graphicsfuzz.cov-loop-global-counter-increment-iterator-select-uniform
 dEQP-VK.graphicsfuzz.cov-loop-increase-iterator-condition-uniform-copy-array-elements
 dEQP-VK.graphicsfuzz.cov-loop-increment-array-elements-clamp-index
 dEQP-VK.graphicsfuzz.cov-loop-increment-array-index-array-usuborrow-feedback
@@ -360,6 +368,7 @@ dEQP-VK.graphicsfuzz.cov-loop-limiter-min-findlsb
 dEQP-VK.graphicsfuzz.cov-loop-limiter-uniform-bitwise-and-one-always-break
 dEQP-VK.graphicsfuzz.cov-loop-logical-xor
 dEQP-VK.graphicsfuzz.cov-loop-multiple-iterator-variables-copy-array-elements
+dEQP-VK.graphicsfuzz.cov-loop-never-iterated-constant-vector-condition
 dEQP-VK.graphicsfuzz.cov-loop-read-array-index-from-array-data
 dEQP-VK.graphicsfuzz.cov-loop-max-divide-integer-by-ten
 dEQP-VK.graphicsfuzz.cov-loop-overwrite-sample-texture-as-color-output
@@ -368,6 +377,7 @@ dEQP-VK.graphicsfuzz.cov-loop-replace-output-color-restore-original
 dEQP-VK.graphicsfuzz.cov-loop-returns-behind-true-and-false
 dEQP-VK.graphicsfuzz.cov-loop-sampled-texel-integer-counter
 dEQP-VK.graphicsfuzz.cov-loop-set-vector-components-pow-two
+dEQP-VK.graphicsfuzz.cov-loop-start-fragcoord-while-iterates-once
 dEQP-VK.graphicsfuzz.cov-loop-start-from-one-switch-case-invalid-color-never-executed
 dEQP-VK.graphicsfuzz.cov-loop-start-from-one-switch-case-never-executed
 dEQP-VK.graphicsfuzz.cov-loop-struct-array-field-set-value-self-dependency
@@ -404,6 +414,7 @@ dEQP-VK.graphicsfuzz.cov-modf-integer-to-private
 dEQP-VK.graphicsfuzz.cov-modulo-zero-never-executed
 dEQP-VK.graphicsfuzz.cov-multiple-fragcoord-conditions-false-never-return-sample-texture
 dEQP-VK.graphicsfuzz.cov-multiple-fragcoord-conditions-never-return-color-uninitialized
+dEQP-VK.graphicsfuzz.cov-multiple-functions-global-never-change
 dEQP-VK.graphicsfuzz.cov-multiple-loops-same-condition-always-false-global-loop-counter
 dEQP-VK.graphicsfuzz.cov-multiple-one-iteration-loops-global-counter-write-matrices
 dEQP-VK.graphicsfuzz.cov-negative-integer-bitwise-or-uniform-increment-loop
@@ -411,6 +422,7 @@ 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-functions-vec4-array-element-argument
 dEQP-VK.graphicsfuzz.cov-nested-loop-continue-inner-copy-array-element
 dEQP-VK.graphicsfuzz.cov-nested-loop-decrease-vector-components
 dEQP-VK.graphicsfuzz.cov-nested-loop-initializer-value-increased-inside
@@ -436,6 +448,7 @@ dEQP-VK.graphicsfuzz.cov-nested-loops-global-loop-counter-fragcoord-negative-alw
 dEQP-VK.graphicsfuzz.cov-nested-loops-global-loop-counter-index-array-vec2
 dEQP-VK.graphicsfuzz.cov-nested-loops-global-loop-counter-iterator-dependency
 dEQP-VK.graphicsfuzz.cov-nested-loops-global-loop-counter-output-color-from-backup
+dEQP-VK.graphicsfuzz.cov-nested-loops-global-loop-counter-reached-second-iteration
 dEQP-VK.graphicsfuzz.cov-nested-loops-identical-iterator-names-multiply-divide
 dEQP-VK.graphicsfuzz.cov-nested-loops-identical-iterators-compare-same-array-elements
 dEQP-VK.graphicsfuzz.cov-nested-loops-increase-integer-dot-product
@@ -530,8 +543,10 @@ dEQP-VK.graphicsfuzz.cov-transpose-multiply
 dEQP-VK.graphicsfuzz.cov-trunc-fract-always-zero
 dEQP-VK.graphicsfuzz.cov-two-functions-loops-copy-elements-infinite-loops-never-executed
 dEQP-VK.graphicsfuzz.cov-two-functions-modify-struct-array-element-return-from-loop
+dEQP-VK.graphicsfuzz.cov-two-loops-global-loop-counter-clamp-ivec-elements-index-array
 dEQP-VK.graphicsfuzz.cov-two-loops-global-loop-counter-shift-right-zero-increment-array-element
 dEQP-VK.graphicsfuzz.cov-two-loops-increment-integer-global-counter-break-square-threshold
+dEQP-VK.graphicsfuzz.cov-two-loops-never-iterated
 dEQP-VK.graphicsfuzz.cov-two-nested-loops-switch-case-matrix-array-increment
 dEQP-VK.graphicsfuzz.cov-types-return-in-main-never-hit
 dEQP-VK.graphicsfuzz.cov-uadd-carry-bit-count-index-array