Measured since: the phases of a draw, and runs for device-generated commands

Timer marks on the renderer thread (render.c, g_ph) in the same world, 4.1 million draws in 600 presents:

Phasens a draw
The resolve (start to the pipeline key)360
Vertex buffers130
Storage90
Stage sets (2 a draw, about 180 ns each: constants 85, storage 18, textures 32, images and the set 44)390
Indices and the pass120
Binds, dynamic state, push constants and the record245

Runs of draws in a row (vk_draw_runs=1, record.c), with two keys added for device-generated commands (D2):

So D2 needs D1's offsets in push constants first. Even then it removes at most the binds and the record (245 ns, about 18% of a draw) and writes a sequence of tokens for each draw in their place. The resolve, the buffer lookups and the stage sets stay.

The offsets in push constants (window epochs) and D2's ceiling

The dynamic offsets that end the runs are the constant buffer windows' bases: each bank moved its 64 KiB window of the staging ring at its own time (1.20 million moves in 600 presents, of 16.9 million window binds). The setting vk_cb_window_epochs=1 gives all windows of a draw thread in the ring one base, which moves for all of them at once; a kept copy below the base is copied again. The texture words and the GPU mirror's banks keep a window of their own. Window moves fell to 0.27 million, and the runs one device-generated execute could take grew from 3.42 to 10.08 draws.

The epochs alone cost time (100 s a side, one build): the renderer thread 10.9 ms a present at 83 fps off, 11.2 to 11.4 ms at 80 fps on. The constants part of a stage set rose from 96 to 111 ns (the copies made again).

The binds and record (256 ns a draw) in parts: pipeline, blend and sets 68, vertex input, buffers and dynamic state 96, push constants 42, the draw command 19, the commits after it 30. Inside a D2 run, the push constants, the vertex and index buffers and the draw still go as tokens, and the dynamic state must still be computed and compared to find where a run ends. So D2 would save the ring's commands and a few binds, about 50 to 80 ns a draw (4% to 6%), against the epochs' 30 ns: 2% to 4% net, for the largest change of part D. Not built.

Part D stopped here (2026-11-24). In this world no change of part D measured or estimated removes more than about 4% of the renderer thread net: the per-draw time is the resolve, the buffer lookups and the stage sets, which each draw needs. The probes stay in the worktree for later measurements: vk_draw_runs' device-generated keys (record.c), the phase timers (g_ph, render.c), the texture handle probe and the offsets probe.


Made from docs/dev/draw-fast-path.md at 69237645142c. GPL-3.0-or-later.