One work packet, landed as 3 commits (d8bb73078f..862d4c13a1 on archive/development-linear-2026-10-28), in order:
* Sample a BC texture's own image through the device's decode, keeping no twin
Under the native-arithmetic rule a device that has a BC format decodes it itself: its decode is
the answer, recorded where it can differ from Metal's. The BC1 to BC5 decoded twin emulated
Metal's 6-bit-weight decode on drivers not measured to make it (lavapipe, NVIDIA, ANV, RADV's
BC4/BC5), at the cost of a second image 4 to 8 times the blocks and a decode after every write.
It goes, and with it every piece only it used:
- the translator's `bind::BlockDecode` and `bind::block_decode_module` (Metal's fitted BC1 to
BC5 decode, its kernel and its tests); `bind/block_decode.rs` keeps only what the carriers'
decode modules share (`BlockDecodeModule`, the bindings, `table`, `decode_module`);
- the runtime's `TwinDecode::Block`, `Device::twin_decode`, the twin's announcement
`decoded-block-twin` (`Degradation::DecodedBlockTwin`, removed), the view-decode notice for a
view of another decode (`degrade_view_decode`, `degrade_device_decode`), and the
device-test-only `Scheduler::decodes_pending`, which only the BC twin's CPU decodes needed.
A BC texture (BC1 to BC7, the sRGB forms too) is now its own BC image on every device, and on a
device whose driver lacks the format's fact (`ColorBlockDecodeIsMetals`,
`ChannelBlockDecodeIsMetals`, `Bc6hBlockDecodeIsMetals`, `Bc7BlockDecodeIsMetals`) announces
`compressed-texel-decode`, now also for a sparse texture and a texture over the caller's
`VkImage`, which announced nothing before. The facts still decide the note. The carriers'
twins (ASTC, PVRTC, ETC2/EAC, 4:2:2) and their CPU decode thread are unchanged; a carrier whose
twin's format the device cannot sample is now refused typed instead of read as its carrier (no
conformant device lacks those formats). The sRGB forms' read through Metal's table is unchanged
here (another change replaces it).
Lanes and suite:
- `runtime_lane::compressed_decode` reads the device's decode: exact where the driver has the
fact (within `device-texel-conversion`'s ulp off Metal's sampler), else within the note's
stated per-format bound, with the note announced; no write makes a decode pass or CPU decode.
- `cpu-block-decode` keeps a lane site in `astc_textures` (`astc_cpu_writes_decode_on_the_cpu`,
the CPU decode thread's ordering behind work in flight), and `chroma_pairs` holds its notice
to the CPU decodes on every device.
- conformance: `compressed-texel-decode` joins `replay::NATIVE_NOTES`; the BC cases declare no
twin notices; 40 llvmpipe rows in known-gaps.tsv, one per BC1 to BC5 round, each within the
note's lavapipe bound. The cross-check `every_recorded_texel_is_the_lanes_fitted_rule` still
holds the M3 Max's recorded texels to the case's own model of Metal's decode.
- new device test `tests::bc_own_image`: every BC format, `Shared` by `replaceRegion`, `Private`
by a blit and a heap's, has no twin, keeps its blocks, makes no decode, and announces the note
exactly where the fact is missing.
Docs: API.md's `compressed-texel-decode` entry and cost (lavapipe's BC4/BC5 bound widened to
2.4/255, signed 0.022, as measured below), `decoded-block-twin` removed; a FAST-PATHS.md
device-gap row; REFUSALS.md, api_signatures.tsv, api_surface and CONFORMANCE-COVERAGE.md
regenerated. RUNTIME_VERSION 1669 -> 1710 (renumbered at landing). SEMANTICS_VERSION stays: no
translation changes, so the golden hashes do not move. The runtime-sources pin is not re-pinned
here.
Verified:
- clippy `--workspace --all-targets --all-features -D warnings`, plain and `--cfg m2v_gpu`;
rustdoc with `-D warnings`; the refusal, signature, Metal and conformance coverage checks.
- macOS, no device: metal2vulkan-runtime + metal2vulkan-conformance 2139 passed; metal2vulkan's
fast_paths, owned_divisions, bind, api_surface, api_signatures, driver_facts and cache tests
568 passed; conformance again after the ledger rows, 1007 passed.
- lavapipe (linux-gate arm64, `--cfg m2v_cpu_icd`): 145 tests of the touched families passed
(bc_own_image, compressed_decode, astc_textures, chroma_pairs, pvrtc/etc textures,
degrade_notices, texture_blits/fills, cpu_copy_layouts, image_plan, first_moves, the
degradation tests). Largest differences from Metal: BC1/BC2 2/255, BC3 3/255, BC4 2.28/255
(signed 0.0172), BC5 2.31/255 (signed 0.0212); BC6H has its fact there, BC7 announces.
`conformance replay --cpu`: the only unlisted gaps were these 40 BC rounds, no stale row.
- MoltenVK on the M3 Max (maclock, memcap): 43 tests passed, every BC1 to BC5 channel exactly
Metal's, no `compressed-texel-decode`; the replay of 105 touched cases left all 41 BC cases
exact (one unrelated divergence, `read-write-tier-held`'s `set-past-layout-support` notice).
* Count the ASTC CPU-write lane's behind-work decodes from before the making
`astc_cpu_writes_decode_on_the_cpu` failed once on lavapipe after the rebase onto cb759a4c4a:
"ASTC4x4LDR Event: 2 CPU decodes, not 1". The cause is the test's window, not a second decode.
`WorkCounts::cpu_block_decodes` counts a write's decode when the device's decode thread finishes
it (`Image::finish_twin_decode`). The case writes the old blocks, commits the reader, and only
then took `before`. In the Busy case `scheduled(&reads)` waits for the reader's batch, which the
scheduler holds until the old blocks' decode finished, so `before` already holds it. In the Event
case nothing waits, so the old blocks' decode could land after `before` and be counted with the
new ones'. Each write queues exactly one job, and the thread takes them in order, so 2 is the old
write plus the new.
Now the case counts from before the texture's making and expects exactly two CPU decodes (its two
writes) where the copies go on the host or the staging queue, and none elsewhere. The count is
read after the later reader completed. That reader's batch waits for the new write's decode, the
thread finished every earlier job by then, and it counts each job before it releases the batches
that wait for it. Every earlier case's decodes landed before its own later reader completed too.
No sleep, and no looser bound.
Verified: clippy of the validation crate under `--cfg m2v_gpu`; on lavapipe (linux-gate arm64,
`--cfg m2v_cpu_icd`), the test 20 times and the families
bc_own_image|cpu_copy_layouts|compressed_decode|degrade_notices|astc|etc_textures|chroma_pairs|
event_round_trips|grouped_submissions|waiter_submits|scheduler. The 20 runs all passed: each of
the 80 behind-work cases (two formats, Busy and Event) counted exactly 2 CPU decodes, 0 cases
wrong; 13 Busy cases were void (the reader ran before the write) and 2 to 4 cases a run held.
The families: 86 tests passed.
* 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.