What: a default-on count beside dispatches_pushing_set_zero, one relaxed add of the push's write
count per pushing dispatch (compute.rs), so writes over pushes is the descriptors a compute push
writes. Listed in the host_ab example's counts; the dispatch_work lane test asserts every push
carries the same writes, at least one, and that writes are counted exactly where pushes are.
Why: on the consumer's Iris Xe, binding::push_set's instructions over a guest compute benchmark's
timed pass rose 21-36% between two runtime pins with the same Mesa (26.2.6), almost all of it
under compute dispatches' pushes, inside the driver's vkCmdPushDescriptorSet. Whether each push
carries more descriptors, or more dispatches push, needs both counts; draws already count theirs
(set_zero_writes_pushed).
Verified: msi m3-max-33677 at the lane tip 9794e48d50: clippy (runtime, all targets, all features) 0;
lavapipe runtime_lane::dispatch_work::dispatches_push_their_set_zero_where_the_device_pushes passes both
ways (4 pushes carried 8 descriptor writes / 0 pushes carried 0). clippy m2v_gpu/m2v_cpu_icd and rustdoc follow.
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.
A heap's GBGR422 or BGRG422 texture lies as a shadow of the heap's bytes in Metal's rows (its answer
is Metal's measured rows: 512 @ 16 for 16x16, 8192 @ 16 for 64x64), and heap_texture_at excluded
4:2:2 textures from the decoded twin RUNTIME 2382 gave other carried formats' shadows, so every
kernel read and sample of one was refused, NotImplemented(Format) (56 refusals on PHOENIX and on
lavapipe, m3-max-33636 / 33625), where Metal reads it and the device can decode it.
heap_texture_at drops the 4:2:2 exclusion: the shadow keeps the twin with_decoded_twin chooses for
the device, through the device's conversion of the pairs where it converts them (rule 1), else
Metal's decode, one whole-image pass recorded after each copy in that moves its rows, its kernel made
at first use. A 4:2:2 heap texture cannot lie apart from the heap's bytes (held_to_metal sends rows to
Shadow or refuses with HeapTextureMemory; Unaliased is for one-plane and two-plane formats only), so
every 4:2:2 heap texture over device memory now keeps a twin; one over the caller's host pages, and a
detached heap's stand-in, stay twinless and refuse reads. Docs: chroma_pairs.rs contract,
decoded_twin.rs, degradation.rs CarriedDecodedTwin (doc and cost: "moves the blocks or rows"),
docs/API.md; first_use's lines say "decode passes set at the making N, their kernels made at first
use"; the HEAPDECODE line names a missing twin "none".
Verified: PHOENIX m3-max-33671 (carried archive of the lane tip 4976a40be3): 5/5 (heap_carried_reads
with GBGR422 and BGRG422 16/64 Private/Shared under both heap answer policies, new_resources_wait_for_
no_gpu_work, a_carried_heap_texture_reads_its_bytes_with_no_commit, four_two_two_heap_textures_take_
metal_s_size_and_layout, a_texture_held_for_copies_a_kernel_s_handles_reach_is_announced_once): every
4:2:2 case shadowed, a use 1 copy and 1 decode, a second encoder 0 and 0; kernel reads, samples,
samples after a blit and a Shared replaceRegion, blit out and getBytes equal the texture outside a
heap; route: Metal's decode (RADV and lavapipe convert no 4:2:2 pairs; the device-pair route in a
heap shadow ran on no device). lavapipe msi 33635: the same 5. Control (test commit alone): PHOENIX
33636 and lavapipe 33625 fail with the 56 refusals. Clippy plain, m2v_gpu, m2v_cpu_icd and rustdoc 0
(33635); runtime lib tests in 33672.
The lane's device options ask for exact answers, RateMapRegionPolicy::Exact among them, and the
encoder frame did not set the policy back, so its draws went region by region through each
region's own viewport: on the Iris Xe (job m3-max-33608) every frame printed 0 draws through the
region-copy variant and 0 routed on the GPU, base and tip alike. It now sets FanOut, as the
pieces frames set their policy. A lavapipe probe of the same pass over the same map under the
default policy took the region-copy variant and the GPU's routes in every case (job m3-max-33629).
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.
A guest compute benchmark's encoders each update one fence and wait for one (reims, 780M,
c471372f87: fence updates = waits = encoders in every workload; 63 encoders a command buffer in one
workload), and an encoder that updated a fence ended its fold group, so every encoder began its own
VkCommandBuffer: 47.5 a submission, encoders_folded 54 of 117591. The driver's per-call work grows
with every VkCommandBuffer, and on the Iris Xe a VkCommandBuffer boundary costs 18.25 us of GPU time
against 0.64 us for the least barrier between dispatches (m3-max-33589).
A fence update no longer ends its group. A later member's commands order after the update by a
barrier recorded per command at the narrowest width that covers it: source, the updating encoders'
writes in the stages the update covers (SHADER_STORAGE_WRITE in shader stages, TRANSFER_WRITE in
transfer stages, attachment writes in a pass); destination, what the command can reach of memory
no use names, in its own stages (SHADER_STORAGE_READ | SHADER_SAMPLED_READ | SHADER_STORAGE_WRITE,
TRANSFER_READ | TRANSFER_WRITE), plus its untracked uses' own reads (indirect-argument or uniform
reads only where an untracked use reads them); tracked resources keep the tracker's rule. Between
two compute encoders that is the least barrier, SHADER_WRITE to SHADER_READ | SHADER_WRITE. The
barrier precedes the member's commands whether or not it waits, since a wait anywhere in an encoder
covers all its commands, which enter the shared VkCommandBuffer as they come; independent encoders
that update fences no one in the group waits on so run one after another (accepted: the guest's
encoders all wait). Across command buffers and queues nothing changes: Metal evaluates a fence at
submission, a wait only orders after updates committed before it ("commit the command buffers with
the producing passes before those with the consuming passes", MTLFence), a waiter on another VkQueue
waits for the updater's batch end, and a group never crosses a batch, so no cycle can form.
WorkCounts gains fold_fence_barriers and six folds_refused_* counts (the reason a join was refused:
kind, tail, batch, state, parts, ends; one relaxed add on a refused join, nothing on a join). Tests
that ended a group by a fence update now end it by a change of dispatch type or an event.
Verified: PHOENIX (RADV 780M, release, interleaved, 600 command buffers of 24 encoders, m3-max-33626):
fenced chain 47 -> 1 VkCommandBuffer a submission, mean call 56-79 -> 18-20 us, GPU start median
142-173 -> 101-105 us, GPU time median 146.7 -> 87.8 us (either wait order); independent fence-updating
encoders 74.7 -> 88.0 us GPU (serialised, as accepted); unfenced control unchanged (49.2 us).
fold_fence_barriers 13800 = 600 x 23; no folds_refused_* moved. Long-call bench, small listed:
539 -> 371 us mean call. Lane tip 8ae906a4fd: clippy plain, m2v_gpu, m2v_cpu_icd 0 (33633); lavapipe
runtime suite 2829 passed at 143a0013f8 and tracker unit tests 85 (33621; 8ae906a4fd deletes only the
dead Summary::has_updates); PHOENIX encoder_fold, render_fold, spares, fences 71 passed (33626).
Iris before/after: m3-max-33627, pending.
Public surface: WorkCounts (for the lanes) gains fold_fence_barriers and folds_refused_*, blessed in
api_signatures.tsv; a struct literal of WorkCounts must name them, Default and readers are unaffected.
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.
- Rate maps: the GPU routes the encoder's own draws of a fanning pass
- rate-map GPU routes: the rebound recording takes no route; the routed-draw count through the device's counters
- rate_mapped_pieces_encoder: the small triangles' commands drawn as the encoder's own draws
- Rate maps: the GPU routes' docs, the depth test's flagged draw between fanned ones
- rate_mapped_pieces_encoder: the draws the GPU routed, fanned out and drew through the region-copy variant
- CountDraws: the indirect-count draw's recording is record_draw
- rate_mapped_depth_equal: the GPU routes the encoder's draws as the host step's probe decides them
In a rate-mapped pass that fans out (RateMapPolicy FanOut, the default), the encoder's own draws
were routed by the host step only for executions; the GPU now routes them: a counts kernel
(bind/fan_out/route_counts.rs, built through the translator's public API) reads each draw's lead
instance probe and writes indirect counts, so each draw either fans out per region or draws through
the region-copy variant, as the host step's probe decides for the same draws. Its kernel is made at
first use; a cold frame, whose variants are still being made, falls back to the region-copy route
alone. Exact (RateMapPolicy::Exact) routes nothing on the GPU. WorkCounts gains
rate_map_gpu_routed_draws, rate_map_gpu_fanned_draws and rate_map_gpu_copied_draws (for the lanes;
blessed in api_signatures.tsv). FAST-PATHS rate-map row updated. No new Degradation kind.
Verified: msi m3-max-33521 at the lane tip 4ee726aa13: clippy (translator, runtime, validation; all
targets, all features) 0; translator route_counts, fan_out, api_surface, api_signatures, fast_paths
62/62; runtime fan_out, every_command_the_runtime_records_is_routed, work_counts, upload,
owned_kernel 10/10; lavapipe rate_map device tests 24/24. rate_mapped_depth_equal (each pass two
ground halves with a w-crossing triangle between): 0 red pixels in every leg under Exact and FanOut;
the warm FanOut encoder frame routed 6/6 draws on the GPU (2 fanned, 4 region-copy), the same as the
host step decides for them executed. Pending: clippy m2v_gpu/m2v_cpu_icd, rustdoc, the Iris A/B.
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.
Under DevicePolicy::exact_answers (HeapAnswerPolicy::Metal) a heap's PVRTC or ETC2 texture on RADV
PHOENIX misses Metal's answer (its BC1 carrier image takes 4096 B @ 4096, Metal answers 128 @ 128
or 2048 @ 128), so it lies in memory of its own as a shadow of the heap's bytes (MemoryShadow;
Shadow or Tiled where those serve). heap_texture_at gave a decoded twin only to the Direct,
HostTransfer, Linear and Hidden routes, so its sampled view fell to the carrier, which has no
sampled usage, and every kernel read and sample was refused, Unsupported(Format) (8 of 8 cases in
m3-max-33467), where Metal samples it and the device can decode it.
A heap's PVRTC, ETC2 or EAC texture on a shadow route (not over the caller's host pages, not
detached) now gets its decoded twin. ShadowCopy::record_gated records the shadow's decode
(ShadowCopies::decode) after a copy in that moved texels, and only then (record_moves answers
whether it moved any); the pass is set at making (Image::decode_after_copies_in) and its kernel is
made in ShadowCopies::prepare at first use, so no making compiles. WorkCounts::shadow_twin_decodes
counts the decodes. 4:2:2 heap shadows stay twinless; heaps over the caller's host pages stay the
documented copies-alone gap. Docs: decoded_twin.rs, pvrtc.rs, etc.rs, degradation.rs, docs/API.md,
docs/FAST-PATHS.md (heap shadows of decoded formats are no longer for copies alone). New device test
runtime_lane/heap_carried_reads.rs. Public surface: WorkCounts (for the lanes) gains
shadow_twin_decodes, blessed in api_signatures.tsv.
Verified: PHOENIX m3-max-33568 (carried binary of the lane tip d5bf9cac82): heap_carried_reads,
a_carried_heap_texture_reads_its_bytes_with_no_commit, pvrtc_texels_read_as_metal_s and
etc_texels_read_as_metal_s pass. Under HeapAnswerPolicy::Metal all 8 cases shadowed; a use takes 1
copy and 1 decode, a second encoder in the same command buffer 0 and 0; kernel reads, samples, blit
out and getBytes equal the texture outside a heap, and samples follow a blit and a replaceRegion.
Under HeapAnswerPolicy::Device: not shadowed, 0 copies, 0 decodes, equal. Without the fix
(33467 at the test commit) all 8 reads were refused. lavapipe (msi 33535): the 4 tests pass. Clippy
x3 running in 33569.
The IN-PLACE-LENT line of render_targets_whose_copies_lose_their_padding_lie_in_place
printed runs of spaces where its string's line continuations had collapsed when
it was written (lavapipe job m3-max-33512 shows them). Print only; no
assertion changes.
Verified: compiled under --cfg m2v_gpu by the clippy job that follows.
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.
On the Iris Xe (ANV), a render target over host pages whose rows end
inside a 64-byte line (nonCoherentAtomSize) failed the in-place check's
renders: the clear and store, and draws, write back the line holding a
row's last texels whole, so a CPU write to the padding in that line can
be lost. Such textures were shadowed (733 in reims's walk: RGB10A2
66x66@512 572, RGBA16F 55, R8 49, A8 49, BGRA8 3). But the shadow keeps
nothing more: its copy back writes the same lines, and on this device a
plain buffer copy, a copy of texels into a buffer's rows and a kernel's
stores all write back that line too (Iris probe, job m3-max-33417:
clear+store 15/15 rounds changed padding bytes, draw 15/15, product
shadow copy back 14/15, buffer copy 15/15, kernel stores 6/6; every
changed byte in the row's tail line, none past it; rows on lines 0).
The check gains an access, Copies: a blit copies a zero texture's texels
into the class's buffer's rows while the CPU writes beside them (every
shape but the 3840x2160 surface; no rounds over the runtime's own
memory). A texture that renders over host pages whose rows' padding is
free (not declared unobserved), whose renders failed for its row ends,
now takes the verdict of renders that let that padding change where the
class's Copies failed for those row ends too (pending while they are),
announced as Degradation::LineWriteBack (line-write-back, Precision).
Copies failures carry across classes as the other GPU writes do. The
check notes each class and access's rounds' time. CHECK_VERSION 19.
Docs: FAST-PATHS host-pages row and a known gap for the Iris line
write-back (nonCoherentAtomSize 64; buffer copies, texel copies, kernel
stores, passes); API.md section 1 and the catalogue entry; the in-place
lane's VERDICTS 98 -> 112 and a lane test with the kind's site.
Verified: msi m3-max-33510 at the lane tip 47b06c9f0d: clippy (runtime + translator, all features,
all targets) 0; runtime tests 29/29 (the decision, a_texture_that_renders_lends_its_free_padding_
where_the_copies_change_it_too, carry, degradation_catalogue, degradation_sites, texture_placement);
translator api_signatures, fast_paths, api_surface 34/34; --cfg m2v_gpu archive of runtime +
validation built (33511). Pending: negative control 33520, lavapipe 33512, the Iris proof.
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.
RUNTIME 2379's WorkCounts::batch_submit_cpu_nanos and submit_long_call_cpu_nanos read
CLOCK_THREAD_CPUTIME_ID twice on every submission call on every driver. That clock is a system
call on Linux, not a vDSO read: 459 ns a read against the host clock's 19 ns (thread_clock_bench,
Ryzen 7 7840HS, Linux 7.3, fastest of 3 rounds of 1M reads, m3-max-33486), so 0.9 us a call always
on, against a whole NVIDIA submission call of ~12 us. The thread's CPU time is now read only where
the device notes queue times (METAL2VULKAN_QUEUE_TIMES, the existing default-off diagnostic); the
CPU fields read 0 elsewhere and their docs say so with the measured cost. The wall-time fields,
the long-call counts included, stay on. The long-call bench turns queue times on and gains its
unfenced arms (one VkCommandBuffer against 47); thread_clock_bench measures the reads.
Verified: msi m3-max-33490 at the lane tip 57e916e1c6: clippy (all features, runtime + translator)
0, clippy --cfg m2v_gpu 0, lavapipe kernel_end_device + submit_stalls 16/16 (the queue-times device
test checks the CPU time stays unread when not asked and is counted once asked).
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.
A guest compute loop's vkQueueSubmit calls on the Radeon 780M averaged 601 us, 293 of them 1 ms or
more in 32 s, and nothing told a call that works from one that waits on a driver without the stall
fact. WorkCounts::batch_submit_cpu_nanos sums the thread's CPU time (CLOCK_THREAD_CPUTIME_ID; on
Windows GetThreadTimes, sampled at the clock's ticks) across every call batch_submit_nanos times;
submit_long_calls, submit_long_call_nanos and submit_long_call_cpu_nanos count the calls of 1 ms or
more. Benches (test-only): a guest compute loop's submissions term by term, chained encoders and a
host-set event's wake, growth per VkCommandBuffer with fenced chains, import and free churn apart,
and long calls split by the GPU's work and the listed dma-bufs, with and without a warm-up spin.
Finding (PHOENIX, release, m3-max-33442): the long calls work, they do not wait: thread CPU is
about wall time in every arm (360 listed, 3 in flight: mean 867 us, 861 us CPU). A 500 us spin
before the call cuts it 7-12%, so most of the doubling after a 3 ms GPU step is cold caches.
Verified: msi m3-max-33446 at the lane tip f67314bade: clippy (all features) 0, clippy --cfg
m2v_gpu 0, submit_stall tests 12/12. Windows clippy not run (thread_cpu, the existing
GetThreadTimes path, only made pub(super)).
Public surface: WorkCounts (for the lanes, not part of the API) gains four pub fields, blessed in
api_signatures.tsv; a struct literal of WorkCounts must name them, Default and readers are unaffected.
a_recovery_starts_a_ram_s_plans_and_their_tables_anew copied into a Shared buffer made before
recover_for_test(). Where the device keeps Shared buffers in pooled memory (the RX 7900 XTX on
RADV, whose check finds that a held import taxes submissions), the recovery leaves such a buffer
with the lost generation, as device/carry.rs documents, so the first copy after it was refused
with NotImplemented(MadeBeforeRecovery) (round ef313200e2, XTX runtime leg). The test is about
the RAM use's plans and tables, which the recovery carries; the copies after it now go to a
buffer made after it.
Verified: see the landing check job.
The commit before made the heap's carried texture an ASTC_4x4_LDR one. A
heap refuses that texture where the device lacks ASTC
(NotImplemented(DecodedHeapTexture), job 33372 on lavapipe). A heap's 4:2:2
texture is a shadow of the heap's bytes (AliasRoute::MemoryShadow), so it
takes no twin and stages no decode. The heap's carried kinds that take a
twin in its own memory, and stage its whole decode as they are made
(heap.rs, decode_whole), are ETC2/EAC and PVRTC. So the timed heap makings
are now a PVRTC_RGBA_4BPP texture and an ETC2_RGB8 one. Every device but
PowerVR's carries PVRTC. The test prints the whole decodes those makings
staged (WorkCounts::block_decode_passes), which shows the route was taken.
The no-commit get_bytes test uses a PVRTC texture in a Shared heap. Its
rows are unpitched, as Metal takes PVRTC's.
Verified: nothing yet; the msi job (clippy x3, rustdoc, lavapipe) and the
PHOENIX run (tip x3 plus the control) follow.
A GBGR422 texture in a heap took no staged decode on PHOENIX: the control
(runtime at 18c640a85d) built nothing at that making, so the check could not
fail there without the fix. An ASTC_4x4_LDR texture in a heap is carried
where the device lacks ASTC (PHOENIX, lavapipe), and its making stages its
twin's whole decode (heap.rs, decode_whole), so the timed making and the
no-commit get_bytes test now use one. The 4:2:2 texture of its own stays
among the makings.
Verified: nothing yet; the msi job and the PHOENIX run (tip x3 plus the
control) follow.
On the RTX 2080 (job m3-max-33373, 34 queue tests at 16 threads)
a_device_refused_once_takes_its_least_plan_where_it_takes_fewer_queues
failed: the stand-in refused the plan's 18 VkQueues as the test asks,
and the driver itself then refused the least plan's 3
(ERROR_INITIALIZATION_FAILED), the other test processes' devices
holding its channels, so the test read a refusal of a least plan that
takes fewer.
plan_room's wait is now a generic with_room (device_with_room is built
on it, unchanged in what it does), and the test asks the stand-in's
refusal and the least plan's making again while the driver's own
answer to the least plan is a refusal (two attempts on a GPU whose least
plan takes fewer), with the same pauses and bound and a
PLAN-DEVICE-ROOM line each. The probe's making again, where the least
plan takes no fewer, goes through device_with_room.
Verified: cargo fmt; build, clippy and the tests in the lane's jobs.
The 2080 lane leg 1/2 at c1747ff89 (job m3-max-33322, 1,040 tests,
830 s) waited 35 times for room, 12.0 s of pauses in all, and every
device it waited for was then made with its plan. 16 of those tests
then failed on the loader's errors, which the wait had left in the lane's
message list: kernel_textures x10, layered_passes, made_at_creation x2,
math_routines, mesh_commands and ycbcr_in_place. The loader reports each
refused vkCreateDevice as two errors through the instance's messenger
("terminator_CreateDevice: Failed in ICD ... vkCreateDevice call",
"vkCreateDevice: Failed to create device chain."), and those come from
the making the lane drops and makes again, not from the device the
test keeps.
Messages::failing_kept and Messages::drop_failing_since: the lane marks
the failing list before each making, and where it makes that one again
it drops what was kept since the mark. The kept making's messages, the
layer's included, stay. validated_device_with and made_lane_device both
do it.
Verified: cargo fmt; build, clippy and the 2080 lane leg in the lane's
jobs.
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.
What: a DecodePass keeps what its sets bind as it is made; its kernel (TwinDecode, or a
4:2:2 twin's ChromaSample) and its sets are a FirstUse (owned_kernel.rs), made:
- by its maker where it records the pass at once: a blit's decode, and the decode a blit's
write makes for a second twin, as the blit is encoded; a replace_region's own submission,
before the submission;
- for every pass staged for the device's next submission (a heap texture's whole decode, a
host call's staged copy's) or queued for a second twin (its whole decode, a host write's),
by Device::make_pending_decodes on the submitting thread before the submission takes its
lock: commit_as before the scheduler's section, submit_internal_taking before the device's
internal lock. The passes are listed under the first-move registry's and the queue's locks
and made after those are free, so a making that stages one never waits behind a compile; an
atomic note, set after each registration, makes the walk one swap where nothing is pending.
Inside the sections, a submission takes no pass whose kernel is not made: a staged copy whose
decode is unmade waits for a later submission with every staged copy after it (the copies keep
their order), and a queued second decode stays queued. Such a pass was staged after the
submission's walk began, so its texture was made after the commit began, and none of the
submission's commands reads it. Each DecodePass::record debug-asserts that its kernel was
made. PairsSampling makes the device's conversion alone (made_ycbcr_conversion) and names its
kernel (module()), which surface_pairs' first-use making and the decode passes make.
make_second_twin no longer builds the kernel at the view's making.
Why: Metal's making compiles nothing. A carried texture's making in a heap compiled TwinDecode
(or ChromaSample), a 4:2:2 texture's making compiled ChromaSample where the device converts
its pairs, and a view of an ASTC carrier in its other colour space compiled TwinDecode. The
submissions record staged and queued decodes inside the scheduler's section (submit_batch,
record_second_decodes) or the internal lock (submit_internal_taking), so the compile goes to
the submitting thread before those locks, where no other queue's submission waits for it.
Where the cost lands: the first commit or internal submission after a carried heap texture's
making, a second-twin view or a carrier's staged write, once per device per decode kind.
commit's doc says so. A making whose staged decode passes the staging bound makes an internal
submission at once, as before, whose walk then compiles in that making.
Test: first_use's per-call built-nothing check covers three more makings: a GBGR422 texture
(a ChromaSample build where the device converts pairs), one in a heap (its whole decode), and
an ASTC_4x4_LDR texture's sRGB view (a second twin where the device lacks ASTC); the next
commit (a blit out of each 4:2:2 texture) takes the decodes, and the line names what the uses
built. a_carried_heap_texture_reads_its_bytes_with_no_commit: a GBGR422 texture made in a
Shared heap builds no kernel, then replace_region and get_bytes with no commit between read
the bytes written, the internal submissions among them making the staged decode first.
Verified (m3-max-33342, msi, at a13cf74a78): clippy of the runtime and validation crates (all
targets, all features, -D warnings) 0; lavapipe 376/376 of the first_use, heap, two-plane, YCbCr,
ASTC, chroma pairs, ETC, PVRTC, compressed-decode, first_moves, twin and encoder_fold tests;
first_use: no making built a kernel, the uses built 4; the carried heap texture's making,
replace_region and get_bytes built 0 kernels each and the bytes matched. The PHOENIX runs and
the device-configuration clippy follow on development.
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.
`class_takes_fresh_pages` answered `host_visible && cfg!(unix)`, a gate from
when `OwnPages::map` returned None off unix. b8bb06bcac gave Windows a
VirtualAlloc `OwnPages::map` (and the page-buffer blocks already use it there
through `own_page_types`), but left the gate. So on Windows no buffer took
fresh pages, even on a device that imports host pointers and whose submission
check found no import tax. In particular, an indirect command buffer's records
lay in pooled memory even under `IndirectRecordsPolicy::Carried`, where a
recovery's carry moves them and resets every command, where Metal keeps them.
Now the predicate is the class alone. Where the system maps no pages, or the
device imports none, the buffer lies where it would have (`OwnPages::map`
answers None; no importer). On unix the expression is unchanged. The module doc
cites VirtualAlloc's MEM_COMMIT zero guarantee beside mmap's.
Verified at the base (ef313200e2) on an Intel UHD Graphics 630, Windows driver
101.2145, gnullvm, --cfg m2v_gpu, each test in its own process (m3-max-33325):
tests::icb_carry_race::a_recovery_keeps_the_commands_the_cpu_encoded failed
("render command 0 (Lost)": [None; 4] against [Some(64), Some(80), Some(96),
Some(112)]); a_write_held_across_a_recovery_lands_on_the_records_it_keeps hung
(the pooled carry waits for the write the test holds); tests::fresh_pages failed
3 of 6 (no fresh-page buffer made where the device's check says they pay). The
Also in this landing (tests only): icb_carry_race's a_write_held never holds a write across a
pooled carry (it skips visibly where the device imports no host pointer, and fails at once where
the records still pool); device_recovery's Scratch makes a directory of its own per call, so each
recovery test gets its own device in one process (under cargo test's threads they shared one and
recovered each other's); host_ram_device's logged RAM fixture compiles only where its bench does.
Verified: UHD 630 Windows (m3-max-33356, at 38455c7259): the 7 icb_carry_race tests each alone and
all 7 in one process pass (each recovery generation 1; the carried tests print Kept);
tests::fresh_pages 6/6. Base controls m3-max-33325 and 33334 (above; in one process the 5 pooled
failed 3/5 on one shared line at generations 1-5). Lavapipe, cargo test in one process (33354):
the recovery family, icb_carry_race, icb_records_policy, fresh_pages, stall and labels 56/56. At
9d78e00e30: clippy plain, m2v_cpu_icd and m2v_gpu 0 (33360), Rustdoc 0 (33364).
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.
A recording through the region-copy variant drew a box of several rows, so its vertex function
found its region as `first + (DrawIndex / c)·nx + DrawIndex mod c`: it read the table's count of
columns, divided by it and by the box's columns, and only then read its region's terms.
Now each row of a box is its own recording (in parts of at most a multi-draw's draws), and
`PushField::RegionBox` holds the row's first region's segments `[x0, y0]`: the vertex function
draws the region of segments `(x0 + DrawIndex, y0)`, dividing nothing and reading no table word
before its region's own, the row's `y0` the same at every vertex. A row is recorded a region at
a time where a sample may lie on a pixel's left edge (`folds` answers that axis alone: a row's top
and bottom edges are its scissor's). The pixels and positions are the route's as before: the same
copy arithmetic of the same region, under the same viewport, its row's scissor holding the
regions' pixels. A whole-table draw is 34 recordings where it was 2
(rate_map_region_copy_recordings). The docs, the FAST-PATHS fan-out row and the boxes test say
rows; the docs drop the cost claim the Iris A/B disproved.
Kept though neutral on the Iris: the shorter vertex function (42 instructions, 428 estimated
cycles, 8 sends -> 37, 258, 7) did not move the per vertex-region cost, which lies in the fixed
function after it (four user clip distances tested on every copy; 2073 of 2074 rejected there).
Verified: m3-max-33295 (msi, at 72bd8baa20): clippy of the translator and runtime (all targets,
all features, -D warnings) plain, m2v_cpu_icd and m2v_gpu 0; translator 47/47 and runtime
fan_out 6/6 unit tests; lavapipe 24/24 rate-map device tests. m3-max-33355 (ef59a08250, docs):
clippy plain and Rustdoc 0. Iris (ms01) m3-max-33332: 24/24 rate-map device tests
(region_boxes direct [3 draws, 39 recordings] against indirect [3, 624], 0 texels differ;
depth_equal 0 red). Negative control m3-max-33327: the base's divided region restored, the SPIR-V
divisions assertion fails (4 vs 0). Iris A/B m3-max-33262 (warm, no INTEL_MEASURE): whole-table
commit frame 671.1 -> 670.9 ms, Exact 505.7 -> 498.7 ms; per sub-draw 1.068 us + 0.3626 ns x V
-> 0.926 us + 0.3697 ns x V.
On the RTX 2080 (job m3-max-33317, 31 queue tests at 16 threads) the
driver refused 10 of the 12 queue_share_device tests' devices their
queue plan, and the runtime made them with its least plan's 3
VkQueues; the tests passed on one shared VkQueue, so what they claim
about the plan's queues went untested. The runtime's own device tests
had no wait like the lane's (ef66c46a5f): on NVIDIA each VkQueue is a
channel, the 2080 holds about 210 across processes (11 devices of the
plan's 18, job m3-max-19615), and the suite's 16 processes ask more.
src/tests/plan_room.rs's device_with_room makes such a device again,
the one made dropped first, while the driver refuses it for want of
resources (Error::DeviceRefused) or it took its least plan
(DeviceShared::least_plan), with pauses doubling from 0.25 s to 2 s up
to 120 s in all, each a PLAN-DEVICE-ROOM line naming the answer and the
wait. Any other error returns at once; past the bound a refusal is
returned and a device still of its least plan fails its test, so a test
of the plan's queues runs on them or not at all. No lock and no
cross-process coordination.
Every plan-device maker in the runtime's tests goes through it:
blit_holds, caller_queue_writes, commit_and_submit, completion,
completion_wakes, draw_again, hand_out_waits, queue_limits_device,
queue_share_device (5), reserved_queues, scheduler_held_wakes,
scheduler_wakes, store_out_device and video_interop. Left as they are:
the least plan's own tests (least_queue_plan, reserved_queues'
a_device_made_with_its_least_plan_reserves_what_its_plan_spares), which
stand the driver's refusal in with refuse_next_devices; many_devices, a
GPU hazard that fills the GPU on purpose; host_ram_first_fill_bench's
ignored release benchmarks.
Test: plan_room::a_plan_device_refused_once_is_made_again_of_the_plan_s_queues
refuses the first making with the stand-in and asserts the device
helped back is of the plan's round robin and presenting queues (from
queue_plan over its families), not its least plan; a plain making
answers the least plan (NVIDIA) or a refusal (lavapipe, RADV) there.
docs/VALIDATION.md says the runtime's tests wait too.
Verified: cargo fmt; build, clippy and the tests in the lane's jobs.
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.
What: a shared FirstUse cell (owned_kernel.rs) keeps what a resource's sets of one of the
runtime's own kernels bind as the resource is made; the kernel (once per device, as
owned_kernel's rule says) and the sets are made by make() at the resource's first use, as an
encoder plans a command that uses it (ShadowCopies::prepare), before any of its copies is
recorded. Every record takes them through made(), which debug-asserts that a use made them and
records nothing where none did. Three resources take it:
- the tiled heap texture's moves (HeapTiledCopies), which held this form inline;
- a heap's two-plane extended-range texture's moves (HeapPlaneCopies, RGB10A8_2P_XR10 and its
sRGB twin, in a heap or over a surface's planes), whose making compiled TwoPlaneTexels;
- a 4:4:4 two-plane YCbCr texture's write shadow's write-back (YCbCrWriteBack), and a render
shadow's load (YCbCrLoad), whose making compiled YCbCrWrite (and YCbCrConvert's float form):
a heap set's float storage element makes that shadow as the texture is placed, so the
texture's making compiled it wherever such a set lived.
Why: Metal's resource creation never waits for anything and compiles no pipeline; on a RADV
APU a compile beside busy GPU work took 10-43 ms in a heap texture's making (the tiled form's
probe). The compile now moves to the first encode that needs the moves, once per device, on
the encoding thread, not on the making's.
Test: first_use's check that no making builds a kernel of the runtime's own
(WorkCounts::owned_kernels_made, per call) covers two more makings while the busy work runs:
an RGB10A8_2P_XR10 texture in a heap, and a YCBCR8_444_2P texture over a surface's plane made
after a kernel that writes through an argument buffer ran (so the device's heap set lives and
its float storage element takes the texture's write shadow), where the device holds textures in
argument buffers. Each is used after (a blit out; a write through its handle), and the line
names the kernels the uses built.
Left: a carried texture's decoded-twin kernels (a 4:2:2 texture's pairs on a device that
converts them, a heap texture's whole decode, a view's second twin) still build at making;
the next change. A multisample heap texture's sample-move trial builds pipelines to decide its
route; a separate follow-up.
Verified (m3-max-33274, msi, at ab77f697ba): clippy of the runtime and validation crates (all
targets, all features, -D warnings) 0; lavapipe 292/292 of first_use, heap*, two_plane*, ycbcr*,
extended_range_planes, shadow*, surface_two_planes and owned*; first_use: the makings built no
kernel, the uses built 3. The PHOENIX runs and clippy in the device configurations follow on
development.
validated_device_with no longer calls it, so the lib build outside the
device cfgs warned it unused (msi job m3-max-33276); its two callers are
device tests (degrade_notices, resource_ids).
Verified: cargo fmt; build and clippy in the next job.
On the RTX 2080 (job m3-max-33087, 18 queue tests at 16 threads)
a_device_refused_once_takes_its_least_plan_where_it_takes_fewer_queues
failed "the least plan took no fewer": it read the plan's round robin and
presenting queues from a device the driver had made, and under that load
the driver refused that device its plan too, so it had taken the least
plan's 1 + 0 and the test compared the least plan with itself.
The plan's queues now come from queue_plan over the device's queue
families, as reserved_queues::spare reads them, so the branch the test
expects (least plan taken, or refused) is a property of the families, not
of the load. The probe that reads the families is made as a loaded GPU's
driver makes it, refused its plan once by the stand-in (so of its least
plan's 3 VkQueues on NVIDIA, made again where the least plan takes no
fewer), and dropped before the test's own device: the test now
reproduces 33087's condition on every run and holds 3 channels, not
18 + 3. The LEAST-QUEUE-PLAN line names what the probe took.
Verified: cargo fmt; the tests on the 2080 and lavapipe in the lane's
jobs.
The 2080 legs of round 9ce951f521 failed 33 of 2,054 lane tests at device
creation: 27 devices of the queue plan that the driver refused (the
runtime then took its least plan and announced least-queue-plan, which
the lane's creation check rejects) and 6 lane devices of 3 VkQueues it
refused outright (Error::DeviceRefused, ERROR_INITIALIZATION_FAILED or
ERROR_OUT_OF_HOST_MEMORY).
Cause, measured: NVIDIA's driver gives each VkQueue a channel with an
instance block of its own, and refuses a device where it cannot allocate
one (the kernel logs "Could not create Channel"). A device of the plan
takes 18 VkQueues on the RTX 2080 (14 round robin, 2 presenting, the
staging and fill queues; its copy family's 2 queues put the copy queue on
the fill queue's), a lane device 3. With nothing else running the 2080
(NVIDIA 620.70.06) holds about 210 channels across processes: 11 runtime
devices of the plan and 3 of the least plan, the 15th refused (job
m3-max-19615), and 66 bare devices of 3 with room for 18 (19562). The
legs run 16 test processes, 188 of the lane's 408 modules make devices of
the plan, and nextest runs a module's cases side by side: 16 x 18 = 288
VkQueues. Lane 2/2's indirect_executions shards, 64 tests at the plan in
a row, took 22 least plans. Nothing leaks: each lane test is its own
process, every helper drops its device in a scope, and a runtime device
makes one vkCreateDevice whose queues its threads never add to.
Neither answer is the test's: its device is the one it asked for, and
the GPU lacked room only while the lane's other processes held theirs
(the runtime's DeviceRefused docs: a device asked for again once fewer
are live may be made). So validated_device_with makes such a device
again, the one made dropped first, after a pause doubling from 0.25 s to
2 s, for at most 120 s in all (runtime_lane/device_room.rs), and
made_lane_device does the same for a refusal. Only Error::DeviceRefused
and a least-queue-plan announced as the device was made are asked
again; any other answer returns at once, and past the bound the last
answer is handed back, failing the test as before. Each pause writes a
LANE-DEVICE-ROOM line naming the answer, the pause and the time waited.
No lock and no cross-process coordination: the driver's answer is the
only signal. The runtime's least plan and refusal stay its own tests'
(tests::least_queue_plan, the driver's refusal stood in for).
Tests: runtime_lane::device_room's unit tests (no device): a short
answer is asked again with doubling pauses until one has room; an answer
with room returns with no pause; one that never has room stops at the
bound. docs/VALIDATION.md's few-channels paragraph says what the lane
does now; degrade_notices' LEAST_PLANS says why no lane test keeps it.
Verified: cargo fmt; build, clippy and the tests in the lane's jobs.
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.
check_whole, the only user of SamplerState in compute/live.rs, is cfg(debug_assertions), so a
release build under --cfg m2v_gpu warned 'unused import: SamplerState' (live.rs:94), an error
under -D warnings (seen by the gbgap and ratemap3b lanes' release builds). The signature names
the type by its path and the import goes.
Verified: see the landing check job.
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.
DirtyCommit::note did all its work once a use. A host RAM copy over 128 chunks of a RAM with
a log names 2048 writes, and each chunk's key has a log of its own (RamOnDevice::chunk_key):
each write searched `host` for its log (one entry a chunk's log, about 128), took a Vec of its
own in `reported`, looked its key up in the imports and upgraded the log's Weak again, and put
its key in `used` again. On msi's lavapipe that was 179 us of a 290 us call (release probe,
m3-max-33184, the layer bench's logged case).
note now takes each run of consecutive uses of one key at once: the key goes into `used` once;
its logs are looked up and upgraded, and their places in `host` found, once, at the run's first
write; each kept write's reported logs are a range of one flat list (reported_hosts) that the
run's writes share, so no write takes a Vec of its own. Each write is still kept apart (the
seen check of the last 8, `written`, WRITES) and noted in its logs' ranges (HOST_RANGES, the
whole past it) as alone: written, host, what report_host_writes tells and when are as before.
wrote_host is split into host_place and wrote_at; wrote_unreported reads a write's logs through
its range.
Test: runs_of_one_key_note_exactly_as_their_uses_one_by_one notes 300 generated command
buffers (runs, keys named twice, reads, repeated writes, keys of no log and of two, logs past 64
ranges) and one past 4096 writes and keys, through note and through note_each (the uses one by
one, test-only), and asserts the same NotedWrites: each write with its logs, the keys used, the
overflows and each log's ranges.
The test's evidence bound asks for more than 30 logs written whole past 64 ranges (the rounds
give 43).
Verified: m3-max-33195 (msi, at 65498cb639): the runtime crate on lavapipe 2822/2823 (the one
failure the test's own bound, lowered in d99df37c6a), clippy plain, m2v_gpu and m2v_cpu_icd 0,
Rustdoc 0; m3-max-33205 (at d99df37c6a): 49/49 dirty and host_ram_copy tests, clippy cpu-icd 0.
Release A/B (m3-max-33196, msi lavapipe, 3 interleaved pairs, the same probe on both, us a call,
128 chunks of a logged RAM): note_dirty 200.4/204.1/196.6 -> 75.8/86.6/79.7, the call 324.1 ->
204.4 mean; unlogged unchanged; the log told 4096 runs a copy in every run.
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.
What: HeapTiledCopies (a heap texture held as a shadow in Metal's tiles,
AliasRoute::Tiled, and the surface depth textures that use it) no longer
builds the device's TiledTexels kernel or writes its two descriptor sets as
the texture is made. They live in a OnceLock and are made at the texture's
first use, in ShadowCopies::prepare(), which the encoder's plan_shadows calls
before it records any shadow copy. That is the path a converted YCbCr
texture's conversion already takes. dispatch() debug-asserts that the kernel
was made. So the compile moves to the first encode that needs any tiled
shadow, once per device, as owned_kernel.rs's rule says ("made once per
device, when a command first needs it"). That cost is now on the encoding
thread, not on resource creation.
Why: runtime_lane::first_use::new_resources_wait_for_no_gpu_work failed three
times on the Radeon 780M (RADV PHOENIX), always at "new_texture in a heap",
which returned 0.7-0.8 s later, about 65-70 ms after the busy work ended, with
no internal submission. A probe on um790's PHOENIX (9 runs, 3 of them beside
the lane's partition 4/4) showed that this making takes 10-43 ms every time,
while every other making takes about 1 ms. Backtrace samples taken 4 ms into
the call (3 runs) sit in vkCreateComputePipelines under HeapTiledCopies::new,
via Device::owned_kernel(TiledTexels). It is the only timed call that builds a
pipeline. Expected, not verified (the long wait did not reproduce in the probe
runs, nor beside a VRAM hog): the 0.7-0.8 s is that compile waiting in the
driver or kernel for the GPU's in-flight work, on an APU with a 2 GiB carve-out
shared by the lane's parallel processes. Metal's makings compile nothing.
Test: the first-use test records WorkCounts::owned_kernels_made around each
timed call and fails where a making built a kernel. Without this change that
check fails wherever the heap texture takes the tiled route (the 780M:
verified). The test also prints the tiled-heap-texture count and the kernels
the later uses built, as evidence the path ran. The heap texture's copy in and
copy out still read Metal's bytes.
Left alone (main records it): owned_kernel holds the device's owned_kernels
lock across every compile, so a lookup of a kernel already built waits behind
another kernel's compile.
Verified (m3-max-33194, msi, at 01fe19ba22): clippy of the runtime and validation crates (all
targets, all features, -D warnings) 0; lavapipe 132/132 of first_use|heap*|shadow*, including
first_use::new_resources_wait_for_no_gpu_work and every heap_tiled unit test. The PHOENIX runs
(the cause's device) and clippy in the device configurations follow on development.
A VMM keeps a log of its guest RAM's writes on a discrete GPU, so a download into that RAM
records each command's uses for the commit's report to the log (DirtyCommit::note): a cost the
layer bench's RAM, which had no log, never showed. host_ram_layer_encode_bench now runs its
two cases (the layer in one chunk and over every chunk), lets that RAM go (its keep-alive
dropped, so two RAMs' pages are never held at once), then runs the layer over every chunk of a
second fresh RAM with a log (HostRam::with_dirty_pages of LayerLog, which counts the runs it is
told), alone and beside a fill as the others, and prints the runs the log was told a copy: the
evidence the logged path ran.
The case's body is layer(), shared by the three. host_ram_device gains fresh_logged_ram_in, a
fresh RAM with a log, beside fresh_ram_in (fresh_host_ram_of makes the RAM for both).
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.
order_joined's Joins::of copied every use of a joined run's kept tail into a `noted` list grown
from empty, and took each run's hull twice by folding whole uses; note then walked those uses one
by one (a map entry, a find over the key's ranges, a clone, the room for 9 at the second), though
Joins already holds the run's key new to the part and named once by the command. At a host RAM
copy over 128 chunks (2049 uses, 128 runs of 16) that was about 25 us in Joins::of and 25 us in
note a copy on msi's lavapipe (release probe, m3-max-33112).
Joins now keeps, for each joined run, its key and the list note leaves of it from none (the hull
of its first 9 + 8m uses, then each after, in one Few with room for 9 past the first, as note
reserves), and `noted` holds only the uses no run joined. order_joined orders by `ordered` and
notes `noted` through order_as as before, then puts each joined key's list into the part at once
(note_kept), the map reserved for them. A run's hull is the first's range hulled with the last's
(their bytes past each other: the first's start to the last's end) with the reads and writes of
all folded, no use moved per step. A run with an empty range is not joined (joins), so note's
merge of equal ranges never meets a joined run, and empty ranges order as before.
order, inside_uses and admit are unchanged; the plain path takes none of this.
Test: runs_of_9_and_20_uses_join_exactly_and_one_with_an_empty_range_does_not (a 20-use run that
note collapses at its 9th and 17th, a 9-use run, a buffer use; after a command and as the first;
ordered and not) asserts equal barriers, summaries and the next encoder's cross-queue plan against
order, and that the run with an empty range is not joined. The 600-round
runs_of_one_key_joined_order_exactly_as_their_uses keeps asserting the same over random commands.
Verified: m3-max-33153 (msi, at 83e47c807a): the runtime crate on lavapipe 2823/2823, clippy
plain, m2v_gpu and m2v_cpu_icd 0, Rustdoc 0. Release A/B (m3-max-33160, msi lavapipe, 3
interleaved pairs, the same probe on both, us a call at 128 chunks): note 25.7/23.2/29.3 ->
4.0/4.3/4.5; Joins::of unchanged (about 27); the call 132.0 -> 115.1 mean; one chunk unchanged.
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.
A dispatch takes what its state planned for its bind state's shape and class of grids while the
state keeps it among its latest PLANNED. A stream of dispatches over buffers of several length
classes in grids of several classes cycles more pairs than 4: the bench's moved, heap, ragged
shape of three length classes cycles 6 through 4 entries, so a fifth of its dispatches planned
again (plan_now 4.0% of the encoding thread on msi lavapipe, m3-max-33099). In the consumer's
profile of its compositor's fix-index encoder on the XTX (hvP2, at 2cdfa840b5) plan_now,
BindState::shape and position_of_shape were 25.2% of dispatch_threads, 64% of its dispatches
planned and 47% made their shape anew.
PLANNED goes from 4 to 16. Each Planned carries its shape's key beside its used resources
(BindShape::key_beside_used). A lookup (position_of, used by planned_shape and planned_of)
compares the latest IN_PLACE = 4 entries in place, as the state compared its four before; only
where none is the state's shape does it work out the state's key (which folds every argument
sampler's) and compare whole only the remaining entries of that key. planned_for's fallback,
past the Arc match, compares whole only entries of the shape's key. PLANNED's doc states the
bound: about 290 bytes an entry, and at most PLANNED entries' variants and region pipelines kept
past the state's memos. The dispatch_chain bench's --classes takes up to 12.
Test: grid_classes::shapes_and_classes_in_turn_each_plan_once (six shape-class pairs in turn for
six rounds: each plans at its first dispatch alone, every later one takes its plan, every slice
Metal's words); at PLANNED=4 it fails (grid_classes.rs:346).
Verified at 9b5717e840 (m3-max-33158, msi): clippy plain, m2v_cpu_icd and m2v_gpu 0, Rustdoc 0,
106 lavapipe tests of the compute paths, the PLANNED=4 control failing. Profile (m3-max-33180,
msi lavapipe): 48 samplers, 3 classes: no key pass, plan_now gone; 12 classes (24 pairs): the
keyed path runs. XTX A/B (m3-max-33162, 5 interleaved rounds, load 23, median ns a dispatch,
dev 0ab6927fce / this): no samplers 3 classes 4448/4272; 48 samplers 3 classes 5180/5122, 12
classes 7708/6423; 200 samplers 3 classes 6408/6435 (flat); plain 3753/3554; no samplers 12
classes noisy (median 6151/6547, min 5839/5220, least encode+commit 6166/5543).
dispatches_planned_as_before 0.80 -> 1.00 at 3 classes; at 12 classes 0.61 reused where dev
planned every dispatch.
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.
copy_imports built, per chunk, a Vec in a BTreeMap of the import indices that hold the chunk's
bytes, and for_copy returned a one-element Vec for every made chunk: at 128 chunks two heap
allocations a chunk on every copy, the kept plan's reuse included, before the plan's serials
and maps were compared.
CopyImports::of_chunk (and KeptPlan's copy of it) is now one Vec of (chunk, import index) pairs
in the imports' order, sized for one import a chunk up front. copy_imports takes a made chunk's
import itself, after take_for_copies still moved the window past every chunk left, and
for_copy handles only chunks not made. The reuse compares the two lists as before (same
imports in the same order, each holding the same chunks). The full path sorts a copy of the
pairs by chunk (stable, so each chunk's imports keep their order) and looks a piece's chunk up
in it (imports_of), in place of a table of every chunk's slice.
Test: each_chunk_s_imports_are_found_by_chunk_in_the_order_they_were_given checks imports_of
against the old per-chunk map over 200 generated import lists. The device tests of both copy
paths cover the rest.
Verified: m3-max-33083 (msi, at 9b59c25348): the runtime crate on lavapipe 2821/2821, clippy
plain, m2v_gpu and m2v_cpu_icd 0, Rustdoc 0. Release split at 128 chunks (m3-max-33086, msi
lavapipe, before/after interleaved, the same phase probe on both, us a call): copy_imports
23.1/25.1 -> 4.9/5.1, the reuse's compare 6.7/6.9 -> 2.5/1.9, the imports' drop 4.6/4.0 ->
0.8/0.9; the layer's call 156.7 -> 133.9 mean; one chunk unchanged (one slot).
corpus() joined env!("CARGO_MANIFEST_DIR"), baked at build time, so a carried test archive run
on another node read no Metal records (parity::sequences::lane::sequences_0..7 'no Metal record'
off msi, regr98's 31742). It now joins metal2vulkan_devtools::validation_dir(), as the
runtime lane's corpus readers do.
Verified: see the landing check job.
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.