Check the whole backing before idle texture eviction and preserve eviction totals #2724

Manually merged
github merged 1 commit from github-bot/gh-2724 into main 2026-11-30 14:14:56 +00:00 AGit
Owner

@⁠Tristan1019-user on GitHub · 2026-11-29 16:37 UTC · original
Tristan1019-user:codex/verified-texture-eviction → main · +63 −3 · 1 files · 1 commits · merged 2026-11-30 14:12 UTC

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-gpu library tests (no title or SDK needed): idle_detach_keeps_a_mapped_middle_page and the_slot_eviction_line_tells_what_eviction_did both 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.

**@⁠Tristan1019-user** on GitHub · 2026-11-29 16:37 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2724) `Tristan1019-user:codex/verified-texture-eviction` → `main` · +63 −3 · 1 files · 1 commits · merged 2026-11-30 14:12 UTC ## 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-gpu` library tests (no title or SDK needed): `idle_detach_keeps_a_mapped_middle_page` and `the_slot_eviction_line_tells_what_eviction_did` both 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.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 16:43:35 +00:00
github manually merged commit e181b6afb1 into main 2026-11-30 14:14:56 +00:00
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!2724
No description provided.