D3D12-WARM-ALL: launcher -WarmAll makes every known pipeline ahead, -WarmOnly stops after the precompile #2956

Closed
github-bot wants to merge 1 commit from github-bot/gh-2956 into main AGit
Owner

@⁠OnendGreysource on GitHub · 2026-12-01 21:16 UTC · original
OnendGreysource:d3d12-warm-all → main · +33 −2 · 3 files · 1 commits · closed without merging

Claimed in the coordination issue as: D3D12-WARM-ALL (#2570)

What and why

The precompile makes only the pipelines earlier runs drew with (leonida warm --used, about 2,400 of the ~83,500 the title creates). A place met for the first time therefore still compiles its pipelines in play, which stalls the game once for each.

  • -WarmAll (play-nvidia.ps1 and play-d3d12.ps1): after the usual warm --used, a second leonida warm without --used makes every other known pipeline. These go into the driver's cache only (LEONIDA_WARM_LIBRARY=0 for that pass, restored afterwards), because putting all of them in the pipeline library would grow it to gigabytes. warm-done.txt already skips what is made, so this is long once per translation or driver change and takes seconds after that. --again (an emptied driver cache) is passed through. The driver-cache file note and the full-cache warning run after both passes. The F1 menu's SAVE AND RESTART keeps -WarmAll.
  • -WarmOnly: ends the script after the precompile without starting the title. This lets the long first precompile run while nobody is playing. It is not replayed by the menu restart.
  • README switch table: both rows added.

Off by default, so nothing changes without the switch.

Tested

  • tests/test_leonida_launcher.py, tests/test_play_nvidia_menu_choice.py, tests/test_win_launchers.py, test_docs_*: pass. Both scripts parse with no errors in the PowerShell parser.
  • The same logic (as an environment switch in a fork's launcher) has been used daily on an RTX 5080: about 93,700 pipelines made per translation in ~11 min, after which no in-game pipeline compiles appear in new areas. This exact branch has not yet been run against the game. It stays a draft until it has.

GPUs tested: NVIDIA GeForce RTX 5080, driver 621.40, Windows 11 Pro 26200 (fork's equivalent; this branch pending)

AI-assisted: yes. Claude Code with Claude Opus 5.5 wrote the change. Not yet reviewed by a separate reviewer agent; that will happen before this leaves draft.

Checklist

  • Based on current main and merges cleanly.
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (check_no_game_data.py on the changed files).
  • A new translator rule is in the contract table of docs/design.md (n/a: no translator change).

🤖 Generated with Claude Code

**@⁠OnendGreysource** on GitHub · 2026-12-01 21:16 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/2956) `OnendGreysource:d3d12-warm-all` → `main` · +33 −2 · 3 files · 1 commits · closed without merging Claimed in the coordination issue as: D3D12-WARM-ALL (https://git.gtahub.st/github/ubiquitarianism--leonida/issues/2570) ### What and why The precompile makes only the pipelines earlier runs drew with (`leonida warm --used`, about 2,400 of the ~83,500 the title creates). A place met for the first time therefore still compiles its pipelines in play, which stalls the game once for each. - `-WarmAll` (play-nvidia.ps1 and play-d3d12.ps1): after the usual `warm --used`, a second `leonida warm` without `--used` makes every other known pipeline. These go into the driver's cache only (`LEONIDA_WARM_LIBRARY=0` for that pass, restored afterwards), because putting all of them in the pipeline library would grow it to gigabytes. `warm-done.txt` already skips what is made, so this is long once per translation or driver change and takes seconds after that. `--again` (an emptied driver cache) is passed through. The driver-cache file note and the full-cache warning run after both passes. The F1 menu's SAVE AND RESTART keeps `-WarmAll`. - `-WarmOnly`: ends the script after the precompile without starting the title. This lets the long first precompile run while nobody is playing. It is not replayed by the menu restart. - README switch table: both rows added. Off by default, so nothing changes without the switch. ### Tested - `tests/test_leonida_launcher.py`, `tests/test_play_nvidia_menu_choice.py`, `tests/test_win_launchers.py`, `test_docs_*`: pass. Both scripts parse with no errors in the PowerShell parser. - The same logic (as an environment switch in a fork's launcher) has been used daily on an RTX 5080: about 93,700 pipelines made per translation in ~11 min, after which no in-game pipeline compiles appear in new areas. **This exact branch has not yet been run against the game.** It stays a draft until it has. GPUs tested: NVIDIA GeForce RTX 5080, driver 621.40, Windows 11 Pro 26200 (fork's equivalent; this branch pending) AI-assisted: yes. Claude Code with Claude Opus 5.5 wrote the change. Not yet reviewed by a separate reviewer agent; that will happen before this leaves draft. ### Checklist - [x] Based on current `main` and merges cleanly. - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (`check_no_game_data.py` on the changed files). - [ ] A new translator rule is in the contract table of `docs/design.md` (n/a: no translator change). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The precompile makes only the pipelines earlier runs drew with (warm --used,
about 2,400 of 83,500), so a place met for the first time still compiles its
pipelines in the game, a stall each. -WarmAll runs a second warm without
--used after it: every other known pipeline, into the driver's cache only
(LEONIDA_WARM_LIBRARY=0, the library would grow to gigabytes). warm-done.txt
keeps it to once per translation or driver change. -WarmOnly ends the script
after the precompile without starting the title, so that long first one can
be done while not playing. -WarmAll is kept for the F1 menu's restart;
-WarmOnly is not.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 21:19:18 +00:00
Author
Owner

@⁠andrew-ai on GitHub · 2026-12-01 21:21 UTC · original

-WarmOnly reports success even when the precompile executable fails. I exercised the public scripts/play-d3d12.ps1 entry point at 558b7980e under native Windows PowerShell 7.6.9 using both unmodified scripts, synthetic input paths, and a recording leonida.exe. The stand-in returned exit code 37 on exactly one selected pass and zero on the others.

Failing pass with -WarmOnly -WarmAll Passes invoked Outer pwsh exit Printed “Precompile done”
None shaders, warm --used, warm 0 yes
shaders shaders, warm --used, warm 0 yes
warm --used shaders, warm --used, warm 0 yes
final warm shaders, warm --used, warm 0 yes

The final-pass failure alone makes a warm-only batch job look successful. Please capture the native exit status immediately after each precompile pipeline and surface a failure from the public entry point before announcing completion. A subprocess test with a deliberately failing stand-in would cover this.

The success controls worked: the extra pass alone saw LEONIDA_WARM_LIBRARY=0, plain -WarmOnly stopped after the used pass, and -WarmOnly -NoPrecompile invoked nothing. None of the six cases attempted a title launch. This checks launcher behavior without game files, not actual cache warming. Coordination claim. AI-assisted with OpenAI Codex (GPT-6).

**@⁠andrew-ai** on GitHub · 2026-12-01 21:21 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/2956#issuecomment-7326130338) `-WarmOnly` reports success even when the precompile executable fails. I exercised the public `scripts/play-d3d12.ps1` entry point at `558b7980e` under native Windows PowerShell 7.6.9 using both unmodified scripts, synthetic input paths, and a recording `leonida.exe`. The stand-in returned exit code 37 on exactly one selected pass and zero on the others. | Failing pass with -WarmOnly -WarmAll | Passes invoked | Outer pwsh exit | Printed “Precompile done” | | --- | --- | ---: | --- | | None | shaders, warm --used, warm | 0 | yes | | shaders | shaders, warm --used, warm | 0 | yes | | warm --used | shaders, warm --used, warm | 0 | yes | | final warm | shaders, warm --used, warm | 0 | yes | The final-pass failure alone makes a warm-only batch job look successful. Please capture the native exit status immediately after each precompile pipeline and surface a failure from the public entry point before announcing completion. A subprocess test with a deliberately failing stand-in would cover this. The success controls worked: the extra pass alone saw `LEONIDA_WARM_LIBRARY=0`, plain `-WarmOnly` stopped after the used pass, and `-WarmOnly -NoPrecompile` invoked nothing. None of the six cases attempted a title launch. This checks launcher behavior without game files, not actual cache warming. [Coordination claim](https://git.gtahub.st/github/ubiquitarianism--leonida/issues/2570). AI-assisted with OpenAI Codex (GPT-6).
Author
Owner

@⁠merzleckeier on GitHub · 2026-12-01 21:33 UTC · original

Cache recovery can select an early pipeline in both warm passes. I reproduced the launcher dispatch on 558b7980e merged into 1fff69129.

I ran the two unmodified PowerShell scripts through scripts/play-d3d12.ps1 with a recording executable. A missing noted driver-cache file and a file that shrank from 8 to 4 fixture bytes both requested warm --used --again followed by warm --again. The same-size control passed neither --again. The second call alone switched the library setting to 0, then the original value was restored. The F1 restart command kept -WarmAll.

I then ran those argument pairs through the actual Win64 leonida warm on an RTX 4070 SUPER under Wine 11.22 / VKD3D-Proton 3.1.0, using a synthetic book with one early key and one other key.

Case Used pass candidates All pass candidates Early-key entries in final warm-done.txt
Normal, no early library record 1 1 1
Recovery, no early library record 1 2 2
Recovery, early key in library bookkeeping 1 1 1

--again in the second call ignores the done record the first call just wrote. This exercises scheduling with LEONIDA_WARM_DONE_ALL=1 for the dummy records. The worker reports that the records make no host PSO. The library comparison seeds bookkeeping only. No timing or driver-cache retention was measured.

MEASURED with synthetic inputs, OpenAI Codex and independent raw-log verification.

**@⁠merzleckeier** on GitHub · 2026-12-01 21:33 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/2956#issuecomment-7326449868) Cache recovery can select an early pipeline in both warm passes. I reproduced the launcher dispatch on `558b7980e` merged into `1fff69129`. I ran the two unmodified PowerShell scripts through `scripts/play-d3d12.ps1` with a recording executable. A missing noted driver-cache file and a file that shrank from 8 to 4 fixture bytes both requested `warm --used --again` followed by `warm --again`. The same-size control passed neither `--again`. The second call alone switched the library setting to `0`, then the original value was restored. The F1 restart command kept `-WarmAll`. I then ran those argument pairs through the actual Win64 `leonida warm` on an RTX 4070 SUPER under Wine 11.22 / VKD3D-Proton 3.1.0, using a synthetic book with one early key and one other key. | Case | Used pass candidates | All pass candidates | Early-key entries in final `warm-done.txt` | | --- | ---: | ---: | ---: | | Normal, no early library record | 1 | 1 | 1 | | Recovery, no early library record | 1 | 2 | 2 | | Recovery, early key in library bookkeeping | 1 | 1 | 1 | `--again` in the second call ignores the done record the first call just wrote. This exercises scheduling with `LEONIDA_WARM_DONE_ALL=1` for the dummy records. The worker reports that the records make no host PSO. The library comparison seeds bookkeeping only. No timing or driver-cache retention was measured. MEASURED with synthetic inputs, OpenAI Codex and independent raw-log verification.
Author
Owner

@⁠wrexik on GitHub · 2026-12-01 21:35 UTC · original · reviewed

Two items to address before merging:

  1. The leonida shaders, warm --used, and -WarmAll warm calls are piped through output filters, but their native exit codes are never checked. A failing pass can still reach Precompile done and return success. Capture and propagate $LASTEXITCODE after each invocation, with subprocess coverage for each failure and the public wrapper.
  2. When driver-cache recovery adds --again to $warmArgs, the -WarmAll pass removes only --used and carries --again forward. That can redo pipelines the first pass just completed. Strip --again from the second pass and cover recovery with a missing or shrunken cache-note fixture.

Please credit @⁠wrexik in the PR description for this review feedback if you incorporate it.

**@⁠wrexik** on GitHub · 2026-12-01 21:35 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/2956#pullrequestreview-6140578572) · **reviewed** Two items to address before merging: 1. The `leonida shaders`, `warm --used`, and `-WarmAll` `warm` calls are piped through output filters, but their native exit codes are never checked. A failing pass can still reach `Precompile done` and return success. Capture and propagate `$LASTEXITCODE` after each invocation, with subprocess coverage for each failure and the public wrapper. 2. When driver-cache recovery adds `--again` to `$warmArgs`, the `-WarmAll` pass removes only `--used` and carries `--again` forward. That can redo pipelines the first pass just completed. Strip `--again` from the second pass and cover recovery with a missing or shrunken cache-note fixture. Please credit @⁠wrexik in the PR description for this review feedback if you incorporate it.
@ -889,0 +900,4 @@
$libraryWas = $env:LEONIDA_WARM_LIBRARY; $env:LEONIDA_WARM_LIBRARY = '0'
try {
& $leonida @($warmArgs | Where-Object { $_ -ne '--used' }) | Where-Object { $_ -match 'pipelines known|^\d+ of |made in' } |
ForEach-Object { Write-Host " $_" }
Author
Owner

@⁠wrexik on GitHub · 2026-12-01 21:37 UTC · original

Suggested change for this pass:

                $warmAllArgs = @($warmArgs | Where-Object { $_ -ne '--used' -and $_ -ne '--again' })
                & $leonida @warmAllArgs | Where-Object { $_ -match 'pipelines known|^\d+ of |made in' } |
                    ForEach-Object { Write-Host "  $_" }
                $precompileExitCode = $LASTEXITCODE
                if ($precompileExitCode -ne 0) { throw "leonida warm failed with exit code $precompileExitCode." }

Apply the same immediate exit-code capture/check after the shaders and warm --used pipelines too. Keeping --again on only the recovery pass avoids rerunning pipelines that the first pass has just completed.

**@⁠wrexik** on GitHub · 2026-12-01 21:37 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/2956#discussion_r4761353512) Suggested change for this pass: ```suggestion $warmAllArgs = @($warmArgs | Where-Object { $_ -ne '--used' -and $_ -ne '--again' }) & $leonida @warmAllArgs | Where-Object { $_ -match 'pipelines known|^\d+ of |made in' } | ForEach-Object { Write-Host " $_" } $precompileExitCode = $LASTEXITCODE if ($precompileExitCode -ne 0) { throw "leonida warm failed with exit code $precompileExitCode." } ``` Apply the same immediate exit-code capture/check after the `shaders` and `warm --used` pipelines too. Keeping `--again` on only the recovery pass avoids rerunning pipelines that the first pass has just completed.
@ -889,0 +900,4 @@
$libraryWas = $env:LEONIDA_WARM_LIBRARY; $env:LEONIDA_WARM_LIBRARY = '0'
try {
& $leonida @($warmArgs | Where-Object { $_ -ne '--used' }) | Where-Object { $_ -match 'pipelines known|^\d+ of |made in' } |
ForEach-Object { Write-Host " $_" }
Author
Owner

@⁠wrexik on GitHub · 2026-12-01 21:37 UTC · original

Please credit @⁠wrexik in the PR description for this review feedback if you incorporate it.

**@⁠wrexik** on GitHub · 2026-12-01 21:37 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/2956#discussion_r4761357907) Please credit @⁠wrexik in the PR description for this review feedback if you incorporate it.
github-bot closed this pull request 2026-12-02 07:19:58 +00:00

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/ubiquitarianism--leonida!2956
No description provided.