fix(warm): inherit victory-settings.txt and play shader defaults #1001

Closed
adwen-007 wants to merge 1 commit from upstream-pr/1001 into main
adwen-007 commented 2026-11-28 10:57:07 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by adwen-007 on 2026-11-28T10:57:07Z.


Problem

victory play automatically sets shader-affecting defaults such as VICTORY_EARLY_DEPTH=1 and loads victory-settings.txt (which may set VICTORY_AMBIENT, VICTORY_NAN_SCRUB=1, etc.), all of which are hashed into the shader cache key (shader_cache.rs).

victory warm does not set those defaults or read victory-settings.txt, so running victory warm --used warms all pipelines under a different cache key. On the next victory play launch, hundreds of pipelines miss the cache and compile live during gameplay ((761 being made) -> single-digit FPS).

Fix

  • At the start of warm::run (before spawning worker processes), load unset VICTORY_* values from victory-settings.txt (VICTORY_MENU_FILE / VICTORY_HOME / %LOCALAPPDATA%\victory\victory-settings.txt) and apply the play shader defaults (VICTORY_EARLY_DEPTH=1, VICTORY_AMBIENT_SPECULAR=1, VICTORY_WATER_LIGHT=1) without overriding any env vars explicitly set by the caller.

Verification

  • Verified on Windows 10 (19045), RTX 3060 Ti 8 GB, i7-12700K: victory.exe warm --used now logs VICTORY_EARLY_DEPTH=1, warms 4,542/4,542 used pipelines under the exact play cache key, and subsequent gameplay starts with 0 being made.
<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5539393006 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1001). Originally posted by [adwen-007](https://github.com/adwen-007) on 2026-11-28T10:57:07Z. --- ### Problem `victory play` automatically sets shader-affecting defaults such as `VICTORY_EARLY_DEPTH=1` and loads `victory-settings.txt` (which may set `VICTORY_AMBIENT`, `VICTORY_NAN_SCRUB=1`, etc.), all of which are hashed into the shader cache key (`shader_cache.rs`). `victory warm` does not set those defaults or read `victory-settings.txt`, so running `victory warm --used` warms all pipelines under a different cache key. On the next `victory play` launch, hundreds of pipelines miss the cache and compile live during gameplay (`(761 being made)` -> single-digit FPS). ### Fix - At the start of `warm::run` (before spawning worker processes), load unset `VICTORY_*` values from `victory-settings.txt` (`VICTORY_MENU_FILE` / `VICTORY_HOME` / `%LOCALAPPDATA%\victory\victory-settings.txt`) and apply the `play` shader defaults (`VICTORY_EARLY_DEPTH=1`, `VICTORY_AMBIENT_SPECULAR=1`, `VICTORY_WATER_LIGHT=1`) without overriding any env vars explicitly set by the caller. ### Verification - Verified on Windows 10 (19045), RTX 3060 Ti 8 GB, i7-12700K: `victory.exe warm --used` now logs `VICTORY_EARLY_DEPTH=1`, warms 4,542/4,542 used pipelines under the exact `play` cache key, and subsequent gameplay starts with `0 being made`.
eleboucher commented 2026-11-29 04:57:33 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by eleboucher on 2026-11-29T04:57:33Z.


Related: #1971 does the same for shaders, warm and preload by calling play's own settings() instead of copying defaults. That also covers VICTORY_NAN_SCRUB and VICTORY_BVH_MISS, which are in the shader cache key and are not in this PR's list. Measured on an RTX 4070 Ti SUPER: before, hits=0 misses=1709 after shaders + warm --used; after, hits=1924 misses=0.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7250962824 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1001#issuecomment-7250962824). Originally posted by [eleboucher](https://github.com/eleboucher) on 2026-11-29T04:57:33Z. --- Related: #1971 does the same for `shaders`, `warm` and `preload` by calling play's own `settings()` instead of copying defaults. That also covers `VICTORY_NAN_SCRUB` and `VICTORY_BVH_MISS`, which are in the shader cache key and are not in this PR's list. Measured on an RTX 4070 Ti SUPER: before, `hits=0 misses=1709` after `shaders` + `warm --used`; after, `hits=1924 misses=0`.
adwen-007 commented 2026-12-01 14:43:33 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by adwen-007 on 2026-12-01T14:43:33Z.


Closing as superseded by #1971 and #4067, which reuse play's own settings() directly and cover all keyed shader settings including VICTORY_NAN_SCRUB and VICTORY_BVH_MISS. Thanks!

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7314723931 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1001#issuecomment-7314723931). Originally posted by [adwen-007](https://github.com/adwen-007) on 2026-12-01T14:43:33Z. --- Closing as superseded by #1971 and #4067, which reuse play's own settings() directly and cover all keyed shader settings including VICTORY_NAN_SCRUB and VICTORY_BVH_MISS. Thanks!

Pull request closed

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
trustno1-coder/VIctory-NVIDIA!1001
No description provided.