Repository navigation
Conversation
Idle put-aside PC command allocators previously stayed dirty in the swap pool indefinitely, holding D3D12 command-allocator memory and any deferred UMA blocks until the title happened to reset that specific title allocator again. Meanwhile, releasing a title allocator with work in flight dropped busy owned spare tracking and abandoned pending UMA blocks. - alloc_pool: track Backing::dirty, proactively reset idle put-aside PC allocators (never dereferencing title-owned allocators off-thread) and trim excess clean owned spares above MAX_IDLE_SPARES_PER_ALLOC (2) via reclaim_idle, triggered with a 500 ms cooldown outside STATE lock on allocator reset and release. - alloc_pool / console_list / bind / real / list_x: add reset_list_with_retire and order bind::forget before list_x::on_release and alloc_pool::forget_list so retired UMA blocks are recorded before list membership clears; track busy orphaned spares and title-allocator pending UMA through GPU fences via orphaned_spares, orphaned_retirements, and retire_orphan_uma; clear dead title allocator pointers in bind::on_title_allocator_release. - Add unit tests covering idle spare reset/trim, title pending UMA safety while sibling spares are busy, fence-gated orphan retirement, and reset_list_with_retire ordering. Assisted-by: Antigravity
|
Independent focused run of 998564a3 on Windows 11 build 26300, RTX 3080 Ti / 621.35, Rust 1.99.1 MSVC, debug.
Focused synthetic coverage. Retail, memory savings and the workspace suite are outside this report. AI use: OpenAI Codex (GPT-6) ran the tests and drafted this report. |
|
A regression run under Wine on Linux on the retail title: no device removal, no crash, frames level with Tested
Regression run main (first run): this PR: The second Not tested
AI use
|
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
Put-aside PC command allocators previously stayed dirty in the swap pool until the title happened to reset that exact title allocator again, holding native D3D12 command-allocator allocations and any pending unified-memory blocks indefinitely. In addition, releasing a title allocator with GPU work in flight dropped busy owned spare allocators without waiting for completion and left stale title-allocator references in command-list binding state, while
forget_listran beforebind::forgetandmove_listcould race with background reclamation on reset.This change proactively resets idle put-aside PC allocators, trims excess idle spares per title allocator, keeps busy orphaned spares and title pending blocks tracked behind GPU fences until idle, and orders list release/reset retirement strictly before
alloc_poollist disassociation.What is in it
crates/xcl/src/hle/d3d12x/alloc_pool.rs: add dirty tracking,reset_list_with_retire,retire_orphan_uma,reclaim_idle(skipping off-thread Reset on title-owned allocators and capping excess clean owned spares at 2 per allocator, plus deferring title-allocator pending UMA flushes until all backings for that title allocator are idle),forgetfence-gated orphan capture, throttledmaybe_reclaim_idleon reset/release, and three unit tests covering idle reclaim/trim, fence-gated orphan retirement, and mid-reset reclamation orderingcrates/xcl/src/hle/d3d12x/console_list.rs: addtake_pending,free_uma_blocks, andpending_len_for_testhelperscrates/xcl/src/hle/d3d12x/bind.rs: addretire_uma_blocks(routingallocator == 0throughretire_orphan_uma) andon_title_allocator_release, droppingSTATESlock before retirement inforgetcrates/xcl/src/hle/d3d12x/real.rsandcrates/xcl/src/hle/d3d12x/list_x.rs: orderbind::forgetbeforelist_x::on_releaseandforget_list, clear dead title-allocator bindings on allocator release, and run reset state cleanup insidereset_list_with_retirebefore moving the list's backingTested
rustc 1.100.0 (0ef1bc386 2026-11-09)cargo test -p xcl --libtargeted suites (--test-threads=1):alloc_pool::tests6 passed / 0 failed,bind::tests6 passed / 0 failed,console_list::tests5 passed / 0 failed,list_x::tests29 passed / 0 failed,title_list::tests1 passed / 0 failedcargo test --workspace --no-fail-fast -- --test-threads=4: 1155 passed, 2 failed (only pre-existinggpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1seed 722 andfuzz_validate_and_gpu_3seed 1599 reproduced on unmodifiedorigin/main6020a33b, tracked in DXIL fuzz tests: fuzz_validate_and_gpu_1 fails on AMD (seed 722 and others, RDNA2-4), so the default suite is red there #2115 / Direct DXIL: geometry mode, MSAA loads and directed f32 rounding #1679), 46 ignored across 21 test targets (debug build)SKIPPEDtests: gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu: f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426 semantics differ from the console's)); gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu: f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426 semantics differ from the console's)); gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu: f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426 semantics differ from the console's)); gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu: f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426 semantics differ from the console's)); gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu: f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426 semantics differ from the console's)); gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu: f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426 semantics differ from the console's)); heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows; shaders::tests::pso_measurement_compiles_an_exact_synthetic_record: cannot disable the driver cache (Windows Developer Mode is required): The application requested an operation that depends on an SDK component that is missing or mismatched. (0x887A002D)cargo build --release -p xcl) and 60 s retail title run (5ec87c56) completed cleanly with 0 device removals and 0 crashes; peak commit was 17109 MB vs 19090 MB onmainRegression run
Not tested
mainalone (verified locally across a 240 s retail world-load soak alongside the stacked sparse-arena fallback PR, reducing held blocks from 5,006 across 212 allocators to 142–257 across 42–84 allocators), NVIDIA GPUs, Intel Arc GPUs, wave32-only GPUs, and Linux/WineAI use
main, adding the unit tests, running the test suite and smoke runs, and drafting this description. All builds, tests, and regression runs were executed locally on the hardware above.