A half value whose bits are not known from a load (a store, a reinterpretation,
a texel's or snapshot's bits) is encoded by the device: with shaderFloat16 one
OpFConvert to 16 bits (NoContraction under the float controls), each lane read
as a word beside a 16-bit zero; without it GLSL.std.450 PackHalf2x16. The exact
integer sequence (rebias, NaN quieting, the 2^24 denormal scaling, the 0x7C00
cap under native rounding) is deleted. narrow::encodes_bits finds the
narrowing; compile.rs records the widening's notes for it: NativeNanEncoding
everywhere, NativeHalfConversion where neither the float controls nor
MetalHalfArithmetic cover it. Bits known from a load, folded constants, an
integer's half and bfloat stay exact. bits_words 136 -> 48 per lane.
Tests pinning the old NaN bits accept the device's where the note is recorded;
40 known-gaps rows the Apple M3 Max no longer diverges at are dropped (29
attribute-format-fetches half-NaN sites, 3 each of half-texel-nans-r16f/
-rg16f/-rgba16f, 2 of math-frexp-ilogb-half: Metal's own NaN bits now).
SEMANTICS_VERSION 1919.
Verified: 347 translator tests (lower::arith::tests, the touched engine
modules, every public fixture on every committed profile), clippy plain and
--cfg m2v_gpu, rustdoc; a sabotaged encode form fails the new
a_half_encode_is_the_devices_narrowing_in_every_form; on the M3 Max:
conformance replay of 28 half cases exit 0 (every divergence a held ledger
row), validation runtime_lane half tests 7/7, runtime nan_signs/vertex
conversion notices/degradation sites 4/4. golden_hashes.tsv cells move,
re-blessed on development. Not run: lavapipe, the full validation and
conformance sets.
One work packet, landed as 1 commit on archive/development-linear-2026-10-29: 0d7093d826.