Frame generation asks the base-frame pace guard before it runs #1357

Open
HailLucifer666 wants to merge 7 commits from upstream-pr/1357 into main
HailLucifer666 commented 2026-11-28 17:57:05 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by HailLucifer666 on 2026-11-28T17:57:05Z.


Frame generation is a presentation multiplier on a base that already runs. On a base whose median frame is past 50 ms (under 20 fps) generated frames halve an already-too-slow one, triple input staleness, and spend card memory the run needs — #775 ("low base FPS causing slomo effect") and #788's full-card state are this class. The design (thresholds, hysteresis, the state matrix, the false-positive controls) is docs/plan-victory-nvidia-fg-guard.md on the Marvisak line; this PR lands its decision core.

The mechanism (crates/victory-gpu/src/streamline/pace.rs):

  • A 30-present ring of base-frame intervals; the decision is the median, never the mean — the same run whose fps average read 7.76 while its median read 2.44 (docs/findings.md) is why, and a mean would refuse on one long loading frame inside a healthy run.
  • Refuse past 50 ms, resume at or under 33_333 µs (30 fps), hold between — hysteresis, so a base hovering in the band does not flap frame generation per frame.
  • Permissive until ten intervals exist: no refusal on startup noise.
  • VICTORY_FRAMEGEN_FORCE=1 is the documented escape: it answers yes always and still observes, so releasing it leaves a correct median behind rather than an empty ring.
  • Wired as one more arm of before_present's configuration: it can only say no — every other switch-off arm (no fresh upscaling, size or format change, focus, the submission line) is theirs, untouched. That is the false-positive control: the guard never forces anything on, and the first refusal while the menu wants frame generation is logged once.

Tests and probes (streamline::pace::tests, 7 tests): the unmeasurable ring permits; 60 ms medians refuse; 20 ms medians permit through the ring wrap; the hysteresis band holds and recovers; force overrides and still observes; median-not-mean (ten 100 ms frames among twenty 10 ms ones leave the median fast); non-monotonic stamps feed nothing. Two mutation probes ran red and were restored, recorded in the test file: the median replaced by a mean; the hysteresis band removed.

Scope: FSR 3 / Streamline frame generation only — the DLSS-side configuration and the MFG unlocker path are theirs. The guard says nothing about which multiplier: that is the driver's and the menu's. The behavior claim that stays unproven until a title run (no machine here runs it): that the base-pace thresholds are right for real scenes — they are the design doc's, changeable by env-reviewed constants, and the escape switch is one variable.

Stacks on #1290 → #1294 → #1326 → #1328 → #1348 for CI. Locally: victory-gpu pace tests 7/7, both clippy -D warnings variants clean (including --all-features — my first draft of the wiring carried its own let_and_return, which is the exact lint class #1290 fixes; caught before any push).

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5543053333 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1357). Originally posted by [HailLucifer666](https://github.com/HailLucifer666) on 2026-11-28T17:57:05Z. --- Frame generation is a presentation multiplier on a base that already runs. On a base whose median frame is past 50 ms (under 20 fps) generated frames halve an already-too-slow one, triple input staleness, and spend card memory the run needs — #775 ("low base FPS causing slomo effect") and #788's full-card state are this class. The design (thresholds, hysteresis, the state matrix, the false-positive controls) is `docs/plan-victory-nvidia-fg-guard.md` on the Marvisak line; this PR lands its decision core. **The mechanism** (`crates/victory-gpu/src/streamline/pace.rs`): - A 30-present ring of base-frame intervals; the decision is the **median**, never the mean — the same run whose fps average read 7.76 while its median read 2.44 (`docs/findings.md`) is why, and a mean would refuse on one long loading frame inside a healthy run. - Refuse past **50 ms**, resume at or under **33_333 µs** (30 fps), **hold between** — hysteresis, so a base hovering in the band does not flap frame generation per frame. - Permissive until ten intervals exist: no refusal on startup noise. - **`VICTORY_FRAMEGEN_FORCE=1`** is the documented escape: it answers yes always and **still observes**, so releasing it leaves a correct median behind rather than an empty ring. - Wired as one more arm of `before_present`'s configuration: it **can only say no** — every other switch-off arm (no fresh upscaling, size or format change, focus, the submission line) is theirs, untouched. That is the false-positive control: the guard never forces anything on, and the first refusal while the menu wants frame generation is logged once. **Tests and probes** (`streamline::pace::tests`, 7 tests): the unmeasurable ring permits; 60 ms medians refuse; 20 ms medians permit through the ring wrap; the hysteresis band holds and recovers; force overrides and still observes; **median-not-mean** (ten 100 ms frames among twenty 10 ms ones leave the median fast); non-monotonic stamps feed nothing. **Two mutation probes ran red and were restored, recorded in the test file**: the median replaced by a mean; the hysteresis band removed. **Scope**: FSR 3 / Streamline frame generation only — the DLSS-side configuration and the MFG unlocker path are theirs. The guard says nothing about which multiplier: that is the driver's and the menu's. The behavior claim that stays unproven until a title run (no machine here runs it): that the base-pace thresholds are right for real scenes — they are the design doc's, changeable by env-reviewed constants, and the escape switch is one variable. Stacks on #1290 → #1294 → #1326 → #1328 → #1348 for CI. Locally: victory-gpu pace tests 7/7, both clippy `-D warnings` variants clean (including `--all-features` — my first draft of the wiring carried its own `let_and_return`, which is the exact lint class #1290 fixes; caught before any push).
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/1357:upstream-pr/1357'
git switch 'upstream-pr/1357'

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/1357'
git switch 'upstream-pr/1357'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1357'
git switch 'upstream-pr/1357'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1357'
git switch 'main'
git merge --squash 'upstream-pr/1357'
git switch 'main'
git merge --ff-only 'upstream-pr/1357'
git switch 'main'
git merge 'upstream-pr/1357'
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
trustno1-coder/VIctory-NVIDIA!1357
No description provided.