Risks

  1. The size: render.c is about 8,300 lines of code written for one thread, with its state in globals, and the callees in surface.c, texture.c, buffer.c and pipeline.c rely on vk_lock. Step 3 alone touches most of it.
  2. Locks on the hit path, or cache lines shared by the workers, can take what the threads give, as the per-draw pipeline showed. Each shared cache needs a measurement under two workers.
  3. A dependency that the check misses gives a wrong frame, not a crash: a stale texture over a target, a missing barrier. The check mode must compare each batch with a serial setup.
  4. A small CPU: the workers compete with the game's threads. The setting must choose by measurement, as gpu_split=2 does.

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