fix: ignore stale plain VICTORY_FRAMEGEN_X in settings() (#966) #3274
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3274"
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 t91a60 on 2026-11-29T21:14:01Z.
Refs #966
What it changes
Frame generation can load at 4x even when the F1 menu and victory-settings.txt say 2x
(#966, RTX 5080, log + screenshot). Issue #966 was closed by the stale-bot on 2026-11-29,
but the underlying defect is still present on current main: the verbatim-apply guard is
absent and the regression test fails without the fix (apps/victory/src/play.rs:1618,
assertion
left == right).Root cause:
settings()derivesVICTORY_FRAMEGEN/VICTORY_FRAMEGEN_XfromVICTORY_MENU_FRAMEGENand the DLSS/FSR state, then applies every plainVICTORY_*linefrom victory-settings.txt verbatim. A stale plain
VICTORY_FRAMEGEN_Xleft in the file(e.g. 4 from an earlier run) overrides the computed value (e.g. 2).
Change: in the verbatim-apply loop, skip
VICTORY_FRAMEGENandVICTORY_FRAMEGEN_Xsoplay.rs stays their sole owner. 28 lines added in one file. No behavior change beyond
fixing the precedence; no emulation output, shader cache key, or memory-guard interaction.
How it was tested
cargo test -p victory --locked: 80 passed, 0 failed (was 79; new regression testa_stale_plain_framegen_x_does_not_override_the_menuadded).cargo clippy -p victory --locked --no-deps -- -D warnings: clean.f72cec77has pre-existing failures unrelatedto this change (unused imports in victory-shader/victory-loader, manual-is-multiple-of
in victory-gpu, too-many-args). Reported separately, not fixed here.
cargo test --workspace --locked: 1128 passed, 1 failed (xtask policy bindings.ini,pre-existing on this commit).
What is UNVERIFIED
inferred from code, not confirmed from the log).
AI assistance
This change was prepared with AI assistance. The diff and tests were reviewed by me.
Checked for overlap
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by ErRusso on 2026-11-29T21:25:03Z.
Review: COMMENTED
Reviewed against main (
fbe3dc20). The root cause is right and the fix is small; good to merge.settings()the frame generation keys are computed (play.rs:473,496) and then the plain lines fromvictory-settings.txtare applied over them, so a leftoverVICTORY_FRAMEGEN_Xwins. Skipping the two keys there fixes it;--set(o.more) still overrides, which looks intended.VICTORY_FRAMEGEN=1in the file can no longer turn frame generation on without DLSS (the #331/#459 stop).Nit: the line is now dropped silently. #3253 recommends users keep their own
VICTORY_*lines in that file, so a one-line notice in the launcher window ("VICTORY_FRAMEGEN_X in victory-settings.txt is ignored; F1 sets it") would save a confused report later.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by andrewpozdnakov7-jpg on 2026-12-01T10:37:51Z.
I rebased your three commits onto current
main5fabb46, preserving the Git author. I kept the preload regression beside the moved settings test when resolving the conflict.The narrow variant still discards the plain
VICTORY_FRAMEGEN_Xwhen that is the user's only frame-generation setting in the file. Follow-up commit applies the F1 precedence only when the file has a saved F1 choice and prints the notice in that case.The focused Windows test confirms three paths: saved F1
2beats a stale plain4; a plain4is kept when there is no saved F1 choice; and explicit--set VICTORY_FRAMEGEN_X=5still wins. The staged policy check passed. Git also merges the rebased branch cleanly with #4796's current head and the proposed warning update. The checks did not run the game.Please retain the Git author on cherry-pick or rebase, or add
Co-authored-by: andrewpozdnakov7-jpg <[email protected]>if folding the follow-up into another commit.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by t91a60 on 2026-12-01T13:45:01Z.
Thanks for the review — the root cause and precedence analysis are exactly right, and
--setstill winning is intended.The silent-drop nit is addressed, but I refined it further so the fix doesn't throw away a user's only frame-generation setting: the plain
VICTORY_FRAMEGEN_Xis now ignored only whenVICTORY_MENU_FRAMEGENexists in the file (i.e. a saved F1 choice owns the factor); otherwise the plain value is kept. The notice is printed only in that case — "The saved F1 frame generation choice takes precedence over VICTORY_FRAMEGEN_X." — so a stale value no longer wins silently, while hand-edited files keep working.--set VICTORY_FRAMEGEN_X=…still overrides both.Rebased onto current main (
5fabb46e); the regression test now covers three paths: saved F12beats stale plain4; plain4kept with no saved F1 choice; explicit--set …=5wins. (The separate #331/#459 "no frame gen without DLSS" guard is intentionally left out of this PR to keep it focused; happy to add it as a follow-up if you'd like.)Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by t91a60 on 2026-12-01T13:45:11Z.
Thanks — took the conditional approach (ignore plain
VICTORY_FRAMEGEN_Xonly when a saved F1 choice exists) and added the notice only in that case. Rebased and tests updated.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.