Record DevicePackConversion where a heap read decodes a raw-held texture

A float or half read, sample or gather through an argument buffer that
decodes a texture the heap holds by its raw texels alone (BGR10_XR,
BGRA10_XR, R10Unorm_X6, RG10Unorm_X12 and the bfloat formats; the
heap_raw routine) converts by the device's arithmetic, as a slot's decode
of the same texel does, but recorded no PrecisionNote: a reader of the
module alone saw no near-equivalent, against AGENTS.md's "allowed only
when the artifact records it".

The decode is planned in one place now, texture::heap_raw::plan, which
both the read (select_read_as) and the emulated sample or gather
(heap_raw_sample) call. It records DevicePackConversion as a specialized
note with one clause on a new bound-value key, SpecKey::HeapRawTextures
(stage): a texture the stage's handles can name is held raw. The binding
plan gives the key from the command's heap members (resident or bound
textures, as for HeapYCbCrTextures), so the note is in the module's
notes, holds under precision_notes_bound exactly where the command can
name such a texture, and the runtime announces it at that draw or
dispatch (degrade_bound_values) and never at the pipeline's making. A
stage that records the note outright for another conversion keeps it
outright. Heap accesses that reach no such texture (queries, integer
reads, storage reads, samples the function does not emulate) record
nothing.

NoteOn::HeapTextures is renamed HeapYCbCr beside the new HeapRaw.
bind::heap::raw_held is pub(crate) for the plan. The heap set's own
announcement naming the texture (heap_sets::RawRead) stays.

SEMANTICS_VERSION 2008 (heap-reading modules gain the note);
ARTIFACT_FORMAT_VERSION 498 (a SpecKey variant). api_signatures blessed;
REFUSALS.md regenerated (unchanged). docs/API.md's catalogue and the
runtime's Degradation docs say where the note is recorded and announced.

Tests: heap_decodes_record_the_device_pack_conversion now also asserts
the one HeapRawTextures clause; the new
a_heap_decode_s_note_holds_where_its_command_can_name_a_raw_texture checks
the plan's key and the bound note on every committed profile; the lane
a_heap_decode_s_stage_note_is_announced_where_its_command_can_name_a_raw_texture
checks the runtime's announcement under announce_each.

(cherry picked from commit 1ab403b671f18773a10c8572ffbe0a73b56f5bbc)
This commit is contained in:
Anees Iqbal committed 2026-11-09 23:54:15 -08:00
1 parent 0957fcb752
commit c42e63e64b
16 files changed
+262 -53

No files matched your search

+7 -4
View File
@@ -4234,10 +4234,13 @@ bound.
`half` result within one `half` ulp. A texture a heap holds by its raw texels alone
(`BGR10_XR`, `BGRA10_XR`, `R10Unorm_X6`, `RG10Unorm_X12` and the bfloat formats:
`bind::heap_raw_form`), whose `float` read, sample or gather through an argument buffer the
function decodes the same way, is announced by the runtime instead of by the stage, naming the
texture, at the first command that binds a heap set holding it (whether or not its function
reads it) or as it is placed in a set a command buffer that bound the set and has not completed
may read through.
function decodes the same way: such a stage records the note as a specialized note, holding
where a texture its handles can name is one (`SpecKey::HeapRawTextures`, which the binding plan
gives from the textures the command makes resident or binds), so a reading of the module alone
holds it and a draw or dispatch whose command can name one announces it. The runtime also
announces it naming the texture, at the first command that binds a heap set holding it (whether
or not its function reads it) or as it is placed in a set a command buffer that bound the set
and has not completed may read through.
- `metal2vulkan-degrade-color-attachment-groups` (precision).
`PrecisionNote::ColorAttachmentGroups`: A render pipeline whose color attachments the device
draws in more than one group (more than the lesser of its `maxColorAttachments` and