Files
reims-vgpu/docs
Anees Iqbal 85820d4dec 🐎 Commit a long command buffer in parts as it is walked
On the Vulkan platform a command buffer's GPU work starts at its commit, so
a long buffer's walk and its GPU work ran in series: WindowServer's
composite of a Liquid Glass desktop walked 2.6 to 3.5 ms and then ran 1.6
to 3.3 ms of GPU work each frame on an RTX 5080 Laptop GPU, against a
refresh of 8.33 ms, with its p90 at 7.5 to 8.5 ms.

At an encoder's end, once the part walked since the last took 250 us, the
walk now hands the platform that part (`CommandBuffer::split`) and goes on
in the command buffer it answers. A part is committed only where the whole
buffer could be committed then, waiting for nothing, and only for a buffer
of a context that waits for no event, is behind none that does and is not
a video buffer. While a buffer's parts are out, its context's other
commits wait at their commit and its range messages are carried out after
its last part, so each comes wholly before the buffer or wholly after it.

What the guest sees: one CB_SUBMITTED, CB_SCHEDULED and CB_COMPLETE per
buffer as before, the last two from its last part; a long buffer's
CB_COMPLETE sooner; its GPU times from its first part's start to its last
part's end; the first failed part's error. On the M3 Max (MoltenVK) a
frame of 60 passes completed in 6.0 ms from its message's take, where it
took 9.5 ms whole. A buffer whose walk faults after a part still fails at
its stand-in, but the parts committed before the fault have run, as the
encoders before a fault of Metal's GPU do; a whole buffer's walk fault ran
none of it.
2026-11-05 21:59:32 -08:00
..