Build steps

  1. A copy of each draw's state (DsState, DrawCall, the inline indices) that the front end hands over, so that Stage 2 never reads the live state.
  2. Stage 1 as a function of that copy, with no side effect on a memo hit, which returns "do it in Stage 2" at any miss (a guest read that can land results, a reload, an upload, a compile).
  3. One owner for each shared structure: the texture memos and all texture resolves in Stage 1, the buffer cache, rings, sets, g_dyn and g_rp in Stage 2. Per-thread statistics.
  4. The Stage 1 thread outside vk_lock, fed through a ring of draw copies, and its results through a ring by value.
  5. In Stage 2, the check of the stamps and of the draw's surfaces, and the full resolve where one moved.
  6. A setting to turn Stage 1 off, draw_state_check=1 to compare each result with a full resolve, and the headless tests.
  7. A/B with at least three runs of 100 s a side.

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