Check the whole backing before idle texture eviction and preserve eviction totals #2724
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2724"
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?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Tristan1019-user on 2026-11-29T16:37:49Z.
What it changes
The streamed-out texture and idle render-target sweeps use the first page as a fast prefilter. An absent first page doesn't prove the rest of the texture is gone. Before detaching an otherwise eligible host copy, compute its layout extent, acquire the existing nonblocking mapping read guard, and require the full address range to be unmapped. Hold the guard through detachment, not staging cleanup. Unknown layout/backing, overflow, or a busy mapping leaves the copy alone. Existing ownership and idle checks still apply.
Separately, the interval logger was resetting the same atomics that the lifetime logger reads. Take a delta from the last interval snapshot instead. This is an accounting correction, not a claim that more memory was actually returned to the driver.
How it was tested
Windows, focused
victory-gpulibrary tests (no title or SDK needed):idle_detach_keeps_a_mapped_middle_pageandthe_slot_eviction_line_tells_what_eviction_didboth passed on this PR base. The first reserves three pages, commits only the middle one, checks that ownership is unchanged, then decommits it and checks that the owner transfers exactly once. No gameplay, performance or full-suite claim for this revision.Overlap
Uses the existing whole-range check already used for the host-pressure path. Extends it to two other detach paths; does not introduce a competing VRAM policy, change texture fidelity or include the busy-descriptor proposal in trustno1-coder/VIctory-NVIDIA#2173.