A replayed draw whose making outlasts the commit's bound leaves its pass to the host step
The last draw dropped for its making's time: a draw of an execution's replay at commit (render commands the CPU writes) whose pipeline the replay began itself and that was still being made at the command buffer's bound recorded nothing. Metal cannot encode a draw before its pipeline exists, so every encoded draw runs. Now the replay at commit stops there, keeps the making on the command buffer (CommandBuffer::leave_unmade), and the pass takes it into the makings its host step waits for (DeferredPass::left_for_makings): the commit leaves the pass to the host step with its pipelines pending, as it already did for a pass whose settled makings were still being made, and the step records it from the records as they stand then once the making lands. A replay inside a host step waits for its making until made, on the step's thread. record_on_gpu declines to the host step the same way. The commit still returns at its bound at most. Removed: DrawDroppedStillMaking, WorkCounts::draws_dropped_still_making, CommandBuffer::drop_late_draw, RenderLowering::drop_late_replayed_draw, the execution's encoder place that only named the dropped draw, and the open-gap text in FAST-PATHS row 43, API.md (the bullet and the catalogue entry), the runtime README and the PipelineWaitPolicy docs (api_signatures.tsv -2). The IndirectCommandCheck and executed-commands docs name the new case in which an execution read at commit is read and checked again in its host step. The gap's test flips: a_replayed_draw_whose_pipeline_is_still_being_made_at_its_bound_renders_once_made (commit returns after the bound and before the 10 s watchdog; the command buffer is not complete a second past its bound while another queue completes; once the hold goes it completes with the rectangle drawn and nothing dropped). Checked by the lint and lavapipe jobs reported with it.
This commit is contained in:
1 parent
6447de22ad
commit
a610b58b8a
20 files changed
+179
-278
No files matched your search
+7
-23
@@ -190,15 +190,13 @@ compile does. `DevicePolicy::default()` is `DevicePolicy::UNTRUSTED`:
|
||||
made, however long that takes, and records them then: each renders and writes what Metal's
|
||||
does, its command buffer completing later, as on a slower GPU. `commit` waits for none of them
|
||||
but a pass that executes render commands the CPU writes, until its commit plus
|
||||
`DevicePolicy::pipeline_commit_wait` at most, which it leaves to the command buffer's host step
|
||||
past that; no other program call blocks for a making but those that wait for the GPU (a wait
|
||||
for the command buffer's completion or scheduling, an event it signals, a new command buffer
|
||||
of a queue whose most are all uncompleted). One draw is still dropped, an open gap: an
|
||||
execution's replayed draw whose making the replay waits for itself (one the commit's settle
|
||||
left the host step no wait for), still being made at that bound (`draw-dropped-still-making`, named by
|
||||
`CommandBuffer::dropped_draw` with `VK_TIMEOUT`, counted
|
||||
`WorkCounts::draws_dropped_still_making`). Meanwhile it holds back only its own queue's later
|
||||
command buffers: one of
|
||||
`DevicePolicy::pipeline_commit_wait` at most, for its pipelines and for those its executions'
|
||||
replay begins itself, which it leaves to the command buffer's host step past that; the step
|
||||
records the pass once they are made. No other program call blocks for a making but those that
|
||||
wait for the GPU (a wait for the command buffer's completion or scheduling, an event it
|
||||
signals, a new command buffer of a queue whose most are all uncompleted); a host step that
|
||||
meets a making of its own waits for it on its step's thread. No draw or dispatch is dropped
|
||||
for its making's time. Meanwhile it holds back only its own queue's later command buffers: one of
|
||||
another queue committed after it goes first, even where the two touch one tracked resource
|
||||
that one of them writes, and the waiting one runs after it, as an x86 Mac's GPU may take a
|
||||
later commit of another queue first (`metal2vulkan-conformance`'s
|
||||
@@ -3561,20 +3559,6 @@ bound.
|
||||
and the submission checks of the batches behind a queue's next one run with its own, before the
|
||||
batch before them is submitted; their commands, barriers and GPU times are unchanged;
|
||||
`CompletionPolicy::Exact` submits and checks each batch alone.
|
||||
- `metal2vulkan-degrade-draw-dropped-still-making` (precision). `DrawDroppedStillMaking`: A draw
|
||||
of an execution's replay (render commands of an indirect command buffer replayed on the CPU)
|
||||
whose `VkPipeline` the replay waits for itself (a making its commit's settle left no host step
|
||||
to wait for), and the driver was still making once its command buffer's bound passed
|
||||
(`PipelineWaitPolicy::Bounded`, the default: its commit plus
|
||||
`DevicePolicy::pipeline_commit_wait`, 4.5 s by default) ran nothing: its recording records
|
||||
nothing of it, and the command buffer runs on without error. Every other draw and dispatch waits
|
||||
for its making, its command buffer completing later. Metal makes a render state's pipelines
|
||||
inside `newRenderPipelineState`, so every draw it encodes runs: this is an open gap, not a
|
||||
choice (`docs/FAST-PATHS.md`). Announced where the draw is recorded: in the program's `commit`,
|
||||
or the command buffer's host step. Cost: the draw's commands ran nothing, where Metal's draw
|
||||
renders; the command buffers committed after the pipeline is made draw with it;
|
||||
`CommandBuffer::dropped_draw` names the first such draw with the error VK_TIMEOUT;
|
||||
`PipelineWaitPolicy::Exact` waits until the pipeline is made.
|
||||
- `metal2vulkan-degrade-draw-dropped-unmade` (precision). `DrawDroppedUnmade`: A draw whose
|
||||
`VkPipeline` the driver failed to make after the draw returned (the runtime makes a draw's
|
||||
pipeline while the draw goes on, `render/pending.rs`) ran nothing: its recording records the
|
||||
|
||||
Reference in new issue
Block a user