diff options
| author | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-26 12:36:34 -0500 |
|---|---|---|
| committer | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-26 12:40:56 -0500 |
| commit | 76109561f4e392fd0da97a2d4b936b35c83e821a (patch) | |
| tree | 266b133c2c5c0ade756d0efc51bb0ea4093fdb84 /runtime/src/main.cpp | |
| parent | bd6ba97ab6366777f76a080861017df5366f5a28 (diff) | |
d3d12: --precompile-pipelines builds the skip-listed programs unless --skip-listed
LEONIDA_SKIP_COMPUTE is a play-time setting: the game drops the listed programs' dispatches. The precompile also
refused to build them, one "not built (LEONIDA_SKIP_COMPUTE)" line each and no override. Players run it with the
game's environment (docs/running.md), so their skip list kept those programs out of the journal for good, and a later
run without the list compiled them in the game.
- precompile_compute_pipelines builds every compute entry; with the list set it says how many entries it names.
--skip-listed leaves them out on purpose, one line each.
- The last line counts the whole run: built (compiled, from a cache), journaled already, being built by another
process, failed; left out: of those the list names, not buildable, filtered out (--filter, the size bounds and now
--limit too).
- BuildHost::unbuildable no longer checks the list. The compile server checks it itself, as before: the game that
starts it drops those dispatches.
Docs: running.md, linux_proton.md and d3d12_vulkan.md no longer give compile time as the reason for the skip list.
The 89-167 s per program came from wave64-emulated packs; with a native wave64 pack on an RX 7900 XTX (RADV, Mesa
26.3.1, Wine) all 721 library programs of 2 MiB or more built, 360 of them in 170 s on 32 threads, 2.5-32 s each, the
largest (13 MiB) in 28.5 s alone, at a peak of 14 GiB of RAM. Two world runs on that card with all of them journaled
and no skip list took them all from the journal and got no further than runs with the list (a stop with the GPU
idle at 404 s; an idle-queue device loss at about 214 s, which also happens with the list set). Their output is
not checked, so the docs keep the skip list and LEONIDA_RT_AS=off as the setting of our longest runs.
Test: precompile_skip_list (test/check_precompile_skip_list.cmake) precompiles two synthetic compute modules, one of
them listed, three times: with the list set both are built; with --skip-listed only the other one is, and the listed
one is named; a second run into the first journal finds both journaled. It fails on main.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/src/main.cpp')
| -rw-r--r-- | runtime/src/main.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/runtime/src/main.cpp b/runtime/src/main.cpp index 21551e948..6f7039099 100644 --- a/runtime/src/main.cpp +++ b/runtime/src/main.cpp | |||
| @@ -10,11 +10,11 @@ | |||
| 10 | // The same mapping, then each loaded DLL's TLS callbacks and DllMain(DLL_PROCESS_ATTACH) are run. | 10 | // The same mapping, then each loaded DLL's TLS callbacks and DllMain(DLL_PROCESS_ATTACH) are run. |
| 11 | // | 11 | // |
| 12 | // gta6rt --precompile-pipelines [--threads N] [--big-threads N] [--big-bytes N] [--all] [--smallest-first] | 12 | // gta6rt --precompile-pipelines [--threads N] [--big-threads N] [--big-bytes N] [--all] [--smallest-first] |
| 13 | // [--limit N] [--min-bytes N] [--max-bytes N] [--filter PART]... [--list] | 13 | // [--limit N] [--min-bytes N] [--max-bytes N] [--filter PART]... [--skip-listed] [--list] |
| 14 | // No game: creates the Vulkan device as --run does and builds every compute pipeline of the shader library | 14 | // No game: creates the Vulkan device as --run does and builds every compute pipeline of the shader library |
| 15 | // (LEONIDA_SHADERS) into the pipeline journal and the driver's cache, so a title's first dispatch of a large one | 15 | // (LEONIDA_SHADERS) into the pipeline journal and the driver's cache, so a title's first dispatch of a large one |
| 16 | // does not stall it. Resumable: entries already journaled are skipped (--all: built anyway). See | 16 | // does not stall it. Resumable: entries already journaled are skipped (--all: built anyway). Programs named by |
| 17 | // shims/d3d12_precompile.h. | 17 | // LEONIDA_SKIP_COMPUTE are built too unless --skip-listed is given. See shims/d3d12_precompile.h. |
| 18 | // | 18 | // |
| 19 | // gta6rt --run <exe> [--game-dir DIR] [--overlay DIR] [--trace-d3d12] [--trace FILE] [-- game arguments...] | 19 | // gta6rt --run <exe> [--game-dir DIR] [--overlay DIR] [--trace-d3d12] [--trace FILE] [-- game arguments...] |
| 20 | // The same, then the EXE's own TLS callbacks and its entry point, on a game thread. The game's argv and | 20 | // The same, then the EXE's own TLS callbacks and its entry point, on a game thread. The game's argv and |
| @@ -262,7 +262,7 @@ int usage() { | |||
| 262 | " gta6rt --init <image> [--game-dir DIR] [--overlay DIR] [--mods DIR] [--archetype-lookup RVA[,ARG]] [--view-mode-getter RVA] [--trace-d3d12] [--trace FILE]\n" | 262 | " gta6rt --init <image> [--game-dir DIR] [--overlay DIR] [--mods DIR] [--archetype-lookup RVA[,ARG]] [--view-mode-getter RVA] [--trace-d3d12] [--trace FILE]\n" |
| 263 | " gta6rt --first-run-ui <exe> [--game-dir DIR] [--overlay DIR] [--trace FILE]\n" | 263 | " gta6rt --first-run-ui <exe> [--game-dir DIR] [--overlay DIR] [--trace FILE]\n" |
| 264 | " gta6rt --run <exe> [--game-dir DIR] [--overlay DIR] [--mods DIR] [--archetype-lookup RVA[,ARG]] [--view-mode-getter RVA] [--trace-d3d12] [--trace FILE] [-- game arguments...]\n" | 264 | " gta6rt --run <exe> [--game-dir DIR] [--overlay DIR] [--mods DIR] [--archetype-lookup RVA[,ARG]] [--view-mode-getter RVA] [--trace-d3d12] [--trace FILE] [-- game arguments...]\n" |
| 265 | " gta6rt --precompile-pipelines [--threads N] [--big-threads N] [--big-bytes N] [--all] [--smallest-first] [--limit N] [--min-bytes N] [--max-bytes N] [--filter PART]... [--list] [--via-helper]\n" | 265 | " gta6rt --precompile-pipelines [--threads N] [--big-threads N] [--big-bytes N] [--all] [--smallest-first] [--limit N] [--min-bytes N] [--max-bytes N] [--filter PART]... [--skip-listed] [--list] [--via-helper]\n" |
| 266 | " gta6rt --compile-server [--parent PID] [--threads N] [--idle-threads N] [--idle-exit SECONDS]\n"); | 266 | " gta6rt --compile-server [--parent PID] [--threads N] [--idle-threads N] [--idle-exit SECONDS]\n"); |
| 267 | return 2; | 267 | return 2; |
| 268 | } | 268 | } |
| @@ -290,6 +290,7 @@ int precompile_main(int argc, wchar_t** argv) { | |||
| 290 | else if (a == L"--max-bytes") ok = number(i, options.max_bytes); | 290 | else if (a == L"--max-bytes") ok = number(i, options.max_bytes); |
| 291 | else if (a == L"--all") options.rebuild = true; | 291 | else if (a == L"--all") options.rebuild = true; |
| 292 | else if (a == L"--smallest-first") options.smallest_first = true; | 292 | else if (a == L"--smallest-first") options.smallest_first = true; |
| 293 | else if (a == L"--skip-listed") options.skip_listed = true; | ||
| 293 | else if (a == L"--list") options.dry_run = true; | 294 | else if (a == L"--list") options.dry_run = true; |
| 294 | else if (a == L"--via-helper") options.via_helper = true; | 295 | else if (a == L"--via-helper") options.via_helper = true; |
| 295 | else if (a == L"--filter" && i + 1 < argc) { | 296 | else if (a == L"--filter" && i + 1 < argc) { |