RUNTIME 2302: render encoders record into the VkCommandBuffer of the encoders before them
A render encoder took a VkCommandBuffer of its own at every open, so a compute, render and blit step began 2.71 and submitted 4 VkCommandBuffers per step (dispatch_chain renders, lavapipe). A render encoder with a log of its calls now takes part in the encoder fold: - One whose pass records at its end (draws in a secondary) joins the group before it; one whose first instance records inline joins none and may lead a group. - No barrier records inside a pass: a joined render encoder records one barrier from everything of the group's earlier encoders (FoldOrder::everything) at its open, counted in command_barriers. - Color groups, rasterization-rate maps and a depth attachment out of GENERAL take no group; segments, fence updates and Overwrites end the group after the encoder. Logless devices keep one VkCommandBuffer per render encoder. - A folded member's layout moves go before its group's first part (GroupPlaces). - A check splits a group with a render member at its pass's submission (as RUNTIME 2297 does for blits). - A group's order is built as its second encoder joins, not as its first ends. A/B (lavapipe, dispatch_chain, per step, base vs tip): renders 2.71 -> 1.35 VkCommandBuffers begun, 4 -> 2 submitted, GPU 119.5 -> 97.7 us; renders-apart 3.71 -> 1.00, 4 -> about 0, 143.6 -> 94.6 us; passes unchanged in buffers, the encoder's open about 250-480 ns more on the host (the group an inline pass begins), the whole pass within the host's noise. Tests: tests::render_fold (device), tests::held_depth, shadow_runs' rebind expectation (a rebind encodes a group whole). Docs: encoder_fold.rs, API.md, FAST-PATHS known gap and ANV row. Verified (msi, lavapipe): the full runtime suite 2683/2684 at c502efba29, the one failure the race test fixed in ca5042567b; clippy plain and --cfg m2v_cpu_icd, rustdoc, fast_paths 0. Negative control (the explicit order removed, renderfold-negctl): the hazard tests fail on their barrier counts; lavapipe shows no wrong texel because it completes each command as it runs, so the texel proof is a GPU that overlaps work.
This commit is contained in:
1 parent
a91629c1a6
commit
d8666d430f
22 files changed
+1496
-150
No files matched your search
@@ -58,7 +58,7 @@
|
||||
//! and it keeps the run's scratch after its own merge where a later pass went on over it, a
|
||||
//! linear attachment's run's box copied in again first (`State::replaying_keeps`, recorded by
|
||||
//! `EncoderCore::finish_replay`). Its run's other passes are not encoded again.
|
||||
//! - **Groups whole.** The compute and blit encoders of a group recorded into one
|
||||
//! - **Groups whole.** The encoders of a group recorded into one
|
||||
//! `VkCommandBuffer` (`encoder_fold.rs`) are encoded again together: a rebind that moves one
|
||||
//! encodes each again, into `VkCommandBuffer`s of its own, and puts them in their places
|
||||
//! together, or puts none where one of them kept no log, is refused or does not fit its place.
|
||||
@@ -490,7 +490,7 @@ impl CommandBufferShared {
|
||||
/// work than its encoding again's.
|
||||
const UNFIT: &str = "its place holds other parts or work than its encoding again's";
|
||||
|
||||
/// Why an encoder of a group of compute and blit encoders recorded into one `VkCommandBuffer`
|
||||
/// Why an encoder of a group of encoders recorded into one `VkCommandBuffer`
|
||||
/// keeps its first recording where the group cannot be encoded again whole (`encoder_fold.rs`).
|
||||
const TOGETHER: &str = "it records into one VkCommandBuffer with encoders around it, \
|
||||
which are not all encoded again";
|
||||
@@ -530,8 +530,8 @@ impl State {
|
||||
|
||||
/// The units the rebind's turn encodes again of `moved`, the ended encoders it moved, with
|
||||
/// their logs, in order, each with whether it splits a group: each encoder alone, but an
|
||||
/// encoder of a group of compute and blit encoders recorded into one `VkCommandBuffer` with
|
||||
/// every encoder of its group (`encoder_fold.rs`), whose shared recording none may leave
|
||||
/// encoder of a group of encoders recorded into one `VkCommandBuffer` with every encoder of
|
||||
/// its group (`encoder_fold.rs`), whose shared recording none may leave
|
||||
/// alone. A group one of whose encoders kept no log, or cannot be encoded again apart in its
|
||||
/// command buffer's command predication (`State::encodes_again_apart`), is split where each
|
||||
/// such encoder lies in one of Metal's submissions that runs nothing anyway
|
||||
@@ -579,7 +579,7 @@ impl State {
|
||||
units
|
||||
}
|
||||
|
||||
/// `group`, a group of compute and blit encoders recorded into one `VkCommandBuffer` some of
|
||||
/// `group`, a group of encoders recorded into one `VkCommandBuffer` some of
|
||||
/// whose encoders cannot be encoded again ([`State::encodes_again`]), split by a rebind: where
|
||||
/// each of those lies in one of Metal's submissions (`checks::metal_submissions`) that holds
|
||||
/// one of them that named a buffer the rebinds moved (`rebound`), which the first submission
|
||||
|
||||
Reference in new issue
Block a user