Add --auto-fps hardware profiler for GPU VRAM, RAM, and CPU cores #4798

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

@⁠YounesAH15 on GitHub · 2026-12-01 09:05 UTC · original
YounesAH15:feat/auto-fps-profile → main · +228 −2 · 2 files · 1 commits · open

What it changes

Adds an opt-in --auto-fps flag to victory play (off by default; existing defaults unchanged) that probes DXGI adapter name + dedicated VRAM (streamline::adapter_info), system RAM, logical CPU cores, Streamline, and FidelityFX availability, and selects a conservative launch profile:

  • <= 6 GiB VRAM: Series S, DLSS Ultra Performance, VICTORY_TEXTURE_SOFT_MB=2000, VICTORY_TEXBACK_FULL_OVERWRITE=1.
  • <= 9 GiB VRAM (e.g. 8 GB RTX 3050/3060/3070/4060): Series S, DLSS Performance, VICTORY_TEXTURE_SOFT_MB=2500, VICTORY_TEXBACK_FULL_OVERWRITE=1.
  • > 9 GiB VRAM: Series X, DLSS Quality, VICTORY_TEXTURE_SOFT_MB=3000.
  • Enables DLSS FG 2x on supported RTX 40+ (> 9 GiB), else FSR 3 2x when FidelityFX DLLs are present, caps at 60 FPS, sets VICTORY_LAND_THREADS to (cores / 2).clamp(3, 6), and respects any explicit --set overrides.

How it was tested

  • GPU and profile (Series X or S, resolution, DLSS, frame generation, ray tracing): RTX 3050 8 GB (8,042 MB VRAM), 40 GB RAM, 12 threads, Windows 11 — tested --auto-fps combined on my-play (--auto-fps --ignore-menu + VICTORY_FIDELITYFX_DIR, Series S, DLSS Performance, FSR 3 2x, 60 FPS cap, VICTORY_TEXTURE_SOFT_MB=2500, VICTORY_LAND_THREADS=6, VICTORY_TEXBACK_FULL_OVERWRITE=1).
  • Before: default victory play launched Series X 1440p on an 8 GB card, spilling 5–6 GB into shared memory.
  • After: launched directly into Series S + DLSS Performance + FSR 3 2x and ran stably for 16+ minutes in-world (191 samples, 5,596 / 7,274 MB peak VRAM; in-world run combined with #4465/#4532/#4682/#4694/#3760).
  • For shader changes, the wave sizes tested (32 and/or 64 lanes): N/A (launcher + DXGI adapter query only).
  • cargo test passed for the crates it touches: yes — rebased onto origin/main 5fabb46e at commit 45694a0e:
    • cargo test -p victory --locked: 95 passed, 0 failed (92 unit including auto_fps_plan_selects_expected_tiers, 1 cache_paths, 2 census).
    • cargo clippy -p victory --no-deps --all-targets --locked -- -D warnings: passed cleanly (0 errors, 0 warnings). (Note: full cargo clippy -p victory --all-targets --locked -- -D warnings fails identically on origin/main 5fabb46e due to 5 pre-existing findings in crates/victory-gpu/src/host/{font.rs, menu.rs, panel.rs}, addressed in #4680 / #4708.)

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. Related: #3791, #4694
**@⁠YounesAH15** on GitHub · 2026-12-01 09:05 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4797) `YounesAH15:feat/auto-fps-profile` → `main` · +228 −2 · 2 files · 1 commits · open ## What it changes Adds an opt-in `--auto-fps` flag to `victory play` (off by default; existing defaults unchanged) that probes DXGI adapter name + dedicated VRAM (`streamline::adapter_info`), system RAM, logical CPU cores, Streamline, and FidelityFX availability, and selects a conservative launch profile: - `<= 6 GiB` VRAM: Series S, DLSS Ultra Performance, `VICTORY_TEXTURE_SOFT_MB=2000`, `VICTORY_TEXBACK_FULL_OVERWRITE=1`. - `<= 9 GiB` VRAM (e.g. 8 GB RTX 3050/3060/3070/4060): Series S, DLSS Performance, `VICTORY_TEXTURE_SOFT_MB=2500`, `VICTORY_TEXBACK_FULL_OVERWRITE=1`. - `> 9 GiB` VRAM: Series X, DLSS Quality, `VICTORY_TEXTURE_SOFT_MB=3000`. - Enables DLSS FG 2x on supported RTX 40+ (`> 9 GiB`), else FSR 3 2x when FidelityFX DLLs are present, caps at 60 FPS, sets `VICTORY_LAND_THREADS` to `(cores / 2).clamp(3, 6)`, and respects any explicit `--set` overrides. ## How it was tested - GPU and profile (Series X or S, resolution, DLSS, frame generation, ray tracing): RTX 3050 8 GB (`8,042 MB` VRAM), 40 GB RAM, 12 threads, Windows 11 — tested `--auto-fps` combined on `my-play` (`--auto-fps --ignore-menu` + `VICTORY_FIDELITYFX_DIR`, Series S, DLSS Performance, FSR 3 2x, 60 FPS cap, `VICTORY_TEXTURE_SOFT_MB=2500`, `VICTORY_LAND_THREADS=6`, `VICTORY_TEXBACK_FULL_OVERWRITE=1`). - Before: default `victory play` launched Series X 1440p on an 8 GB card, spilling `5–6 GB` into shared memory. - After: launched directly into Series S + DLSS Performance + FSR 3 2x and ran stably for 16+ minutes in-world (`191` samples, `5,596 / 7,274 MB` peak VRAM; in-world run combined with `#4465`/`#4532`/`#4682`/`#4694`/`#3760`). - For shader changes, the wave sizes tested (32 and/or 64 lanes): N/A (launcher + DXGI adapter query only). - `cargo test` passed for the crates it touches: yes — rebased onto `origin/main` `5fabb46e` at commit `45694a0e`: - `cargo test -p victory --locked`: **95 passed, 0 failed** (92 unit including `auto_fps_plan_selects_expected_tiers`, 1 `cache_paths`, 2 `census`). - `cargo clippy -p victory --no-deps --all-targets --locked -- -D warnings`: passed cleanly (0 errors, 0 warnings). *(Note: full `cargo clippy -p victory --all-targets --locked -- -D warnings` fails identically on `origin/main` `5fabb46e` due to 5 pre-existing findings in `crates/victory-gpu/src/host/{font.rs, menu.rs, panel.rs}`, addressed in #4680 / #4708.)* ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. Related: #3791, #4694
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 09:10:55 +00:00
Author
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-12-01 11:08 UTC · original

On 45694a0e, the automatic texture and upload tuning is applied after settings() has merged the saved file. Its override check only looks at --set, so a saved limit or unset can be replaced by the automatic value.

53c659d53983779e8be764ab7bffba0e04d7c170 treats saved entries and explicit --set entries as overrides for those three settings. It also recognizes the case-insensitive spelling of a --set key on Windows. Review commit

I ran the unchanged settings merge and the exact Auto-FPS overlay from both revisions using synthetic inputs. The author head changed a saved 1,600 MiB texture cap to 2,000 MiB, a saved one-thread value to four, and an empty overwrite entry to enabled. The follow-up kept both saved values and left the empty entry unset. With no overrides the profile still supplied its values. The staged policy accepted the one changed file.

Please retain the Git author on cherry-pick or rebase, or add Co-authored-by: andrewpozdnakov7-jpg <[email protected]> if folding the change in.

AI-assisted with OpenAI Codex.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-12-01 11:08 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4797#issuecomment-7309226098) On `45694a0e`, the automatic texture and upload tuning is applied after `settings()` has merged the saved file. Its override check only looks at `--set`, so a saved limit or unset can be replaced by the automatic value. 53c659d53983779e8be764ab7bffba0e04d7c170 treats saved entries and explicit `--set` entries as overrides for those three settings. It also recognizes the case-insensitive spelling of a `--set` key on Windows. [Review commit](https://github.com/andrewpozdnakov7-jpg/VIctory-NVIDIA/commit/53c659d53983779e8be764ab7bffba0e04d7c170) I ran the unchanged settings merge and the exact Auto-FPS overlay from both revisions using synthetic inputs. The author head changed a saved 1,600 MiB texture cap to 2,000 MiB, a saved one-thread value to four, and an empty overwrite entry to enabled. The follow-up kept both saved values and left the empty entry unset. With no overrides the profile still supplied its values. The staged policy accepted the one changed file. Please retain the Git author on cherry-pick or rebase, or add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>` if folding the change in. AI-assisted with OpenAI Codex.
This pull request has changes conflicting with the target branch.
  • apps/victory/src/play.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

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

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-4797'
git switch 'github-bot/gh-4797'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-4797'
git switch 'github-bot/gh-4797'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-4797'
git switch 'main'
git merge --squash 'github-bot/gh-4797'
git switch 'main'
git merge --ff-only 'github-bot/gh-4797'
git switch 'main'
git merge 'github-bot/gh-4797'
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/trustno1-coder--VIctory-NVIDIA!4798
No description provided.