fix(victory-gpu): retire kept host resources when releasing dynamic descriptor slots #446

Open
github-bot wants to merge 1 commit from github-bot/gh-446 into main AGit
Owner

@⁠Lewandox on GitHub · 2026-11-26 18:55 UTC · original
Lewandox:fix/victory-gpu-dynamic-slot-release → main · +59 −7 · 1 files · 1 commits · open

Summary

Rebased onto the #409 combined base (which already removed the 200 µs polling sleep from HostHeap::dynamic).

Fixes a VRAM / host-resource retention leak in victory-gpu/src/descriptor/host.rs:

  • HostHeap::release(first, n) previously cleared only the taken bitmap and left every released dynamic slot's self.kept[index] holding its ID3D12Resource COM reference until the slot was later overwritten.
  • Now HostHeap::release drains self.kept[index] for each released dynamic slot and retires the old resources via crate::host::retire_resource(old) after dropping the self.next mutex, matching HostHeap::keep and preventing evicted textures/buffers from staying pinned in VRAM/shared memory.
  • Adds GPU unit test descriptor::host::tests::release_clears_kept_resources_for_dynamic_slots.

Relates to #412.

Verification

  • cargo test -p victory-gpu descriptor::host::tests::release_clears_kept_resources_for_dynamic_slots (default and --features diagnostics)
**@⁠Lewandox** on GitHub · 2026-11-26 18:55 UTC · [original](https://github.com/LooperSalty/AnyXboxX/pull/446) `Lewandox:fix/victory-gpu-dynamic-slot-release` → `main` · +59 −7 · 1 files · 1 commits · open ## Summary Rebased onto the `#409` combined base (which already removed the 200 µs polling sleep from `HostHeap::dynamic`). Fixes a VRAM / host-resource retention leak in `victory-gpu/src/descriptor/host.rs`: - `HostHeap::release(first, n)` previously cleared only the `taken` bitmap and left every released dynamic slot's `self.kept[index]` holding its `ID3D12Resource` COM reference until the slot was later overwritten. - Now `HostHeap::release` drains `self.kept[index]` for each released dynamic slot and retires the old resources via `crate::host::retire_resource(old)` **after** dropping the `self.next` mutex, matching `HostHeap::keep` and preventing evicted textures/buffers from staying pinned in VRAM/shared memory. - Adds GPU unit test `descriptor::host::tests::release_clears_kept_resources_for_dynamic_slots`. Relates to #412. ## Verification - `cargo test -p victory-gpu descriptor::host::tests::release_clears_kept_resources_for_dynamic_slots` (default and `--features diagnostics`)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 18:56:48 +00:00
github-bot changed title from fix(victory-gpu): release kept resources on dynamic slot free and wake waiters via Condvar to fix(victory-gpu): retire kept host resources when releasing dynamic descriptor slots 2026-11-26 19:50:40 +00:00
github-bot force-pushed github-bot/gh-446 from 135d8ace70 to 5b2522b8b4 2026-11-26 19:50:41 +00:00 Compare
github-bot force-pushed github-bot/gh-446 from 5b2522b8b4 to e04cc0bc0e 2026-11-27 00:37:48 +00:00 Compare
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/446/head:github-bot/gh-446'
git switch 'github-bot/gh-446'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-446'
git switch 'github-bot/gh-446'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-446'
git switch 'github-bot/gh-446'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-446'
git switch 'main'
git merge --squash 'github-bot/gh-446'
git switch 'main'
git merge --ff-only 'github-bot/gh-446'
git switch 'main'
git merge 'github-bot/gh-446'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.