The gain

From the measured shares of a draw's time:

StageStepsShare
1, resolvedraw_find and shaders 8%, targets and fragment key 12%, formats and draw key 3%, pipeline and setup 3%, the start 4%about 30%
2, bind and recordstage sets 34%, binds and push constants 15%, buffer prefetch 9%, constant prefetch 3%, storage and images 6%, record 3%about 70%

The map puts the start in Stage 2 too, because vk_frame_check can submit. Then Stage 1 is about 25% of a draw (2.7 ms a present) and Stage 2 about 73% (7.9 ms). A pipeline goes as fast as its slower stage. With the copy of ds and the hand-off (50 to 100 ns a draw, 0.35 to 0.7 ms a present), the renderer would take about 8.3 to 8.8 ms a present, against 10.8 ms: about 20% faster, 84 to about 100 fps. That holds only where Stage 1's results stay valid. The write epoch moves at each submit and the adds counter at each draw that stores, so the share of stale Stage 1 results can take much of the 2 to 2.5 ms.

Moving all texture resolves into Stage 1 (needed for one owner of the texture memos) shifts a little more work there.


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