victory-gpu: bound let_go_idle sweep and back off empty slot_evict pa… #2549
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!2549
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2549"
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?
@KleiinMoretti on GitHub · 2026-11-29 14:06 UTC · original
KleiinMoretti:fix/bounded-texture-sweep→main· +71 −19 · 1 files · 1 commits · merged 2026-11-30 14:12 UTCWhat it changes
On titles with 100k+ live textures (such as GTA 6 on 8 GB GPUs), two texture sweep paths were causing severe CPU frame-time spikes:
let_go_idle()full-table scans (crates/victory-gpu/src/resource.rs): Whenmost != u64::MAXoridle_ms < 60_000 && !unmapped_only,let_go_idle()walked every entry in the live texture table on every submission. Unforced passes are now bounded toPART = 8192textures andMAX_SWEEP_US = 4_000(4 ms) using a rollingFROMcursor, whileflush != 0andVICTORY_TEXTURE_SWEEP=wholeretain full scans.slot_evict()empty-pass thrashing (crates/victory-gpu/src/resource.rs): When bindless descriptors prevented evicting any slots (evicted == 0),slot_evict()still re-scanned the descriptor heap every second for zero gain. Addedslot_evict_backoff_ms()+NEXT_SLOT_MSto back off15_000ms after an empty pass (2_000ms when over budget with evictions,5_000ms otherwise; bypassed on forced flushes), plus unit testresource::tests::slot_evict_backoff_slows_empty_passes.How it was tested
console=series-s), DLSS Quality (preset K), FG 2xlooks for textures to let goaveraged94.16 ms(263.7 msmax);the heaps' records and what is sweptwas47.6 ms/framewhileslot_evictscanned 141,073 textures and evicted0looks for textures to let goaveraged3.60 ms(7.3 msmax);the heaps' records and what is sweptdropped to0.1–0.5 ms/framecargo testpassed for the crates it touches: yes (cargo test -p victory-gpu --locked --lib -- resource::tests: 45 passed, 0 failed, 1 ignored;slot_evict_backoff_slows_empty_passespassed)Checked for overlap
@icdmkg2 on GitHub · 2026-11-29 18:19 UTC · original
An in-game data point from an 8 GB laptop. It covers this PR together with four others, so it can't attribute the gain to this one alone.
Setup: RTX 5060 Laptop GPU (8 GB), Ryzen 7 H 260 (8 cores), 32 GB, Windows 11, driver 621.24.
mainat55d06914, release build, Series S, DLSS performance,VICTORY_LEVELS_ON_DEMAND=0andVICTORY_COMMIT_FLOOR_MB=1024in both builds (see #1411 for why). Same save (the prologue's cell), driven by a script: 60 s measured after a 30 s settle, warm shader cache, two alternating pairs.Combo:
main+ #2549 + #2783 + #2647 + #2665 + #2795. These merge cleanly together. #2796, #2656, #2604 and #2587 conflict with that set, so they weren't tested.mainThat's about 15–18 % shorter frames and half the slow frames, with no crash and no device removal. A frame capture of the combo (diagnostics build,
VICTORY_CAPTURE_WORLD) matchedmain's brightness (mean luma 66.4 against 66.2), with no black holes.One thing for the diagnostics build: with these merged together,
--features diagnosticsno longer compiles. A localtiminginsubmitshadowshost::timing()at three call sites, andcopystat::log_heap_elsewhereuses anmbhelper it doesn't define. Both are one-line fixes; mentioning it in case whichever lands second hits it.github-bot referenced this pull request2026-11-30 09:34:54 +00:00