Launcher: stamp the translation key, not every setting #590

Open
oxybes wants to merge 1 commit from upstream-pr/590 into main
oxybes commented 2026-12-04 08:48:42 +00:00 (Migrated from github.com)

Imported from readmet3xt-lab/foxhound. Originally posted by oxybes on 2026-12-04T08:48:42Z.


The prepare stamp decides whether the title's shaders are translated again. It was built from the executable, a status summary of the profile, and every setting, which had two consequences:

  • toggling frame generation, the frame rate or the log level re-translated the whole title (23 s here, and minutes at 0.1 fps when it lands while playing);
  • editing the installed profile.toml did not invalidate the stamp at all, because the summary it used stayed the same.

The stamp is now:

  • the executable's length and mtime;
  • the host wave;
  • a SHA256 of the installed profile.toml (none when no profile is installed, unreadable when it cannot be hashed - never an empty field);
  • the resolved cache and data directories, from victory config rather than the environment, so a direct run without a wrapper still stamps the right cache;
  • only the switches the translator reads: the union of the literals victory-shader/build.rs collects and the hand-written list in victory-gpu/src/shader_cache.rs - 65 names. That union adds VICTORY_LDS_UNBOUNDED, which changes the translated code and was missing from the build script's scan.

The list is written out by hand in the script, with a comment saying that every new VICTORY_* literal in crates/victory-shader/src must be added there too.

Also in this PR

  • The environment list keeps the variables this repository documents and that were previously cleared: VICTORY_TITLE_PROFILE, VICTORY_TITLE_PROFILE_DIR, VICTORY_PROFILE_ANY_EXE, VICTORY_BCPACK_TABLES, VICTORY_LOG, VICTORY_PIPELINE_LIST, VICTORY_WARM_PROCESSES, VICTORY_FACE_SHAPES_FIRST_USE. The inherited ones are printed on their own # paths: log line, so a forgotten VICTORY_LOG=debug is visible instead of changing a measurement invisibly.
  • A missing Streamline now stops the run with the path it looked for, unless -Dlss off was asked, instead of silently running without DLSS and frame generation.
  • A second copy of this build stops at once with its pid (mirroring the machine wrapper's check) - before the expensive prepare, not after.
  • The stamp is written atomically (a temp file in the same folder, then a rename, flushed first).

Testing

  • No changes: no "Translating", the stamp's hash is unchanged.
  • -FrameGen and -Fps 60: no "Translating", the stamp is unchanged.
  • Appending a comment to the installed profile.toml: "Translating" runs; restoring the file byte-for-byte restores the stamp.
  • VICTORY_LDS_UNBOUNDED=0: the stamp changes (it is a translator switch).
  • Two config files with different cache_dir: different stamps.
  • VICTORY_WARM_PROCESSES=2: the warm line reports 2 processes; VICTORY_LOG=warn: no INFO lines from the engine.
  • A second start while one is running: Already running: <path> (pid N). Close it first., exit 2.

Scope: scripts/play-foxhound.ps1 only.

<!-- greyfinch-sync:readmet3xt-lab/foxhound:issue:5643334062 --> Imported from [readmet3xt-lab/foxhound](https://github.com/readmet3xt-lab/foxhound/pull/590). Originally posted by [oxybes](https://github.com/oxybes) on 2026-12-04T08:48:42Z. --- The prepare stamp decides whether the title's shaders are translated again. It was built from the executable, a status summary of the profile, and *every* setting, which had two consequences: - toggling frame generation, the frame rate or the log level re-translated the whole title (23 s here, and minutes at 0.1 fps when it lands while playing); - editing the installed `profile.toml` did not invalidate the stamp at all, because the summary it used stayed the same. The stamp is now: - the executable's length and mtime; - the host wave; - a SHA256 of the installed `profile.toml` (`none` when no profile is installed, `unreadable` when it cannot be hashed - never an empty field); - the resolved cache and data directories, from `victory config` rather than the environment, so a direct run without a wrapper still stamps the right cache; - only the switches the translator reads: the union of the literals `victory-shader/build.rs` collects and the hand-written list in `victory-gpu/src/shader_cache.rs` - 65 names. That union adds `VICTORY_LDS_UNBOUNDED`, which changes the translated code and was missing from the build script's scan. The list is written out by hand in the script, with a comment saying that every new `VICTORY_*` literal in `crates/victory-shader/src` must be added there too. ## Also in this PR - The environment list keeps the variables this repository documents and that were previously cleared: `VICTORY_TITLE_PROFILE`, `VICTORY_TITLE_PROFILE_DIR`, `VICTORY_PROFILE_ANY_EXE`, `VICTORY_BCPACK_TABLES`, `VICTORY_LOG`, `VICTORY_PIPELINE_LIST`, `VICTORY_WARM_PROCESSES`, `VICTORY_FACE_SHAPES_FIRST_USE`. The inherited ones are printed on their own `# paths:` log line, so a forgotten `VICTORY_LOG=debug` is visible instead of changing a measurement invisibly. - A missing Streamline now stops the run with the path it looked for, unless `-Dlss off` was asked, instead of silently running without DLSS and frame generation. - A second copy of this build stops at once with its pid (mirroring the machine wrapper's check) - before the expensive prepare, not after. - The stamp is written atomically (a temp file in the same folder, then a rename, flushed first). ## Testing - No changes: no "Translating", the stamp's hash is unchanged. - `-FrameGen` and `-Fps 60`: no "Translating", the stamp is unchanged. - Appending a comment to the installed `profile.toml`: "Translating" runs; restoring the file byte-for-byte restores the stamp. - `VICTORY_LDS_UNBOUNDED=0`: the stamp changes (it is a translator switch). - Two config files with different `cache_dir`: different stamps. - `VICTORY_WARM_PROCESSES=2`: the warm line reports `2 processes`; `VICTORY_LOG=warn`: no `INFO` lines from the engine. - A second start while one is running: `Already running: <path> (pid N). Close it first.`, exit 2. Scope: `scripts/play-foxhound.ps1` only.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/590:upstream-pr/590'
git switch 'upstream-pr/590'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/590'
git switch 'upstream-pr/590'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/590'
git switch 'upstream-pr/590'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/590'
git switch 'main'
git merge --squash 'upstream-pr/590'
git switch 'main'
git merge --ff-only 'upstream-pr/590'
git switch 'main'
git merge 'upstream-pr/590'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
readmet3xt-lab/foxhound!590
No description provided.