diff options
| author | OreoFR <29048345+OreoFR@users.noreply.github.com> | 2026-11-27 14:04:00 +0100 |
|---|---|---|
| committer | OreoFR <29048345+OreoFR@users.noreply.github.com> | 2026-11-27 14:24:29 +0100 |
| commit | d42c37335b2f10e39b3e06dbc8cffe00e5178b52 (patch) | |
| tree | 227af49c085eee3fca19b6692bbf9813729a6c6a /docs/d3d12_vulkan.md | |
| parent | ec91d695ca5ffebbf327c2127ea49d89547a4e81 (diff) | |
d3d12: LEONIDA_ASYNC_MIN_BYTES_GRAPHICS, a separate async threshold for graphics (RT-ASYNC-MIN-BYTES-GRAPHICS)
With LEONIDA_ASYNC_PIPELINES=1, graphics and mesh pipelines (all their stages) now take
LEONIDA_ASYNC_MIN_BYTES_GRAPHICS when it is set, and LEONIDA_ASYNC_MIN_BYTES otherwise, so
nothing changes while it is unset. Compute keeps LEONIDA_ASYNC_MIN_BYTES. 0 makes every graphics
pipeline asynchronous. One startup line states both thresholds; text that is not a number is
ignored with a log line.
Thread dumps from a retail run showed the draw thread building lazy graphics variants under the
1 MiB threshold in place, 2.5-11 s each, back to back, with no present for about 100 s. A skipped
draw costs one draw. The image needs the small lighting and post compute programs, and those
are still built in place.
Tests: async_pipeline_size_test covers the per-kind decision and the unset fallback;
d3d12_pipeline_workers_test --async-graphics-zero / --async-graphics-unset (new ctests) hold
the compile worker with compute over its threshold.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'docs/d3d12_vulkan.md')
| -rw-r--r-- | docs/d3d12_vulkan.md | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/docs/d3d12_vulkan.md b/docs/d3d12_vulkan.md index 50dd51614..bd9f62ec0 100644 --- a/docs/d3d12_vulkan.md +++ b/docs/d3d12_vulkan.md | |||
| @@ -2950,6 +2950,17 @@ submitting thread; at the maintainers' decision it was replaced by this one when | |||
| 2950 | still goes through the compile gate and `LargeModuleGate` as before, so a smaller one a submission waits for can | 2950 | still goes through the compile gate and `LargeModuleGate` as before, so a smaller one a submission waits for can |
| 2951 | queue behind it there; `async_pipeline_size_test` covers the decision and `d3d12_m4_compute_async_small_waits` a | 2951 | queue behind it there; `async_pipeline_size_test` covers the decision and `d3d12_m4_compute_async_small_waits` a |
| 2952 | submission whose two pipelines are under the threshold with the worker held (both dispatches run). | 2952 | submission whose two pipelines are under the threshold with the worker held (both dispatches run). |
| 2953 | `LEONIDA_ASYNC_MIN_BYTES_GRAPHICS=<n>` gives graphics and mesh pipelines (all their stages) a threshold of their | ||
| 2954 | own; unset, they take `LEONIDA_ASYNC_MIN_BYTES`, as before the variable, and compute always does. `0` makes every | ||
| 2955 | graphics pipeline asynchronous, as `LEONIDA_ASYNC_PIPELINES=1` did on its own. The reason: @MoonEyes's thread dumps | ||
| 2956 | (RTX 4060, `LEONIDA_ASYNC_MIN_BYTES=1048576`) showed the draw thread building lazy graphics variants under 1 MiB in | ||
| 2957 | place (`PipelineState::variant` -> `build` -> `vkCreateGraphicsPipelines`, 2.5-11 s each, back to back), so no | ||
| 2958 | present came for about 100 s. A graphics pipeline that is not built yet costs one skipped draw, while the image | ||
| 2959 | needs the small lighting and post compute programs, so graphics can stay asynchronous while those are built where | ||
| 2960 | they are needed. One startup line states both thresholds. `d3d12_pipeline_workers_async_graphics_zero` holds the | ||
| 2961 | compile worker with compute over its threshold and graphics at `0`: every dispatch runs, every draw is skipped, and | ||
| 2962 | the draws come once the worker is let go; `d3d12_pipeline_workers_async_graphics_unset` checks that graphics follow | ||
| 2963 | `LEONIDA_ASYNC_MIN_BYTES` without the variable. | ||
| 2953 | - **Warm-ups while the title submits.** A compute warm-up holds the compile gate for its whole create, and every | 2964 | - **Warm-ups while the title submits.** A compute warm-up holds the compile gate for its whole create, and every |
| 2954 | submission waits behind it: a native boot's submissions waited 140 s in all at the gate behind compute warm-ups, and | 2965 | submission waits behind it: a native boot's submissions waited 140 s in all at the gate behind compute warm-ups, and |
| 2955 | past the story load the worker went through 694 warm-ups of modules over 128 KiB (those over 640 KiB take 4-25 s | 2966 | past the story load the worker went through 694 warm-ups of modules over 128 KiB (those over 640 KiB take 4-25 s |