The RTX 5080 Laptop's replay at 2953064a1c (NVIDIA 615.71.09, job m3-max-68835) read 34 sites of
attribute-format-fetches that known-gaps-rt.tsv does not list.
The 29 at attribute3 (`half2 h`, read as Half or Half2) were ours. The case's inputs there are half
NaNs: attribute_coding.rs's Half codes 0x7E01 and 0xFE01, at threads 9 and 10 in component 0 and 6
and 7 in component 1. Metal's recording returns every attribute3 input unchanged at all 29 leaves.
The 5080 differs at as many elements as there are NaNs (2 at Half, 4 at Half2), first at a NaN
(Metal 0x7e01, ours 0x7fff), and its largest difference, 32258, is 0xFE01 - 0x7FFF. That every
differing element is a NaN is read from the counts, the first element and the largest difference,
not from a full print. The kernel only reinterprets the fetched value (`bitcast <2 x half> to
<2 x i16>`), which the module's own contract keeps as the field's bits (PrecisionNote::
NativeNanEncoding: "a `half` stored back unchanged keeps its bits"), so no note covered it.
The cause: fetch::decode joins the lanes it widened with one OpCompositeConstruct. from_bits noted
each lane's bits, but narrow::known_bits looked through struct members and lane inserts only, so
the bitcast's to_bits found no bits for the vector and encoded it: the device's narrowing of the
device's widening. On NVIDIA a half NaN widens to 0x7fffffff (attribute0's answer on all three
NVIDIA cards) and narrows to 0x7fff. Mesa's widening keeps the payload and its narrowing gives it
back, so the Mesa cards showed nothing; the RTX 3090 and RTX 2080 (620.70.06) showed nothing either
(expected: that compiler folds the round trip; unverified).
The class, at the base: three product sites join half lanes whose bits are noted with a vector
construct and lose them there: the pulled fetch (fetch::decode, for a kernel's [[stage_in]], a
pulled vertex attribute and a post-tessellation attribute), math::unpack_float (air.unpack of the
11/11/10 float formats into half lanes) and chunk::from_words (a chunked bitcast's half lanes), and
one test-only one, the arith tests' own load of a narrow vector. Texture reads, ops::of_lanes_bits
and narrow::unpacked_from_bits widen the whole vector at once and note it; lane inserts were
already followed. So the fix is in known_bits, for the whole class at once:
- spirv::builder records the parts of every OpCompositeConstruct of an f32 vector
(ModuleBuilder::vector_parts, FunctionBuilder::vector_parts), counted in the builder's
footprint.
- narrow::constructed_bits: a vector constructed of parts whose bits are each known (noted, a
constant's, or a lane of a vector's noted bits) has the construct of those bits. Nothing is
emitted when a part's bits are unknown. known_bits tries it before the lane inserts.
- SEMANTICS_VERSION 2275 -> 2276: the modules of every such vector's store or reinterpretation
change (the encode becomes the construct of the known bits). The golden table is re-blessed on
development.
- docs/API.md's native-nan-encoding entry and NativeNanEncoding's doc name the vector join among
the paths that keep a half's bits.
The other 5 sites (attribute0, the `float4` widening of Half, Half2, Half3, Half4 and FloatRG11B10)
are the device's own answer under device-nan-encoding, as the 3090's rows. The ledger takes each
card's rows from the replays of the round at 2953064a1c, named no wider than the card that ran,
each row's detail equal to what the replay printed and its text the template card's whose answer
it shares:
- RTX 5080 Laptop GPU (job m3-max-68835): every payload bit set (0x7fffffff), as the RTX 3090.
- RTX 2080 (NVIDIA 620.70.06, job m3-max-68939): the same 5 answers as the RTX 3090.
- "AMD Radeon 780M Graphics (RADV PHOENIX)" (Mesa 26.2.6): the PHOENIX run (job m3-max-68941) and
the HawkPoint run (job m3-max-68942) print that one venue and answer as the RX 7900 XTX:
0x7fc02000 for the halves, 0x7ffe0000 at 9 RG11B10 elements.
- "AMD Radeon RX 550 / 550 Series (RADV POLARIS12)" (Mesa 26.2.6, job m3-max-68993): the same
answers as the RX 7900 XTX.
The 2080, 780M and RX 550 runs show no attribute3 site. docs/CONFORMANCE-COVERAGE.md regenerated
(ledger rows 7968 -> 7988).
Tests, each failing at the base's product code and passing with the fix:
- lower::arith::tests::narrow::a_constructed_narrow_vector_keeps_its_lanes_bits (interpreter):
four decoded lanes, two beside the constants 0 and 1.0, and the harness's loaded vector keep
0x7E01, 0xFE01, 0x7C01, 0xFDFF and the rest bit for bit, where the encode answers 0x7E00.
- tests::engine_kernel_stage_in::a_half_attribute_reinterpreted_unchanged_encodes_no_half:
stage_in_fetch with Half2 and Half at attribute 3 holds no OpFConvert to a 16-bit float and no
PackHalf2x16 on any committed profile, with each half form among them (Controlled, Converted,
and Device, the profiles without shaderFloat16).
Verified:
- This change on 5f93a64342 (probe 73dead9f70, tree 56642f49), compile job m3-max-69015:
the two tests against 5f93a64342's product code FAIL, with the fix PASS; fmt,
signatures, clippy --workspace --all-targets --all-features -D warnings plain, under
--cfg m2v_gpu and under --cfg m2v_cpu_icd, and workspace Rustdoc -D warnings exit 0; the
metal2vulkan and metal2vulkan-air suites: 3348 tests passed, 22 skipped, peak 11.3 GiB.
- The tree at 8134bb4201 (on c38852d665; its crates/metal2vulkan/src and
metal2vulkan-air equal 73dead9f70's), recheck m3-max-68965: against the base's product
code the engine test reads "30 of 30 modules encode a half": every committed profile with Half2
and with Half, one OpFConvert to 16 bits each, two PackHalf2x16 each on nvidia-pascal-linux and
runtime-floor (no shaderFloat16). Compile job m3-max-68956 at 9f921a841c (the same translator
code): the metal2vulkan and metal2vulkan-air suites 3348 passed, 22 skipped, peak 11.9 GiB.
golden_hashes_match_the_table passed at SEMANTICS 2276 in both suite runs: 0 cells of those it
compares on Linux moved, so no "bless due"; the cells that need metal-as are compared at
development's bless.
- RTX 5080 Laptop GPU (NVIDIA 615.71.09), the conformance replay on rt: at 8134bb4201, job
m3-max-68961, and at 73dead9f70, job m3-max-69047: exit 0, no unlisted site;
attribute-format-fetches differs only at its listed rows (the 8-bit unsigned normalized
formats' 1-ulp rows and the 5 new attribute0 rows), none of the 29 attribute3 sites differs,
and "the 4607 row(s) above are exactly the open gaps known-gaps-rt.tsv expects on this venue".
- States-only play on lavapipe, 9 streams, every MODE line states-only: 8134bb4201 (job
m3-max-69001) against c38852d665 (job m3-max-68979). In each stream both made the same render
and compute states and pipelines (gb-3090-r2: 10643 render, 15299 compute, 568 pipelines;
glbench-780m-r4-recnil: 3756, 484, 498), refused 0 and left 0 unattempted. 8134bb4201's
translator code equals 73dead9f70's.
- Not run: the RTX 2080's, the 780M's and the RX 550's rows are as those cards' replays printed at
2953064a1c; their replays with this change are the next round's. "The RTX 3090 shows nothing at
attribute3" stays unverified.
The branch is rebased onto development after the jobs; the commits between 5f93a64342 and its
base change runtime files alone (crates/metal2vulkan-runtime), none of this change's.