The per-draw form (above) loses its time in the hand-off at each draw. A batch form hands a worker a whole run of
draws. A probe (bp_draw, render.c) cut the draws of one game's world into batches, by three rules, over 600 presents
(about 4.1 million draws):
| A batch ends at | Batches | Draws each | Draws in batches of 16 or more |
|---|---|---|---|
| any record that is not a draw, or a new pass | 898,000 | 4.6 | 70% |
| the same, but a constant buffer write stays inside | 480,000 | 8.6 | 88% |
| only a new pass | 96,000 | 42.6 | 97% |
With the second rule, 19% of the draws are in batches that sample a target that an earlier batch of the present wrote (the probe sees targets, not storage images or buffers), and 43% are in batches with a draw that missed a memo of the draw table, the targets or the texture cache (a lookup in a shared cache). So batches are long and mostly independent, and the shared caches must take workers' lookups, not only their hits.
Made from docs/dev/parallel-draw-prep.md at 69237645142c. GPL-3.0-or-later.