Under the default Fair queue turns, a later command buffer of a queue sharing a
VkQueue is held for its turn while its queue's earlier one is in flight. Where
that later one signals a value another queue's held head waits for, and the
earlier one waits on the GPU for a signal the program gives only once that
waiter is scheduled (a caller's reserved signal, Event::reserve_vk_signal), the
program waited for the watchdog, where Metal schedules them all at once.
Each look now first gathers the values the line heads wait for that no
submitted signal or host set reaches (EventShared::landing), and, only where
there are any, marks each turn-taking line's head by whether a batch of its
line signals such a value for another line (one read per command buffer).
Such a head takes no turn (scheduler/mod.rs mark_awaited_signals; Held
signals_awaited); once the signal went, its line takes turns again. The
awaited values live in State and are emptied after each look, so a look
allocates nothing. queue_turns.rs gains the "Awaited signals" rule and the
FAST-PATHS queue-turns row says it.
The lane test runtime_lane::events::a_signal_another_queue_waits_for_takes_no_turn_behind_a_gpu_wait
(queue B's first command buffer waits on the GPU for a reserved gate, its second signals W=1,
queue A's waiter waits for W=1; the gate opens once A's waiter left Committed) comes with it.
Verified (evwait lane, tip b77e692259 on fe3f09f569): m3-max-39516 (msi): clippy -D warnings
plain, --cfg m2v_gpu and --cfg m2v_cpu_icd 0, rustdoc -D warnings 0, runtime unit tests
queue_turns|unshared_hold|fast_paths|scheduler|order 222/222. The lane test's before/after
on the XTX (m3-max-39536) and PHOENIX follows on development; unverified there until then.
No new Degradation kind, WorkCounts field or public signature.
What: event_scenario (a_command_buffer_that_waits_leads_its_group,
a_wait_on_the_same_queue_for_a_held_signal_goes_after_its_group,
a_wait_on_another_queue_for_a_held_signal_goes_after_its_group,
a_middle_value_waited_for_from_another_queue_is_met_by_the_group_s_end) and
a_queue_s_batches_group_within_their_run make their devices with
QueueTurnPolicy::CommitOrder, as completions_wake_the_scheduler_only_once_a_head_may_go
(b9f584ffc1) and RUNTIME 2490's queue-sharing tests do.
Why: since RUNTIME 2490 (QueueTurnPolicy::Fair, the default) these failed under parallel
GPU load on RADV, alone in the module and in the XTX lane: every failing scenario grouped
nothing ("0 vkQueueSubmit calls held 0 batches together"). Their two command queues share
one VkQueue there, and under Fair a queue's command buffers after its first are held for
its turn wherever its expected run prices its work in flight past the turns' budget (2 ms
or 16 ms); beside the module's other GPU tests the warm fills took 10 to 450 ms from commit
to completion, so the steps reached the scheduler one at a time and nothing grouped. Alone
the runs are short and they group. That is the turns' pricing as designed, which
tests::queue_turns covers; these tests are about grouping.
Verified before (grouped_submissions module alone, nextest's default parallelism, 3 rounds,
carried --cfg m2v_gpu archives): development 68c456e5ba on the RX 7900 XTX 3, 2 and 3 of 15
failed (m3-max-39448), on the 780M PHOENIX 2, 1 and 4 (m3-max-39421); the same tree with
at_plan's devices on CommitOrder (probe 45561e17b7) 15/15 three times on the XTX
(m3-max-39446). This commit's runs follow in its tip report.
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: device/submit_calls.rs judged whether a committing thread leaves a VkQueue's batches to
the scheduler's thread by a floor of the driver call alone: the least of the last 15
vkQueueSubmit calls once the shortest was set aside. It now keeps, for each batch that goes to
the driver in a call of its own with command buffers, the whole submission on the thread that
made it (from CommandBufferShared::submit_batch's start: planning against the tracker, the
batch's barriers, transitions and timestamps, to the call's return), and the queue is slow
where the median of its last 15 is 100 us or more. Calls of no command buffer and a group's
calls stay out. The scheduler's thread's submissions feed the same ring, so a queue whose
submissions turn cheap again goes back to its committing threads.
Why: on the Iris Xe (ANV) the compositor's parts' calls straddle the bound. In the consumer's
desk walk at 5fc0508f0b the calls of the parts submitted inside their commit took 57 to 243 us
from the first to the ninth decile, 36% under 100 us, so the floor stayed under the bound most
of the time and 40 to 69% of those parts were still submitted inside their commit, each such
commit call about 220 us against 37 to 70 us for the others; mission and scroll take->show p90
24.3 and 21.2 ms against 20.8-21.7 and 18.6-18.9 before RUNTIME 2461. Their whole submissions
took 86 to 313 us, 11 to 17% under 100 us. A median is the cost a commit pays half the time or
more; a driver's rare long call or a minority of short ones moves it no more than the floor's
one short call set aside did.
Tests: submit_calls::a_queue_s_cost_is_the_median_of_its_last_submissions (the ring: one short
submission, a third, seven stay slow; eight do not); commit_and_submit::
a_queue_whose_calls_of_commands_are_slow_but_a_third_leaves_them (fails under the floor: two
fast calls in 15 held it under the bound) beside the one-in-15 case, now one helper; and
a_queue_whose_submissions_turn_cheap_again_goes_back_to_its_committing_threads (3 ms calls,
1 ms bound: left while slow, at commit again once cheap). drag_submit_bench gains a one-in-three
leg.
Docs: submit_calls.rs, the slow-call lines in scheduler/mod.rs, CommandBuffer::commit_and_submit,
WorkCounts::scheduler_at_commit_left_slow_calls and the runtime README.
Verified (launchreg lane, tip a693916ebf on 3dca675bde): m3-max-39443 (msi, lavapipe,
--cfg m2v_cpu_icd): runtime submit_calls|commit_and_submit|submission_turns|
queue_share_device|deferred_calls 72/72, the three new tests among them; clippy -D warnings
plain and cpu_icd 0. The negative control, clippy under the GPU cfg, rustdoc and the XTX,
PHOENIX and Iris drag_submit_bench before/after follow on development. No new Degradation
kind, WorkCounts field or public signature; FAST-PATHS names no floor (its slow-call row
stays true).
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: under QueueTurnPolicy::Fair, CommandBufferShared::held_for_turn now holds only a
command buffer's first batch (index 0). Once that one went, each later batch of it (a
command buffer splits at an event wait after its work or at a signal before more) goes as
it is ready, as Metal schedules a command buffer whole. queue_turns.rs gets a "Whole
command buffers" bullet and loses the claim that the turns add no wait that can close a
cycle; the FAST-PATHS queue turns row says it.
Why: a REGRESSION of RUNTIME 2490 (Fair, the default). A queue with no run seen keeps one
batch in flight, so a command buffer whose first batch waits on the GPU for a signal not
yet given (the caller's reserved signal, Event::reserve_vk_signal, or another VkQueue's)
had its later batch held for the turn until that first batch completed: it read
Scheduled only then, and another queue's command buffer waiting for its later signal was
held for EventValue meanwhile. A program that gives the signal once that waiter is
scheduled (Metal schedules both at once) waited for the runtime's 20.2 s watchdog, which
failed the signaller (GpuHang / victim) and recovered the device: the XTX lane's
runtime_lane::submission_checks reds. Every device whose command queues share a VkQueue
(RADV, ANV, lavapipe) takes Fair.
Verified before the fix (carried --lib gpucfg archives, alone, --test-threads 1):
development 68c456e5ba on the RX 7900 XTX (m3-max-39361) and the 780M PHOENIX
(m3-max-39362): a_submission_detached_while_a_gpu_signal_is_in_flight_fails,
a_wait_the_host_meets_is_checked_without_waiting_for_the_gpu and
an_event_wait_a_gpu_signal_in_flight_meets_is_checked_at_once FAIL (signaller Error after
the watchdog); the same tree with QueueTurnPolicy::CommitOrder (a probe, not landed):
4/4 pass in 0.1 s each on both. RUNTIME 2493 and 2503 fail alike on the XTX.
Verified after (evwait lane, tip c435183fba): clippy -D warnings on runtime + validation,
all targets, all features (m3-max-39391, msi), queue_turns + unshared_hold + fast_paths
unit tests 61/61; PHOENIX 780M (m3-max-39414): runtime_lane::submission_checks 9/9 as a
module in parallel, the three reds included (1.4-2.1 s each), and the runtime's
queue_share_device, queue_turns, scheduler_held_wakes, submission_turns and unshared_hold
tests 56/56. Clippy under the GPU cfgs, rustdoc and the XTX run follow on development.
No new Degradation kind, WorkCounts field or public signature.
The census at development 3dca675bde (after 4114585b2a's snapshot selection rule) compiles every
authored case as before: differences=0, regressions=0. Only the artifacts_at line's product
fingerprint moves, recording the build the cells were compiled at.
Verified: m3-max job m3-max-39354 (~/.cache/m2v-orch/census-job.sh): 2369 cases, 21 profiles,
49,749 cells, census-exit=0, slowest cell 1,106 ms, peak worker RSS 389 MiB.
engine/snapshot_select (ss_read_selecting, ss_read_selecting_dfdx), added by 4114585b2a, gets its
rows in public_fixture_expectations_engine.tsv and golden_hashes.tsv and its printout
tests/air_input/snapshot_select.txt. No existing cell moved.
Verified: m3-max job m3-max-39351 (~/.cache/m2v-orch/bless-job.sh at development 3dca675bde):
bless_engine_inventory, bless_golden_hashes and bless_engine_goldens each exited 0; the patch adds
4 + 4 rows and the 145-line printout only; every row of the fixture is ok on every profile.
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 fragment function that reads its own pixel of a colour attachment and branches on the value
was refused its snapshot read (SnapshotRefusal::Branch), so each such draw split its render pass
and copied the texture. On the consumer's desktop walks that was 614 draws/s on the XTX and the
Radeon 780M (510 render-pass splits/s, 20.8 M texels/s of split copies) and 107 draws/s on the
Iris Xe. In a pipeline dump of the 780M walk, 30 of the 33 readers refused for Branch branch
through selections whose arms hold no derivative, implicit-level sample, group op, kill or loop;
their values leave the arms through Function variables, not phis.
The rule (spirv/requirements/snapshot.rs, new snapshot/arms.rs): a branch or switch on a fetched
value keeps the slot when it is a selection whose arms leave only through its merge (no break,
continue, return, OpKill, OpTerminateInvocation or unreachable end), hold no tangled instruction
(Inst::is_tangled: a derivative, an implicit-level sample or LOD query, a subgroup or quad op),
hold no loop and no non-constant integer divisor or dynamic index, and call no function that
holds any of these. The merge's phis and the Function, Private and Output variables the arms (or
their callees) store to take the condition's reach, so a merged value that reaches a derivative
still refuses the slot (Derivative). A helper invocation may then take either arm: its stores to
Function, Private and Output memory have no effect beyond it ("Helper Invocations"), and nothing
in the arms observes its neighbours. The loop form stays Branch. demote_guard goes: the rule
covers it (demote arms are clean arms).
The facts a module states change (snapshot_textures, snapshot_refusals): SEMANTICS bump. A new
owned fixture, engine/snapshot_select.metal (scripts/regen-air-fixtures). No new Degradation
kind, WorkCounts field or public signature. Docs: SnapshotRefusal::Branch, docs/API.md (Snapshot
reads).
Tests: snapshot::tests (kept: empty arm, demote arms, Private store, callee and pointer forms;
refused for Branch: an arm with a derivative, a call to one, a kill, a loop, a non-constant
divisor, the loop exit; refused for Derivative: an arm's store or a merge phi reaching a
derivative); compile::tests::a_selection_on_the_texel_keeps_the_slot_where_a_helper_may_take_
either_arm (ss_read_selecting states no refusal on the 780M and lavapipe profiles;
ss_read_selecting_dfdx and wlk_read_branch state Branch); runtime_lane::snapshot_reads 12/12 on
lavapipe with two new lanes.
Verified (snapbranch lane): clippy -D warnings on the three crates (m3-max-39324), touched tests
6/6, lavapipe snapshot_reads 12/12 (m3-max-39334). The fixture's inventory, air_input printout
and golden hashes re-bless on development; clippy under the GPU cfgs, rustdoc, the release
translation timings and the PHOENIX lane run follow there.
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 pass that reads its own colour attachment (attached reads) turns the texture's two faces
where it can; where it cannot, the texture's texels are copied in before the pass. On the
consumer's desktop walks the passes whose render area is short of the texture (Unturned::Area)
were 71% of all shadow copy traffic: 132.7 M texels/s on the XTX and the Radeon 780M (282
copy-ins/s), 18.9 M/s on the Iris Xe (67%); faces turned 8.2 times a second on the XTX.
- Step 0, counters: attached_read_unswapped_area is now the sum of new fields by sub-cause
(extent, resolve, shared, memoryless, failing). unfaced_cause checks unfit_for_faces before the
colour's own verdict, so Area no longer hides a texture that could never take turns.
- Step 1: a Clear or DontCare colour whose pass is short of its texture turns the faces. Before
the first instance, the face turned to copies from the old face only the texels its clear does
not rewrite: for a stored Clear, those outside Metal's reach (the area rounded up to whole
32-pixel tiles, or the whole texture); for any other load, those outside the area. Within those
it copies only where the faces' standing (shadow_standing) is stale. The turned face's writes
are bounded by the clear's reach, not by the render area (the clear writes past the area, so a
bound by the area alone would leave the next turn stale there); shadows::plan takes the pass's
draw-call fact for it.
- Vulkan: load, store and resolve effects are restricted to the render area
(VkRenderPassBeginInfo::renderArea; VkRenderingInfo the same).
- New WorkCounts: attached_read_swaps_short_area, attached_read_swap_area_texels, and the
sub-cause fields. No new Degradation kind; exact in every case, nothing announced.
Tests: a 32x12 area of a 64x16 texture whose clear reaches 32x16, faces made to differ outside
the reach first: the first short turn copies 512 texels (exactly the half outside the reach),
later turns copy 0 with 0 copied in; the busy lane (open command buffer, a copy in every pass)
gives the same bytes; both 0 bytes off Metal's answer.
Verified (areaface lane, m3-max-39298, msi): lavapipe runtime attached_read|face|shadow|standing|
snapshot|carried_draws|reach 251/251, api_signatures + api_surface, clippy plain/gpu/cpu_icd 0,
rustdoc 0. The first run (39276) caught the clear's reach past the area (fixed in the second
commit).
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 render encoder that opened from a carry holds kept draws of the states its command buffer's
earlier encoders drew. At a split of its pass instance, rehome_aside re-homed the kept draws set
aside in the encoder but let go of every carried one not drawn since, and select_kept's opened
check dropped the rest once the instance changed. Each such state's first draw after the split
then took every step. On the Iris walk of a guest animation page (ia-p150), a fit over its
per-second counts puts 12 to 20 of the 46.6 full draws a present in encoders that opened from a
carry at splits (~3.6 splits a present, 3 to 5 carried states undrawn at each), at an estimated
88-101 us a full draw against ~10 us a rebound one.
- rehome_aside re-homes a carried kept draw like the others (readers and draws that read the
pass's colors are still let go); it stays carried.
- draw_rebound begins nothing for a re-homed draw (the split's draw began the instance it
records into); select_kept lets a re-homed carried draw past the opened check.
- Kept::carried_into clears the mark, so the next encoder's first draw of it still begins that
encoder's first instance.
Why the re-homed draw is right in the new instance: it stays carried, so its rebind brings every
slot the encoder's calls bound since its opening, and carried_stale stops it where the bind
state holds a slot no call of the encoder bound (a new encoder inherits no binding in Metal).
Its state commands record against the instance it records into (settled none, a fresh record;
inline_splits.rs: the record stays valid across instances in one primary command buffer). Its
uses are made whole and gathered into the instance after the split, so the barrier and copies
the pass end plans before that instance order it as an every-step draw there.
WorkCounts: kept_draws_rehomed_carried (of kept_draws_rehomed) and kept_draws_carried_unopened
(carried draws still let go at select because the instance is no longer the opened one). No new
Degradation kind. draw_costs gains a "splits" shape.
Tests: split_keeps::carried_draws_undrawn_at_a_split_are_rebound_past_it (commands, state
commands and pixels equal the every-step run; debug builds compare the carried draws field by
field). Verified (rebound lane): msi lavapipe m2v_cpu_icd 86/86 of the split, carry, rebound and
recovery-carry suites (m3-max-39124); negative control with the carried reject back fails the new
test (m3-max-39129); release build of the example (m3-max-39128). Clippy x3, rustdoc and the
splits bench run on development after.
Every draw of a pass but its first changes only its scissor rectangle, its two buffer offsets
and its indices: the rebound draw with no texture, sampler or pipeline state change, measured
alone.
Verified: built and run in a release job (lavapipe).
The scene shape's draws are their pipeline state's kept draw rebound with moved offsets and
their own indices; with a scissor rectangle set before each, every one is restated too, the
draw a guest's frame repeats about a thousand times a present. The shape lets that draw's CPU
be measured and profiled alone.
Verified: built and run in a release job (lavapipe).
tests::start_stamp::a_command_buffer_s_gpu_start_comes_before_its_own_long_work holds the
time from a command buffer's kernel end to its GPU start under half its life. Other test
processes' work on the same GPU runs before it, so that bound is the GPU queue's: in the
RTX 5080 Laptop GPU's whole runtime suite (round leg m3-max-39010) the start came 14.5 ms
after the kernel end, of a 25.8 ms life, while the 64 dispatches' GPU span of 11.2 ms still
held the work (the GPU start was stamped before it, as the test means to show). It now runs
alone, as the other GPU-time-bound tests do.
Test configuration only. Verified: the filter's form matches the queue_share_device override
beside it; the 5080 leg of the next round runs it alone.
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 queue's call floor was the least of its last 15 calls of commands, so one short call among
slow ones kept the floor under the 100 us bound, and a committing thread kept making the slow
calls itself. On a guest's window drag on the Radeon 780M, a `VkQueue` shared by several guest
queues had one queue's smaller batches come in under the bound about once in each 15 calls,
never two in a row; the drag's parts still made their ~170 us calls inside their commit 5-9%
of the time (the consumer's two walks) where the rest left.
The floor is now the least of the last 15 once the shortest one is set aside (SHORT_CALLS = 1,
select_nth_unstable). It still moves only with a cost all but one of the calls paid: a driver's
rare long call, or lavapipe's slow first calls of a fresh device, among short ones does not
trip it.
Tests: a device test whose calls of commands are slow but one in each 15 (a test hook,
Device::fast_submit_call_every) leaves them to the scheduler's thread; a no-device unit test of
the ring's floor (one short among slow -> slow at every ring position; two short -> not; a short
call ages out after 15; one long among short -> not). The host-pages test holds the slow-call
rule off: it is about host steps, and on a loaded host the rule rightly left its calls.
Verified (drag99 lane): clippy plain/gpu/cpu_icd 0, rustdoc 0, lavapipe commit_and_submit + ring
test 12/12 (m3-max-39031); the new device test fails before on PHOENIX (floor 22.8 us) and passes
after (lavapipe 39031/39004/38966, PHOENIX x3 in 39019). PHOENIX bench (m3-max-38985), 140
imports, every call +100 us but one in 15: batches at commit 46.2% -> 0%, 1476 -> 31 us a frame
on the committing thread; the driver's own 66-86 us calls stay inline both ways.
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.
The measured steps are a video step and a 3D step in a consumer's macOS guest, and the drag's
thread the compositor's committing thread: comments only.
Verified: cargo fmt; plain clippy of the runtime in the lane's 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.
What: the no-submission path (State::needs_no_gpu) now lets fills of the program's memory wait
past it on a device without a fill queue too (FirstMoves::none_waiting_but with the program's keys,
no has_fill_queue condition): such a command buffer completes in its queue's order with no
vkQueueSubmit, and the next batch takes the fill before its commands.
Why: a new Private buffer's zeros are the device's first work for its next submission
(buffer.rs clear_first), and only the GPU reads them. Without a fill queue every batch takes every
fill (FillTake::Owned) and an internal submission takes every one, so leaving them past a
command buffer with no commands changes nothing any command or the host sees. Before, an empty
command buffer after a new buffer carried its zeros in a submission of its own: a consumer's
macOS guest on the Iris Xe (ANV, no fill queue) made a buffer and committed a lone empty command
buffer 60 times a second in one 3D step; per second the empty ones taken with no call plus
new_buffer_zero_fills matched them (10+58, 18+58, 15+59, 30+45, 32+42, 6+60, 6+60, 7+57 of 60, 60,
60, 60, 60, 60, 60, 56), and those submitted at commit took 375-709 us.
Test: unsubmitted::an_empty_command_buffer_leaves_a_new_buffer_s_zeros_waiting: "unsubmitted 1,
queue submissions 0, zero fills 0; the copy after it: zero fills 1", and the copy reads zeros.
Verified: m3-max-38889 (msi): runtime clippy (all targets, all features), plain and --cfg
m2v_cpu_icd, clean; on lavapipe unsubmitted, first_move, fill_waits and commit_and_submit 44/44;
with the fill-queue condition put back in the same job the new test fails ("unsubmitted 0, queue
submissions 1, zero fills 1"). --cfg m2v_gpu clippy, rustdoc and the Iris count follow the merge.
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: DeviceShared::submit_logged takes the number of VkCommandBuffers its call submits, and only
a successful batch call that submits one or more is timed into the VkQueue's ring of its last 15
calls (device/submit_calls.rs), whose floor decides whether a committing thread leaves its batches
to the scheduler's thread. The device tests' slow-call stand-in (Device::slow_submit_calls) slows
calls of commands alone, as a driver's are that submits no commands for a call of none.
Why: a batch with no work, no wait and no timestamp holds no command buffer (submit.rs), and its
call is short where calls of commands list every import (RADV, ANV). One such call among each 15
held the floor at its own length. reims's traced macOS guest on the 780M (window drag, ~140
dma-buf imports): 8.8% of the parts had no GPU time, every one the last part of a guest buffer
split into several; the inline ones took 15-40 us for the whole commit (all 413 short inline
commits were such parts), the rest 173 us at p25, so left_slow_calls fired for ~30 of ~800
commits a second and the committing threads made 85-88% of the calls. With them left out, the
least of each 15 calls of commands the window server's thread made was 143 us at p10. The Iris
(ANV) Safari video step: a third of the parts empty, left_slow ~0/s at 306-374 us a call.
Also: drag_submit_bench (ignored, release, m2v_gpu, Linux, udmabuf): frames of 13 parts, the
last empty, over 140 then 280 imports of 2 MiB dma-bufs (6e29a6cfda); the test's and the bench's
empty command buffers signal an event, since one that signals nothing makes no vkQueueSubmit
(cdbf3980b3); is_multiple_of in the new test (7f260ca8e4).
Verified: m3-max-38842 (msi, lavapipe): runtime clippy (all targets, all features) clean;
commit_and_submit 10/10 with the two existing tests; the new
a_queue_whose_calls_of_commands_are_slow_leaves_them_among_empty_ones: batches at commit 0 of 48,
left for slow calls 48, floor 197.3 us; with the ring line put back in the same job it fails
("the queue's call floor is 1916 ns among empty command buffers' calls"). m3-max-38854: clippy
--cfg m2v_gpu clean. The Radeon 780M before/after, --cfg m2v_cpu_icd clippy and rustdoc follow
the merge.
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 reader's snapshot (the full-size storage image a draw takes where it reads a texture its
own pass renders through a view, render/snapshot.rs) was kept with the texture for the texture's
life: an image of the texture's level-0 extent beside every texture a draw ever read so. The
texture now holds it weakly, and each command buffer whose draws take it holds it until it is
released (CommandBuffer::hold_used_texture, once, beside the textures it made). One snapshot
still serves every command buffer in flight; when the last holder goes, its image parks in the
device's recycler, which evicts it within 1 s (bounds 32 images / 128 MiB; images_parked,
images_recycled, images_evicted). The snapshot is the runtime's own image and stays out of the
texture's allocated size, as before.
Why: a consumer's Iris walk with image caches showed a second Private image of each cache's size
placed 1-10 ms after the cache and freed only with it (~1.4 GiB at peak, unannounced). On
lavapipe and the Radeon 780M the plain cache sequence makes no image; a draw that reads the
texture or its view while its own pass renders the view makes one. This commit releases the
snapshot form; the usage-shadow form for attached reads is unchanged, pending the Iris's answer
to which form the guest takes.
The branch's earlier step keyed snapshots by command buffer (the texture then named the command
buffer type, whose auto-trait check overflowed in examples/draw_costs.rs, and two snapshots lived
where one did); this replaces it.
New test tests::snapshot_goes: the first pass's snapshot parks by its command buffer's release
with the texture and view alive; the second pass takes that image back (recycled 1, none made);
the last parks and is evicted within the recycler's time.
Verified: m3-max-38839 (msi): plain clippy and --cfg m2v_gpu clippy clean, lavapipe 38/38;
m3-max-38825 (same product code at da4a2f4b87): --cfg m2v_cpu_icd clippy and rustdoc clean;
the Radeon 780M (m3-max-38840) 38/38, with snapshot_goes's line "first {snapshotted 1, taken 1,
recycled 1}, parked by its release 1; second {snapshotted 1, taken 1, recycled 1}, parked by its
release 1, evicted since 1". Not run: snapshot_goes against the old code.
The lavapipe leg 4/4 (um790, m3-max-38632) failed
a_recovery_imports_a_resident_ram_whole_again_before_the_new_device_serves: the resident 640 MiB
RAM was cut into chunks of [128, 128, 128, 128, 128] MiB and none was imported as its use began.
That is the plan's contract: listed_chunks_of (host_ram.rs) imports a resident, kept RAM whole
only where the cap would cut it into more chunks than the source's and the device's limits do,
and there a device limit (llvmpipe's maxStorageBufferRange) takes 128 MiB chunks, within the cap,
so nothing past the cap exists to import. udmabuf's limit was at least 640 MiB, or the test would
have said so and not run. So the failure is deterministic on lavapipe wherever /dev/udmabuf opens
with that limit, not load; the resident and hole tests assume the same chunks past the cap.
listed_device now computes the chunk the device's limits take (listed_chunk_bytes, as the plan
does, with udmabuf's limit as the source's) and, where it is no longer than
LONGEST_LISTED_CHUNK, says so and does not run, beside its other environment checks.
Test only; the product is unchanged.
The Iris runtime leg (ANV, m3-max-38516) failed
a_command_buffer_s_gpu_span_holds_its_batch_s_first_work: with a new 256 MiB Private buffer the
fill's life grew by 65.3 ms, of which 54.1 ms lay from the kernel end to the GPU start and
11.37 ms in the GPU span (0.004 ms without the buffer). The span held the first work: 11.37 ms is
the zero fill's one vkCmdFillBuffer of 256 MiB. The 54 ms lay before the GPU's first timestamp,
after the start of the driver's submission call (the kernel end, command_buffer/group.rs's call
time), where the runtime does nothing: no GPU span holds it, nor would Metal's. The test's claim
(the span holds half the life the first work adds) counted it.
The test now runs the same fill again after the batch (one vkCmdFillBuffer of the buffer's
256 MiB, its first work done, which it asserts) and holds the batch's span to at least half of
that fill's span: GPU time against GPU time. A start written after the first work would leave a
span of about 0.004 ms against a bound of about 5.7 ms there, so the test still fails on that.
Each line also prints the submission call's own time where the process set
METAL2VULKAN_QUEUE_TIMES (CommandBuffer::submit_returned_time), so a run can show where the
time before the GPU start goes.
Test only; the product is 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.
What: dma_buf/parked.rs's release enters a section of the exit guard around each parked image's
vkDestroyImage (its shared.vk() included), leaving the image to the process's end while it exits,
as DmaBufPages's drop leaves the import. FixedPages releases its parked images inside its own
section and before its memory is freed or recycled (and before the free on a lost generation),
as the parked.rs docs say. The exported parking test now has the residency thread's own pass
release the parked images (import tax forced Holds), not the test thread's sweep.
Why: on the 780M, tests::exported_textures::an_nv12_picture_s_planes_over_exported_memory_go_in_place_naming_its_handle_type
ended in SIGABRT in parallel runs (m3-max-38587, and run 2 of 3 in m3-max-38611):
"metal2vulkan: the runtime's thread metal2vulkan-residency reached the device outside an
exit-guard section". The residency thread's pass (release_idle_parked) calls parked::release,
whose shared.vk() was read outside any section; a test build ends the process there
(exit_guard::check). Since exported images park (RUNTIME 2505), RADV's residency releases them
at its next pass, so the path runs on the thread in most tests over exported memory; the
host-page parked images took the same path before.
Verified: the 780M (m3-max-38630): the parallel 7-test set (exported_textures and
dma_buf_parked_images) 3 times, 7/7 each, no abort (before: 2 of 4 parallel runs aborted,
m3-max-38587 and m3-max-38611). msi: clippy --cfg m2v_gpu and the archive (m3-max-38621);
plain and --cfg m2v_cpu_icd clippy, lavapipe 20/20 (m3-max-38622).
What: many_passes_over no longer settles the device's in-place check before a target over host
pages, nor prints its verdicts; the expected form still follows the verdicts (merges_on_host).
Why: the lane's devices take the exact answers (HostPageTexturePolicy::Shadow, in_place_textures.rs
in_place), under which no check runs, settle_in_place_checks answers false at once and every verdict
stays pending: the settle's assertion failed both legs in 0.1 s on the XTX (m3-max-38616 at
00142dfb2c). So the cause the commit before named was not a check still running when the passes
began but none at all: under these policies every shadow over host pages merges on the host
(shadow_splice::splices takes a pending verdict) and joins no run of passes, on every device, and
the passes keep for themselves, as merges_on_host reads from the pending verdicts.
Verified: the tip's XTX run, in the lane report.
What: many_passes_over settles the device's in-place check before a target over host pages, and
expects the shadow's passes to keep twice as one run only where its merges stay the GPU's; where
the settled check of host pages (Pointer) failed or did not answer a copy's or a shader write's
texels in lines beside other bytes (shadow_splice::splices), each pass keeps every texel for
itself. Where those passed but another class failed its copies and passed its reads, either form
is accepted, as the report states no memory flags (in_place::copies_verdict). A copied buffer's
merges stay the GPU's. The verdicts read are printed.
Why: since RUNTIME 2432 (518d6d8443) such a texture joins no run of passes (render.rs, the join's
!merges_on_host), as pass_runs.rs and shadow_splice.rs say; the runtime crate's copy of this test
(tests/merge_scratch.rs) took that branch and settles the check first in RUNTIME 2433. This copy,
with a fresh shader cache and no settle, ran its passes while the XTX's check was pending or
failed: m3-max-38545 (ea202ab28f) kept 706 times every texel (54220800 and 50832000) against the
two of one run. Unsettled, a check that answers midway could also split the passes between the
two forms.
Verified: the fix tip's XTX run, in the lane report.
What: command_buffers_one_after_another_are_each_timed_on_their_own commits one untimed fill of
its new private buffer, and waits for it, before the counted window, so the eight timed fills
carry no first work.
Why: since RUNTIME 2466 (35ac917d6f) a timed command buffer whose first batch carries first work
(here the new buffer's zeros) writes its start in that work's command buffer, before the work
(command_buffer/submit.rs, GPU times), not in its first encoder's prefix, so it is no prefixed
start. The XTX lane (m3-max-38545, ea202ab28f) counted (7, 0, 0) prefixed, kept and reused
against (8, 0, 0), command buffer 0's GPU span 12.0 us against 3.6 to 5.4 us for the others.
The product does what its docs say; the test's claim missed the first work. The start of a batch
with first work is start_stamp.rs's test.
Verified: the fix tip's XTX run, in the lane report.
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 batch's first work of Managed uploads alone ended with a barrier
TRANSFER/TRANSFER_WRITE -> ALL_COMMANDS/MEMORY_READ|MEMORY_WRITE. On a
device that orders its batches by their ends, where the first work
already takes no leading barrier (first_move::Earlier::Ended), its
second scope is now the union of the stages and access types the
batch's encoders' uses of those buffers name (first_move::Later::Batch,
from the parts' tracker summaries). Every later batch on the VkQueue is
ordered by the batch's end, Barrier::to_all, whose first scope includes
all earlier commands at ALL_COMMANDS/MEMORY_WRITE (the uploads among
them) and whose second includes every later command; another VkQueue's
command buffers wait for the batch's signal, whose first access scope
includes all memory access performed by the device. The barrier keeps
ALL_COMMANDS under the exact batch order, and wherever the batch's use
is unknown: a command may reach memory no use names, a heap's set is
bound, the work may write through its residency, an upload names no
key, or the batch's uses name none of a buffer.
Probe (64 B inline, GPU p50; probe-only branches, never landed): the
global barrier narrowed to COMPUTE_SHADER/SHADER_READ|SHADER_WRITE took
the RTX 2080 from 23.85 to 18.25 us (none 12.4) and the RTX 3090 from
32.25 to 25.05 us (none 21.8); a buffer-range barrier measured the same;
on the RX 7900 XTX the trailing barrier costs nothing (9.7 us either
way).
New counter WorkCounts::managed_upload_barriers_narrowed; device tests:
the WAR test counts it, a later batch reads the upload at a stage the
upload's batch never used, and the barrier's scope names both stages of
a batch whose kernel and blit both use the buffer (a test-only record of
the scopes).
The second commit (263b155a4a) prints vk flags as raw words; Later derives no Debug.
Verified: m3-max-38590 (m2v_gpu and release archives, clippy --cfg m2v_gpu) and m3-max-38591
(clippy plain and --cfg m2v_cpu_icd, rustdoc -D warnings) clean; device tests managed_inline,
host_ram_managed and managed_copy_device 49/49 on the RX 7900 XTX (m3-max-38597) and the RTX
2080 (m3-max-38600): the WAR test counts the barrier narrowed (0 under the exact order and in
its negative control), the later-batch test reads the upload at TRANSFER, and the scope test
finds COMPUTE_SHADER|TRANSFER and SHADER_READ|TRANSFER_READ. The base-vs-tip benches on the
2080 (m3-max-38610) and 3090 (m3-max-38612) follow the merge.
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 texture over a buffer of the runtime's memory exported as a dma-buf, or in a block of its
buffers allocated exportable as one (Holds::FdDmaBufs), where no image binds in that memory
itself, takes a DRM_FORMAT_MOD_LINEAR image bound to a dedicated import of the memory's own
dma-buf. That image now parks as its texture goes, under the buffer's pages (FixedPages), and the
next texture over the same buffer of the same plan at the same texels and pitches takes it: no
vkGetMemoryFdKHR, no import, no VkImage made. The parking machinery of dma_buf/parked.rs is
shared: ParkSpot and the residency note a ParkHolder (HostImport or FixedPages) instead of a
HostImport, so the same bound (PARKED_MOST), windows and release passes apply, and the same
refusals (a handed-out VkImage, the device's check's textures, a detached image). Parked images
go with the buffer's pages, before their memory is freed or recycled, and on a lost generation.
New WorkCounts: exported_dma_buf_images_parked, exported_dma_buf_images_taken,
exported_dma_buf_images_parked_released (api_signatures.tsv blessed). HostImport::device, used
only by the residency's parked ages, is gone: the device comes from the parked images.
Why: a consumer's 780M walk (RADV) made and freed two such textures each frame over its surface
caches: 120 dma_buf_import_calls a second at ~333 us each (~40 ms of CPU a second), with
exported_dma_buf_images +120/s and nothing parked or taken, as this route never parked.
The second commit (622807d05b) reuses Buffer::fixed_pages (now pub(super)) and coerces each
ParkSpot holder's Weak through a binding of its concrete type.
Verified (msi): runtime clippy, all targets and features, plain and under --cfg m2v_cpu_icd
(m3-max-38572) and --cfg m2v_gpu (m3-max-38573) clean; rustdoc and the signatures check clean
(m3-max-38576); on lavapipe (m3-max-38572) exported_textures, dma_buf_parked_images,
dma_buf_shared_files and dma_buf_pieces 20/20, the host-page parking through the new holder
included. The new test a_texture_over_a_dma_buf_block_takes_the_image_the_last_one_parked is
not reached on lavapipe (its images bind in the memory itself); its 780M run and the release
bench exported_park_bench follow the merge (m3-max-38587).
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: copy_texture_from_host_ram / copy_texture_to_host_ram staged through the CPU (first touch,
a chunk that takes no import) recorded the GPU's copy between the arena and the texture as one
region at the surface's pitch, bufferRowLength = pitch / texel bytes, for any region of more than
one row. A pitch past 2^31 - 1 bytes (and up to texel x (2^32 - 1)) so recorded a
vkCmdCopyBufferToImage / vkCmdCopyImageToBuffer region breaking
VUID-vkCmdCopyBufferToImage-bufferRowLength-09108 and
VUID-vkCmdCopyImageToBuffer-bufferRowLength-09108 (bufferRowLength times the texel block size at
most 2^31 - 1); a wider pitch was refused (Problem::HostRam) where the texels overflowed a u32.
The copy straight on the imports already joined no rows past that pitch.
How: one rule, `joining_pitch` (more than one row, a pitch of at most 2^31 - 1 bytes), now used by
both paths; the staged path builds its regions with `staged_regions`: the one region of all the
rows where they join, else one region per row at the row's byte of the arena's region
(bufferRowLength 0, one row high). The same bytes either way; the arena's region is unchanged
(the whole span, which a device that cannot make a buffer that long refuses at the host step,
failing the command buffer, as before).
Verified: m3-max-38558 (msi): runtime clippy (all targets, all features) and rustdoc
clean; tests::host_ram_texture_rows 3/3 with the new
a_staged_copy_s_rows_past_a_pitch_of_2_31_minus_1_bytes_are_a_region_each, which fails with the
pre-fix rule restored in the same job (1 region, not 3). m3-max-38559 (lavapipe): runtime clippy
under --cfg m2v_cpu_icd clean; tests::host_ram* 94/94.
a_command_buffer_naming_host_pages_is_submitted_at_its_commit asserted that no commit was left
for slow calls. On a loaded host lavapipe's vkQueueSubmit calls can stay past the bound for a
stretch of the queue's last calls, so RUNTIME 2496's rule rightly leaves those commits to the
scheduler's thread: the pin round's lavapipe leg (m3-max-38535, um790 under load) left 5 of 200
plain-leg commits so, with 195 at commit and the final call floor 2.3 us. The test's claims stay:
no commit left for a host step, no host step recorded, the host pages' encoders keep their logs,
and at least half the batches go at commit. The slow-call leave is counted and printed;
a_queue_whose_calls_are_slow_leaves_its_batches_to_the_scheduler_s_thread proves that path.
With the check standing by for the device's work (RUNTIME 2501), the type 9 hang scenarios no
longer wait for its answer before they begin (ac9cad48bf): the check runs from the device's making
on a fresh scratch cache, beside the scenarios, as it does beside a program's first work. Once
they ended the test waits for its answer and prints it with WorkCounts::device_checks (its
stand-bys). For the NVIDIA run that shows the other queue's Scheduled latency with the check
beside it.
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 command buffer's transition to Completed that waited on the GPU for another queue's
command buffer X now waits for X's transition to reach its completed handlers wherever nothing
before X's transition in X's queue's context may block: no item there, nor what a thread runs
there, runs a scheduled or completed handler of the program's or waits for a submission handler
(Run::may_block; completion-seen handlers never block). Before, it waited only where X's
transition was first in its context or already running, so behind an earlier command buffer's
handler-free transition still queued, or run by a thread the host kept off the CPU, it went on
and the program's completed handler of the waiter could read X short of Completed. Behind an item
that may block it still goes on, as Metal's does
(a_blocked_handler_of_the_signaller_s_queue_holds_back_the_signaller_and_not_the_waiter).
How: each item posted to a context takes a place (a counter over all lines); a line keeps the
places of its items that may block and whether what a thread runs of it may. Follow keeps its
transition's place (an AtomicU64 store where it kept an AtomicBool) in place of the command
buffer's address, so Lines::leads is one look at the line's first item and first place that may
block: no walk of the line (the old lead check walked it where a thread ran the line), no new
lock. Cost: a u64 per queued item, a u64 per queued item that may block, a deque push and pop for
those. Item::finishes, which only the walk used, is gone.
The validation test a_shared_event_wait_for_a_kept_group_s_signal_ends_at_the_next_completion_turn
now checks what the program can rely on: X reads Completed in Y's completed handler, and Y's GPU
work began after X's ended where the device's own timestamps place both. It no longer compares
the two completed handlers' start instants, which Metal does not order either (an M3 Max under
macOS 27.0.1 started the waiter's first in up to 6% of rounds with a plain event, 0.1% with a
shared one).
The contexts tests name items by their places, so Ends carries no name (353257e382).
Verified on lavapipe (msi, m3-max-38523): clippy (cpu_icd, runtime and
validation, all targets and features) clean; runtime tests 63/63
(tests::contexts with the new an_item_leads_its_line_behind_what_may_not_block,
the three completion_order follow tests, unshared_hold, queue_turns,
submission_turns, scheduler_held_wakes); validation grouped_submissions 16/16.
A scratch diagnostic of the same shape, 5 rounds under each of Fair and
CommitOrder: X read Completed in Y's handler in 10 of 10 (before the fix,
m3-max-38464: X still Scheduled in 2 of 10). m3-max-38524: workspace clippy
(all targets, all features), clippy with --cfg m2v_gpu, workspace rustdoc
with -D warnings: all clean.
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 batch whose first work is only Managed uploads (copies or inline
vkCmdUpdateBuffers into device copies) recorded, in its first-work
command buffer, an execution barrier ALL->ALL before its GPU start and a
lead barrier ALL_COMMANDS/MEMORY_WRITE -> TRANSFER before the uploads.
On a device that orders its batches by their ends (batch_order::by_ends:
RADV, NVIDIA, ANV) both are redundant: every earlier command on the
batch's VkQueue is a batch's, followed in submission order by its end
Barrier::to_all (ALL_COMMANDS/MEMORY_WRITE -> ALL_COMMANDS/
MEMORY_READ|MEMORY_WRITE), whose first synchronization scope "includes
all commands that occur earlier in submission order" and second "all
commands that occur later in submission order" (vkCmdPipelineBarrier),
the uploads among them. Earlier reads of the device copy run before them
(WAR needs only an execution dependency), earlier writes are available
and visible to their writes (WAW), and the start timestamp at the top of
the pipe is held there as a first encoder's prefix start already is. The
one other kind of submission on a batch VkQueue, an internal one
(device/submit.rs), ends with no such barrier: the batch skips both only
where no internal submission the host has not seen complete was made,
read while it holds its place in the first work's order, which an
internal submission takes before it is made. Another VkQueue's command
buffers stay ordered by the batch's semaphore waits. Under the exact
batch order (to_host ends) both barriers stay; the trailing barrier stays
everywhere.
New counter WorkCounts::managed_uploads_unbarriered. New device tests in
tests::managed_inline: an upload behind a batch whose kernel still spins
on the device copy's word lands after its reads (default order, counted
unbarriered on a by_ends device; exact order, kept), and an ignored
negative control forcing it unbarriered under the exact order. The bench
prints the counter.
The write-after-read test's buffers take their first work before its steps
(e54dbd08b3) and its doc says where it can fail (5cbadadeef).
Verified: clippy in three configurations and rustdoc passed
(m3-max-38492, m3-max-38530); the managed_inline device tests on the XTX
47/47 (m3-max-38511); the write-after-read legs on the 2080 passed
(m3-max-38527). Measured (release, inlinemanaged bench, 64 B inline):
the XTX's GPU gap over no upload fell from +5.6 us to +3.5 us
(m3-max-38521; 2.1-2.9 us across sizes); the 3090 showed no measurable
change (m3-max-38522). The 2080 rerun follows the merge.
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: the view check (RUNTIME 2495/2498) ran from the device's making beside the program's first
work. Before each of its eight kernels' making and each of its timed dispatches it now stands by
until the device's work is quiet (DeviceShared::work_quiet_for): no batch committed waits for
its submission (Scheduler::holds_none), none submitted is in flight on any VkQueue, and no use of
a VkQueue has been under way for step_aside::QUIET (20 ms) before a making, which cannot stop
once begun, or queue_quiet::SETTLE (1 ms) before a dispatch, or since the check's own last
dispatch where that was the last use. It stands by for no one while a call waits for its answer
(settle_view_check), and stops as the device's holds stop. Each kernel's making is a step of its
own, inside its own exit-guard section, after the allocation step-aside the rounds already took.
QueueQuiet::unused_for reads how long no queue use has been under way. Counted:
WorkCounts::device_checks.view_check_stand_bys and view_check_stand_by_nanos. The module docs
also correct one claim: the check's dispatches are internal submissions counted as the device's.
Why: on the RTX 5080 Laptop GPU beside the runtime lane (b5080 m3-max-38412), on a fresh cache,
the check's kernels' making (compute_pipeline_create_nanos +833 ms, an 18.5 ms vkQueueSubmit)
overlapped the type_nine hang test's first scenario, whose other queue's command buffer read
Scheduled 103.2 ms after its commit, and its rounds' internal submissions landed in later
scenarios' counted passes. Each dispatch is an internal submission (device/submit.rs,
submit_internal_taking): it holds the device's internal lock from before its recording through
its vkQueueSubmit on the device's first VkQueue and the wait for its fence, so it waits behind
the work submitted there before it and holds every other internal submission meanwhile; a
kernel's making holds the driver for its compile. The other checks step aside only for the
device's allocations and frees (step_aside.rs) and make no pipelines.
With it (folded): its quiet counted from no earlier than its start, so its first kernel waits for the program's first work (a device that had used no VkQueue read as quiet for ever, so the first kernel's making began at the device's making); the runtime README says when the check stands by and that a device whose work never pauses that long gets its answer once it does (or from the record next start).
Residual, unmeasured: a compile already begun when guest work arrives still runs to its end; 20 ms of full quiet first makes that unlikely, not impossible.
Tests: tests::view_check_device::the_check_stands_by_while_the_device_s_work_goes_on (lavapipe: while a queue keeps a command buffer committed or in flight for 900 ms, from 300 ms on the check makes no kernel and submits no dispatch and its answer stays pending; once the work stops it answers, having stood by for at least 600 ms).
Verified (msi, at 85ca74cc15): m3-max-38482 clippy -p metal2vulkan -p metal2vulkan-runtime --all-targets --all-features 0, rustdoc -D warnings 0, api_signatures/api_surface 15/15; m3-max-38481 clippy --cfg m2v_gpu 0; m3-max-38480 clippy --cfg m2v_cpu_icd 0, lavapipe view_check|submit_check|queue_switch|in_place_check|tiling_check|tiling_cost|step_aside|queue_quiet 59/59. An NVIDIA run follows the merge.
What: the engine fixture uniform_texel_windows (.metal, its .ll and .air.ll) and its TOOLCHAIN line.
Why: since SEMANTICS 2142 the uniform_texels tests run on indexed inline kernels and the view check
builds its own kernels (bind::view_check_module); nothing references the fixture (git grep finds only
its own files and its TOOLCHAIN line). No dead fixtures.
Verified: in the check job named in the landing.
runtime_lane::pitched_surfaces::a_pass_s_copies_in_share_their_barriers and
runtime_lane::private_primitives::type_nine's hang scenarios each make a device over a fresh
scratch cache, which holds no record of the device's view check, so the check (RUNTIME 2495,
f2367d8956) runs from the device's making on a thread of its own. Beside the runtime lane on the
RTX 5080 Laptop GPU it ran into what the tests count and time:
- The barrier count is the device's: in the last counted pass the view check's internal
submissions (one dispatch between two timestamps each, a barrier before) added 2 and 15
barriers (1 against 3 and 16, internal_submissions +3 and +14), the pass's own staying 1.
- The hang test's first scenario overlapped the check's making of its pipelines
(compute_pipeline_create_nanos +833 ms, an 18.5 ms vkQueueSubmit, steps_aside 2 -> 8): the
other queue's command buffer read Scheduled 103.2 ms after its commit, past the hang, with no
cross-queue hold counted (heads_held_for_earlier_commits, batches_held_for_another_queue,
heads_held_for_unshared_commits and heads_held_for_queue_turns 0 in every scenario).
Both now wait for the view check's answer (Device::settle_view_check) right after making the
device. Found with counter prints of every moved WorkCounts field (b5080 m3-max-38412, two runs
beside the runtime_lane::p* tests).