Files
metal2vulkan/docs
Anees Iqbal d0714ec9a6 RUNTIME 2518: queue turns hold only a command buffer's first batch; its later batches follow
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.
2026-11-16 23:05:56 -08:00
..