Files
metal2vulkan/docs
Anees Iqbal 08ff006256 lavapipe stores small-float NaNs as Metal does: its MetalSmallFloatNans row, and the lanes that gate it
What: driver_facts::DEVIATIONS gains MetalSmallFloatNans for MESA_LLVMPIPE (every
CPU). A half or float texel's write that may reach an RG11B10Float storage image
on lavapipe then records no DeviceNanEncoding for it and requires
VkProperty::MetalSmallFloatNans, as on MoltenVK's Apple9 identity. Two lane tests
measure the deviation on every venue and gate it where a driver is listed:
half_storage_writes::every_nan_a_kernel_writes_to_a_small_float_texture_is_metal_s_where_measured
(32,766 float NaNs: every top-13 payload pattern, low bits clear and set, both
signs; write, read_write, texture buffer and argument buffer forms) and
half_write_nans::every_half_nan_written_to_a_small_float_texture_is_metal_s_where_measured
(all 2,046 half NaNs; write, read_write, held). Each requires every NaN field
Metal's canonical one and no device-nan-encoding where the profile takes the
deviation, and device-nan-encoding where any field differs elsewhere. half_write_nans'
stored() takes its texels. The existing half_write_nans lane's measured branch
no longer requires native-nan-encoding absent where the device's widening is
unmeasured (no MetalNanMoves): that note is the kernel making's, for its widening of
the half whatever texture it writes, and a 32-bit float store shows it.

Why: lavapipe announced device-nan-encoding on every RG11B10Float half write of
runtime_lane::half_write_nans (write, read_write and held) with 0 of 25 lanes
differing from Metal's (msi, Mesa 26.2.4, LLVM 23.1.1, at 7d7085f9d0), and the
conformance case half-write-nans-rg11b10f differed only in its notices. The note
fires because the profile lacked the deviation, not because the store differs:
llvmpipe packs a small float in its shader code and writes every NaN as the
field's quiet NaN with its sign dropped, which is Metal's. RADV and NVIDIA keep
payload bits, so they stay unlisted. No SEMANTICS_VERSION bump: the deviation is
an enabled property the profile fingerprint hashes, so lavapipe's keys change
(golden_hashes' lavapipe cells re-key; re-blessed on development).

Test that fails without it: device::tests::driver_facts::
the_profile_takes_the_deviations_its_driver_is_measured_with now expects
MetalSmallFloatNans on lavapipe, gate-lavapipe and gate-lavapipe-x86_64.
Verified: the lavapipe, PHOENIX and M3 runs in the branch's report.
2026-11-11 01:30:29 -08:00
..