On a GPU with one graphics queue (RADV, ANV, lavapipe) every command queue, the unshared ones
included, submits to the same VkQueue in order, so a compositor's command buffer waits behind an
application's long one. Deciding whether to build compositor isolation needs to know how often
that happens in real use, so the runtime now counts it, always on:
- WorkCounts::command_buffers_behind_other_queues: command buffers whose first batch took its
value on a VkQueue while the latest batch of another command queue's before it there was not
seen complete;
- ..._over_16ms and ..._over_33ms: those whose wait, from the first batch's submission (or hold
in a group) to the host's observation of that other batch's completion, ran over 16 or 33 ms
(an upper bound: the host sees a completion after the GPU's end);
- wait_behind_other_queues_longest_nanos: the longest such wait;
- the same four with an unshared_ prefix for queues made with new_command_queue_unshared.
How (queue_wait.rs): each VkQueue keeps its last batch's value and command queue, the value of its
latest batch of another queue than that one, and the waits being timed, in the order of the value
each waits for, which never falls. The submission side runs under the scheduler's lock where a
batch takes its value (command_buffer/submit.rs); the completion side where the host publishes a
new timeline value (QueueSlot::completed). O(1) per batch and per completion; no command queue of
the device is scanned. The runtime's own submissions (staging, checks, a step's run again) are
not seen.
Test: queue_share_device::a_command_buffer_behind_another_queue_s_long_one_counts_its_wait (two
queues on one VkQueue, a ~30 ms command buffer then a short one: one wait from another queue,
bounded below by the long one's GPU work left and above by the host's time around it; none from
the same queue; the unshared tallies from an unshared queue). The API signatures table is
re-blessed; docs: WorkCounts, the runtime README's unshared queue entry, FAST-PATHS known gap.