What: a batch held for its host step, once the step took its gate, kept its
place in the order across queues, so every later commit of any queue whose
footprint conflicted with it waited host-side until the GPU work before the
step completed and the step recorded. A step whose uses commit could not
bound (shadowed textures, tile memory, a visibility query, an inherited
function table) conflicts with every batch that makes a tracked use, so it
held every queue, the compositor's unshared queues included. On an RTX 3090
a rate-mapped pass executing a GPU-written indirect command buffer held every
queue's commits for the 89 ms pass before it in its command buffer.
Now such a batch gives way, as it already did before its gate (the x86 Macs
take a later commit of another queue first; the M3 keeps commit order), but
for a later commit that writes what the step reads on the host (its
executions' records and ranges), which the gate does not cover, or that
shares a fence with it. The batches after it on its line give way with it.
A step whose host reads are not known (staged gathers and scatters, indirect
dispatches, loop checks, predicated executions, indirect sparse updates)
keeps its place from its gate on, as before.
How: Held keeps the step's host reads as a footprint when the gate is taken
(CommandBufferShared::step_host_reads, step_reads without the bounded-uses
requirement; Footprint::of_uses); place_of answers GivesWay for it; the
order's comparison for a batch that gives way checks fences and, for such a
step, a later write of its reads. Order itself is unchanged. Docs: the
scheduler's and order.rs's rules, gate_of, WorkCounts, and the
host-replayed-indirect-commands notice (degradation.rs, docs/API.md).
Verified: tests::held_step_order on lavapipe, three legs (results in the
report): an unshared queue's fill while the pass waits at its gate, the pass
bounded and not, goes with no look held behind it; a reset of the records the
step reads still waits behind the pass's batch. Before this change the
unbounded leg's fill went 111.40 ms after its commit, 0.2 ms before the pass
(m3-max-30848 at cd77de72d8, 3 looks held).
Also in this landing: cd77de72d8 Test: an unshared queue's fill waits for no other queue's host step.
RUNTIME 2326: an unchanged artifact's later commits on other queues no longer wait behind a host step held at its gate.
Proof (m3-max-30854, lavapipe): held_step_order's unknown-uses leg 0.17 ms after commit, 0 looks held (base 111.40 ms,
3 held); a reset of the step's records still waits. Negative control m3-max-30866 (the old gate condition): that leg
fails, 125.03 ms, 4 looks held.