victory preload run on its own translates without victory play's defaults, so the next start translates the shaders again #3884

Closed
opened 2026-11-30 10:12:28 +00:00 by JSa25 · 4 comments
JSa25 commented 2026-11-30 10:12:28 +00:00 (Migrated from github.com)
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by JSa25 on 2026-11-30T10:12:28Z.


What happens. victory play puts its defaults (DEFAULTS in apps/victory/src/play.rs) into the environment. Four of them change translations and are in the shader cache's key:

  • VICTORY_EARLY_DEPTH=1
  • VICTORY_NAN_SCRUB=1
  • VICTORY_SAMPLED_MARKS=1
  • VICTORY_BVH_MISS=1

victory play --preload and the F1 menu's PRELOAD SHADERS run victory preload as a child with the start's environment (play::preload), so their translations match. A victory preload started on its own doesn't apply those defaults, so its translations are stored under other keys.

What we saw. After a translator change, we ran victory preload --all on its own (280 s, 6,599 of 6,600 pipelines). Then:

  • The next victory play start translated 228 shaders in over 50 ms each, all of them during loading.
  • The run before it, whose cache was filled by earlier play runs, had none over 50 ms.
  • The two light-atlas programs show it best. The preload's warm step read them from its own cache in 2 ms. The game run translated them again in 114-121 ms.

Suggestion: have victory preload apply the same defaults as play (and the launcher's --set switches, if given). Or say in its help that it should be run as victory play --preload.

Overlap: #1262, #3262 and #3451 are about the preload but not this.

Setup: RTX 5090, Ryzen 9 9950X3D, Windows 11, main 41adb551 plus local changes.

AI use: Claude Code (Claude Opus 5.5) found this in the logs and wrote this text. Posted with the account owner's approval.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:6693869883 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/3884). Originally posted by [JSa25](https://github.com/JSa25) on 2026-11-30T10:12:28Z. --- **What happens.** `victory play` puts its defaults (`DEFAULTS` in `apps/victory/src/play.rs`) into the environment. Four of them change translations and are in the shader cache's key: - `VICTORY_EARLY_DEPTH=1` - `VICTORY_NAN_SCRUB=1` - `VICTORY_SAMPLED_MARKS=1` - `VICTORY_BVH_MISS=1` `victory play --preload` and the F1 menu's PRELOAD SHADERS run `victory preload` as a child with the start's environment (`play::preload`), so their translations match. A `victory preload` started on its own doesn't apply those defaults, so its translations are stored under other keys. **What we saw.** After a translator change, we ran `victory preload --all` on its own (280 s, 6,599 of 6,600 pipelines). Then: - The next `victory play` start translated 228 shaders in over 50 ms each, all of them during loading. - The run before it, whose cache was filled by earlier `play` runs, had none over 50 ms. - The two light-atlas programs show it best. The preload's warm step read them from its own cache in 2 ms. The game run translated them again in 114-121 ms. **Suggestion:** have `victory preload` apply the same defaults as `play` (and the launcher's `--set` switches, if given). Or say in its help that it should be run as `victory play --preload`. **Overlap:** #1262, #3262 and #3451 are about the preload but not this. **Setup:** RTX 5090, Ryzen 9 9950X3D, Windows 11, main 41adb551 plus local changes. AI use: Claude Code (Claude Opus 5.5) found this in the logs and wrote this text. Posted with the account owner's approval.
github-actions[bot] commented 2026-11-30 10:12:37 +00:00 (Migrated from github.com)
Author
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by github-actions[bot] on 2026-11-30T10:12:37Z.


Please attach both logs from the run that went wrong. Without them we can only guess. Paste %LOCALAPPDATA% into the address bar of File Explorer to get there.

  1. The play log, in %LOCALAPPDATA%\victory\logs\: the newest victory-nvidia-play-<date>-<time>-<number>.log (from victory.exe) or victory-nvidia-<date>-<time>.log (from the script launcher). The window shows its path at the start, on the line Log: ....
  2. The crash log: %LOCALAPPDATA%\VIctory\data\7952987A\crashes.log, and, if there is one from that run, the newest victory-<date>-<time>-<number>.crash.log in %LOCALAPPDATA%\VIctory\data\7952987A\temp\.

Also say which GPU, Windows version (10 or 11)

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7275278720 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/3884#issuecomment-7275278720). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-30T10:12:37Z. --- Please attach both logs from the run that went wrong. Without them we can only guess. Paste `%LOCALAPPDATA%` into the address bar of File Explorer to get there. 1. The play log, in `%LOCALAPPDATA%\victory\logs\`: the newest `victory-nvidia-play-<date>-<time>-<number>.log` (from `victory.exe`) or `victory-nvidia-<date>-<time>.log` (from the script launcher). The window shows its path at the start, on the line `Log: ...`. 2. The crash log: `%LOCALAPPDATA%\VIctory\data\7952987A\crashes.log`, and, if there is one from that run, the newest `victory-<date>-<time>-<number>.crash.log` in `%LOCALAPPDATA%\VIctory\data\7952987A\temp\`. Also say which GPU, Windows version (10 or 11)
cloph-dsp commented 2026-11-30 10:16:38 +00:00 (Migrated from github.com)
Author
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by cloph-dsp on 2026-11-30T10:16:38Z.


finding: the preload/defaults cache-key mismatch cannot be reproduced from main as it stands. On origin/main (41adb551) only VICTORY_EARLY_DEPTH of the four named keys exists in any .rs file; VICTORY_NAN_SCRUB, VICTORY_SAMPLED_MARKS and VICTORY_BVH_MISS have zero hits, and shader_cache.rs::build keys on the WAVE_*/F16_NEAREST/FILTER_3D/... list plus early_depth(). So the reported retranslation comes from the local translator changes, not from victory preload missing play's defaults on this tree. Applying all of play::SETTINGS to a standalone preload would also clear user VICTORY_* overrides (prepare resets the environment), so I am holding off until the four keys are in main or their logs/patch are attached. The help-text alternative is docs-only. No game data used. (AI-assisted: Hy4 flash.)

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7275371720 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/3884#issuecomment-7275371720). Originally posted by [cloph-dsp](https://github.com/cloph-dsp) on 2026-11-30T10:16:38Z. --- finding: the preload/defaults cache-key mismatch cannot be reproduced from main as it stands. On origin/main (41adb551) only `VICTORY_EARLY_DEPTH` of the four named keys exists in any `.rs` file; `VICTORY_NAN_SCRUB`, `VICTORY_SAMPLED_MARKS` and `VICTORY_BVH_MISS` have zero hits, and `shader_cache.rs::build` keys on the WAVE_*/F16_NEAREST/FILTER_3D/... list plus `early_depth()`. So the reported retranslation comes from the local translator changes, not from `victory preload` missing `play`'s defaults on this tree. Applying all of `play::SETTINGS` to a standalone preload would also clear user `VICTORY_*` overrides (`prepare` resets the environment), so I am holding off until the four keys are in main or their logs/patch are attached. The help-text alternative is docs-only. No game data used. (AI-assisted: Hy4 flash.)
andrewpozdnakov7-jpg commented 2026-11-30 10:31:23 +00:00 (Migrated from github.com)
Author
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by andrewpozdnakov7-jpg on 2026-11-30T10:31:23Z.


I reproduced the cache-key split on the clean NVIDIA release commit 41adb551. Its play.rs contains all four defaults from the report, and the production translation key uses them. A clean standalone preload and plain play produced different keys on that commit. Pinned defaults Pinned cache key

#1971 makes them match in a clean shell. I posted the measured keys there along with a tested case where a single environment override still needs the remaining defaults. Test results in #1971

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7275714575 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/3884#issuecomment-7275714575). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-30T10:31:23Z. --- I reproduced the cache-key split on the clean NVIDIA release commit `41adb551`. Its `play.rs` contains all four defaults from the report, and the production translation key uses them. A clean standalone preload and plain play produced different keys on that commit. [Pinned defaults](https://github.com/trustno1-coder/VIctory-NVIDIA/blob/41adb55167fa778fcaa5dc36fa18a1fa8dacd657/apps/victory/src/play.rs#L116-L130) [Pinned cache key](https://github.com/trustno1-coder/VIctory-NVIDIA/blob/41adb55167fa778fcaa5dc36fa18a1fa8dacd657/crates/victory-gpu/src/shader_cache.rs#L122-L157) #1971 makes them match in a clean shell. I posted the measured keys there along with a tested case where a single environment override still needs the remaining defaults. [Test results in #1971](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1971#discussion_r4737831286)
JSa25 commented 2026-11-30 15:17:07 +00:00 (Migrated from github.com)
Author
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by JSa25 on 2026-11-30T15:17:07Z.


Thanks @andrewpozdnakov7-jpg for reproducing it on a clean 41adb551. #1971 covers this, so I'm closing this issue in favour of it.

(@cloph-dsp: all four are on 41adb551. Besides apps/victory/src/play.rs and crates/victory-gpu/src/shader_cache.rs, the translator reads VICTORY_NAN_SCRUB in emit/lower.rs, VICTORY_SAMPLED_MARKS in emit/lower.rs and emit/shader.rs, and VICTORY_BVH_MISS in emit/intersect.rs and emit/mod.rs.)

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7282741755 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/3884#issuecomment-7282741755). Originally posted by [JSa25](https://github.com/JSa25) on 2026-11-30T15:17:07Z. --- Thanks @andrewpozdnakov7-jpg for reproducing it on a clean 41adb551. #1971 covers this, so I'm closing this issue in favour of it. (@cloph-dsp: all four are on 41adb551. Besides `apps/victory/src/play.rs` and `crates/victory-gpu/src/shader_cache.rs`, the translator reads `VICTORY_NAN_SCRUB` in `emit/lower.rs`, `VICTORY_SAMPLED_MARKS` in `emit/lower.rs` and `emit/shader.rs`, and `VICTORY_BVH_MISS` in `emit/intersect.rs` and `emit/mod.rs`.)
Sign in to join this conversation.
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
trustno1-coder/VIctory-NVIDIA#3884
No description provided.