Scale automatic framegen texture room reserve in bytes on large-VRAM GPUs #4902
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!4902
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-4901"
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?
@Andreww2009 on GitHub · 2026-12-01 13:15 UTC · original
Andreww2009:perf/framegen-byte-vram-reserve→main· +34 −1 · 1 files · 1 commits · openWhat it changes
When
victory playenables frame generation, it setsVICTORY_TEXTURE_ROOM_PERCENT=80together withVICTORY_FRAMEGEN_ROOM_RESERVE=1. On an 8 GB GPU (~7 GiB DXGI budget), 20% leaves ~1.4 GiB free for Streamline / optical flow buffers. On a 16 GB GPU (~14.6 GiB DXGI budget), the same 20% leaves ~2.9 GiB unused and lowers the texture ceiling to ~11.4 GiB, causing prematureno room, new textures waitstalls,SMALL_WHEN_FULLmip downgrades, and shared-RAM spilling.In
room_line_for(crates/victory-gpu/src/resource.rs), whenframegen_reserve && framegen_availableis true, scale the automatic reserve in bytes (1,408 MiB, capped at 92% of budget) while keeping the existing 80% floor for <= 8 GB budgets and honouring explicit userVICTORY_TEXTURE_ROOM_PERCENToverrides (framegen_reserve == false) verbatim. Adds unit testframegen_reserve_scales_in_bytes_on_large_vram_cards.How it was tested
5ef350a9(isolated branch onorigin/main5fabb46e) and in combined local Release build139968c3.victory-nvidia-play-20261201-093452-2728.log/NS-C4-fg2x), texture ceiling stayed at11,403–11,774 MB, logging35no roomstalls,61,376SMALL_WHEN_FULLdowngrades (3,899waiting to grow), up to6,600 MBshared RAM usage,85frames >50 ms, and169.9 msworst frame spike.NS-C5-fg2x(unattended pass-throughpresented=1with active Streamline FG proxy), texture ceiling rose to13,319 MB(90.4%,+1,545 MB),waiting to growdropped to38(-99%), shared RAM dropped by1,072 MB, frames >50 ms dropped to28(-67.1%), frames >100 ms dropped to0, and worst spike dropped to61.8 ms(-63.6%). Note: live run was measured in the combined C5 build (139968c3);5ef350a9alone was verified viacargo testandclippy.cargo testpassed for the crates it touches: yes (cargo test -p victory-gpu --lib: 1,105 passed, 0 failed;framegen_reserve_scales_in_bytes_on_large_vram_cardspassed;cargo clippy -p victory-gpu --all-targets -- -D warningsreported 0 warnings inresource.rs, only 3 pre-existing warnings onorigin/main5fabb46ein untouchedhost/{font,menu}.rs).Checked for overlap
crates/victory-gpu/src/resource.rs, unrelatedgrow_smallpass limit; no open PR touchesroom_line_for).@gut0to on GitHub · 2026-12-01 15:12 UTC · original · reviewed
AI-assisted review: I checked the new frame-generation reserve branch and its unit test. I used AI assistance and verified the untested fallback against the current code.
@ -3061,2 +3061,3 @@}percent.map_or_else(|| line_for(budget), |p| budget / 100 * p.clamp(50, 97))let line = percent.map_or_else(|| line_for(budget), |p| budget / 100 * p.clamp(50, 97));if framegen_reserve && framegen_available {@gut0to on GitHub · 2026-12-01 15:12 UTC · original
Could this test also cover
framegen_reserve=true, framegen_available=false? The new byte-scaled path is tested only when the backend is available, while the separate fallback above deliberately retains the old conservative percentage cap. A large-budget case asserting the fallback stays at 80% (and a lower explicit percentage remains lower) would protect the no-frame-generation path from accidentally inheriting the new increase.@cloph-dsp on GitHub · 2026-12-01 15:29 UTC · original
Verification (independent, AI-assisted: Hy4 flash). Windows, Rust 1.100.0 (Scoop rust-msvc), MSVC, commit-scoped shallow worktree, per-worktree CARGO_TARGET_DIR.
Base
5fabb46eaf6ed8771321787f8871051abde69b9b, head5ef350a918461c7e758b623e8b361f3089e8b34b.git diff --numstat→ crates/victory-gpu/src/resource.rs 34/1.One test is added and its name is new on the base —
git grep -F framegen_reserve_scales_in_bytes_on_large_vram_cards 5fabb46e -- .returns no match:resource::tests::framegen_reserve_scales_in_bytes_on_large_vram_cards, at resource.rs:8399.It asserts
room_line_for(budget, floor_pct, framegen_reserve, available)over six literal cases: 7,000 MiB at 80%, 10,800 MiB and 14,574 MiB both keeping a flat 1,408 MiB reserve, 22,000 MiB capped at 92%, and two explicit-override cases (75% and 80% withframegen_reserve = false) that keep the floor verbatim.git diff --check "5fabb46e..5ef350a9"→ no output, exit 0.Result:
running 1 test,test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1161 filtered out; finished in 0.00s.Budgets are passed as literals; no adapter is queried, GPU/driver N/A. No game data.
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.