D3D12.X: hold UMA blocks until allocator reset on console list release (#1488) #1612
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1622"
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 slopgobblercobbler on 2026-11-24T18:22:37Z.
Summary
Defers freeing UMA argument-table and IO blocks on console command list release until command allocator reset in
crates/xcl/src/hle/d3d12x/console_list.rs(Issue #1488, findingXCL-BT-022):ExecuteCommandListswhile the GPU is still executing (only the backing command allocator must remain alive until execution completes).console_list.rs,cl_releasepreviously calledfree_uma(&st.uma)immediately when the command list refcount dropped to 0, recycling argument tables and IO blocks out from under in-flight GPU execution.free_umaincl_releasewithhold_until_reset(st.allocator, st.uma), matchingcl_resetandbind::forget. UMA blocks are now safely deferred intoPENDING[st.allocator]and reclaimed only when the caller resets the command allocator after GPU completion.hold_until_resetacross bothcl_resetandcl_release.uma_blocks_are_held_until_allocator_reset_on_releaseinconsole_list.rsverifying refcounting, retention of UMA blocks until allocator reset, and clean deallocation onallocator_reset.Changes
crates/xcl/src/hle/d3d12x/console_list.rs:cl_releaseviahold_until_reset.Tested
cargo test -p xcl -- console_list: 7 passed, 0 failed.upstream/main, GPL-2.0-only compliant, zero retail game data or keys.Not Tested
XCL_CONSOLE_LISTS=1.AI Use
Co-Authored-By: Claude Code (Claude Opus 5.5) / Gemini Antigravity
Imported from ivall/xcl. Originally posted by gut0to on 2026-11-24T18:26:25Z.
Review: COMMENTED
Because this changes runtime code, CONTRIBUTING.md requires both the full workspace GPU suite and a real-title
scripts/smoke.ps1comparison onmainand this head. The Tested section reports onlycargo test -p xcl -- console_list, and Not Tested says the retail run was not done underXCL_CONSOLE_LISTS=1. Please add the full GPU suite and paired smoke results with the option enabled before merge. AI-assisted review; I checked the requirements against the guide.Imported from ivall/xcl. Originally posted by Anon64 on 2026-11-24T19:33:23Z.
Regression run for this PR: head
31fe507, based onmain9e3831e. RTX 3060 12 GB (581.80, wave32), Windows 11 26200, release,XCL_NETWORK=0, A pressed every 4 s from 20 s,scripts/smoke.ps1on a retail title for 60 s, in one batch with themainrun.main
9e3831e:this PR:
No device removals or crashes; 99 % of main's frames, 105 % of its peak commit.
Peak commit on this machine is mostly the pipeline preload's DXC compiles (#1035) and varies from run to run, so it says little about this PR.
Not tested: the whole suite; whether the title reaches the changed code in these 60 s.
Written with Claude Code (Claude Opus 5.5) from runs on this machine.
Imported from ivall/xcl. Originally posted by throny on 2026-11-24T20:15:31Z.
Two contributors checked independently and found that this PR makes the same change as #1305 (for #1488): #1607, group D33. They suggest keeping #1305. If you agree, closing this PR or joining the other one would save the maintainers a review. If the two differ in a way the checks missed, a note in #1607 helps.
This is a hint, not a request from the maintainers; nobody from the project has adopted #1607 so far.
AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T20:37:52Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~22 ignored.Thanks!
Imported from ivall/xcl. Originally posted by ivall on 2026-11-24T20:43:17Z.
Closing this as a duplicate: #1305 makes the same change and was opened first (a released console list holds its unified-memory blocks until its allocator resets). It stays open and is the one that will be reviewed and merged.
This says nothing about the quality of the code here. I compared the two diffs; the pair was also found by independent checks in #1607. If this PR covers a case #1305 does not, or #1305 is closed without being merged, say so and I'll reopen it. A test that is only here is welcome on #1305.
Thank you for the work.
AI use: Claude Code (Claude Opus 5.5) compared the diffs and wrote this comment; the decision is the maintainer's.
Pull request closed