perf(resource): release settled peak render-target reserve after 20s stability window #3944
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!3944
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3944"
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?
@qlfu on GitHub · 2026-11-30 12:36 UTC · original
qlfu:pr/perf-targets-settled-reserve→main· +18 −2 · 1 files · 1 commits · openSummary
targets_room_kept(crates/victory-gpu/src/resource.rs), the default peak-based path already computes theGREW/settle(VICTORY_CARD_ROOM_FOR_TARGETS_SETTLE_MS, default 20 s) stability window on every call, buttargets_kept_from_peakignored it and held the 1.5x peak reserve indefinitely instead of releasing it once targets settle.targets_kept_from_peak_settled(most, targets, peak, still_ms, settle): oncesettle > 0 && targets >= 256 MiB && still_ms >= settle, returns0(matching the flat-reserve path'stargets_kept), freeing ~850 MiB of texture headroom on 12 GiB cards in steady-state gameplay while keeping the full reserve during startup/scene transitions and whensettle == 0.Verification
crates/victory-gpu/src/resource.rscovering pre-settle, settled,settle == 0, and below-256-MiB cases.cargo test -p victory-gpu --lib --locked -- resource:: --test-threads=1: passed (0 failed).cargo check -p victory-gpu --all-targets --all-features --locked: exit 0.git merge-tree --write-tree 41adb551 HEAD: clean merge.@tyr0nsur on GitHub · 2026-11-30 13:16 UTC · original
I reproduced a scene-transition case at
aa0b9cc. After targets have settled, a sharp drop updateslastintargets_seenbut leaves the last growth timestamp unchanged. The automatic reserve can stay at zero while a prior target set has gone away and its replacements have not yet been made.The companion patch restarts the automatic stability timer after a 64 MiB or larger move in either direction. During replacement it holds only the gap to the preceding footprint, capped by the existing maximum. The explicit flat setting still uses the growth-only timer, and settle=0 retains the original peak calculation. The footprint and timer are sampled together so a competing reader cannot store an old timer value.
In a synthetic trace for the 2,560 MiB small-card cap, the original PR kept zero after a settled 1,712 MiB footprint dropped to 390 MiB. The patch keeps 1,322 MiB of admission headroom at that point, 812 MiB after the replacement footprint reaches 900 MiB, and zero after 20 seconds at 900 MiB. These are policy outputs. No title run or VRAM-usage claim. The focused resource suite passed 46 tests on an RTX 4060 and under WARP.
Companion commit
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.