play.ps1: -Record, -Warm and -Shaders, so warm has pipelines and the run's switches #403

Open
github-bot wants to merge 3 commits from github-bot/gh-403 into a-publier AGit
Owner

@⁠Esteban-V on GitHub · 2026-11-27 00:03 UTC · original
Esteban-V:perf/warm-usable → a-publier · +60 −6 · 3 files · 3 commits · open

victory warm --used can only make pipelines that an earlier run wrote down, and nobody gets there through the launcher. Recording needs VICTORY_PIPELINE_BOOK=1 (crates/victory-gpu/src/pipeline/known.rs:45-48), but scripts/play.ps1 never sets it and removes every inherited VICTORY_* variable before the run (play.ps1:38-41), so only an undocumented -More @{VICTORY_PIPELINE_BOOK='1'} works. With nothing recorded, warm prints 0 pipelines known, ...; 0 to make with no hint why. And victory shaders / victory warm run from a plain shell can see different switches than play.ps1 sets: sixteen VICTORY_* switches are part of the shader cache key (crates/victory-gpu/src/shader_cache.rs:86-146), so one difference makes the run miss everything warm made. This adds launcher modes that record, warm and translate with the run's own switches.

  • play.ps1 -Record adds VICTORY_PIPELINE_BOOK='1' to the settings. Off by default.
  • play.ps1 -Warm builds the same settings (-Safe, -RayTracing, -Fsr4K, -Build, -More, -Record) and runs victory warm --used; -Shaders <paths> does the same and runs victory shaders <paths>, with the paths resolved before the script changes directory.
  • Parameter sets Run, Warm, Shaders: -Exe is required only for Run, and -Warm / -Shaders cannot be combined with it, so they never start the title.
  • apps/victory/src/warm.rs: new empty_hint(known, early, used), printed after the summary line when nothing was recorded or early-pipelines.txt is empty with --used.
  • README.md: two sentences under the shaders / warm block on -Record, -Warm and -Shaders.
  • Default unchanged: play.ps1 -Exe <path> sets the same variables and runs the same command as before. VICTORY_PIPELINE_BOOK writes the title's shader code into the cache folder, so turning it on by default is the maintainers' call.

Testing

  • Windows CI (windows-latest): Clippy, default tests and diagnostics tests pass (run).
  • Type-checked and clippy-clean for x86_64-pc-windows-msvc on a macOS host (cargo clippy --workspace --all-targets --locked -- -D warnings, with and without --all-features).
  • Unit test empty_hint_only_when_there_is_nothing_to_make added.
**@⁠Esteban-V** on GitHub · 2026-11-27 00:03 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/pull/403) `Esteban-V:perf/warm-usable` → `a-publier` · +60 −6 · 3 files · 3 commits · open `victory warm --used` can only make pipelines that an earlier run wrote down, and nobody gets there through the launcher. Recording needs `VICTORY_PIPELINE_BOOK=1` (`crates/victory-gpu/src/pipeline/known.rs:45-48`), but `scripts/play.ps1` never sets it and removes every inherited `VICTORY_*` variable before the run (`play.ps1:38-41`), so only an undocumented `-More @{VICTORY_PIPELINE_BOOK='1'}` works. With nothing recorded, `warm` prints `0 pipelines known, ...; 0 to make` with no hint why. And `victory shaders` / `victory warm` run from a plain shell can see different switches than `play.ps1` sets: sixteen `VICTORY_*` switches are part of the shader cache key (`crates/victory-gpu/src/shader_cache.rs:86-146`), so one difference makes the run miss everything warm made. This adds launcher modes that record, warm and translate with the run's own switches. - `play.ps1 -Record` adds `VICTORY_PIPELINE_BOOK='1'` to the settings. Off by default. - `play.ps1 -Warm` builds the same settings (`-Safe`, `-RayTracing`, `-Fsr4K`, `-Build`, `-More`, `-Record`) and runs `victory warm --used`; `-Shaders <paths>` does the same and runs `victory shaders <paths>`, with the paths resolved before the script changes directory. - Parameter sets `Run`, `Warm`, `Shaders`: `-Exe` is required only for `Run`, and `-Warm` / `-Shaders` cannot be combined with it, so they never start the title. - `apps/victory/src/warm.rs`: new `empty_hint(known, early, used)`, printed after the summary line when nothing was recorded or `early-pipelines.txt` is empty with `--used`. - `README.md`: two sentences under the `shaders` / `warm` block on `-Record`, `-Warm` and `-Shaders`. - Default unchanged: `play.ps1 -Exe <path>` sets the same variables and runs the same command as before. `VICTORY_PIPELINE_BOOK` writes the title's shader code into the cache folder, so turning it on by default is the maintainers' call. ## Testing - Windows CI (`windows-latest`): Clippy, default tests and diagnostics tests pass ([run](https://github.com/Esteban-V/VIctory-Belobug-AMD/actions/runs/45916894521)). - Type-checked and clippy-clean for `x86_64-pc-windows-msvc` on a macOS host (`cargo clippy --workspace --all-targets --locked -- -D warnings`, with and without `--all-features`). - Unit test `empty_hint_only_when_there_is_nothing_to_make` added.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 00:59:16 +00:00
Author
Owner

@⁠Yoshi-233 on GitHub · 2026-11-27 02:23 UTC · original

I tested the launcher in 0ce04fb using PowerShell 7.7 on Ubuntu. A native stand-in for victory.exe recorded the actual argument list and returned a selected exit code. Paths with spaces came through correctly. Two cases may affect people scripting a warm-up:

  • With both shader[1].rpf and shader1.rpf present, -Shaders 'shader[1].rpf' passed shader1.rpf to the child. With just solo[2].rpf present, the child received one empty path. An unmatched glob alongside a valid path was silently dropped. Resolving each existing literal first (Test-Path -LiteralPath / Resolve-Path -LiteralPath), then expanding any remaining patterns and rejecting empty matches, preserved both bracketed names in my control. An intentional stage*.rpf still expanded to both archives.
  • With pwsh -File scripts/play.ps1, child exit codes 0/7/42 yielded launcher status 0/0/0 for Run, Warm, and Shaders. The Run behavior already occurs on base 4eb6cfd; the new preparation modes inherit it. Capturing $LASTEXITCODE after the selected child command and returning it after Pop-Location gave 0/7/42 in all three modes.

These checks exercise argument passing and process status only. AI-assisted testing.

**@⁠Yoshi-233** on GitHub · 2026-11-27 02:23 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/pull/403#issuecomment-7208087528) I tested the launcher in `0ce04fb` using PowerShell 7.7 on Ubuntu. A native stand-in for `victory.exe` recorded the actual argument list and returned a selected exit code. Paths with spaces came through correctly. Two cases may affect people scripting a warm-up: * With both `shader[1].rpf` and `shader1.rpf` present, `-Shaders 'shader[1].rpf'` passed **shader1.rpf** to the child. With just `solo[2].rpf` present, the child received one empty path. An unmatched glob alongside a valid path was silently dropped. Resolving each existing literal first (`Test-Path -LiteralPath` / `Resolve-Path -LiteralPath`), then expanding any remaining patterns and rejecting empty matches, preserved both bracketed names in my control. An intentional `stage*.rpf` still expanded to both archives. * With `pwsh -File scripts/play.ps1`, child exit codes `0/7/42` yielded launcher status `0/0/0` for Run, Warm, and Shaders. The Run behavior already occurs on base `4eb6cfd`; the new preparation modes inherit it. Capturing `$LASTEXITCODE` after the selected child command and returning it after `Pop-Location` gave `0/7/42` in all three modes. These checks exercise argument passing and process status only. AI-assisted testing.
Brackets in an archive name are part of the name, not a pattern.
The run, warm and shaders modes return victory.exe's exit code.
An entry that matches nothing stops with its name. -Exe, victory.exe and
the repository folder are taken as written. If victory.exe does not start,
the launcher exits 1.
Author
Owner

@⁠Yoshi-233 on GitHub · 2026-11-27 05:52 UTC · original

Thanks for the update, @⁠Esteban-V. I reran the cases from my earlier comment against 6aea6e8. Both reported issues are fixed in my PowerShell 7.7 tests on Ubuntu.

  • With both files present, -Shaders 'shader[1].rpf' now passes that exact file. An intentional stage*.rpf still expands to both archives. A pattern with no matches exits 1 before starting the child, even when a valid archive precedes it.
  • Run, Warm, and Shaders each propagated child exit codes 0, 7, and 42 exactly. I also checked a bracketed title path and the missing-title and missing-runtime cases.

This used the actual launcher with a native argument/exit-code recorder. All 18 launcher checks on the updated head passed.

**@⁠Yoshi-233** on GitHub · 2026-11-27 05:52 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/pull/403#issuecomment-7211023977) Thanks for the update, @⁠Esteban-V. I reran the cases from my earlier comment against `6aea6e8`. Both reported issues are fixed in my PowerShell 7.7 tests on Ubuntu. * With both files present, `-Shaders 'shader[1].rpf'` now passes that exact file. An intentional `stage*.rpf` still expands to both archives. A pattern with no matches exits 1 before starting the child, even when a valid archive precedes it. * Run, Warm, and Shaders each propagated child exit codes `0`, `7`, and `42` exactly. I also checked a bracketed title path and the missing-title and missing-runtime cases. This used the actual launcher with a native argument/exit-code recorder. All 18 launcher checks on the updated head passed.
Author
Owner

@⁠Esteban-V on GitHub · 2026-11-27 13:51 UTC · original

Oh nice, good catches!

Pushed 6aea6e8. Bracketed names go through as typed now, so shader[1].rpf actually gets that file, and stage*.rpf still expands. If something matches nothing it stops and tells you instead of quietly dropping it. -Exe had the same bracket thing so I fixed that too.

Exit code comes from victory.exe now in all three modes, which also fixes the old Run one. Hadn't even thought to check that, thanks.

**@⁠Esteban-V** on GitHub · 2026-11-27 13:51 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/pull/403#issuecomment-7220027105) Oh nice, good catches! Pushed 6aea6e8. Bracketed names go through as typed now, so `shader[1].rpf` actually gets that file, and `stage*.rpf` still expands. If something matches nothing it stops and tells you instead of quietly dropping it. `-Exe` had the same bracket thing so I fixed that too. Exit code comes from victory.exe now in all three modes, which also fixes the old Run one. Hadn't even thought to check that, thanks.
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/403/head:github-bot/gh-403'
git switch 'github-bot/gh-403'

Merge

Merge the changes and update on Forgejo.
git switch 'a-publier'
git merge --no-ff 'github-bot/gh-403'
git switch 'github-bot/gh-403'
git rebase 'a-publier'
git switch 'a-publier'
git merge --ff-only 'github-bot/gh-403'
git switch 'github-bot/gh-403'
git rebase 'a-publier'
git switch 'a-publier'
git merge --no-ff 'github-bot/gh-403'
git switch 'a-publier'
git merge --squash 'github-bot/gh-403'
git switch 'a-publier'
git merge --ff-only 'github-bot/gh-403'
git switch 'a-publier'
git merge 'github-bot/gh-403'
git push origin 'a-publier'
This discussion has been locked. Commenting is limited to contributors.
No description provided.