Repository navigation
Conversation
|
Tested the change at d827520 on Windows with an RX 7900 XT, on a downstream XCL stack that includes #1422 and a local direct texture upload change. Both split-segment tests and the existing in-flight allocator lifetime test passed individually. The release build passed. I ran one game comparison per build with the same saved Series X profile, separate copies of the same populated DXIL/PSO caches, two DXC workers, a 28 GiB whole-job limit, and the same scripted Player1 selection at 33 s.
With the patch, at 256 allocator replacements the runtime logged 197 created and 197 put aside. The warm control ended before that counter appeared. An earlier run with the control executable and different cache history reached 256 replacements with 184 put aside. These counts include in-flight work and do not isolate a leak. The later run still had a dark captured frame. I could not verify a visible world or player control. One run per variant does not establish a timing improvement. |
|
Independent Windows 11 + NVIDIA GeForce RTX 3060 Ti (8 GB) test report for Tested
Regression run PR head ( Not tested: debug build, AI use: Antigravity ( |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
# Conflicts: # crates/xcl/src/hle/d3d12x/title_list.rs
…_list::release ABA Two bugs in title_list segment and wrapper lifecycle: - When a title_list split onto an extra PC segment and later returned that segment to `spares` via Reset or KickoffX, `alloc_pool::forget_list` was never called on the retired segment. The segment stayed in its backing allocator's `users` set indefinitely, preventing that backing allocator from being reused and leaking new PC allocators on every Reset. - In `title_list::release`, after `f(pc)` freed the primary PC list, `WRAPPER_OF.remove(&pc)` and `bind::forget(pc)` ran unconditionally. If another thread created a new command list that reused the freed `pc` address in the window after `f(pc)`, the old wrapper's cleanup detached the new wrapper and wiped the new list's bind state. Call `alloc_pool::forget_list(list)` inside `list_x::clear_segment_state` (covering both `title_list::reset` and `KickoffX`) and before releasing spare segments; in `title_list::release`, only remove `WRAPPER_OF` entries still mapped to `this` and skip redundant `bind::forget(pc)` when `pc` was adopted (already cleaned up inside `real::cl_release`). Assisted-by: OpenCode (Gemini 4 Neon)
d827520 to
0bfea00
Compare
Integrates split-segment alloc_pool unpin + title_list ABA guard (xcl-dev#1453), allocator-put-aside memory retention (xcl-dev#1422), and forget-PSO-before-free (xcl-dev#2422). Preserves UnadoptGuard in list_x reset paths and xcl-dev#2320 kickoff target switching. Assisted-by: Antigravity (Gemini 4 Neon)
|
Test report: #1453's diff (head That failure is the second bug this PR fixes. In a failing run on Tested
Not tested
AI use: Claude Code (Claude Opus 5.5) found the cause, ran the measurements and wrote this report. |
|
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
Thanks! — Devin |
…ease `heap_release`, `mem_heap_release`, `q_release` and `alloc_release` called the driver's Release first and, when it returned 0, removed what XCL keeps by the object's address. Once the driver has freed the object, another thread can create a new one at the same address and record its own entries; the cleanup then removes those. For an ID3D12Heap that is worse than lost bookkeeping: `mem_heap_release` takes the new heap's `HEAP_UMA` entry and frees its block of unified memory while the new heap's buffers live in it. A descriptor heap loses its console slots, a queue or an allocator its list_x / alloc_pool entries. `release_taking_first` takes a reference first; when AddRef returns 2 the caller holds the last one, so the entries are removed while the address is still this object's, and what must outlive the object (the heap's memory block, a descriptor heap's slots and shadow) is freed after the last Release, as before. `console_heap::unregister` is split into `take` and `free` for that. The command list and pipeline releases have the same order; xcl-dev#2691, xcl-dev#1453 and xcl-dev#2422 change those (xcl-dev#2690). Assisted-by: Claude Code (Claude Opus 5.5) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Test report: passes on NVIDIA merged onto current Tested
Not tested
Claude Code (Claude Opus 5.5) ran the tests and wrote this report. |
|
Source review of 1. The spare pool's in-flight check may lose its data. This PR adds 2. Our flake looks like yours. On an AMD iGPU (RDNA2, Ryzen 7 9800X3D), with the AI use: Gemini (Antigravity) found point 1 in a review; Claude Code (Claude Opus 5.5) checked it against |
…ease `heap_release`, `mem_heap_release`, `q_release` and `alloc_release` called the driver's Release first and, when it returned 0, removed what XCL keeps by the object's address. Once the driver has freed the object, another thread can create a new one at the same address and record its own entries; the cleanup then removes those. For an ID3D12Heap that is worse than lost bookkeeping: `mem_heap_release` takes the new heap's `HEAP_UMA` entry and frees its block of unified memory while the new heap's buffers live in it. A descriptor heap loses its console slots, a queue or an allocator its list_x / alloc_pool entries. `release_taking_first` takes a reference first; when AddRef returns 2 the caller holds the last one, so the entries are removed while the address is still this object's, and what must outlive the object (the heap's memory block, a descriptor heap's slots and shadow) is freed after the last Release, as before. Two last-but-one releases at once both miss `AddRef == 2`; the one whose Release ends at 0 then takes the entries after the object is gone, as before this change, so nothing is left behind. `console_heap::unregister` is split into `take` and `free`. The command list and pipeline releases have the same order; xcl-dev#2691, xcl-dev#1453 and xcl-dev#2422 change those (xcl-dev#2690). Assisted-by: Claude Code (Claude Opus 5.5) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The repetition counts promised in 7186429674: this PR removes the flake on our AMD iGPU. AMD Radeon integrated graphics (RDNA2) of a Ryzen 7 9800X3D, Windows 11, debug,
Every failure was Point 1 of my earlier comment (the spare pool's Not tested: NVIDIA (never seen to fail there, 0 of 11 earlier runs); a title. AI use: Claude Code (Claude Opus 5.5) ran the arms and wrote this. |
Apply thehollowedone's patch and reference-count regression from xcl-dev#2622 comment 7187891221. A list whose Close failed cannot be reset, so release it rather than losing its owner on later spare reuse, and clear its dispatch-chain predecessor. Adjust the suggested initial-refusal Release call to use the adopted vtable too: cl_release must clean address-keyed state instead of bypassing it through orig_fn. This is the same lifecycle class discussed in xcl-dev#1453 and xcl-dev#2691. Assisted-by: Codex (GPT-6.1-Sol)
Fixes two lifecycle bugs in
title_listsplit segments and wrapper release:title_listsplit onto an extra PC segment and later returned that segment tosparesviaResetorKickoffX,alloc_pool::forget_listwas never called on the retired segment. The segment stayed pinned in its backing allocator'susersset indefinitely, preventing reuse of that backing allocator and leaking new PCID3D12CommandAllocators on subsequentResets.title_list::release, afterf(pc)freed the primary PC command list,WRAPPER_OF.remove(&pc)andbind::forget(pc)ran unconditionally. If another thread created a new command list that reused the freedpcheap address in the window afterf(pc), the old wrapper's cleanup detached the new wrapper and wiped the new list'sbindstate.This calls
alloc_pool::forget_list(list)insidelist_x::clear_segment_state(covering bothtitle_list::resetandKickoffX) and before releasing spare segments; intitle_list::release, it only removesWRAPPER_OFentries still mapped tothisand skips the redundantbind::forget(pc)whenpcwas adopted (already cleaned up insidereal::cl_release).What is in it
crates/xcl/src/hle/d3d12x/list_x.rs: callalloc_pool::forget_list(list)inclear_segment_state.crates/xcl/src/hle/d3d12x/title_list.rs: guardWRAPPER_OFremoval against address reuse, skip redundantbind::forget(pc)for adopted lists, forget spare segments fromalloc_poolbefore release, and add unit testsreset_releases_retired_split_segment_from_alloc_poolandrelease_does_not_remove_reused_pc_from_wrapper_map(both verified failing before the fix).Since the last push: rebased onto
main06c9f55. The conflicts were in the test module (main'snewer_layout_slot_139_resets_primary_and_reclaims_split_segmentsandslot_139_keeps_the_title_caller_for_the_backing_layout_guard, both kept) and inrelease's loop, wheremainiteratesextra_active,sparesandfirst: the PR's ABA guard now applies to all three.Tested
stable-x86_64-pc-windows-msvc), DXC 1.9.2609.5, debug (scripts/test.ps1) and release (scripts/smoke.ps1).\scripts\test.ps1(cargo build --workspace+cargo test --workspace -- --test-threads=4): 1267 passed, 0 failed, 46 ignored (SKIPPED: the wave64 / direct-DXIL per-lane tests that need 64-lane hardware or a semantics mode this adapter refuses,no heap windows, andcannot disable the driver cache (Windows Developer Mode is required))cargo test -p xcl --lib title_list: 3 passed, 0 failed (both new tests failed before the fix)Regression run
main (
426a5a7, clean tree, no local changes):PR (
0bfea00, clean tree, no local changes):(The main block is
426a5a7, an ancestor of the currentmain, from the same machine and data folder.)Not tested
AI use
main06c9f55, resolved the conflicts, ran the suite and thescripts/smoke.ps1pair at the head above.