ScarletNX / ScarletNX documentation / Parallel draw preparation (design, not built) · ← previous · next →
Build steps
- 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.
- 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).
- 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.
- The Stage 1 thread outside
vk_lock, fed through a ring of draw copies, and its results through a ring by value.
- In Stage 2, the check of the stamps and of the draw's surfaces, and the full resolve where one moved.
- A setting to turn Stage 1 off,
draw_state_check=1 to compare each result with a full resolve, and the headless
tests.
- A/B with at least three runs of 100 s a side.
← previous · next →