Commit Graph
1855 Commits
Author SHA1 Message Date
Anees Iqbal ca5aa90e09 env_vars: the ten variables only the deleted runtime read go
With metal2vulkan-runtime deleted, ten accessors in crates/metal2vulkan/src/env_vars.rs have no
reader: lane_validation, log_pipelines, log_memory, log_shadows, dump_pipelines, log_passes,
pending_audit, queue_times, encoder_trail and encoder_times. A grep of the tree finds no call of
any of them and no other read of their METAL2VULKAN_* names, in metal2vulkan-rt or anywhere else.
They go with their registry rows, so `metal2vulkan --help` lists only the variables something
reads: METAL2VULKAN_REPRO_DIR and the METAL2VULKAN_<TOOL> family.

METAL2VULKAN_REPRO_DIR's row and accessor doc lose the deleted runtime's half (its bundles of
refused creations, and "unset is off (the runtime's)"); the binary's bundles are unchanged, and the
binary is the variable's one reader.

docs/API.md's paragraph describing the ten variables (section 9, under "How a notice reaches you")
goes; the heap-texture refusal line after it no longer begins "Whatever the variables". The rest of
section 9 still describes the deleted runtime and is the docs step's.

The env_vars module is hidden (not in tests/api_surface.rs or api_signatures.tsv);
scripts/api-signatures/signatures.py --check is 0 on this tree.

Verified: the gate of this commit (fmt, clippy x3, workspace doc, the metal2vulkan crate's tests).
2026-11-20 07:24:20 -08:00
Anees Iqbal 5d725aeec7 Delete metal2vulkan-runtime, with every test and script that read it
The cutover deletes the old runtime: crates/metal2vulkan-runtime and its workspace member go.
Nothing in the workspace depends on it any more: the harness and conformance lost their old arms,
and validation dropped its dependency in its own commit.

Adapted in this commit, so no gate reads the deleted tree:
- CI and scripts/linux-gate-ci: the crate's per-feature clippy group, its `-p` in the Windows
  clippy and the test step, and its private-doc-links row go. Packaging needs no edit: the
  workspace's published crates are now metal2vulkan and metal2vulkan-air.
- The published-crates test lists those two; devtools' carried trees and the five nextest groups
  of the old crate's tests go.
- scripts/api-signatures: the crate leaves CRATES, FLOORS and the header, its self-test trees name
  rt (read by the same rules), and the table is re-blessed (the old crate's 4555 rows go);
  api_signatures.rs pins the three crates left.
- scripts/refusal-surface: the old crate's tree and its sections go (RuntimeGap, AppleOnly,
  Problem and the problem enums it forwards to), with their 87 reach rows, the `--delegations`
  verb and the test that counted the old Problem's delegations; docs/REFUSALS.md is regenerated.
  The basis check now holds rt's refusal enums alone, which it already required.
- scripts/api-cost-coverage goes: it measured only the old crate's surface.
- feature_vocabulary.rs: the old crate's two enable tables go; the Khronos and validation tables
  stay held to the vocabulary.
- The conformance coverage generator's by-hand roots read rt instead of the old crate, and
  docs/CONFORMANCE-COVERAGE.md is regenerated (MTLResourceOptions' row, which only the old crate
  modelled, gives way to rt's MTLCommandBufferError).
- scripts/matrix: the harness times the new runtime alone (`--runtime new`), so the rules that
  judged it against the old one go: the new-over-old budget with its floors (floors.tsv,
  gpu-floors.tsv), ceilings, card variance and status table (status.tsv), the frozen arm, the
  base spread and the timing once more it set off, the re-timed pairs, the five creation rounds
  and the old runtime's parked tests and records. A harness row's time is judged as a cross-GPU
  outlier, with its alone runs as before, and the frame and burst rows by their stored
  instruction counts; the creation rows run once, in their own process. docs/VALIDATION.md's
  matrix section says these rules.

Checked locally (python, no build): signatures.py --check and --selftest, refusal_surface.py
--check, --selftest and --missing-basis, coverage.py --check and --selftest, and scripts/matrix's
49 tests pass. The compile gate (fmt, clippy plain, --cfg m2v_gpu and --cfg m2v_cpu_icd, Windows
clippy for gnullvm and msvc, workspace Rustdoc, packaging, the touched crates' suites on the host
and on lavapipe) runs on this sha as potluck jobs that the landing note names.
2026-11-20 07:01:01 -08:00
Anees Iqbal 779eb522b4 Re-derive the generated documents at the landing tip
They are generated from the whole case set, and the set grew on `development`
while this branch was in flight, so the copy committed here counted a smaller
one.

Verified: regenerating at this tip leaves no change beyond the `Generated at`
stamp.
2026-11-20 06:59:54 -08:00
Anees Iqbal ac90becd94 Conformance: the old runtime's side goes; rt's side is the only one, held to one ledger
The cutover deletes metal2vulkan-runtime, so the conformance suite stops depending on it.

What goes: the old runtime's side (runtime_side.rs, runtime_work.rs, states.rs) and its runs in
run.rs, report.rs and the command; the cost verb, the timing-coverage verb, `times`' leg of ours,
the `--rt`, `--default-policy`, `--leg`, `--call` and `--cold-shaders` flags; the four split
binaries that drove the old runtime directly; coverage.rs; and the old side's ledger,
known-gaps.tsv. The harness half of the cutover landed separately.

What stays: rt_side is the only runtime side, and `conformance replay` runs it (CI's
`replay --cpu` now replays rt on lavapipe). Its ledger, known-gaps-rt.tsv, is the one ledger, with
the rows it held; a call rt_side does not answer yet stays Failure::unavailable on it, as before.
The cases keep every allowance: the old runtime's Degradation kinds become the suite's own codes
(degradation.rs, the same `metal2vulkan-degrade-<kind>` codes), and the old runtime's Metal value
enums the cases state become the suite's own (values.rs). The old side's descriptor helpers that
rt_side and its tests used move to rt_side/fields.rs. Recordings keep their `costs` and our times
as data; `deny_unknown_fields` still reads them.

The coverage generator reads rt_side alone, and docs/CONFORMANCE-COVERAGE.md is regenerated.
The README describes the suite as it now is.

Checked: coverage.py --check and --selftest locally. The compile gate (fmt, clippy plain,
--cfg m2v_gpu, --cfg m2v_cpu_icd and for aarch64-apple-darwin, workspace Rustdoc, the suite on the
host and on lavapipe, and the lavapipe replay) runs on this sha as potluck jobs that the landing
note names.
2026-11-20 06:19:03 -08:00
Anees Iqbal a9acc24aa0 Coverage map: rows rt and the translator answer through their own calls, per-row sizes, refusals by rt's names
The fast switch to metal2vulkan-rt marked missing every runtime row whose old counterpart rt
does not hold under the same name. rt's and the translator's Rustdoc answer more of them:
- 28 runtime rows are implemented: the 9-argument texture and buffer-to-texture copies and the
  options form with no option, `enqueue`, `commandBufferWithUnretainedReferences` (the same call
  as `commandBuffer`), every `withRange:` setter of both encoders (a loop of the single setter),
  `useResources:count:usage:` and `useHeaps:count:`, both encoders' memory barriers,
  `newBufferWithBytesNoCopy` (Device::import_host_memory and a buffer in its block),
  `MTLCreateSystemDefaultDevice` (Device::new), `MTLCopyAllDevices`
  (Instance::physical_devices), a texture's `storageMode` through its descriptor, and
  `renderPassDescriptor` (RenderPassDescriptor's Default);
- 23 translator rows are implemented: MTLLibrary and MTLFunction by the translator's Library
  and Function (from_metallib, function, functions, library_type, install_name, properties,
  function_constants_dictionary, reflection), and MTLFunctionDescriptor by FunctionDescriptor;
- maxBufferLength and a texture descriptor's resourceOptions are the consumer's;
- 53 missing rows take their own size and note: encoder calls (S for loops of existing calls and
  store action options, M for stride binds and indirect draws, L for vertex amplification),
  render pass fields, a texture buffer's descriptor and alignment, function options;
- refusals are named by rt's types: Gap::IndirectCommandBuffers, Gap::KernelInput and
  Gap::DrawInput for function tables, RenderPipelineKind::VertexAmplification and Tessellation,
  RenderPassKind::TextureType and NoAttachment, Gap::TextureBuffer;
- 629 notes no longer name the old runtime's items (RuntimeGap's variants, FeatureRow's rows,
  its compiled_reflection, function_handle, allocated_size, new_library_with_source and
  BlitOption).
coverage.py's group names follow (buffers, encoder calls, command buffer options, function
options). docs/METAL-COVERAGE.md and docs/CONFORMANCE-COVERAGE.md regenerated: implemented
593, missing 1118, out of scope 424.

Verified: every implemented row resolves by the test's own rules in its crate's sources (a
script run of them: runtime 237, translator 356, none missing); every `Type::name` a note names
is held by rt or the translator (14 checked; the same check over the table before this commit
finds 26 it does not hold). The compile job is named in the hand-off.
2026-11-20 06:02:37 -08:00
Anees Iqbal 8871d40bdf Validation: delete the old runtime's lane, parity harness, player backend and old-only tools
The old runtime goes at the cutover, and validation's old-runtime-only parts go with it:

- runtime_lane/ (the old runtime's device tests) and the Metal predication probe that pinned
  its streams. Its one rt-based module, the replay player's rt device tests, moves to
  replay/rt_replay.rs with its three old-runtime comparisons cut (the census test on both
  runtimes goes; its rt half is its own test) and a pipeline cache directory of its own in the
  scratch root.
- parity/ (Metal programs compared with the old runtime alone) and its Metal records under
  corpus/observations/parity.
- The player's old backend (replay/old_runtime): command-replay always plays on the new runtime,
  and `--runtime` is gone.
- corpus-draw-ab and format-scout (old-runtime-only tools), scripts/making-bench (corpus-draw-ab's
  bench), and the eleven public fixtures only the deleted sources used.
- The nextest overrides of runtime_lane tests, the queue-plan test group and the few-channels
  profile; the matrix's device-test filter now names replay::rt_replay.
- VALIDATION.md, REPLAY-STREAM.md and validation's README lose the lines of what went.

The candidate executor's runtime path, and validation's dependency on metal2vulkan-runtime, go in
the next commit.
2026-11-20 05:42:33 -08:00
Anees Iqbal 220473aafd Coverage map: the runtime's counterparts are metal2vulkan-rt's, and the test reads rt's sources
The old runtime is being deleted, and the coverage map's 649 runtime rows named its items. Every
runtime row now names metal2vulkan-rt's counterpart or none:
- 180 rows whose counterpart rt holds under the same name keep it;
- 29 take rt's name for it: DeviceProperties fields that are Device methods, the heap placements
  that are Device::new_heap_buffer and Device::new_heap_texture, the lod-clamp and stencil
  setters, the dispatch type taken by CommandBuffer::compute_command_encoder, and a texture's
  getters through Texture::descriptor;
- 73 are out of scope as rt's README gives them to its consumer: labels, MTLHeap and its
  descriptor, MTLBinaryArchive and every descriptor's binaryArchives, a resource's options, a
  texture's parent and shareable getters, a library's and a function's device;
- 367 are missing, each with a group, a size and a note: indirect command buffers (71), function
  tables, handles and dynamic libraries (38), mesh (33) and tile (26) pipelines and their calls,
  encoder calls (59), argument encoders (24), libraries and functions as runtime objects (25),
  and smaller groups. Their sizes are the group's, to be refined.

coverage.py names metal2vulkan-rt as the runtime and gains the new groups;
metal_coverage.rs reads crates/metal2vulkan-rt/src. docs/METAL-COVERAGE.md and
docs/CONFORMANCE-COVERAGE.md regenerated from the table (implemented 542, missing 1171, out of
scope 422).

Verified: every implemented runtime row resolves in rt's sources by the test's own rules (a
script run of them over the tree: 209 of 209); the compile job is named in the hand-off.
2026-11-20 05:28:07 -08:00
Anees Iqbal e639f89d25 rt README, API.md: the known gaps a user reads before the old runtime goes
What each line states, in the section that owns it:
- Known gaps of pipeline states: on RADV a stage's pushed values that the driver reads from its
  own upload can be read past that upload's end (a 12-word load widened to 16), which faults
  where the upload ends the driver's upload buffer and loses a Radeon 780M or RX 7900 XTX.
  Recorded as open: rt places pushed values with no regard to that widening.
- Known gaps of pipeline states: the pipeline cache's cold price per card (RTX 3090 5.8% and
  6.8% slower, Iris Xe 9.8% faster, Radeon 780M level) and its warm effect.
- Known gaps of pipeline states, the identity domains' list: in plain words, a buffer reached
  through a pointer member of an argument buffer or a stored gpuAddress, and a kernel that turns
  a buffer argument's pointer into an integer, each named; the texture behind a pointer member
  named as such.
- Known gaps of render pipeline states: each render content is one whole VkPipeline with no
  shared parts; the heaviest recorded content's cold driver time on two RTX 3090s (1,408 and
  1,335 ms), the dynamic states' share (under 1%), the warm figure, and the render records'
  warm saving on lavapipe.
- Known gaps of render pipeline states: mesh render pipelines have no call in rt and no mesh
  draw; a mesh or object function in a render descriptor's vertex place is the translator's
  refusal.
- Known gaps of queues: a texture or block not shared outside rt, released while an unsent
  upload holds it, keeps its memory until that upload is submitted, and with no later call until
  the device drops.
- Floor: Mesa's driver for Apple GPUs (KosmicKrisp, Mesa 26.3.1) meets the floor on macOS;
  MoltenVK is below it (no nullDescriptor, set 1 refused by its set-layout support query).
- docs/API.md section 5, at PushField::SlotBounds: the bounds check's measured cost (harness GPU
  rows on a 780M, an RTX 3090 and an Iris Xe; replay streams' GPU time a frame; cold pipeline
  makes on two RTX 3090s), and the rt README's check entry points to it.

Why: the old runtime is being deleted; these are the gaps of rt a user meets that the README did
not state, stated as what is true now with the jobs that measured each.

Verified: docs only; the numbers are read from the jobs each line names (the bounds check rows
recomputed from m3-max-56485, -56486, -56546 and -56641). Compile job named in the hand-off.
2026-11-20 05:20:15 -08:00
Anees Iqbal 0cd2ad765d Push placement: on the floor each stage's push ends with its tail, 24 bytes above its other fields
A driver that uploads a stage's push bytes up to the highest one the stage reads, and widens a
push load past its last byte by up to 28 bytes, read past the upload where a stage's last field
ended its push (RADV: 49 compute stages at tip). A read pinned past the fields (R7) cost the
stages a driver holds whole in registers those registers: the pin raised the used-word count past
the driver's limit (RADV keeps all 16 words of the harness's lcg_step in user SGPRs at tip, none
under R7). The tail adds no read where the stage has a field of a tail kind, and moves one.

- lower/push.rs: on PushWindow::Floor, place() lays the longest prefix of the kind order that
  fits with its tail: the highest field of a tail kind (SlotBounds or ZeroAddress, the two kinds
  whose value the consumer never pushes with every bit set) moves HOLE_BYTES (24) above the other
  pushed fields' end; where the pushed fields hold no tail kind, the zero tail word
  (PushField::TailWord at PushPlacement::tail_word) takes that place, with which push_range ends.
  One pushed field of one or two words has no tail. The guaranteed window is packed as before.
- tail(), check_floor(): the structural tail and the floor's bound, which select checks on every
  placement as an invariant error.
- emit: the stage reads its tail in its first block and returns where it holds the value the
  consumer never pushes there (emit_tail_guard): the word non-zero, bounds with both words all
  ones, the zero range's address all ones.
- PushPlacement::tail_word (public, serde default, codec), PushField::TailWord (codec, API
  table); SEMANTICS_VERSION 2201, ARTIFACT_FORMAT_VERSION 556; the old render descriptor key
  re-pinned at 2201.
- Tests: push.rs's floor placements at their tails, the bound's refusals; engine_identity's
  31-slot kernel spills 4 addresses to its block; engine_identity_render's vertex range ends at
  64. Docs: API.md section 5 (the tail and what the consumer pushes), rt README (24 addresses
  below the tail), the profile's window doc.

Verified at 855d973a38 (this change before development's c39f6e8350 and 1de18aa609, which
touch no translator file), m3-max-58299 on msi: the metal2vulkan and metal2vulkan-rt suites
3911 of 3911 passed; the old-path pins (golden hashes over Device::new and the old render key)
pass. Clippy failed there on four indexing lints in push.rs, fixed here with get().
RADV dump (m3-max-58310, Radeon 780M, Mesa 26.2.6): lcg_step keeps the same 16 push words in
user SGPRs with no push pointer, plus a 3-instruction scalar guard; the 18-word kernel keeps its
two loads (+0x20, 32 bytes; the second now at +0x58).
2026-11-20 05:17:29 -08:00
Anees Iqbal 1de18aa609 Tests: the stream device tests of the old runtime's queue plan run at most four at a time
What: .config/nextest.toml's default profile puts the validation crate's
runtime_lane::replay_streams tests, and the three runtime_lane::rt_replay tests that play
on the old runtime too (a_private_shown_texture_is_checked_through_a_copy,
a_tiled_texture_takes_its_buffer_s_bytes_and_levels_at_first_use,
the_address_census_is_the_same_on_both_runtimes), in a test group, queue-plan, of
max-threads 4. These are the tests of the GPU legs' filter (DEVICE_TEST_FILTER in
scripts/matrix/matrix) that open a lane device of the old runtime's queue plan (at_plan).
docs/VALIDATION.md's paragraph on a GPU of few channels says so. The few-channels profile
stays: the lane's other at_plan tests lie outside the group, so a whole lane run on such a
GPU still takes it.

Why: the RTX 2080's GPU leg (NVIDIA 620.70.06) failed 3 runs of 3 at b4058db961
(m3-max-58129, m3-max-58168, m3-max-58241), each at the same test:
tests::translate::on_device::every_device_removes_a_blob_it_cannot_take, "NVIDIA GeForce
RTX 2080: vkCreateDevice failed: Initialization of an object has failed". In the seconds of
the failure the kernel logged NVRM "kchannelAllocMem_GM107: Could not create Channel" (31
times in 58241), "kchannelAllocMem_GM107: Instance block allocation ... failed" and
"heapAlloc_IMPL: no free blocks" (39). 58241 sampled the card and the test processes every
0.3 s: at the first error 17 test processes were alive, 15 of them replay_streams tests,
whose devices take the queue plan's 18 VkQueues, each a channel on NVIDIA's driver (the 2080
holds 10 such devices). The card had 242 to 257 MiB of its 8,192 in use then, 1,458 MiB at
most over the leg, 393 MiB reserved: not its memory. The test alone passed (m3-max-58193,
0 NVRM lines), and so did it 18 runs of 18 beside the host-import timing test alone
(m3-max-58237). The lane's devices wait for room (runtime_lane/device_room.rs); the new
runtime's device tests take the driver's refusal as it is. Four devices of the plan are 72
VkQueues, which leaves room for six more: the leg's other 12 processes, whose new runtime
devices take at most 2 VkQueues each, and other programs' devices on the GPU.

Verified (archive m3-max-58111 at b4058db961; the nextest config of a commit whose tree is
this commit's, read from the workspace):
- m3-max-58271, exclusive on homelab-um790-xtx-1: the 2080's leg 506 of 506 passed, exit 0,
  0 NVRM lines, 0 refused channels, at most 4 of the group's tests alive at once; the replay
  tests' wall time 33.4 s; the leg 167.4 s (175.1 to 185.4 s in the three failed runs).
- The same job, the RX 7900 XTX's leg in turn before, after, after, before: 21.62 and
  21.44 s before, 21.57 and 22.09 s after (1.4% longer on the means); the replay tests' wall
  time 3.1 and 2.9 s before, 2.9 and 3.7 s after; at most 8 and 11 of the group's tests alive
  at once before, 4 after; every run 506 of 506, exit 0.
- m3-max-58260: the 2080's leg under --profile few-channels (3 test threads), 506 of 506,
  exit 0, 0 NVRM lines, 166.4 s, the replay tests' 22 runs 54.9 s in all (434.2 s in 58129).
2026-11-20 04:49:59 -08:00
Anees Iqbal f7a833a939 conformance coverage: the ledger rows of bicubic-texel-classes; its sRGB rows name both notes
docs/CONFORMANCE-COVERAGE.md lists the ledger rows, so it is regenerated with the case's
35 old-runtime rows. The old runtime's sRGB rows say "the static notes ... and
srgb-texel-decode".

Verified: scripts/conformance-coverage/coverage.py --check reports the document as derived;
m3-max-57864 at 23dcb71cd6 failed only the coverage test this fixes, and its lavapipe
replays of both runtimes read the ledger rows clean (exit 0).
2026-11-20 02:55:02 -08:00
Anees Iqbal bafdd29f9c conformance: bicubic-texel-classes's rows on an RTX 3090; the note's figures with it
The 3090 answers as lavapipe does (its half results unnarrowed, RGBA16Unorm's largest
difference 2.16e-4), and the old runtime's sRGB row reaches 1.58e-3 there, so the
note's per-format figures in docs/API.md take it.

Verified: the rows are the replay's own ready-to-paste rows at 40bc6a759e on the 3090
(m3-max-57815).
2026-11-20 02:55:02 -08:00
Anees Iqbal a1c3a472bb conformance: bicubic-texel-classes's known-gap rows; the bicubic note states what Metal measured
The case's samples differ from Metal's on every venue by the precision note
BicubicFilterArithmetic: Metal's bicubic results lie on the format's grid (a sixteenth
of a code for the 8-bit classes, a whole code for RGBA16Unorm, an exact half for
RGBA16Float), and at the six RGBA16Float samples whose sum lies exactly halfway between
two halves Metal rounds away from zero; ours is the unrounded f32 sum. Under rule 1 a
filtering answer within Metal's precision is the device's, under its static note, so no
form rounds the sum onto Metal's grid.

docs/API.md's catalogue entry for the note and the note's own definition state those
measurements and the largest difference per format over the venues run. Both ledgers
carry the case's divergent rows per venue (lavapipe, the M3 on KosmicKrisp for the new
runtime and on MoltenVK for the old, a Radeon 780M, an Iris Xe), and the new runtime's
ledger the sRGB texture's refusal (Gap::BicubicTexels) at every venue.

Verified: the rows are the replays' own ready-to-paste rows at 40bc6a759e (lavapipe on
msi, m3-max-57732, m3-max-57813 on a 780M, m3-max-57816 on an Iris Xe); the tie scan
compared rt's lavapipe samples with the recording in exact arithmetic.
2026-11-20 02:55:02 -08:00
Anees Iqbal a816607226 conformance: Metal's recording of bicubic-texel-classes (the M3, macOS 27.0.1), its arms held by three tests; CONFORMANCE-COVERAGE.md regenerated 2026-11-20 02:55:02 -08:00
Anees Iqbal 6833eba8e2 identity domains: a 2D bicubic sample reads its slot's format treatment from a pushed word
Under the identity domains (Device::from_queries, the new runtime's translator device) every
kernel that sampled a texture through a bicubic constexpr sampler was refused as
Unsupported{IdentityDomains} ("a bicubic filter"), because the filter's treatment of the bound
format (its inner taps, its clamp and its border texels) was a SpecKey::BicubicTexels
specialization the old binder sets from the bound texture. One compute pipeline of every macOS
guest boot met that refusal; the old runtime builds it.

The treatment is now one u32 field per bicubic slot, PushField::BicubicTexels(SlotRef), placed
and filled as TextureIntegerChannels is. The 2D routine already took the bits as a run-time value
(Bits::Value), so a sample reads the field instead of the constant; no per-format pipeline, no
new descriptor. metal::format::bicubic_texels_word(pf, swizzle) gives the word the binder
specializes the constant to (BICUBIC_TEXELS_UNBOUND for a slot bound to nothing), and None for a
format of no measured family or of 8-bit sRGB codes. rt fills the field from the bound texture
when the slot's texture changes, and refuses a dispatch whose bicubic slot holds a texture with no
word as Gap::BicubicTexels, naming the slot and the pixel format. The static precision note
BicubicFilterArithmetic stays.

Still refused under the identity domains, each the refusal it was: a bicubic sample of a 1D
texture or at pixel coordinates (and the in-place two-plane routine), an argument buffer's
texture, an array of samplers. The default domains (Device::new, the frozen old runtime's path)
are unchanged: they still specialize SpecKey::BicubicTexels and state RuntimeFact::BicubicTexels,
and the binders refuse the new field.

SEMANTICS_VERSION 2199 -> 2200, ARTIFACT_FORMAT_VERSION 554 -> 555 (a new push field tag).
docs/REFUSALS.md regenerated; api_signatures table blessed; docs/API.md and the rt README's known
gaps say what is lowered and what is refused.

Tests:
- engine_identity::a_bicubic_kernel_reads_each_slots_format_treatment_from_its_pushed_field
  (replaces the refusal test; fails without the change): bcu_formats on lavapipe and moltenvk-m3
  profiles under the default domains keeps its 10 facts and 10 spec keys and no push field; under
  the identity domains it compiles, passes L3, pushes the 10 slots' fields, declares no spec key
  and no fact, and keeps the precision note; bcu_forms (1D) and bcu_address (pixel) still compile
  on the default domains and are refused under the identity domains.
- rt tests::bicubic (device cfg): each format bound at every slot of bcu_formats pushes its word,
  its arm asserted per format (R32Float linear; RGBA8Unorm, RGBA16Unorm, R8Unorm the [0, 1] clamp;
  RGBA8Snorm the [-1, 1] clamp; RGBA16Float no clamp), an unbound slot the unbound word, and an
  RGBA8Unorm_sRGB texture at slot 3 is Gap::BicubicTexels naming slot 3 and the format.
2026-11-20 02:55:02 -08:00
Anees Iqbal b506518794 rt: prepare_dispatch's tests, README and surface; the player's read-ahead encoder a struct
Tests: the pre-pass grid against each call's own (a saturated dispatchThreadgroups axis, a
dispatchThreads grid of u32::MAX on a size that does not divide it, indirect), GPU-free; on a
device, prepare-then-dispatch of an observing kernel for each kind, each call making exactly one
pipeline (and the ragged grid its one lowering) and the dispatch then waiting for nothing; a
second call making nothing; what the dispatch records nothing for or refuses making nothing; the
emulated-SIMD-group variant prepared; a square-form grid eight deep prepared; and the same
counts recorded and submitted with the calls and without, on two devices.

README: the hook in the compute pipeline states section, and the translation bound the caller's
width multiplies. api_signatures blessed; REFUSALS.md regenerated (the refusal sites moved into
the shared helpers, no new refusal).

Verified: the check job that follows this commit.
2026-11-20 02:44:56 -08:00
Anees Iqbal e4de7cc44e rt: undo the per-slot refill and the changed-words push; a draw and a dispatch refill every slot again
What. Reverts the refill series (68740984ba, 5b164777bd, 71ef1ba14b and its tests b97d37c104,
c076e8d17b, cd134b0995) on development, keeping everything landed since. A render or compute bind
marks the encoder changed again, and the next draw or dispatch finds and fills every slot's facts
and fields and writes every spilled block into the ring, as at f44fb795ae. A draw or a dispatch
whose push bytes the command buffer already holds pushes nothing; any other pushes the whole
window. Rebound, the per-slot facts, Pushed's span and mark, Metrics::push_bytes and
tests/refill.rs go; the push and push-window tests of f44fb795ae come back. rtover's over check
stays as it landed: the texture setters keep their over count (Tables::set_texture, the compute
encoder's `copied`), and the draw keeps Overs' reached form. docs/REFUSALS.md re-derived: the
refusal sites move back from `refilled` and `find` to `dispatch`.

Why. The planner's bar for the series, as amended: instructions a draw and a bind at or below
f44fb795ae's for the refill's own share. If the bar fails, the bookkeeping is undone, and the
push of changed words stays only if it alone meets the bar. Neither does. Harness, own user
instructions, 780M (um870, one round, m3-max-57484; the exclusive rounds m3-max-57397 on gem10
and m3-max-57398 on the 3090 read the same):

  arm                                      a draw   a bind
  f44fb795ae (the bar)                        842      739
  92b9cbb232 (the series alone on it)         963      874
  7096fa7de3 (development)                    958      887
  3cc134e439 (the series' fix)                943      835
  24dd31af87 (this undo, on 3cc134e439)       836      751
  05cca3d165 (the undo + changed words)       887      770

The series alone adds 14.3% a draw and 18.3% a bind. Its fix still left 11.9% and 13.0%. The
push of changed words on its own adds 5.3% a draw: comparing the window word by word costs more
than the whole-window compare it replaces. The undo is 0.7% under the bar a draw and 1.6% over it
a bind; the commits besides the series account for the +12 a bind (rtover's over count in
set_texture; bind_2000 sets a fragment texture before every draw). At the fix, bind_2000 was
18.7% slower on the 780M and 15.6% slower on the 3090. The gain the form was ordered for did not
come: on the video stream (vaapi-780m, lavapipe, m3-max-57454 and m3-max-57460), fields filled a
bind fell from 1.42 to 1.22, but the bind redo (fill_push, Facts::find and the held block) rose
from 901 to 1,079 instructions a draw.

Verified: the table above (m3-max-57484: each arm one harness process on a fresh cache, release).
24dd31af87 is this commit's rt, translator and validation tree but for dfb00c74c6's import test.
cargo fmt; the refusal surface regenerated with scripts/refusal-surface/refusal_surface.py.
2026-11-20 01:13:26 -08:00
Anees Iqbal a48d634517 conformance: two ushort3 function constants read as half3, on Metal and on both runtimes
A case of our own MSL that reads its constants the way the consumer's two refused records do:
engine/fc_ushort3_half3 (our MSL, compiled by scripts/regen-air-fixtures on the M3) declares two
ushort3 function constants and reads each through as_type<half3>, which the compiler folds into
a <3 x half> load of the constant's <3 x i16> global (the regenerated .ll holds exactly that
load), so the translator holds both in the constant blob. Thread t stores, as floats, lane t % 3
of each, their half sum and t; the values (1.0, 2.5, -0.75 and 0.5, 4.0, 1.25) have exact sums.

The suite gains the call that makes such a pipeline: Side::compute_pipeline_with_constants
(newFunctionWithName:constantValues:error:, then newComputePipelineStateWithFunction:error:), on
the Metal side, the new runtime's side (FunctionDescriptor.constants), the old runtime's side and
the watching wrapper. The Metal side's constant setter pads each value's packed bytes with zeros,
so a setter that reads a vector type's aligned size reads zeros past the packed lanes.

Metal's recording (the M3, macOS 27.0.1 26A434, `conformance record` with three runs and the
validated leg, then `times --runs 8 --write`) stores the program's floats for every thread,
which metal_stores_the_programs_floats holds. The engine fixture inventory gains the fixture's two
rows, ok on every profile (blessed on the M3).

The case is named among those authored after the last whole-set cost --write, whose next
run pays its cost record, and docs/CONFORMANCE-COVERAGE.md is regenerated for it. The golden
table gains the fixture's cells on development, where the tables are blessed.

Verified: see the check job named in the landing.
2026-11-20 00:28:33 -08:00
Anees Iqbal a89e4c0838 identity domains: the constant blob is the module's own words; rt's two constant-data gates go
Under the identity domains a function binds no descriptor, so a function reading the constant
blob was refused ("a resource bound through a descriptor"): the 16-byte blob of two ushort3
function constants read as half3 (as_type, folded by LLVM into a <3 x half> load of the
<3 x i16> constant, which fails the typed-access test) refused a consumer's kernel on both
records.

There the blob is now a Private u32 array whose initializer is the blob's little-endian words,
zero-padded to 16 bytes as a bound blob's range is (memory::blob, BlobHome::Module). The blob's
existing word-composed leaf loads read it, every load checked against the array's length (no
robustness covers Private memory); use_blob counts no descriptor and the artifact carries no
blob, so no stage has a constant_blob. Off the identity domains nothing changes (BlobHome::Bound).
The module's blob counts in the plan's private bytes where an access reaches it at an offset only
the run knows, as a run-time-indexed Private constant does, and its declaration's words count in
the size estimate.

The bound is memory::blob::MODULE_BYTES = alloca::MAX_UNSHARED (64 KiB), the most the typed
objects of one function may declare: a typed constant up to that size is already a Private
variable with its initializer, so the module's blob gives the make no larger initializer than
one of those. Past it the identity refusal names the kind, "constant data of N bytes read through
memory", in place of the descriptor catch-all.

rt: nothing reaches its two gates on constant_blob now (rt always compiles under the identity
domains, and the linked stages' constant_blob is None), so interface()'s Gap::KernelInput for
it and RenderPipelineKind::ConstantData are deleted, with the README's two mentions and the
variant's row of the API signature table. docs/REFUSALS.md regenerates unchanged (the variant was
in no section); no crate-root item changed. SEMANTICS_VERSION 2199: identity modules and refusals
change; the encoding does not. The old runtime's render descriptor key, which hashes the version,
is pinned at its 2199 value.

Tests: engine_identity's blob_words kernel reads the records' half3-of-ushort3 load and 2-byte
units at run-time offsets, one past the words: under the identity domains no descriptor, no
artifact blob, private bytes +32, L3, and the CPU interpreter's answers (zero past the words);
the default domains bind the same 24-byte blob. blob_past (a 65,600-byte blob) is refused naming
its size where the default domains bind it.

Verified: see the check job named in the landing.
2026-11-20 00:28:33 -08:00
Anees Iqbal f631d9081d Re-derive the generated documents at the landing tip
They are generated from the whole case set, and the set grew on `development`
while this branch was in flight, so the copy committed here counted a smaller
one.

Verified: regenerating at this tip leaves no change beyond the `Generated at`
stamp.
2026-11-20 00:05:53 -08:00
Anees Iqbal f1c3a2557e translator: spilled fields read 16 bytes at a time, through a NonWritable block
Under the identity domains a function's fields past its push window live
in a parameter block at the pushed ArgumentTableAddress, and each was read
by a load of its own size (a slot's bounds: 8 bytes, aligned 8) through a
writable device place. The block is now read in 16-byte lines: each line a
spilled field touches is one uvec4 load, aligned 16, made once where it
dominates (EmitCx::block_line, so load_push_fields' reads at entry share
them), and each field is taken from its line (a word, a two-word shuffle,
a bitcast for an address, whole lines for a region). The place's member is
NonWritable: nothing writes the block while a command reads it, so a device
may read it as read-only memory; device_place_read_only notes that RADV
reads a uniform address of such memory with a scalar load.

The block's address is a multiple of 16 (rt's ring aligns every write to
16) and its size is (argument_table_size), so every line lies in it.
docs/API.md states that contract for a consumer.

Why: wide_bindings spills 23 of its 24 slots' bounds; it read them as 23
loads of 8 bytes, now 12 of 16. In one stream's kept lowerings
(gb-3090-r2) 2 of 424 modules spill: 14 spilled bounds become 7 lines,
2 become 1. SEMANTICS_VERSION 2197 -> 2198: module words change.

Test: engine_identity_spill's vertex function loads each 16-byte line of
its spilled fields once, in its first block, as a uvec4 aligned 16 through
a NonWritable block; its interpreter tests read the spilled bounds as
before.
2026-11-19 23:35:15 -08:00
Anees Iqbal bda9935e09 rt: VK_NV_linear_color_attachment where listed; a plane renders through its bit only as a LINEAR image, marked, in a pass of such planes alone
The RTX 3090 and the RTX 5080 Laptop GPU (NVIDIA 620.70.06) give every plane format's linear
tiling, and its DRM_FORMAT_MOD_LINEAR modifier where listed,
VK_FORMAT_FEATURE_2_LINEAR_COLOR_ATTACHMENT_BIT_NV in place of the colour attachment feature.
Query::plane asked the image format query alone, which offers the colour attachment usage there,
so rt rendered NVIDIA's in-place planes through that bit with the extension off.

- Floor: VK_NV_linear_color_attachment joins OPTIONAL_EXTENSIONS (enabled where listed), and its
  linearColorAttachment feature (LINEAR_ATTACHMENTS) is enabled where the device lists the
  extension and reports it, which Vulkan requires of a device that lists it. Vulkan 1.3 needs no
  other extension for it (its dependency is VK_KHR_get_physical_device_properties2 or 1.1). The
  translator is told of neither. Core::linear_attachments carries the enabled feature.
- The plane test (surface::held_usage): a usage is offered where the image format query offers it
  AND the plane's own tiling's format features (LINEAR's for an opaque handle, the
  DRM_FORMAT_MOD_LINEAR modifier's for a dma-buf, read through VkDrmFormatModifierPropertiesList2EXT)
  hold what the optimal image has for that usage (texture::kept_features, the test a texture over a
  buffer takes), and for rendering the colour attachment feature itself
  (VUID-VkImageViewCreateInfo-usage-08931). The NV bit stands for the colour attachment feature only
  where linearColorAttachment is enabled AND the image is VK_IMAGE_TILING_LINEAR: Vulkan sets it
  "for renderable color formats in the linearTilingFeatures" alone. So NVIDIA's opaque fd planes stay
  in place on the enabled path and its dma-buf planes take the copy form (SurfaceCopy::Tiling).
- The condition, held by rt: a plane accepted through the NV bit is marked at its make
  (surface::linear_alone, SurfaceImage and Image linear_attachment, Attachment::linear). A pass's
  begin (Pass::check, pass::linear_shape, one mark read an attachment) refuses with the new
  Gap::LinearPlanePass { kind: LinearPlanePassKind }: OtherColor, a colour attachment that is not a
  marked plane (the extension's rule: "as long as all the color attachments in the render pass
  instance have VK_IMAGE_TILING_LINEAR tiling"); DepthStencil, a depth or stencil attachment (not
  Vulkan's rule: an RTX 3090 lost the device on that shape, and rt recovers from no loss, so by the
  ladder's third rung it is not used; the words name the driver); Resolve, a multisample
  attachment resolving into a marked plane. Every colour attachment marked (both planes of a
  picture in one pass among them) with nothing else set renders.
- Unchanged: a texture over a Shared buffer keeps its plain-bit test and its counted copy; the old
  runtime is not touched.

The rt README: the surface test and the marking (Exported surfaces), NVIDIA's dma-buf planes as a
copy-form known gap, the refusal among the render encoders' known gaps, the extension row and a
Linear attachments feature table (Floor); the clear-reach slip "inside the Metal's render area"
fixed. docs/REFUSALS.md regenerated; api_signatures.tsv blessed: the new variant and enum,
floor::Features::linear_attachment, OPTIONAL_EXTENSIONS' value.

Tests: tests::floor (the extension and feature enabled where listed and reported, the README
table); tests::surface::verdicts (NVIDIA's linear word: held and marked only as LINEAR with the
feature, the copy form without it and under the modifier either way, the plain bit unmarked,
blend and filter held to the optimal image); tests::pass (linear_shape: one and two marked planes
render, the three shapes refused); tests::linear_planes on device (a draw into one plane and both
planes in one pass rendered and compared on every device; the three shapes refused where the
plane is marked and rendered, compared, where it is not).
2026-11-19 22:13:45 -08:00
Anees Iqbal 4c39fc5bcb docs: the compressed-texel-decode entry's ASTC bound follows the cost the old runtime announces
What: in docs/API.md's compressed-texel-decode catalogue entry, the sentence on the ASTC LDR bound
(up to 1/2048 off Metal's on ANV, Mesa 26.2.6, the Iris Xe of Raptor Lake-P, over the fourteen
footprints) moves from inside the Cost: words to its own sentence after them.

Why: c77d059c68 put it in the middle of the Cost: words. The old runtime announces
Degradation::CompressedTexelDecode with a fixed cost string, and its catalogue test
(tests::degradation_catalogue::a_runtime_kind_s_entry_states_the_cost_it_announces) holds that an
entry's Cost: text begins with those words. It failed at development b676eda182 (tip check
m3-max-56610, the product suite's one failure of 6200). The old runtime is frozen, so the doc
moves, not its string. The bound and the conformance constant that cites it are unchanged.

Verified: the doc diff alone; the test runs in the check job on development after landing.
2026-11-19 22:00:46 -08:00
Anees Iqbal b676eda182 rt: a colour render target takes an index, and a draw reads it as an attachment as it reads a shader-read one
Metal fetches any render target, and its header gives every texture a handle with no tie to
usage (MTLTexture.h: gpuResourceID, "Handle of the GPU resource suitable for storing in an
Argument Buffer"). rt took an index only for shader-read or shader-write usage, so a colour
target made for rendering alone had no second element and every fetch from it was
Gap::Draw(FetchedAttachment): guest 26's 4,792 refusals, all of that shape.

- The index rule: shaders reach a texture made for shader reads or writes, or a colour render
  target (render-target usage of a pixel format with no depth or stencil), which takes an index
  exactly where it does (Refusal::TextureIndex), at every maker: new_texture and the heap, buffer
  and Managed makers, views, drawables and surface planes. A depth or stencil target made for
  neither is unchanged.
- A colour render target not read takes what a shader-read one takes for attachment reads: the
  sampled usage, and the feedback usage where the image format query offers both beside its
  usage; the shadow on a device without the loop; neither where the query refuses them, and its
  draws that read it stay Gap::Draw. Its home stays the attachment layout, so a pass that does
  not read it records no move of it, and a fetching pass moves it home, feedback, home with the
  existing move code.
- Only its second element is written: its sampled-texture element stays the null one, so a slot
  that binds it reads nil as before. place_texture takes the view its second element names in
  place of a flag.
- A linear image in place over a buffer takes no sampled usage for a target shaders do not read.
- The in-tree consumers take the rule: the replay player's texture class, the harness's and the
  conformance suite's rt side. rt's own tests make their unindexed colour targets with
  new_texture_for_views, and give indices where a test needs new_texture's path.
- docs/RESOURCE-ID.md, the runtime README and Refusal::TextureIndex's doc say the rule; docs/REFUSALS.md is regenerated.

Also rides along, from the planner, in the README's known gaps of memory blocks: a block freed
before a submission used it waits on the block-maker thread for its bind, and a ring take that
needs a new ring block can wait behind it.

Verified: see the check job named in the landing.
2026-11-19 21:40:56 -08:00
Anees Iqbal 6e010b843f rt lock budget: a test that counts nothing says so, and the matrix shows its leg as not counted
A lock-budget test on a node that names no M2V_LOCK_EVENT returned early and passed, printing a
LOCKS-UNMEASURED line the matrix's filter dropped with the rest of a passing test's output. The
gem10 and um870 legs passed that way at 1ae9003019 while every leg that counted failed, and the
report could not tell them apart.

Each budget test now names its record (Locks::open takes its key) and prints, where it counts
nothing, 'LOCKS <test>: not counted, the node names no M2V_LOCK_EVENT' and
'M2V-MATRIX uncounted lock_budget/<key>'. The matrix keeps that line as it keeps a record
(KEEP matches 'M2V-MATRIX '), results.parse_suite collects it, leg_entry stores the leg's keys
(results.leg_uncounted), and the leg's verdict line ends in 'not counted: <keys>'. No node
setting changes.

Verified: scripts/matrix's unittest suite, 87 tests, OK locally, with the new
UncountedTests case (a passing test's line through matrix.KEEP, parse_job and verdict_line).
2026-11-19 21:12:49 -08:00
Anees Iqbal ff507ed9b5 rt: the border swizzle from the image where reported, and an opaque-black border's static note
Where a device lists VK_EXT_border_color_swizzle and reports borderColorSwizzleFromImage, device
creation enables the extension with both its features: borderColorSwizzle, which Vulkan requires
of every device that lists the extension, and borderColorSwizzleFromImage. Elsewhere neither is
enabled. Sampler creation is the same form on every device. No sampler chains
VkSamplerBorderColorComponentMappingCreateInfoEXT on any device: a sampler in the arrays meets
every view, and that structure names one mapping. So the struct is left off everywhere, and
VUID-VkSamplerBorderColorComponentMappingCreateInfoEXT-borderColorSwizzle-06437 cannot fire. With
the feature, an opaque-black border sampled through a view whose component mapping is not the
identity reads through that mapping, as Metal's border reads through the swizzle. Without it,
Vulkan leaves that texel undefined; the NVIDIA driver reads (0, 0, 0, 1).

A new static note, PrecisionNote::SwizzledOpaqueBlackBorder, records that difference, decided on
every device by the sampler alone:
- SamplerState::precision_note is Some for a descriptor whose address mode reads the border
  (ClampToZero or ClampToBorderColor) with an opaque-black colour (SamplerDescriptor::shape's
  opaque_black_border).
- A compute or render pipeline carries it among its precision_notes where a function samples
  through a constexpr sampler of such a border. That is decided by the constexpr sampler's own
  constants, through the device sampler the translator states for it
  (CombinedSampler::constexpr_sampler).
- The conformance rt side collects the sampler state's note with the others.

The rt README records the known gap and the feature table. docs/API.md has the catalogue entry.
The translator's cache appends the variant (ARTIFACT_FORMAT_VERSION 553 -> 554). Validation
derives no tolerance from the note (Allowance::Unbounded).

The old runtime's degradation.rs gains a notes entry, because Degradation::from_precision_note
matches every PrecisionNote. DeviceDepthBias did the same. The old runtime announces nothing new.

Census, GPU-free, over the 31 kept replay streams:
- 0 sampler states read an opaque-black border.
- 0 of 4609 constexpr samplers do, over the 12213 functions of their 322 distinct libraries.
  12 functions did not decode under the standard budget and are not counted.
2026-11-19 20:59:59 -08:00
Anees Iqbal 653014c278 conformance: the heap cases name their size allowance where the coverage document reads it
docs/CONFORMANCE-COVERAGE.md derives each case module's tolerances from the Allowance::new calls
in its own text, so the helper in texture_query.rs left the four heap modules reading 'every
field' while they loosen both numbers of every answer on the new runtime. Each module now names
the allowance itself (the same path, loosening and justification); texture_query keeps the entry's
slug, DEVICE_OWN_SIZES, with the rule in its doc. The document is regenerated: the four heap
modules, pass_sequence_actions and astc_textures each read one more tolerance, 26 in all.
2026-11-19 20:41:18 -08:00
Anees Iqbal 1f4cb5b986 conformance: the new runtime's heap texture sizes are held by their property, not by Metal's numbers
metal2vulkan-rt answers heapTextureSizeAndAlignWithDescriptor: with the device's own image
requirements, raised to bufferImageGranularity (its README's heaps), so on the Iris Xe 588 sites
of the heap families read divergent against Metal's numbers. They are not a bug and not ranked
against the old runtime: a consumer places by this device's answers.

So on the new runtime's run the cases stop comparing the two numbers with Metal's and the side
holds each answer to what a consumer places by, before answering it (rt_side/heap_sizes.rs):
1. the alignment is a power of two, for every query;
2. for a Private query, a heap of align + size bytes takes the texture at offset align;
3. there, level 0's first slice written from a buffer at Metal's layout of the level reads back
   unchanged.
A Shared, Managed or Memoryless query is held to step 1 alone: rt places heap textures in Private
blocks only, and placing the descriptor in a Private heap would answer another query. A
descriptor whose bytes rt does not move, which its copy answers Gap::TextureBytes (depth and
stencil both, multisample) or Gap::FloatDepthUpload (Depth32Float) for, is held to steps 1 and 2.
A failed step answers its failure, so the site still diverges (Err where Metal answered).

The cases (texture-pairs, heap-sizes, format-footprints, ycbcr-two-plane-format-descriptors)
name an rt-only allowance per query at case/<query>/size-and-align/Ok/*, Unchecked, justified by
a new docs/API.md section 10 entry, "The new runtime's heap texture size and alignment are the
device's own", worded as rt's README words it and naming the three steps. The old runtime's run
compares exactly, as before. A refusal still diverges: the allowance is under Ok.

Tests: every recorded heap answer (18 recordings, 2425 answers) has both numbers under that
allowance and its refusal site under none; every NewRuntimeAccepted slug a case names is a
section 10 entry (the existing check now covers rt-only slugs too).
2026-11-19 20:41:18 -08:00
Anees Iqbal c77d059c68 conformance: the ASTC cases hold the device's decode under compressed-texel-decode
On the new runtime a linear (_LDR) ASTC texture whose block the device holds is read through the
device's decode, the static note compressed-texel-decode (Texture::precision_note). The case
named only decoded-texel-precision for its linear forms' texels, the old runtime's emulated
decode, so on the Iris Xe its fourteen linear footprints' texels were unlisted rows, up to 0.00049
off Metal's value. The case now loosens each round's texels on the new runtime's run by the
catalogue's bound for that note, 1/2048 plus the float rounding of both values, justified by the
note alone (rt-only; the old runtime's run is unchanged). The catalogue entry states the ASTC
bound and where it was measured (ANV, Mesa 26.2.6, Iris Xe of Raptor Lake-P, fourteen
footprints): 0.00049 is under 1/2048 (0.000488...) only with the rounding allowance, so the
figure is stated with it. sRGB and HDR forms still compare exactly.
2026-11-19 20:41:18 -08:00
Anees Iqbal 0c451c569e conformance: the two new fetch-ordered cases take fetch-ordered-bgra8unorm's ledger rows
A fetch from a target made for shader writes and from one of unknown usage answers as the fetch
from a target made for shader reads, on both runtimes: the same three texel sites a code apart,
with the same counts on each card. Each ledger takes the read case's rows for its venues, reason
text unchanged (the device's conversion into an 8-bit unorm attachment it also fetches). The
coverage document counts the twelve rows the old runtime's ledger gains.

Verified: see the check job named in the landing.
2026-11-19 20:36:18 -08:00
Anees Iqbal 7839fa0876 conformance: the coverage document counts the two new fetch-ordered cases
Regenerated by the coverage tool at the cases' commit with their recordings: two more committed
recordings, fetch_ordered's six cases, and the case lists of the items they drive.

Verified: m3-max-56114 (msi) regenerated it, then conformance-host 1090 of 1090 passed, the
coverage document test among them; clippy of the conformance crate 0.
2026-11-19 20:36:18 -08:00
Anees Iqbal 5458ac7954 validation: a check or dump of a buffer with two copies names the copy it read
A two-copy stream's Managed buffer has a CPU copy, which Metal's contents answers, and a device
copy, which commands read. The player's check and dump read the CPU copy (Backend::read on the new
runtime), and nothing said so: on a discrete card, two plays' dumps of #106455 agreed as CPU copies
while the device copies the kernel read differed (count word 1848 against 12), and the verdict
'inputs equal' rested on them.

Now a check line of such a buffer ends '(CPU copy)' or '(device copy, read back)', a dump holds
cbC-objO.copy with those words, and compare-dumps compares only the same copy of both plays,
reporting 'copies differ' otherwise and counting the buffers compared as CPU copies and as device
copies in its summary. The new runtime's play reads the device copy with --read-device-copies yes:
through a blit into a Shared buffer of the play's own where the runtime keeps one, through the
buffer's mapping where the device's one copy is the GPU's and the player keeps the CPU's. On a
device that keeps a device copy, the report's 'managed digests' line after its device line says
which copy the play reads. Backend::read_copy names it; the old runtime's backend names none.

Tests: a_read_of_a_buffer_with_two_copies_says_which_copy_it_took (no device: both labels in the
check lines and dumps, the compare of like and unlike copies) and, on a device,
a_check_of_a_managed_buffer_names_the_copy_it_read (a blit's fill reaches the device copy: the CPU
copy reads zeros, the device copy read back reads 7s; the header line where the device keeps a
device copy). docs/REPLAY-STREAM.md section 10 says it.
2026-11-19 20:00:32 -08:00
Anees Iqbal 2c1ecbdd16 conformance: resolve-store-then-load, a resolving store's samples loaded by the next pass
pass_sequence_actions crosses a store with the next pass's load over a single-sampled attachment;
this case asks the crossing it leaves open: whether the samples
MTLStoreActionStoreAndMultisampleResolve keeps are the samples the next pass loads. Each cell
runs two passes over an 8 by 8 RGBA16Float attachment of four samples: pass A clears it and draws
into each 2 by 2 cell under a sample mask of the cell's index, then stores and resolves into
resolve A (or, in the control cell, only stores); pass B loads it, draws into cell 0 under a
mask of its own and stores and resolves into resolve B. A kernel reads every sample after pass
B, and blits read resolve A and resolve B. The sample mask, not the device's sample positions,
decides which samples a draw writes, and every value is exact in half. A side that resolved in
the pass and dropped the samples answers every resolve right and every later load wrong.

Recorded on the M3 Max, macOS 27.0.1 (26A434), by `conformance record` in job m3-max-55692,
eight runs alike, and timed there by `conformance times --runs 8 --write`. Named among the cases
after the last cost run. CONFORMANCE-COVERAGE.md regenerated (job m3-max-55697: the conformance
crate's clippy clean and its host suite 1090 of 1090).
2026-11-19 18:53:05 -08:00
Anees Iqbal f61fee8aac replay: the new runtime's play reports its commits' waits for the work lock
The executed counters take the runtime's commit_lock_wait_nanos, so a frame's line gives its
commits' waits for the work lock, summed; the backend's lines give commit_lock_wait_max_nanos,
the longest wait in the play, which is a maximum and no frame's counter. The runtime has no
product metric of the other calls' waits for the lock (the surface make's included): only the
device tests' per-thread total times those (crate::submit::waits).

Read with it (player built at this change's first form, 307b1998f9, job m3-max-55631; no
validation layer; the player commits from one thread, so these say only that the runtime's own
threads, submit, completion and block maker, hold no caller long):
- syncview-4k-780m, whole (1501 frames), Radeon 780M (RADV), job m3-max-55670: 0.609 ms of waits
  over 8066.2 ms of frames (0.008%), the mean frame's share 0.007%, the worst frame's 0.301%
  (0.022 of 7.436 ms), the longest wait 23.3 us, no frame's waits past 1 ms;
- glbench-3090-r2 to frame 300 (301 frames), lavapipe, job m3-max-55669: 3.680 ms over
  39383.2 ms (0.009%), the mean frame's share 0.007%, the worst frame's 0.431% (0.015 of
  3.370 ms), the longest wait 1.367 ms, in the one frame whose waits passed 1 ms (1786.6 ms long).

Verified: see the check job named in the landing.
2026-11-19 18:46:06 -08:00
Anees Iqbal 4f5289012a identity domains: a checked slot's limit once per access size, in the function's first block
A checked access (an access of a slot the identity domains check, at an offset the module does
not hold as a constant) emitted the normative check whole: m + before, len >= n, len - n, a
compare and an and, five instructions (25 words) per access. Two of them depend only on the
slot and the access size. The check is now at = m + before; at < limit, two instructions (10
words), under the slot's limit for n-byte accesses, psb::limit: len - min(len, n - 1), an
OpExtInst UMin and an OpISub (12 words; the length itself for 1-byte accesses), made once per
slot and size. EmitCx::slot_limit makes it in the function's first block where the bounds are
split there (load_push_fields), through FunctionBuilder::in_entry_block, which appends to the
entry block before its terminator, so every checked access of that size in the function
recalls it; elsewhere it is made in the open block. Both check sites (emit::prepare and the
pulled fetch's address_read) take it.

Exact: where len >= n the limit is len - n + 1, and at < len - n + 1 is at <= len - n; below
that the limit is 0, which no offset is under. len is at most 2^31, so nothing wraps.

Tests: psb::tests::an_offset_under_the_limit_is_one_the_normative_check_admits runs the form on
the interpreter harness (offsets around the buffer's ends and near 2^32, n 1, 2, 4, 16, both
widths, buffers of 0 to 64 bytes) against contain::in_bounds;
engine_identity_contain::a_checked_slots_limit_is_made_once_per_size_in_the_first_block reads
the contain kernel's module on every identity profile: two limits in the first block, three
compares under them.

Docs: docs/API.md section 5 and PushField::SlotBounds say how the check is computed.
SEMANTICS_VERSION 2197 (every checked module changes); ARTIFACT_FORMAT_VERSION 553 with it.
2026-11-19 18:18:25 -08:00
Anees Iqbal bd2f82ee48 docs: CONFORMANCE-COVERAGE.md regenerated for nan-to-integer-conversions
python3 scripts/conformance-coverage/coverage.py at ddf7a8ccd2 (job
m3-max-55493 on msi, which then ran the conformance crate's suite on
lavapipe against this document: 1087 tests run, 1087 passed; clippy
-D warnings and rustdoc -D warnings of the crate clean). One more case
module and recording, one more module that loosens a measured value (the
long-of-infinity elements).
2026-11-19 18:14:15 -08:00
Anees Iqbal 9203b13fe1 conformance: a long of an infinity holds Metal's 0 or the bound, under API.md's row
The planner's ruling: MSL 8.6 promises round toward zero and NaN to 0 and
nothing past the range, so the translator keeps saturating, the case keeps
every past-range row compared, and declares the long-of-infinity pair under
docs/API.md's row.

The row (the plain-fptosi line this lane added) now says what it covers: a
float past an integer's range converts to the nearest bound, Metal on the
M3 Max answering the same at every width but long, whose two infinities it
converts to 0 (job m3-max-55436), and the plain LLVM cast is the device's
own. Its lead-in moved, so its slug is new; nothing else names it.

The case loosens exactly those elements: at each of the four long-of-float
and four long-of-half sites, the bytes of input 14 (+inf) and 15 (-inf),
each to any of 0 and its bound (AnyOf), justified by that entry. A test
holds the two inputs to be the infinities and the entry to be in the
document.
2026-11-19 18:14:15 -08:00
Anees Iqbal eb16ce79c9 docs: a plain fptosi or fptoui of a NaN answers the device's conversion
The translator lowers LLVM's plain fptosi/fptoui to a bare OpConvertFToS or
OpConvertFToU, whose answer for a NaN or an out-of-range value SPIR-V
leaves undefined, while MSL 8.6 sends a NaN to 0. No accepted difference
said so.

Metal's compiler never emits the plain cast: probe job m3-max-55309 compiled
int(), uint(), static_cast and two-lane vector casts of float and half in a
kernel and in fragment functions, with fast math on and off, and every one
is an air.convert call (which the translator saturates). Over the indexed
corpus (29446 modules, job m3-max-55344) and the replay streams on every
node that holds them (jobs m3-max-55344, 55346, 55348, 55349, 55350, 55351)
no function holds a plain fptosi or fptoui; the same walk counting
air.convert float-to-integer calls finds 35606 in the corpus and 19840 in
the M3's streams (job m3-max-55356), so the scan reads real IR.

So the plain cast stays the device's conversion, stated in docs/API.md's
accepted differences under Conversions.
2026-11-19 18:14:14 -08:00
Anees Iqbal 90a02e250d identity domains: a checked access's domain is its buffer, not its bind window
Metal's domain for a buffer argument is the buffer: an access before the bind offset reads the
buffer's bytes there. The containment check measured the offset from the bind offset against
the bytes from there to the buffer's end, so a checked access before the bind offset read zero
and a store there did nothing, where Metal reads and writes the buffer.

- PushField::SlotRemaining (u32) becomes PushField::SlotBounds (uvec2): the buffer's bytes
  before the bind offset (the bind offset), then its length; a set*Bytes copy 0 and its length;
  nil 0 and 0. The check is psb::in_buffer: (len >= n) && (m + before <= len - n) in u32, m the
  offset from the bind offset read as signed. Before the buffer's start the sum wraps to at least
  2^31, past every length (no buffer is longer than 2 GiB). One add more per checked access and
  one more pushed u32 per checked slot.
- Offsets are signed on every identity form: the word-below form (psb::prepare_at, also the
  pulled fetch's) now sign-extends the offset instead of reading it from the slot's window start,
  as the direct form already did through its 2^31 bias.
- The new runtime's encoders push the bounds (encoder::bounds, Tables::bounds); the old runtime's
  binder writes them from the bound buffer and still refuses ZeroAddress.
- The old runtime's lowering is unchanged; SEMANTICS_VERSION 2195.

Tests: engine_identity_domain (new, interpreter): on both identity forms a run-time -4 at bind
offset 16 reads the word at 12 and at bind offset 0 reads zero, a constant -4 at bind offset 16
reads the word at 12, and the default domains read the word at 12 as docs/API.md says.
engine_identity_contain adds an access before the bind offset (inside the buffer: read and
written) and one before the buffer's start (outside). The identity tests push the bounds.

Docs: API.md sections 1 and 5 and the new runtime's README state the domain and the cost.
2026-11-19 17:24:00 -08:00
Anees Iqbal a010d17c6b translator: a fetch's element index first among the floor's fragment fields, from the vertex function's end
On the floor a fragment function's push fields started at the vertex function's push end rounded
up to 8. Where that end is a multiple of 4 and not of 8, the four bytes below the base went
unused, and a fetching fragment function placed its four-byte element index
(PushField::FetchedColor) after its eight-byte fields: a pair that fits the floor's 256 bytes
with those four bytes used was pushed past them. The fragment base is now the vertex function's
push end, and FetchedColor sorts after SlotBindOffset and before the slot addresses
(SlotGuestBase): a fragment function that pushes no parameter block's address places it in those
four bytes. Each field is still placed at the next offset aligned to it, so a fragment function
whose first field is eight bytes, the spilled block's address included, starts where it did, and
the vertex function's window still ends at 248. The fixed windows read no base: the old runtime's
modules are unchanged.

The docs that stated the rounding say the base is the vertex function's end: the push module,
VERTEX_FLOOR_END, LoweringInputs::push_base, docs/API.md section 5, rt's README, and the render
identity test's notes; the spill test reads the base unrounded (its vertex function ends at 248).
2026-11-19 17:22:28 -08:00
Anees Iqbal 7934b405d8 fetch (draft): surfaces read through the loop where their query offers it; loop reads counted; tests and docs
A surface plane whose texture is a shader-read render target takes the feedback
usage where the handle's image format query offers it with the export features
alike (Query::plane; a D3D11 import's query the same), and the in-place make
retries without it where the images with it do not hold the layout; a plane
without it reads through its shadow, the counted copy. The fetch and the texture
read choose the loop or the shadow by the image, not the device.
Metrics::attachment_loop_reads counts every draw that reads an attachment of its
own pass through the loop. Device tests (tests/fetch.rs): N fetching draws exact,
N-1 barriers or copies more than one; a surface plane of each fetched format.
RenderPipelineKind::FramebufferFetch removed. SEMANTICS_VERSION 2193,
ARTIFACT_FORMAT_VERSION 550 (PushField::FetchedColor). REFUSALS.md and
api_signatures regenerated; README and API.md.

Draft: the old render key re-pin follows the compile check.
2026-11-19 17:22:28 -08:00
Anees Iqbal 6eac85e79c rt: the resolve tables after the resolves metric and the resolve-format basis
m3-max-55101's REGEN and BLESS at 4153392249.

Verified: see the check job named in the landing.
2026-11-19 16:56:17 -08:00
Anees Iqbal 4dd8d707d1 rt: the resolve tables, the resolve-format basis the old runtime's records, and the resolve test's target usage
docs/REFUSALS.md and the API signature table regenerated for the resolve
items (m3-max-54897's REGEN and BLESS). Refusal::ResolveFormat's basis named a
device the cluster has no record of; it now cites what metal2vulkan-runtime's
RenderPassProblem::ResolveFormat records: Metal's validation assert for an
integer resolve target. The color resolve test's target took SHADER_READ,
which a texture made without an index refuses (lavapipe, m3-max-54897); a
resolve target needs RENDER_TARGET alone.

Verified: see the check job named in the landing.
2026-11-19 16:56:16 -08:00
Anees Iqbal adf59be4a7 rt: multisample resolves in the pass, by Vulkan's own resolve
A store action that resolves (MultisampleResolve, StoreAndMultisampleResolve, and
Unknown where the attachment names a resolve texture) resolves in the same rendering:
the attachment's VkRenderingAttachmentInfo names a view of the resolve texture's
resolveLevel and resolveSlice and a resolve mode, so the pass adds no pass, copy or
barrier of its own. Color resolves by AVERAGE, the mode Vulkan requires of a float,
normalized or sRGB format, under the new static note PrecisionNote::DeviceRoundedResolve
(RenderPassDescriptor::precision_note) on every device. Depth resolves by its
MultisampleDepthResolveFilter: Sample0 always, Min and Max where the device's
supportedDepthResolveModes has them; stencil by Sample0. Refused as Metal refuses them:
a resolving action with no resolve texture (Refusal::ResolveTexture) and an integer
format's resolve (Refusal::ResolveFormat). Gaps: RenderPassKind::Resolve (another
format, one sample, an emulated encoding, two depth-stencil views), ResolveFilter
(a mode the device lacks, DepthResolvedSample, an unpaired aspect) and LateStore (a
later store that does not resolve an attachment that began resolving).

The old runtime maps the new note to its device-rounded-resolve degradation; the
validation allowance, the conformance suite's rt side and the replay player carry the
resolve fields and filters.

Evidence, draw_full_4x: 64 full-screen draws in one pass into a 4-sample RGBA16Float
target, resolved as the pass ends (MultisampleResolve) into the 1-sample texture the row
checks texel by texel against the draw colour before its timed runs. Each arm records, a
run, 64 draws, 1 pass, 1 barrier and no copy: new's Metrics::resolves 1; old's 1 render
pass instance, 1 vkCmdBeginRenderPass, 64 draws, 1 barrier, no image copy or blit
(m3-max-55061). GPU p50 in us, old,new then new,old, one harness build each:
780M new 259.0/258.7 against old 1933.6/1827.4, new is 86% faster; RX 550 new
1643.5/1643.8 against old 7207.8/7209.3, new is 77% faster (harness at 1ff6574894,
m3-max-55050, 55061); RTX 3090 new 170.0/171.0 against old 188.7/190.0, new is 10%
faster; Iris Xe new 1006.4/1007.7 against old 1022.1/1019.8, new is 1.4% faster
(harness at 5af66e2c4e, m3-max-54928, 54938, 54939). Why old is slower on AMD is not
traced.

Verified: see the check job named in the landing.
2026-11-19 16:56:15 -08:00
Anees Iqbal bc45258bdf replay: a tiled texture of more than one level plays on the new runtime as the old runtime plays the call
The new runtime takes no form of the SPI newTiledTextureWithDescriptor:offset:bytesPerRow:, and the
player made an ordinary texture in its place whose texels were not the program's: on lavapipe the
two runtimes' plays of one stream first parted at the frame whose draws first read such a
texture. Those texels now come from the buffer, as the old runtime gives them.

What the old runtime does, read from its code:
- crates/metal2vulkan-runtime/src/buffer_texture.rs:534-591 (Buffer::new_tiled_texture) and
  shadow.rs:228-250 (the module's "Copies taken at use"): a texture of more than one level is one
  image of its own. The first command of an encoder that uses any of its levels after the making
  (or after did_modify_data, or a replace_region of the first level) takes the copy, before that
  command and inside its command buffer. The take copies every texel of the first level from the
  buffer at the offset, rows bytesPerRow apart, then makes each later level from the first as
  generate_mipmaps makes it. It reads no level past the first from the buffer.
- shadow.rs:386 (LevelsCopy) and :404 (LaterLevels): the later levels come from generate_mipmaps'
  plan for the format (the device's blit chain, the compute filter, or the integer picks). For a
  format that generate_mipmaps leaves as it is or refuses, they are kept.
- buffer_texture.rs:537-538: a texture of one level is the texture over the buffer that
  new_texture makes.

The stand-in, through the runtime's public API only:
- An ordinary texture of the descriptor.
- At the first use since its making, the take is owed to that use's command buffer. A use is an
  encoder's command or a render pass's attachment naming the texture or a view of it, skipped
  encoders included.
- The take runs as one blit encoder (copy_from_buffer into level 0, then generate_mipmaps) in a
  command buffer of the play's own. It is committed on that command buffer's queue, after its
  copies from the guest's RAM and just before it, so it reads the bytes as they are when that
  command buffer runs. A format the runtime refuses mipmaps of (MipmapFormat, MipmapFilter)
  keeps its later levels.
- Counted apart from the stream's work: tiled_textures, tiled_takes, tiled_take_bytes,
  tiled_mipmap_generations, tiled_levels_kept, and tiled_gpu_nanos (its GPU time, in no frame's
  gpu_busy, as the guest RAM's copies are). The report has a "tiled textures over a buffer" line.
- A tiled texture of one level plays as the public texture over the buffer.
- A replaceRegion of a tiled texture's first level is refused. On the old runtime it writes the
  bytes and owes another take; no stream played here has one.

Where it differs from the old runtime: the take runs ahead of the whole command buffer, not just
ahead of the using encoder, so what an earlier encoder of that command buffer writes into the
bytes or the texture lands after it.

The tiled kind leaves the substitutes: substituted_tiled_textures is gone. The "substitutes read"
line now counts gap substitutes alone.

Tested by:
- rt_replay::a_tiled_texture_takes_its_buffer_s_bytes_and_levels_at_first_use (lavapipe, both
  runtimes): a 128x2 two-level tiled texture whose 2x2 squares hold one colour each. Blits of both
  levels read the buffer's texels and the squares' colours, with equal digests on both runtimes
  and one take counted.
- The unit test of the substitute lines, now gaps alone.
2026-11-19 16:55:04 -08:00
Anees Iqbal c601423452 docs: a picture difference traced to a counted player substitute is the second accepted class
The planner's ruling on the replay matrix's rule (c): besides a first parting draw traced to a
function that carries a static precision note, one traced to a counted player substitute (an
ordinary texture the play makes in place of one the runtime cannot make, whose texels are not the
program's) is accepted with its size printed, and its row says where the replay substitutes what.

Docs only.
2026-11-19 16:55:04 -08:00
Anees Iqbal 5f6cdc6b56 replay: a picture difference is sized, and each frame's end carries the system's clock
A digest play that checks a present (--check-presents) now also keeps the shown texture's bytes
as presents/frame-F.bytes in its --out directory, with a `shown ID frame F format P width W
height H` line from the backend's shape of the texture (Backend::texture_shape, old and new
runtime). compare-plays, with no --frame, prints for each frame whose digests differ and whose
bytes both plays kept the texels that differ and their share, the largest difference of each
channel in the format's units (8-bit unorm, 10:10:10:2 and half-float layouts; bytes for
another), and the box the differing texels lie in. The bytes stay on the host that played them.

Each frame's end line gains unix_nanos, the system's clock at the frame's end, so a job wrapper's
own timestamped device samples can be set beside the presents.

REPLAY-STREAM.md gains both, and the planner's two rules: a picture difference at the judged
frame is accepted only when sized and its first parting draw is traced to a function with a
static precision note and no state difference; an NVIDIA time row bins presents by the covering
clock sample's state, at least 30 an arm, else "not comparable by time" with the counts.

Tests: replay::tests::a_kept_present_writes_the_shown_texture_s_bytes_and_each_end_its_time,
a_picture_difference_is_sized_by_texels_channels_and_box,
two_plays_kept_pictures_that_differ_are_sized.
2026-11-19 16:55:04 -08:00
Anees Iqbal 3fc316d576 identity domains: a render pipeline's functions spill past their shares of the floor's push range
Under the identity domains a vertex or fragment function whose push fields passed its share of
the floor's one 256-byte range was refused (Unsupported{IdentityDomains} needing
maxPushConstantsSize). Once containment added each checked slot's length (SlotRemaining) and the
zero range's address (ZeroAddress), pairs reached 272 bytes and were refused: 3 render states of
windrag-780m-b2 (223 draws) and 4 of syncview (259 draws), and the guest's GL-layer pipelines on
reims's walks. A render function now spills as a kernel does: it pushes its parameter block's
address first (PushField::ArgumentTableAddress) and reads every field past its window from the
block, each loaded once, in the function's first block (EmitCx::load_push_fields). The refusal and
its REFUSALS.md row are gone.

- Order: the check's fields are last in the derived Ord of PushField, after
  TessellationFactorAddress (ZeroAddress, then each SlotRemaining), so what every access reads is
  placed ahead of what only a checked access reads, and the check's fields are the first to move
  to the block. The codec's list is unchanged.
- The vertex function's floor window is [0, 248) (push::VERTEX_FLOOR_END). A vertex function is
  lowered without knowing its fragment function, and a fragment function that spills pushes its
  block's address (8 bytes, 8-aligned) from the vertex function's end, so the vertex function
  leaves that room. Cost: only a vertex function whose own fields pass 248 bytes spills where it
  used to fill the last 8.
- metal2vulkan-rt: Draws holds each field's place (the push range or its function's block) and
  each function's block (length, the push offset of its address). A draw that fills its pushed
  values anew writes each block into the parameter ring and its address into the range;
  ring_writes counts it. A block longer than a ring chunk stays Gap::RenderPipeline(DrawInput).
- SEMANTICS_VERSION 2194 (placement changed).

Tests: push.rs's edges (a vertex function ending at 248 with a spilling fragment function, whose
address goes at 248; a fragment base of 244, whose address is still at 248; a vertex function
whose fields would reach 252, which spills); engine_identity_spill: a vertex function of 25 slots
pushes its block's address first and every slot's address, spills only the check's fields, passes
L3, and loads each spilled field once in its first block; the pair with a fragment function from
248 compiles and validates on every identity profile; on the interpreter its sums are Metal's, and
lengths pushed one word short, in the window and in the block alike, read zero.

Docs: push.rs's module text, docs/API.md (section 1) and the rt README state the shares, the 248
and its reason, and the spill.
2026-11-19 15:59:29 -08:00
Anees Iqbal 5573e16f00 docs: the identity domains check run-time-offset slot accesses against the pushed length
docs/API.md: the policy's identity-domain text and section 5 state SlotRemaining and
ZeroAddress, the normative check in u32, what an outside load, store and atomic do, that an
offset before the bind offset is outside, and what stays unchecked (constant offsets, pointers
loaded from memory or made from integers). The rt README's known gaps say the same for buffer
arguments, the nil buffer's length 0, and the pulled fetches.
2026-11-19 15:38:33 -08:00
Anees Iqbal c46b159238 replay: the new runtime's play reads a Private texture through a copy
A check of a Private texture (a stream's m2v.check, or the shown texture of a present that
--check-presents lists) read it with getBytes, which the runtime refuses for a Private texture as
Metal does, so a digest play on the new runtime stopped at the first listed present whose texture
is Private ("the CPU reaches no Private or Memoryless texture"; syncview plays on Iris and the
3090 stopped at frame 296). The old runtime's play reads every texture through a blit. The new
runtime's now copies a Private texture's first level into a Shared block on its read queue, as it
reads a Private buffer, and waits for it; a texture the CPU reaches keeps getBytes.

Test: rt_replay::a_private_shown_texture_is_checked_through_a_copy clears a Private 4x4 RGBA8
texture to red, shows it at present 0 and lists that present; the check's sha256 is the 16 red
texels'.
2026-11-19 15:37:23 -08:00