fix(gpu): retire eligible dynamic descriptor resources after fence completion #332
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/332"
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 avatarmanz/VIctory-7900XTX. Originally posted by brainbudt on 2026-11-26T17:26:04Z.
Problem
Releasing a dynamic descriptor range returns its indices to the allocator while its slots can continue holding D3D12 resources. A synthetic texture retained one extra COM reference after release, preventing the idle texture sweep (which requires a single remaining COM reference) from reclaiming it.
Change
Add opt-in
VICTORY_RECLAIM_DYNAMIC=1to retire explicitly dimensioned texture SRVs and bounded root buffer SRVs/UAVs when their recording is destroyed (replayable recordings keep their reservations until reset or discard). Reclamation checks the direct queue's actual completed fence value via a read-onlyHostaccessor, writes a matching null descriptor, clears any raw twin, and transfers the resource to deferred retirement before publishing the slot for reuse. Unconfirmed fences or unavailable staging slots preserve the defensive hold.Scope
Addresses #266. Defaults to off; gameplay VRAM impact remains to be measured on hardware.
Verification
cargo check --testspassed (includingvictory-gpuwithdiagnostics);cargo xtask policypassed for all 265 files.Reviewed with mistral-loop: APPROVE (2 rounds,
mistral-large-4-0+deepseek-v4-1-flash-1017).Created with gpt-6.2-astra in Codex (orchestrated with Gemini 4 Neon in T3 Code).
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.