A read of a depth cube or depth cube array by face (depthcube<float, access::read>'s
read(coord, face, lod), air.read_depth_cube and air.read_depth_cube_array) was refused on every
profile, Unsupported{IdentityDomains; NotImplemented}: the read kept the 2D-array view
(RuntimeFact::ImageViewShape), which the identity arrays hold no element of. The resident tables
built it before the cutover to the one form, and that commit deleted its interpreter test with
them; the runtime's README listed it as a known gap.
A colour cube's read by face already samples its cube element, the texture's cube view, at the
texel's centre and the read's explicit level through element 0 of the plain sampler array (the
default sampler, nearest, every level), its operands tested in the shader. A depth cube's element
is its cube view of the depth, which that plain float sampler samples without a comparison as a
depth cube's sample() does, the depth the sample's first component. So slot::samples_cube_element
no longer excludes a depth shape: the read takes the same form, and the slot states no
ImageViewShape.
Tests:
- engine_texture's an_identity_cube_read_by_face_samples_its_cube_element compiles
unk_read_depth_cube too, on every identity profile: L3 passes, no ImageViewShape fact, its two
textures from the sampled float depth cube and depth cube-array classes, its sampler from the
plain array, OpImageSampleExplicitLod and no OpImageFetch. Red with slot.rs at the base.
- The runtime's tests::cube_reads gains cr_depth (a Depth32Float depth cube of three levels) and
cr_depth_array (a depth cube array of two cubes and two levels): every texel of every face,
level and cube reads its uploaded depth bit for bit, and each read outside the texture reads 0.
- scripts/qualify-public-cases, CI's step, qualifies the public case
depth-cube-and-cube-array-reads-at-32-and-16-bit-coordinates (3 x 3 depth textures, every
texel of every face and cube, depths over many binades) on lavapipe against its Apple M3 Max
observation.
Docs: lower::texture's module docs, slot.rs, emit.rs, API.md and RESOURCE-ID.md say a depth
cube's read by face samples its cube view; the runtime README's known gap loses the depth cube
read and names it lowered. engine_texture_unk's module docs no longer claim an interpreter run of
the depth cube reads.
Engine inventory: engine/unk_read_depth_cube.ll moves from Unsupported{IdentityDomains;
NotImplemented} to ok on all 15 profiles; its .air.ll twin moves at the M3 bless.
SEMANTICS_VERSION 2365 -> 2367 (a placeholder, renumbered at landing): the fixture's 15 golden
cells, one a profile, change from the refusal to modules, and no other cell moves. The golden
table and the authored compile census (the case's row, not_supported today) are re-blessed on
development.
Verified, at this commit's tree on 6459eaa946 (rebased since onto the sparse path's deletion,
whose only overlap is the SEMANTICS line):
- m3-max-85654, on the CPU with no device: the engine inventory's eight llvm_as parts differ
from the table by nothing (the row moved with the change). Red, with slot.rs at the base:
an_identity_cube_read_by_face_samples_its_cube_element fails at the depth cube; green: it and
the 20 other cube tests of the translator pass. The golden table's cells: 105 change at this
commit, the base's 90 (development's, blessed since) and unk_read_depth_cube's 15, the two lists
otherwise equal. The refusal surface's check, fmt, signatures, clippy (plain, --cfg m2v_gpu,
--cfg m2v_cpu_icd), Rustdoc, private docs, doctests and scripts/api-docs pass; the metal2vulkan
suites ran 3,471 tests: 3,470 passed, 24 skipped, and the failure is
golden_hashes_match_the_table, whose table is blessed on development; validation ran 1,344
tests, all passed, 2 skipped; conformance ran 1,053, all passed.
- m3-max-85654, on devices: the runtime's every_device_reads_a_cube_by_face_as_its_texels, with
the depth cube and depth cube array rows, passes on lavapipe (llvmpipe, LLVM 23.1.1, 256 bits,
m2v_cpu_icd) and on the RTX 5080 Laptop GPU (m2v_gpu).
- m3-max-85654, CI's lavapipe image: scripts/qualify-public-cases exits 0, every case's slot
current, the depth cube case's among them.
- m3-max-85857, on the CPU with no device, at this commit on the sparse path's deletion: clippy
of the workspace (all targets and features) passes, and the 34 cube and engine-inventory tests
of the translator all pass.
138 lines
8.0 KiB
Bash
Executable File
138 lines
8.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# The "Qualify public cases on native Vulkan (Linux)" step of .github/workflows/ci.yml, shared
|
|
# with scripts/linux-gate-ci so the two cannot drift.
|
|
#
|
|
# scripts/qualify-public-cases <bin-dir> # <bin-dir> holds the built validation binaries
|
|
#
|
|
# Executes the owned public cases with the engine (the only engine the validation binaries run
|
|
# since cutover X2b) on the CPU Vulkan ICD (lavapipe), against their committed
|
|
# Metal observations in the reference list's primary environment
|
|
# (crates/metal2vulkan-validation/cutover/c3-references.json), then rebuilds the disposable index and
|
|
# requires each case's engine slot to be current. Run it from the repository root.
|
|
#
|
|
# Rows written here are ephemeral CI evidence under the operator environment `ci-lavapipe`, which
|
|
# no C3 venue names: a runner's lavapipe is not a venue's declared device, so a
|
|
# venue's environment would refuse it (`venue_mismatch`), and these rows are no venue's evidence.
|
|
#
|
|
# A public checkout has no private store, so `corpus-index` indexes only the rows of public
|
|
# sources and reports the committed rows of private AIR it left out (`scope=public-only ...`);
|
|
# any failure of it fails the step.
|
|
set -euo pipefail
|
|
|
|
[ "$#" -eq 1 ] || { echo "usage: scripts/qualify-public-cases <bin-dir>" >&2; exit 64; }
|
|
bin=$1
|
|
export LP_NUM_THREADS=1
|
|
|
|
environment=ci-lavapipe
|
|
metal=$(python3 -c 'import json, sys; print(json.load(open(sys.argv[1]))["primary"]["environment_id"])' \
|
|
crates/metal2vulkan-validation/cutover/c3-references.json)
|
|
cases=(
|
|
d9ce86618e0924966fbb1e7de63761ef471bb6e85b592a70193a26375ec0423f
|
|
4659fedddd1695fba79c3faa797ec3be647e3fd1a87ecec23bde55ccbfbcf656
|
|
1e54315eb0ffcac633d4992c577f3e6ac384ed1bdf2321887c1f37242c00c887
|
|
# A kernel that asks two bound visible-function tables whether they are null and their sizes,
|
|
# and one that calls through a table of four entries, one of them null.
|
|
3a8f75e182b71ba42a94dd39d178cf6789010fbe1355b56944adf0a1c75ba807
|
|
af884d65cb584518fcb8b7319dfe9deff15b20604cfc68f6d72dd97ca3113536
|
|
# An AIR 1.8 fragment (engine/air_1_8_sampling) that samples plainly and by gradient through
|
|
# an argument sampler: the forms an AIR library declares before AIR 2.0.
|
|
884ad7d75a221a11480581ae8d55ef5773defdd021c4fc56c6bde51445e87d37
|
|
# A float (engine/fc_float_gate) and a half (engine/fc_half_gate) function constant that gate
|
|
# a kernel's argument and a fragment's sample mask: Metal keeps what they gate where the
|
|
# value's bits are not all zero (1.5, -0.0 and a quiet NaN), and drops it at +0.0 and unsupplied.
|
|
3a843c7911108e011ac425010de8918ea2ffaabc680efe846d1fa60427bb89da
|
|
ad28780327b4d7bfdfbeba9985f9a065b96766455d39f2187a45aa667acbcb9d
|
|
c7440f65e3dc4b2a20e5a80e1303bd4733973ef4a9d7e0da4f8b2d852b82ead8
|
|
8e22d09b34c6911bf89e9a3819fe8935c877298faf69b235cba74f83cc9f0d1e
|
|
4db5409a6e7d85d95d16cf6a0c2c6a386ee0a2ca281834c5ebf7d54481a115e5
|
|
0ec889df18ff07ab70791b6116fe2dd30331251d9715e62f6644c561ff411426
|
|
03cbdd46a5c0dbe4edcd3aaee7205110805835347288f0f8269131e743362d4d
|
|
8235cf2527e58712c73b1baacb72b2cd576cf45786fe3024b3776d88c969b71f
|
|
579eb7c4c5c2eb7cd30871124eac021cbb131e7931e514cd6ee03234bcc68983
|
|
16bb9c40891adce3e478f143c4d0cf1abd093e6b6c8ba1b5793bcff70f50487a
|
|
deeca6b1a5f4a5daa333c7cb757bd330eccc2f50870a4b73afe7b3704328c853
|
|
0d652c7e36e231111b77232853ae8237603e2eaf0205a30a08c9e517e2b27dfe
|
|
4534a2f6acfe169228698c79410b9f69a2a27193be26d24df48f04bfa212f134
|
|
18c8aab797757953abb8725f36053c4607a1829a8b4f1dcb8c5b877d697fdf1b
|
|
b9bfa9f2737e76d6052e4f705891209af9e7306206b5999acae1a9c30d7a13aa
|
|
# A row of floats written four at a time from a float4 (engine/split_store_tail), the first in
|
|
# one block and the rest where the row holds them, at rows of 5, 6 and 7 floats, and the four
|
|
# in one block at rows of 7: every residue of 16 for the first word's offset.
|
|
1c1ad4164a77a6c10927742ee54ce9b5e6757df96f8eaa3a4e5dcf70eb7c3fe3
|
|
440c5d434c2c77b1147d0ccf9cd482c4f48424f80f1e72042c0e025e3dcd030c
|
|
5cc3b69ff9552e7dc62f5b2f3e89d0c09666f48f9886406506a55842aaf0ead7
|
|
861ff4ddf6f7458effd523d90fdb1d816e4d5d1ba39759ef8755bff0b2243817
|
|
# mul24 and mad24, unsigned and signed, as a scalar and at 2, 3 and 4 lanes
|
|
# (engine/int24_products), with operands in their 24-bit range and outside it.
|
|
5f654fa8f41f1ea09229fc65c9a66261ad4a4ff3fc89c4b3c66851e7daf39194
|
|
36ffb2b4990596138bbf7e50788d8878d0d32ddc4ac7717558ec3ec668768832
|
|
# A sampler or a texture taken from a branch merged at a join (kernel_handle_word_joins): as
|
|
# integer words in a phi and in a select, and as pointers in a phi.
|
|
b0fe67d9b927e646cb76549d72ac73b9c446526a7635d07032d6bdff28362ea5
|
|
2172332f380f4dd6a7ef3166e1148863511532c4aea0677805fdc20f0a60a3a1
|
|
a8649cab0d387804f325ea8fa65e10d7064d06fa076a9d4cfba1a15fe2ca41b1
|
|
d7b7b490f2dfc6a3cbf669b4e3c6ad9d30c93623dca57acc28755923ff3f9427
|
|
# calculate_clamped_lod and calculate_unclamped_lod in a kernel (engine/rfs_kernel_lod) over
|
|
# 2D, 2D-array, 3D and cube textures and in a vertex function, through a runtime sampler without
|
|
# a clamp and with clamps under each mip filter, the clamped level read from the sampler's word.
|
|
ecf328dab422c8a91d4c4ca895bbe95af2e8dfae989a43ee978dc0963d918848
|
|
8f5ff12827c6e096106e8415c6a031818cab0c3b982159fa31f2e8218fcede86
|
|
f46b514ad4907484a4552a7b8fcc9061478a8de4078fce6085fa474ff209a74c
|
|
268ec7e1f6e8e2e00b7e60af234ea2f5ca6ff176a4bcf7301dce5f68aae16d9b
|
|
36313efb0d5bc19b9817d5574c4126c8a0cb242d616825b4898d2da1221ce184
|
|
7ab89b0e1656651a2a07a7e88a2e2361c0e9982c8a3de0ea864246fbfba73798
|
|
47c4985389ccdfe32383df0f0413313bbd59fbff43d1d7d3002ddd87de6b2685
|
|
77869a88dc284419e30cb87528985f6a031e911fbb2a2074116650e1fae0f7d7
|
|
fc4a9ce88fc47734cd9ebd8cc4f38f454b5fb17af7890341a2bbbeb572aff7b4
|
|
fc0539a14aabbb9c8c2ee400bcaabc745d76093eef51858716fc88d95d8e253e
|
|
c2710071e11451fe902a368186bbdfa2899c097edc7881f165f50a807cdbcb98
|
|
805d404243e91650837d93f6787268d8f0833b9aaeaa1ef289ee3f1950d31555
|
|
34bffa47d2d5331f2f6e72db8e0b18f173c04573fb6904a27bda7be45545e292
|
|
436e2dee4c0ad2590acf0b702d0538176293e90443045120cd47ca1376800eae
|
|
# The same queries through a sampler bound with LOD clamps of the bind's own
|
|
# (setSamplerState:lodMinClamp:lodMaxClamp:atIndex: and its vertex form), which the query reads.
|
|
3ed7967d1502fdd8a8ffcf861a14a850f81794b0787d78bdd2584829aceca072
|
|
5f2bb17238a054de6944763aee705892434e4f28d75fe317dc25a2ca188f42eb
|
|
92b04960b3e4d5d296b5720b96ac59a2a5fd640d7a0cef2439c7e9121245e989
|
|
9b9369bbfa1f905eb3e908740ae8d10f632ca0a73f020eb995fcce6666a60972
|
|
ea3e144e1f7a0ea5a58a5951092b095d0b12f727411fce501e3ec8c950400d6b
|
|
c93359f4c8d94d91be2e2f7335a9a235cf1a322dadb12344bd1b2ee0581dd396
|
|
# A texture of memory_coherence_device handed between two threadgroups through a release
|
|
# fence, a device-scope flag and an acquire fence (engine/coherent_texture_handoff): no read
|
|
# that saw every writer's flag reads the texel's earlier value.
|
|
32697a0895a8dcf85651da45ed7d6139ae86bc80f18f986eb28a72f06eb3b061
|
|
# Reads of a 3 x 3 depth cube and depth cube array by face (engine/unk_read_depth_cube), at 32-
|
|
# and 16-bit coordinates: every texel of every face and cube.
|
|
6bcb5f4b1eff579886ef9a22e53f950a74032d334f97705a7c07515f064e0b4c
|
|
)
|
|
|
|
for case_id in "${cases[@]}"; do
|
|
"$bin/corpus-vulkan" \
|
|
--case-id "$case_id" \
|
|
--metal-environment-id "$metal" \
|
|
--environment-id "$environment" \
|
|
--device-type cpu
|
|
done
|
|
|
|
"$bin/corpus-index"
|
|
"$bin/corpus-index" --check
|
|
named=()
|
|
for case_id in "${cases[@]}"; do
|
|
named+=(--case-id "$case_id")
|
|
done
|
|
status=$("$bin/corpus-status" "${named[@]}")
|
|
echo "$status"
|
|
incomplete=0
|
|
tab=$'\t'
|
|
slot="$environment@engine"
|
|
for case_id in "${cases[@]}"; do
|
|
if ! grep -Fqx "slot${tab}${case_id}${tab}vulkan${tab}${slot}${tab}current" <<<"$status"; then
|
|
echo "native Vulkan qualification of $case_id in $slot is not current" >&2
|
|
incomplete=1
|
|
fi
|
|
done
|
|
if [ "$incomplete" -ne 0 ]; then
|
|
echo "native Vulkan qualification is incomplete" >&2
|
|
exit 1
|
|
fi
|