Metal stores a function's writes to an unpacked 4:4:4 two-plane YCbCr texture into both its
planes. The translator held such a slot through an R32G32B32A32_UINT write shadow
(StorageImageClass::YCbCrWrite), and a heap's float storage class held such a member through an
R32G32B32A32_SFLOAT view of its shadow, flagged in its handle-table entry (FLAG_YCBCR_WRITES).
The consumer then encoded the shadow into the planes with bind::ycbcr_write_module. The same
module's second mode stored a render pass's YCbCr attachment (FormatEmulation::YCbCrRendered) into
the planes. metal2vulkan-runtime refuses every YCbCr texture (Gap::TextureFormat), so neither mode
ever ran, but every heap write of a float or half texel through a 2D handle carried the flag's
test and select under its own specialization constant.
Now a slot that writes such a texture keeps the format's refusal (storage_choice,
NotImplemented(Format)), as the other 4:4:4 formats' writes did, and a heap member of one has no
storage choice, so the heap refuses it (ArgumentBufferTextures, NotImplemented). A heap write no
longer tests the flag, and its handle-table search no longer carries it. FormatEmulation::
YCbCrRendered stays as the pipeline's form: a pipeline into such an attachment is made as before,
so no new pipeline-state refusal appears. Its doc now says the pass's store into the planes is not
implemented and that the runtime refuses such textures.
Removed:
- lowering: StorageImageClass::YCbCrWrite (slot.rs's write-only check, emit's ycbcr_write_texel
and YCBCR_WRITE_WORDS), the heap mark (heap_ycbcr_mark, HEAP_YCBCR_WRITE_WORDS,
Write::heap_ycbcr, lower::texture::heap_ycbcr_writes), AccessPlan::heap_ycbcr_writes, and the
YCbCr element mask in heap_element_index.
- memory::handles: FLAG_YCBCR_WRITES, HANDLE_YCBCR_WRITES, Lookup's ycbcr field in Flagged and
Indexed, carries_ycbcr, ycbcr_writes_spec, ycbcr_flag_mask, ycbcr_element_mask,
ycbcr_writes_set, k32_const, and Table's stage (only the YCbCr carry read it). carry takes the
form alone. The search tests lose the YCbCr forms and
a_search_carries_the_ycbcr_flag_only_under_its_constant. The test tables keep an unused bit 15.
- pipeline: SpecKey::HeapYCbCrWrites; HeapStorageReads' doc loses the write shadow.
- binder: plan/resources' write-shadow choice, bind::heap's shadow view, its entry flag and the
reads_unmeasured case, plan::slots::heap_ycbcr_writes and its two specialization arms (compute
and graphics). bind::ycbcr_write goes whole: ycbcr_write_module, YCbCrWriteModule, and the CPU
models ycbcr_write and ycbcr_store, along with their tests. bind::ycbcr_convert loses
words_buffer and scalar, which only the write module used.
- metal::format: ycbcr_writes_stored. The YCbCr, YCbCrRendered, writes_dropped, ycbcr_renders
and held_storage_choice docs say what holds now.
- tests: engine_heap_ycbcr_writes, engine_extended_range's
ycbcr_write_slots_store_each_texel_s_bits_and_mark, and engine_handles' word allowance for the
mark (100 words). owned_divisions loses the write module; api_surface loses five rows.
SEMANTICS_VERSION 2223 is in this commit (placeholder; main renumbers): every heap write of a
float or half texel through a 2D handle loses the mark's code, and the plans of such slots
change (a refusal). ARTIFACT_FORMAT_VERSION 566: SpecKey loses HeapYCbCrWrites in the codec.
RUNTIME_VERSION 2545: bind::heap's handle-table entry flags lose bit 15. The runtime pin is
updated. api_signatures is regenerated, and so is docs/REFUSALS.md (one site fewer for
ArgumentBufferTextures and one for Format).
Consumer check (consumer-uses.sh, consumer development 12b87d3d6b, 64 refs): YCbCrWriteModule,
ycbcr_store, ycbcr_write, ycbcr_write_module, HeapYCbCrWrites, YCbCrWrite, FLAG_YCBCR_WRITES,
WRITTEN_BINDING: 0 hits (code). ycbcr_writes_stored: 0 hits on development. It is used on 39
consumer lane branches (steelbrain/quiesce and others, the newest 17 hours old), in
crates/reims-vgpu-vulkan/src/gpu/ycbcr/sampling.rs:2527, a test of the old runtime's YCbCr write
path. That directory is not on the consumer's development.
Verified: nothing yet (a check job is owed).