Release resources held by freed dynamic descriptor slots #1627
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1627"
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 chaseb64 on 2026-11-28T22:34:40Z.
What it changes
Dynamic descriptor slots in the host heap keep strong references to resources they describe. A returned slot holds its last resource until another allocation writes it. Free slots can therefore prevent reclamation of buffers that the game has stopped using.
Take those references when returning slots from completed detached command lists and when resetting or destroying a recording. Retire the references through the existing submission-based retirement queue after dropping the allocator and slot locks. Attached command lists can still be resubmitted, so their returned slots keep their resource references until overwritten.
How it was tested
cargo test --offline --locked --profile diag --features diagnostics -p victory-gpu --lib descriptor:: -- --test-threads=1passed all 80 selected tests.cargo check --offline --locked --features diagnostics -p victorypassed. The asset-policy check reports the same oversizedcrates/victory-shader/src/emit/lower.rsblob on upstream main and this branch.Checked for overlap
I used OpenAI Codex to help investigate, implement, and test this change.