Make every shader first on a new version's first start, and go by whether MFG Unlocker loaded #1897
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1897"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by igorevv on 2026-11-29T01:57:36Z.
Make every shader first on a new version's first start, and go by whether MFG Unlocker loaded
Summary
Three small launcher/Streamline fixes, each about a signal that did not mean what it
looked like.
victory.exenow builds every shader before the game'sfirst frame, instead of playing for ten seconds and restarting itself.
because the launcher set an environment variable naming it.
it, opting into
--set VICTORY_WARMUP_RESTARTrestarts on every start.Total: 5 files, +89 / −34. No behaviour changes outside these paths.
1. First start: make every shader first, once
The problem
A new
victory.exewith DLSS Frame Generation on runs at about 14 fps on its firststart and normally from then on (#515, #574). The existing answer is a warm-up: play
ten seconds, then restart the game.
Turning that into a shader preload looked like a two-line change, and it was not —
it had three separate ways to fail.
It never ran at all.
main.rsreadsVICTORY_PRELOADbeforeprepare()iscalled:
and
prepare()only exports its settings into the environment afterwards, instd::env::set_var. SettingVICTORY_PRELOADfromprepare()therefore had noeffect on the start that set it.
It would have run on every start. The mark in
%LOCALAPPDATA%\victory\warmedwas written only by the layer'swarmup(), whichreturns on its first line unless
VICTORY_WARMUP_RESTARTis above zero:With the restart replaced by a preload, nothing would ever write the mark,
mark.exists()would stay false, and every start would preload again — replacing a one-off ten-second
restart with a full shader build on every launch.
It left dead code behind.
WARMUP_SECONDSlost its only use, whichclippy -D warningsrejects.
The change
prepare()writes the mark itself and reports the decision through the struct italready returns:
and
main.rshonours either source of the request:WARMUP_SECONDSis removed with it.The upstream condition
VICTORY_FRAMEGEN == "1"is kept deliberately. Per #515 and#574 it is Streamline's swap chain that holds a first run at 14 fps, not first runs in
general — preloading for everyone would cost minutes of shader work to fix a problem
those users do not have.
--set VICTORY_WARMUP_RESTART=<seconds>still asks for the older restart.README.mdis updated to describe what actually happens now.2. MFG Unlocker: go by whether it loaded
The problem
The launcher sets
VICTORY_MFG_UNLOCKER_DLLwhen F1's MFG UNLOCKER is on and the DLLis on disk, but the DLL can still fail to load — and
load_mfgonly reports that onthe console:
Reading that variable as proof that the mod is in means a failed load still forces
DLSS Frame Generation on, on a card whose driver had said no.
The change
load_modrecords the load where the rest of the layer can see it:init,check_runand the start notice readmfg_loaded()instead of the variable.When the mod is in, the card's own answer for
DLSS_Gis not the one to go by — anRTX 20 or 30 says no and the mod makes it run anyway — while Reflex is still asked of
the driver, because frame generation needs its markers either way:
The start notice also keeps its own reading of the card, so a mod loaded the traditional
way — beside
victory.exeaswinmm.dll, with no variable set — still says so:3. Warm-up restart: name its mark, or every start warms up again
The problem
Commit 1 makes the preload the default first start, but leaves
--set VICTORY_WARMUP_RESTART=<seconds>as the way back to the old behaviour. Thatrestart's mark is written by the layer:
The layer is told the seconds and nothing else. It reads the mark's path from
VICTORY_WARMUP_MARK, and writes nothing when that is empty.Commit 1 sets
VICTORY_WARMUP_MARKonly inside the preload branch, which is skippedwhenever
VICTORY_WARMUP_RESTARTis set. Before commit 1 both variables were settogether, so this is a regression in that commit: with the opt-in, no mark is ever
written,
mark.exists()stays false, and every start of the same exe warms up, restarts,and does it again on the next start.
The change
The launcher names the mark on the opt-in path too, and keeps
warmup_marklazy so astart that needs no mark does not hash the exe:
One file,
apps/victory/src/play.rs, and no new state: the mark that the preload branchwrites is the same one the layer now writes again.
Testing
Run on Windows,
x86_64-pc-windows-msvc, one after the other on this branch:Commit 3 is launcher-side only — it sets an environment variable before the layer starts
— so there is no GPU path to test for it, and it was not run in the game.
cargo clippy --all-features --all-targetsreports nothing in any of the five filestouched here. The warnings it still reports elsewhere (
manual_is_multiple_ofatstreamline.rs:2329,transmuteinvictory-loader,dropping_copy_typesinpipeline/known.rs, two inindirect.rs) are present onf9dfb76before this branch.What is not fixed here
indirect::tests::host_list_budget_starts_empty_at_each_submissionandindirect::tests::warp_batch_charges_every_executionfail onf9dfb76already;this branch does not touch
indirect.rs. They fail deterministically on this machine,alone or with the rest: the clamp still empties the records but never charges the
budget word (
spentreads 0 where 134217728 is expected).clippy -D warningsis not green on this base.One thing worth checking before merge
The preload replaces the warm-up restart on the first start, and the two do different
work: the preload builds shaders, while the restart ran the game through once and left
the driver's cache warm. If the 14 fps seen in #515/#574 is Streamline's swap chain and
not shader compilation, this trades a working ten-second restart for a preload that does
not fix it.
It needs a run on hardware where the problem reproduces — an RTX 20 or 30 with MFG
Unlocker, or an RTX 40/50 on a fresh build.
--set VICTORY_WARMUP_RESTART=10restoresthe old behaviour for anyone who hits it; with commit 3 that path now marks the exe and
runs once, as it did before this branch.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by trustno1-coder on 2026-11-29T08:27:46Z.
Thank you! An earlier version of this pull request was merged into main with its original commits and is part of v2026.11.29.01, where you are credited. GitHub does not show it as merged because new commits were pushed here after that merge. It stays open so those newer commits can be looked at next.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by dyshay on 2026-11-29T17:49:01Z.
Merged into our fork's integration branch for testing (dyshay/VIctory-NVIDIA, branch
janus-prs). I read the full diff first: no network access, process spawning, binaries, build or dependency changes, or game data. It builds with--profile diag --features diagnostics, and the CPU tests of the touched crates pass. Runs on an RTX 4090 are queued (Series S with ray tracing, and Series X, DLSS Quality). Frame times will follow here.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.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.