D3D12.X: keep allocator recordings held on device removal #2831
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2831"
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 ivall/xcl. Originally posted by rafelis1997 on 2026-11-26T16:24:19Z.
Part of #2688 (WS2). Reproduction and discussion.
ID3D12Fence::GetCompletedValue()returnsUINT64_MAXon device removal. The allocator used a numeric comparison to retire a backing and the inverse comparison to decide whether a list was still in flight. The removal sentinel satisfied both tests for successful completion. This changes reuse eligibility after removal. The original cause of device removal remains under investigation. D3D12 fence contractWhat is in it
alloc_pool.rs. Use it for both backing retirement and the list's in-flight check. Keep the bounded queue-wait path's immediate exit on a removed device.nvidia-devataf2cecc40886a8682ecf3267f5328c6dc4b66ad7; head965806a09804384324dc6cec463afa51c00b0822. The related mesh reclaim path is still in #2815. Its author can use the same predicate there.Tested
rustc 1.100.0 --test --edition 2021in debug mode, compiling the real allocator module with a synthetic COM fence and shims for surrounding runtime dependencies.released_lists_leave_only_live_recordings_and_gpu_work_holding_the_backingwith the head's assertions against both implementations. Base: 0 passed, 1 failed atdevice removal must not make the list reusable. Head: 1 passed, 0 failed, 0 ignored, 7 filtered out.git show --check HEADpassed.Regression run
Paired clean-tree game smoke runs are pending. The reported retail trace in the linked issue comment came from a separate experimental tree.
Not tested
The full Windows workspace suite and the two clean-tree GPU smokes are pending for this commit. This draft makes no FPS, VRAM savings, or device-loss prevention claim. The integrated synthetic test can be run with
cargo test -p xcl --lib released_lists_leave_only_live_recordings_and_gpu_work_holding_the_backing.AI use
OpenAI Codex (GPT-6) investigated the issue, wrote the patch and regression, ran the isolated test, and prepared the PR description.
Imported from ivall/xcl. Originally posted by andrewDoing on 2026-11-28T01:50:32Z.
I ran the requested Windows workspace validation on RTX 5070 / NVIDIA 616.92, comparing exact parent
af2cecc40886a8682ecf3267f5328c6dc4b66ad7and head965806a09804384324dc6cec463afa51c00b0822in separate builds and sequential suite runs.Both workspace builds succeeded. The same nine test instances failed on both revisions; four shader-fuzz failures used the same seeds and returned
E_OUTOFMEMORYon both, consistent with #1905. The focused integrated allocator-retirement regression passed, and all eight allocator-pool tests passed on the PR head. Both full suites exited 101, so this is not a clean workspace pass.The removal regression uses a synthetic fence. I did not induce actual device loss or run a retail title.
AI use: OpenAI Codex with GPT-6.2 Astra ran and compared the checks; Codex reviewed and prepared this report.
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T09:01:39Z.
Triage (#1607) – head
965806aNo open or merged PR makes the same change. #3125 applies the same rule (a
UINT64_MAXfence does not retire anything) tolate_releaseand the sparse paths, in other files.Main has since rewritten
alloc_pool.rs(Backing::free/in_flightwithsubmit_pins,SubmissionReceipt).SubmissionReceipt::is_completethere says explicitly that device loss may retire resources, which is the opposite of this PR. A rebase needs to settle which rule applies and coverBacking::free,Backing::in_flightand the list-levelin_flighton the new code. Conflicts with main.Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
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.