Files
metal2vulkan/docs
Anees Iqbal 7e86900912 Leave half-float texel writes to the device: drop the half-bits paths
One work packet, landed as 4 commits (a6e81074ae..77a585c009 on archive/development-linear-2026-10-28), in order:

* Leave half-float texel writes to the device: drop the half-bits paths

Under the native-arithmetic ruling the device's own write is the
answer for a half-float texture's stored NaN, recorded as
DeviceNanEncoding (or MetalHalfTexelWrites / MetalHalfStorageNans
where measured). Two paths existed only to store Metal's half NaN bits:

- the half-texel write route through the texture's unsigned integer
  alias (StorageImageClass::HalfBits), which a slot that writes a
  half-float texture took on a device without MetalHalfTexelWrites,
  with its alias view (metal::format::half_bits_view), its read and
  write conversions, its imageblock-slice bits leaf, the read note it
  recorded, and the own-format-views fact a wrapped image without
  MUTABLE_FORMAT needed to opt out of it (TextureFacts::own_format_views,
  TextureShape's field, storage_choice_viewed);
- the heap twin: StorageFormatClass::HalfBits and its neutral and heap
  class, the twin's element view, the own-view heap class indices
  (heap_own_view_index, HALF_BITS_FORMATS, heap_half_bits_indices),
  the twin write and its class test, RuntimeFact::HeapHalfTexelWrites,
  bind::heap_write_nans_converted, metal::format::half_write_nans_converted,
  and the runtime's NanResidue and its draw-time announcement.

What a device needs to write such a texture at all is unchanged: a
half-float slot is the format's own Identity choice on every profile.
The heap write path now records its notes statically: a float write's
rounding and NaN as MetalHalfStorageWrites/MetalHalfStorageNans or
DeviceColorConversion/DeviceNanEncoding, a half write's NaN as
DeviceNanEncoding.

Tests follow the behaviour: the format test asserts Identity for every
use, the heap texel write test asserts one storage class and the note,
the half-slice test asserts the device's widened halves, the half moves
and half texel write tests drop the alias case (the latter now checks a
declared RGBA16Float on every profile), and the twin-only tests go.
Docs the deletion made false are fixed; REFUSALS.md and
api_signatures.tsv are regenerated.

SEMANTICS_VERSION 1883, ARTIFACT_FORMAT_VERSION 466, RUNTIME_VERSION 1665.

Verified so far: cargo check --workspace --all-targets --all-features
is clean; conformance-coverage --check and refusal_surface pass.

* Drop the half-bits exact form from the llvmpipe half-texel rows

The llvmpipe half-texel-nans rows named the read side of the
StorageImageClass::HalfBits aliasing as the exact form behind a policy
switch; that aliasing is gone under the native-arithmetic ruling, so
the sentence describing it is false. The rows' verdicts and the
device-nan-encoding sentence stay.

Verified: scripts/conformance-coverage/coverage.py --check passes.

* Fix the two tests the half-bits deletion left stale

device::tests::mechanism numbers every RuntimeFact densely; with
HeapHalfTexelWrites gone the last tag moves into its place.

merged_argument_buffer_textures_share_one_heap_class bounded the module
at 1,600 words (2,300 with word ids) plus the twin's write words where
the profile took the twin. Without the twin the bound shows what that
allowance covered: on a device that holds an A8Unorm texture's alpha in
red (metal::format::alpha_in_red), the heap write's class-index read
and conversion, 87 words on RADV RDNA2/RDNA3, ANV ARL/Iris Xe,
lavapipe and NVIDIA, 1,591 words elsewhere. The bound now names that
allowance.

Verified: both tests pass under cargo nextest; clippy -p metal2vulkan
--all-targets --all-features -D warnings is clean.

* Re-pin the runtime sources at the landing tip

The landed packet changed a runtime-sources input, so the committed digest no

longer described the sources and `the_runtime_sources_are_the_committed_ones`

would fail. Recomputed over the same inputs and committed by land-pkt.sh.
2026-10-28 17:24:21 +02:00
..