fix(gpu): respect completed sampling windows in slot eviction #3697
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!3697
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3697"
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?
@victorportelada on GitHub · 2026-11-30 04:18 UTC · original
victorportelada:pr/eviction-readback→main· +70 −4 · 2 files · 1 commits · closed without mergingProblem
With
VICTORY_SAMPLED_EVICT=1, the GPU→CPU readback of sampled-slot marks is asynchronous. A slot eviction cutoff can advance past a whole 30-frame readback window before its marks have arrived, so recently sampled textures look cold and become eligible for eviction. On an RTX 5060 8 GB this caused a heavy re-upload storm: 24,458 textures evicted, 3,114 remade, 519 within 2 seconds, with texture first-serve latency spiking to 13+ frames.Fix
Clamp the eviction cutoff to the last readback whose marks have actually been written into
seen. A current token then skips a redundant full dependency scan; stale or inconclusive results still use the authoritative wait check. The regression test checks that a current token is not aged out, that arrivals and landings invalidate it, and that no completed readbacks leaves the result unknown.Verification
sampledtests pass on this branch.cargo test -p victory-gpu --lib sampled: 3 passed.cargo xtask policy: 441 files ok.cargo clippy -D warningscurrently fails on clean upstreammainitself with pre-existing lints (unused imports/variables, MSRVis_multiple_of); this patch does not add any.Matched headless A/B on the RTX 5060 8 GB / Ryzen 5 5600 rig with a gated replay driver: quick rebuilds (<2 s) fell from 1,394 to 283 and total remakes from 13,307 to 4,981, with zero VRAM warnings in both. The fix is correctness-directed; fps impact on a 6-core CPU was within scene noise.
@tyr0nsur on GitHub · 2026-11-30 07:47 UTC · original
A pre-fix 8 GiB data point for this path. One long
v2026.11.29.05run on an RTX 4060 with 32 GB RAM andVICTORY_SAMPLED_EVICT=1ended at 167,763 recorded indexed-slot resets and 129,589 requeue events after shader marks (about 77 requeues per 100 resets). These are cumulative descriptor events and the same slot can recur. They do not measure unique textures, re-upload latency, or bytes returned to DXGI. I have no matched in-game post-fix run yet.I also applied
2353047together with #3750 and its busy-descriptor follow-up on41adb551. The three sampling tests and the locked-descriptor regression passed under Windows WARP. This verifies that those changes build and pass the targeted tests together.github-bot referenced this pull request2026-12-01 06:26:33 +00:00
@trustno1-coder on GitHub · 2026-12-01 18:49 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