Translator: BGR10_XR and BGRA10_XR textures leave the raw-held forms

With their textures held as the UNORM codes of their bits (the previous commit),
ExtendedRange::of no longer names MTLPixelFormatBGR10_XR (554) or MTLPixelFormatBGRA10_XR (552).
Their srgb=false forms stay for the two live uses that hold raw codes: a texture buffer's words
(texel_words builds Bgr10/Bgra10 { srgb: false } itself; the words path decodes and encodes them
through lower::arith::extended_range) and, until their render targets are built, a render
pipeline's colour attachment (ExtendedRange::of_attachment, through the formats' second, raw
candidate; the pipeline is made as before, and no pass draws into one).

- ExtendedRange::HEAP_READ drops them (7 to 5): an argument buffer's 552 or 554 texture is an
  element of the sampled float class, read through the step's arm (its handle's bit 30), not raw
  in the unsigned integer class (bind::heap::raw_held). The heap's class layout loses the two
  extended entries.
- texel_format::crosses_classes still excludes them (metal::format::extended_unorm), and a heap's
  storage element of one is still refused NotImplemented(ArgumentBufferTextures).
- The attachment sites (color_writes' extended_range_colors and merges_extended, link's fetch
  refusal, bfloat blend, written and unwritten attachments, alpha-to-coverage, stage_io's missing
  attachment, write_conversion) read ExtendedRange::of_attachment: every answer for a 552 or 554
  attachment is the one before.
- The extended-range sRGB twins and the two-plane forms keep their raw paths (RGB10A8_2P_XR10's
  goes with its two images).

Tests: the format table test asserts both formats' first candidate is ExtendedRangeUnorm with no
raw-held form, an attachment form, a raw second candidate, and no cross-class read; a new runtime
test samples a BGRA10_XR texture through an argument buffer's half member and a BGR10_XR one
through its float member (examples/heap_samples' hs_sample, a constexpr and a slot sampler).

Consumer search (reims-vgpu at 35cea45c0e, *.rs, *.c, *.h): 0 hits for HEAP_READ, heap_read(,
ExtendedRange, "Bgr10 {", "Bgra10 {", WordLayout::Extended, texel_words and crosses_classes;
ExtendedRangeColor appears only in crates/reims-vgpu-c/link-order.txt. Formats still reaching
the raw-held path: the extended-range sRGB twins, the two-plane forms, the padded R10X6/RG10X12
forms and their twins, RGB10A2Unorm_sRGB and the bfloat forms.

SEMANTICS_VERSION 2374 (the heap's class layout and its reads). ARTIFACT_FORMAT_VERSION unchanged
(no encoded type changes). RUNTIME_VERSION 2573 (bind's heap class layout); runtime-sources.sha256 re-pinned.
api_signatures blessed: ExtendedRange::HEAP_READ is [ExtendedRange; 5] (a consumer indexing its
two first entries breaks; none in the consumer). REFUSALS.md unchanged.
This commit is contained in:
Anees Iqbal committed 2026-12-03 16:14:42 -08:00
1 parent 58988c6b83
commit 5bfaa69869
15 files changed
+232 -57

No files matched your search

+2 -3
View File
@@ -1910,7 +1910,7 @@ category, and says what makes an operation carry the note and what may differ. E
that take the arm where Metal's answers over the block's. A branch Metal was measured to
speculate is speculated, and one it was measured to keep is kept, with no note.
- `metal2vulkan-degrade-device-sample-level` (precision). `PrecisionNote::DeviceSampleLevel`: An
extended-range texture's (`BGR10_XR`, `BGRA10_XR` and their sRGB twins) fragment sample at an
extended-range texture's (`BGR10_XR_sRGB` and `BGRA10_XR_sRGB`) fragment sample at an
implicit level, or with explicit gradients, on every device: its texels are read in the shader, at
Vulkan's level of detail computed there and Metal's level rule, where a constexpr sampler states a
mip filter or a runtime sampler's word does. The device takes the level of detail by Vulkan's
@@ -1985,8 +1985,7 @@ category, and says what makes an operation carry the note and what may differ. E
bound sampler filters (a linear minification or magnification filter, anisotropy or a linear
mip filter): a nearest sampler's sample is the decoded texel at Metal's position.
Through an argument buffer it holds only where the command can name a texture held by its raw
texels in a form the function filters (`BGR10_XR`, `BGRA10_XR`, the padded forms; not a bfloat
one).
texels in a form the function filters (the padded forms; not a bfloat one).
- `metal2vulkan-degrade-device-nan-encoding` (precision). `PrecisionNote::DeviceNanEncoding`: A
`float` NaN result's bit pattern follows the device: Metal answers the canonical `0x7fc00000` for
the NaN results of its float arithmetic and functions, and Vulkan states no encoding, so a device