Under RenderLoweringPolicy::Worker a commit whose last render encoder's end
the lowering thread has not lowered returns at once and leaves its own work
to the thread that lowers the end (render/queued_commits.rs). That run
committed with Hand::Wake whatever the call was, so a commit_and_submit left
so lost its inline pass: the scheduler's thread was woken for it and ran its
checks and handlers.
The queued commit now keeps the call's hand (State::queued_commit is
Option<Hand>), and commit_queued makes commit_and_submit's pass on the thread
that runs it (the lowering thread, or a program thread that settles it before
a wait), with Hand::Wake on a thread command buffers' completion depends on,
as commit_and_submit does there. The pass's submission checks and handlers
then run on that thread. A render encoder opened there (by such a check or
handler) lowers its calls at their calls: one that handed them to the
lowering thread could wait for itself in reserve_end or wait_for_room.
Test: deferred_calls
a_commit_and_submit_after_an_end_in_flight_is_submitted_by_the_lowering_thread
holds the slot so the end is in flight at the commit, then checks the check
and handler ran on metal2vulkan-lowering, one pass at commit submitted and
checked the batch, and an encoder the handler opened lowers at its calls.
Without the hand kept the check runs on metal2vulkan-scheduler and
scheduler_passes_at_commit stays 0; without the guard lowers_at_call is false.
(cherry picked from commit bed9dc881cc1e6f18df708796da144a9072b9fb1)