diff options
| author | Tyrannys <80750971+Tyrannys@users.noreply.github.com> | 2026-11-26 03:10:28 -0600 |
|---|---|---|
| committer | Tyrannys <80750971+Tyrannys@users.noreply.github.com> | 2026-11-26 03:10:28 -0600 |
| commit | a83f38508f535a2de95a15f91071139de2c26fee (patch) | |
| tree | 265ecb9b78f8b202b7cea76fee64ec94d3576d4f /runtime/src/xma2_decoder.cpp | |
| parent | a73a57e1339be072baf5522351c8ec7f1482b56b (diff) | |
d3d12: a pool of compile workers for the pipeline compiler (RT-ASYNC-COMPILE-POOL)
With LEONIDA_ASYNC_PIPELINES=1 every demanded build, the compute warm-up and
the cache checkpoint ran on one general worker (plus a graphics-only one), so
one long driver compile held every pipeline a submission asked for behind it,
and their draws and dispatches were skipped meanwhile.
PipelineCompiler now runs LEONIDA_COMPILE_THREADS workers (half the logical
processors, 2 to 8). A worker takes the most urgent job it may:
- demanded builds first, in the order they came, then warm-ups by size, then
the checkpoint, which waits until no worker compiles;
- large builds (compute over 128 KiB, graphics of 1 MiB or more) and warm-ups
together take at most threads-1 workers, so one stays free for a small
demanded build; at most LEONIDA_COMPILE_HEAVY_MAX large builds at once
(default threads-1, 1 with LEONIDA_SERIAL_BIG_COMPILES=1), compute and
graphics alike, each still within the memory gate;
- warm-ups run one at a time, and none starts while a demanded build runs:
each holds the compile gate for its whole create, and a submission waits
for every create in flight;
- one build of a PSO at a time, so after_running and the teardown rules hold.
LEONIDA_COMPILE_THREADS=1 keeps the layout before the pool. The design is
MoonEyes' (#2077), ported onto #2098's scheduler.
Tests: d3d12_compile_pool (CPU, jobs held at gates: settings, a long build
does not hold up a small demanded one, heavy count, free worker, warm-ups one
at a time and after demanded builds, order, one job per PSO, release/cancel/
stop_for_exit with jobs in flight), and d3d12_compile_teardown also with one
worker.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/src/xma2_decoder.cpp')
0 files changed, 0 insertions, 0 deletions