fix(gpu): apply slot eviction backoff on VICTORY_SLOT_EVICT_ASIDE path #4466
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!4466
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-4465"
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?
@YounesAH15 on GitHub · 2026-11-30 20:40 UTC · original
YounesAH15:fix/8gb-vram-eviction→main· +45 −9 · 1 files · 1 commits · closed without mergingProblem
When
VICTORY_SLOT_EVICT_ASIDEis enabled (the default),slot_evictreturns early immediately after callingslot_look_aside(job), bypassing theNEXT_SLOT_MSbackoff update (#2549) that only ran on the synchronous path:NEXT_SLOT_MSstayed0forever on the async path, so whenever an 8 GB GPU was over the eviction threshold andslot_choosereturned 0 victims (e.g. bindless/indexed textures withoutVICTORY_SAMPLED_EVICT=1),slot_look_asidespawned a freshvictory-slot-lookOS thread on every sweep (each taking ~45-90 ms and contending onTEXTURES/SHADER_HEAPSlocks) instead of backing off for 15 s.slot_look_asidealso did not checkSLOT_HAS_READY, allowing a subsequent sweep beforeslot_evict_readyto spawn a redundant look thread and overwriteSLOT_READY.Changes (
crates/victory-gpu/src/resource.rs)NEXT_SLOT_MSto module scope withslot_evict_next_ms/slot_evict_schedule_nexthelpers.over_budget: boolonSlotJob.slot_look_asidewithSLOT_HAS_READY.load(Acquire)so pending victims aren't overwritten by a redundant scan.slot_evict_readyfinishes applying victims (2 s over budget / 5 s under budget / 15 s if 0 evicted).slot_evict_next_ms_schedules_backoff_for_sync_and_aside.Verification
cargo test -p victory-gpuslot eviction tests — 9 passed, 0 failed (includingslot_evict_next_ms_schedules_backoff_for_sync_and_aside,slot_evict_backoff_slows_empty_passes,a_texture_freed_since_the_look_aside_is_left_alone,a_rewritten_texture_descriptor_survives_a_stale_eviction).slot eviction asidelog timestamps across ~4 minutes of play (16 looks, 0 victims, 45.0 ms avg / 89.9 ms max) spaced cleanly at the 15 s backoff:19:00:17.2119:00:32.95(+15.7 s)19:01:04.29(+15.6 s/look)19:02:05.15(+15.2 s/look)19:04:06.71(+15.2 s/look)@tikD1337 on GitHub · 2026-11-30 20:51 UTC · original
Tested headlessly on
origin/main(e1251c31, Windows 11, no game run):origin/main.cargo test -p victory-gpu --lib -- slot_evict: 7 passed, 0 failed (1193 filtered).Note: this overlaps in
crates/victory-gpu/src/resource.rswith #4433 (both hoistNEXT_SLOT_MS, addover_budgettoSlotJob, guardslot_look_asidewithSLOT_HAS_READY, and schedule backoff on emptyvictims/ afterslot_apply). Merging both would conflict inresource.rs. (#4466 usesRelaxedonNEXT_SLOT_MSand tests the pure helper without mutating global statics; #4433 usesAcquire/Releaseand also updatessampled.rssweep_cadence.)(AI-assisted build/unit-test check and diff review; game runtime not launched.)
@YounesAH15 on GitHub · 2026-12-01 01:41 UTC · original
Before/After Comparison on RTX 3050 (8 GB, Series S, release build)
Tested the exact same machine on
main(without this PR) vs this branch:slot eviction asidelooksmain(without PR #4466)TEXTURES/SHADER_HEAPSlocksfix/8gb-vram-eviction)0dc8c44959toaeb0af47b9@trustno1-coder on GitHub · 2026-12-01 18:41 UTC · original
Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.
Pull request closed