Files
metal2vulkan/docs
Anees Iqbal f1def3dffe Count a texel's half rounding as the measured conversion on MetalHalfConversion profiles
Re-applies 384734851d (reverted in the stack by 5dbf6f3be3) on top of the previous commit, which
merges a heap half read's class arms as the texel's half bits.

What: narrow::round_texel rounds through round_measured, so in QuantizeForm::Converted the
conversion pair's narrowing is recorded as measured. On a profile that takes
DriverDeviation::MetalHalfConversion (MoltenVK on the Apple M3 Max's macOS 27 identity) a texel's
half rounding records no PrecisionNote::NativeHalfConversion, and the module requires
VkProperty::MetalHalfConversion instead: a texel the module decodes itself
(extended_range::decode), a merge of texels (a heap read's phi of its fetched texel and its decode
routine's) and an image instruction's. The note stays for roundings by narrow::round: half
operations and functions computed in float, filter sums, packs and the rest. Other profiles never
read the measured set, so they are unchanged by construction, and round_measured emits the same
pair, so the SPIR-V is unchanged. SEMANTICS_VERSION 1967: recorded notes change on moltenvk-m3.

Why: reims-vgpu's strict Mac tests die on native-half-conversion at a kernel that reads an
argument buffer's texture as half (their ycbcr_probe.metal read_held, over BGRA8Unorm). Every heap
half read carries the decode routine of the seven extended-range/padded/bfloat forms, and its
merge, so it recorded the note whatever the texture. MetalHalfConversion measured the device's
conversion as Metal's half(float) for loaded and computed floats; where Metal's half texel is not
the nearest even half of the texel's value, the access's own note states it: HalfTexelConversion
(outright for a heap element, by the bound class at a slot) or DevicePackConversion (a decoded
texel). The stack 28 gate's cross-class lane failure that reverted it came from the heap read's
merge of widened halves, not from a rounding: an integer texel's bits read as half go through no
rounding, and the previous commit merges them as integers, so they keep their bits without a note.

Kept from 384734851d: the core tests heap_half_texels_round_by_the_measured_conversion and
decoded_half_texels_round_by_the_measured_conversion, the M3 lane
heap_extended_reads::heap_half_reads_of_every_code_round_their_float (half_conversions::half_of
made pub(super) for it), and the docs: the PrecisionNote, DriverDeviation and VkProperty rustdoc,
API.md's native-half-conversion exemption, the driver-facts record (which now also says the
argument buffer's cross-class half read rounds nothing and names its lane), narrow's docs.
runtime-sources.sha256 moves for the doc edits in driver_facts.rs and requirements.rs, which change
no behaviour of a run.

Verified: pending in this commit; the next jobs run the core and M3 lane checks on it.
(cherry picked from commit 1757bd7866aa87c4e38ab83f0b4c4d83e68c75bb)
2026-11-05 04:28:29 -08:00
..