feat(gpu/streamline): VICTORY_FRAMEGEN_OFF as a VICTORY_AB switch, to measure inside one run what frame generation costs the rendered frame (diagnostics) #333

Open
github-bot wants to merge 1 commit from github-bot/gh-333 into main AGit
Owner

@⁠PiloteCode on GitHub · 2026-12-02 12:28 UTC · original
PiloteCode:pr/framegen-ab → main · +21 −0 · 1 files · 1 commits · open

Summary

Frame generation's cost on the rendered frame is hard to measure across runs: the scene, the crowd and the camera differ from run to run by more than the effect. Named in VICTORY_AB, VICTORY_FRAMEGEN_OFF turns frame generation (DLSS's or FSR 3's: both read framegen_wanted()) off in the phases where that switch is on and leaves it as asked in the others, so one run measures both, place for place. Nothing changes outside VICTORY_AB or in release builds.

Changes

  • crates/victory-gpu/src/streamline.rs: framegen_off_by_phase() (diagnostics only; false otherwise), checked first in framegen_wanted(). 21 lines.

What we measured with it (our fork, RTX 5090)

Run big-fg-1: Series X, 2560x1440 output, DLSS quality, DLSS frame generation 4x, a busy crowded street area; VICTORY_AB=10,VICTORY_FRAMEGEN_OFF,VICTORY_SUBMIT_FRAMES, 46 phases of 10 s (24 pairs), drift fitted.

Metric (rendered frames) FG 4x on vs off
Frame median (~58 ms) +1.35 +- 0.58 ms
Frame mean +0.83 +- 0.81 ms (n.s.)
Frame p90 -0.67 +- 1.18 ms (n.s.)
Submitting thread +2.17 +- 0.71 ms
Card busy +4.6 +- 0.4 points

So on that card 4x costs the rendered frame about 2 %: its ~12 ms present call on our submitting thread is mostly a wait that happens anyway (1-2 ms without FG). Same run, same method: VICTORY_SUBMIT_FRAMES=2 gave median -1.4 ms but p90 +9.3 +- 1.2 ms (left at 1).

Rig Specs / Settings

  • i9-14900KF (32 threads), RTX 5090 32 GB, 128 GB, Windows 11 (driver not recorded); diagnostics build; RT off.

Verification

  • Automated checks on this branch (rebased on main 3230974; offline, --locked, toolchain 1.98.1-msvc):
    • cargo clippy --workspace --all-targets --locked -- -D warnings
    • cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
    • cargo test (not run by us on this tree)
    • cargo xtask policy (not run; 21 lines in one file)

Limits

  • One run, one card (RTX 5090), DLSS FG 4x only. On an 8 GB card the GPU share of FG is likely larger; that is exactly what this switch lets MiniVI measure on its own target cards. The FSR 3 path goes through the same function but was not run by us.
**@⁠PiloteCode** on GitHub · 2026-12-02 12:28 UTC · [original](https://github.com/Androtim/MiniVI/pull/333) `PiloteCode:pr/framegen-ab` → `main` · +21 −0 · 1 files · 1 commits · open ## Summary Frame generation's cost on the *rendered* frame is hard to measure across runs: the scene, the crowd and the camera differ from run to run by more than the effect. Named in `VICTORY_AB`, `VICTORY_FRAMEGEN_OFF` turns frame generation (DLSS's or FSR 3's: both read `framegen_wanted()`) off in the phases where that switch is on and leaves it as asked in the others, so one run measures both, place for place. Nothing changes outside `VICTORY_AB` or in release builds. ## Changes - `crates/victory-gpu/src/streamline.rs`: `framegen_off_by_phase()` (diagnostics only; `false` otherwise), checked first in `framegen_wanted()`. 21 lines. ## What we measured with it (our fork, RTX 5090) Run big-fg-1: Series X, 2560x1440 output, DLSS quality, **DLSS frame generation 4x**, a busy crowded street area; `VICTORY_AB=10,VICTORY_FRAMEGEN_OFF,VICTORY_SUBMIT_FRAMES`, 46 phases of 10 s (24 pairs), drift fitted. | Metric (rendered frames) | FG 4x on vs off | |---|---:| | Frame median (~58 ms) | **+1.35 +- 0.58 ms** | | Frame mean | +0.83 +- 0.81 ms (n.s.) | | Frame p90 | -0.67 +- 1.18 ms (n.s.) | | Submitting thread | +2.17 +- 0.71 ms | | Card busy | +4.6 +- 0.4 points | So on that card 4x costs the rendered frame about 2 %: its ~12 ms present call on our submitting thread is mostly a wait that happens anyway (1-2 ms without FG). Same run, same method: `VICTORY_SUBMIT_FRAMES=2` gave median -1.4 ms but p90 **+9.3 +- 1.2 ms** (left at 1). ## Rig Specs / Settings - i9-14900KF (32 threads), RTX 5090 32 GB, 128 GB, Windows 11 (driver not recorded); diagnostics build; RT off. ## Verification - **Automated checks on this branch** (rebased on `main` `3230974`; offline, `--locked`, toolchain 1.98.1-msvc): - [x] `cargo clippy --workspace --all-targets --locked -- -D warnings` - [x] `cargo clippy --workspace --all-targets --all-features --locked -- -D warnings` - [ ] `cargo test` (not run by us on this tree) - [ ] `cargo xtask policy` (not run; 21 lines in one file) ## Limits - One run, one card (RTX 5090), DLSS FG 4x only. On an 8 GB card the GPU share of FG is likely larger; that is exactly what this switch lets MiniVI measure on its own target cards. The FSR 3 path goes through the same function but was not run by us.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-02 12:31:24 +00:00
Author
Owner

@⁠Androtim on GitHub · 2026-12-02 12:49 UTC · original

Read-only security & triage review on 34a8ac8a (external author PiloteCode — awaiting manual owner approval per repository security allowlist policy; not built/executed locally and not auto-merged):

  • Security / Supply-Chain / Clean-Room: Clean. Touches only crates/victory-gpu/src/streamline.rs (+21/-0); no Cargo.toml, build.rs, .github/workflows/, binaries, shell/network calls, or clean-room violations.
  • Architecture note: Diagnostics-only VICTORY_AB helper (VICTORY_FRAMEGEN_OFF) with zero effect in plain --release builds. Left open for manual owner approval.
**@⁠Androtim** on GitHub · 2026-12-02 12:49 UTC · [original](https://github.com/Androtim/MiniVI/pull/333#issuecomment-7345928256) Read-only security & triage review on `34a8ac8a` (external author `PiloteCode` — **awaiting manual owner approval** per repository security allowlist policy; not built/executed locally and not auto-merged): - **Security / Supply-Chain / Clean-Room:** Clean. Touches only `crates/victory-gpu/src/streamline.rs` (`+21/-0`); no `Cargo.toml`, `build.rs`, `.github/workflows/`, binaries, shell/network calls, or clean-room violations. - **Architecture note:** Diagnostics-only `VICTORY_AB` helper (`VICTORY_FRAMEGEN_OFF`) with zero effect in plain `--release` builds. Left open for manual owner approval.
Author
Owner

@⁠Androtim on GitHub · 2026-12-02 13:06 UTC · original · edited 2026-12-02 14:08 UTC

Automated triage for the maintainers (not an approval).

Verdict: merge-candidate · CI (check): passing

Review Summary

Small, self-contained diagnostics addition (+21 lines in crates/victory-gpu/src/streamline.rs) that hooks VICTORY_FRAMEGEN_OFF into the existing VICTORY_AB A/B phase framework.

Verification

  • API & phase integration: framegen_off_by_phase() caches crate::ab::bit("VICTORY_FRAMEGEN_OFF") in a OnceLock<Option<u32>> and queries crate::ab::on, matching the pub(crate) fn bit(&str) -> Option<u32> and pub(crate) fn on(u32) -> bool signatures in crates/victory-gpu/src/ab.rs (L38–L45).
  • Toggle safety: Returning 0 from framegen_wanted() feeds directly into the existing live-toggle path in present_begins (crates/victory-gpu/src/streamline.rs L1786–L1831), which calls set_options with DLSSG_RETAIN_RESOURCES_WHEN_OFF when on != calls.framegen_on and resets FG_PER to 1 when off. Transition frames are naturally excluded from phase stats by the 1-second warmup in ab::presented (ab.rs L88).
  • Zero default/release impact: Compiles to a constant false when feature = "diagnostics" is disabled, and is a no-op in diagnostics builds unless VICTORY_FRAMEGEN_OFF is explicitly listed in VICTORY_AB.
  • CI: Passing.

No issues found; looks ready as a merge candidate pending maintainer review.


Generated with Antigravity CLI (agy).

**@⁠Androtim** on GitHub · 2026-12-02 13:06 UTC · [original](https://github.com/Androtim/MiniVI/pull/333#issuecomment-7346358062) · edited 2026-12-02 14:08 UTC <!-- minivi-triage v1 head=34a8ac8af7e9a04e6b308e7ea178ff6a19a181b7 verdict=merge-candidate ci=passing at=2026-12-02T14:09:08Z --> Automated triage for the maintainers (not an approval). **Verdict:** `merge-candidate` · **CI (`check`):** `passing` ### Review Summary Small, self-contained diagnostics addition (+21 lines in `crates/victory-gpu/src/streamline.rs`) that hooks `VICTORY_FRAMEGEN_OFF` into the existing `VICTORY_AB` A/B phase framework. ### Verification - **API & phase integration**: `framegen_off_by_phase()` caches `crate::ab::bit("VICTORY_FRAMEGEN_OFF")` in a `OnceLock<Option<u32>>` and queries `crate::ab::on`, matching the `pub(crate) fn bit(&str) -> Option<u32>` and `pub(crate) fn on(u32) -> bool` signatures in `crates/victory-gpu/src/ab.rs` (L38–L45). - **Toggle safety**: Returning `0` from `framegen_wanted()` feeds directly into the existing live-toggle path in `present_begins` (`crates/victory-gpu/src/streamline.rs` L1786–L1831), which calls `set_options` with `DLSSG_RETAIN_RESOURCES_WHEN_OFF` when `on != calls.framegen_on` and resets `FG_PER` to `1` when off. Transition frames are naturally excluded from phase stats by the 1-second warmup in `ab::presented` (`ab.rs` L88). - **Zero default/release impact**: Compiles to a constant `false` when `feature = "diagnostics"` is disabled, and is a no-op in diagnostics builds unless `VICTORY_FRAMEGEN_OFF` is explicitly listed in `VICTORY_AB`. - **CI**: Passing. No issues found; looks ready as a merge candidate pending maintainer review. --- _Generated with Antigravity CLI (`agy`)._
Author
Owner

@⁠Androtim on GitHub · 2026-12-02 13:18 UTC · original

Allowlist & Architect Deep Review (PiloteCode is now on the trusted allowlist; CI 46881394832 is GREEN):

  • Clean +21/-0 diagnostics-only VICTORY_AB helper (VICTORY_FRAMEGEN_OFF); compiles to false without --features diagnostics (zero impact on plain --release builds). Ready to merge once diagnostics smoke / merge wave is approved.
**@⁠Androtim** on GitHub · 2026-12-02 13:18 UTC · [original](https://github.com/Androtim/MiniVI/pull/333#issuecomment-7346665580) Allowlist & Architect Deep Review (`PiloteCode` is now on the trusted allowlist; CI `46881394832` is **GREEN**): - Clean `+21/-0` diagnostics-only `VICTORY_AB` helper (`VICTORY_FRAMEGEN_OFF`); compiles to `false` without `--features diagnostics` (zero impact on plain `--release` builds). Ready to merge once diagnostics smoke / merge wave is approved.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
The changes on this branch are already on the target branch. This will be an empty commit.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/333/head:github-bot/gh-333'
git switch 'github-bot/gh-333'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-333'
git switch 'github-bot/gh-333'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-333'
git switch 'github-bot/gh-333'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-333'
git switch 'main'
git merge --squash 'github-bot/gh-333'
git switch 'main'
git merge --ff-only 'github-bot/gh-333'
git switch 'main'
git merge 'github-bot/gh-333'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/Androtim--MiniVI!333
No description provided.