GPU: release resource references with dynamic descriptor slots #2198
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2200"
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 Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-25T07:36:05Z.
Change
When a command-list state releases a dynamic descriptor range, drop the references kept by those slots before returning the range to the allocator. The displaced D3D12 resources still pass through the existing retirement queue.
Verification
Tested on WARP against
940d32f69b22265690a0b5a15d6ded572ba33baf. The same regression creates two structured-buffer copies in separate dynamic slots and releases one through command-list state teardown.victory-gpuClippy passed with default features and with diagnostics. Staged asset policy passed.Imported from Marvisak/VIctory. Originally posted by DenRakEiw on 2026-11-25T07:42:21Z.
Review: APPROVED
Verified locally merged onto
origin/main(940d32f, Windows 11 x64, NVIDIA GeForce RTX 5090, Rust 1.98.1 MSVC):cargo test -p victory-gpu --lib descriptor::tests::— 5 passed, 0 failedcargo clippy -p victory-gpu --all-targets— 0 warningscargo xtask policy— ok (183 files ok)Clean release of kept resource references alongside dynamic descriptor slot release. Looks good.
AI-assisted (Gemini 4 Neon).
Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-25T08:03:07Z.
Review: COMMENTED
Static review only: victory-gpu is Windows-only (D3D12/windows_sys) — nothing compiles or runs on macOS; source review of the diff.
Resource references released with dynamic descriptor slots — descriptor-slot lifetime fix.
Imported from Marvisak/VIctory. Originally posted by MamaLeVrai on 2026-11-25T08:52:08Z.
Test report on real hardware: AMD RX 6950 XT (RDNA2), Windows 11, Rust 1.98.1, with a GPU present, so the hardware-only shader checks run. I merged this PR's head
e3ec7843intomain940d32fin a throwaway tree (no conflict).cargo clippy --workspace --all-targets --locked -- -D warnings: clean; the same with--all-features: clean.cargo test --workspace --locked: 701 passed, 0 failed, 10 ignored, two runs (mainalone on the same machine: 701 passed, 0 failed, 10 ignored). The title was not run, so this says nothing about in-game effect. No game data.AI-assisted (Claude Code); no game data.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T13:28:52Z.
Automated triage for the maintainers.
Merge candidate (worth a look).
HostHeap::releaseindescriptor/host.rsnow drops the resource references kept by the released dynamic slots (through the samehost::retirequeuekeepuses, factored out asreplace_kept), so host copies are no longer held until the slot happens to be reused; the slice it touches is within thecount + extralengthkeptis created with, and the newdraw.rstest checks that only the released table's copy goes. CIcheckpasses on this head.Generated by Claude Code
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T22:06:20Z.
Automated triage for the maintainers, second look (a review against current
main, with builds and tests where they could change the verdict).Closing because it breaks the rule the
keptfield documents: a slot holds the resource its descriptor names for as long as that descriptor is in the heap.release()does not null the descriptors, so a released dynamic slot would still name a resource that is freed after the next submission, and shaders index heaps directly. On capped heaps, where indices can land in the dynamic range, a stale read that is harmless today would become a GPU page fault. No cost of the current retention is shown.If this is mistaken, reply here with what was missed and it will be looked at again. Thank you for the contribution.
Pull request closed