D3D12.X: keep reusable allocator in aside when Reset fails (#1004) #1044
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1051"
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 ksanjeev284 on 2026-11-24T10:55:51Z.
Fixes #1004.
In
alloc_pool::title_reset, the reusable-backing branch removed the spare candidate fromasideand cleared its marks before callingreset_pc_allocator. IfResetreturned an error, the spare was no longer inasideorcur, so it leaked out of the pool and a retry would allocate a new backing instead of reusing it.What is in it
crates/xcl/src/hle/d3d12x/alloc_pool.rs: factor the state transition intoState::reset_title, callreset_pcon the reusable candidate before removing it fromasideand clearing its marks, and addfailed_reset_keeps_reusable_allocator_in_aside_for_retrycovering failedReset, retry reuse without allocating a new backing, and publication tocur.Tested
cargo +1.88.0), debug tests + releasexcl.execargo +1.88.0 test -p xcl --lib alloc_pool -- --nocapture: 2 passed (failed_reset_keeps_reusable_allocator_in_aside_for_retry,a_recording_outlives_the_reset_of_the_titles_allocator), 0 failedcargo +1.88.0 test --workspace --no-fail-fast -- --test-threads=4on base6efdabc: 724 passed, 3 failed (pre-existing in this sandboxed environment:xmem_virtual_query_marks_cpu_readable_memoryand 2 unbuilte2etesttitle tests), 41 ignored (SKIPPED GPU tests:gpu_geometry_wave32_prefix_count_over_a_mask: no wave64,gpu_wave32_program_in_wave64_hardware: no wave64)Regression run
main:
PR:
Not tested
Resetfailure on a live retail title (covered by the isolated state-machine unit test)AI use
Imported from ivall/xcl. Originally posted by copilot-pull-request-reviewer[bot] on 2026-11-24T10:56:05Z.
Review: COMMENTED
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T11:13:38Z.
Heads-up: current
main384f7f7already contains this fix through the merged allocator-pool series (#994 "preserve busy allocators when replacement fails", #1009, #1012, #1023 — commitf52ec36"keep reusable allocators after a failed Reset").alloc_pool.rson main now hastitle_reset_inkeeping the failed candidate owned, with the regression "the failed candidate is still owned and reusable" — the same behaviour this PR adds, and this branch no longer merges cleanly. Suggest closing as superseded unless there's a remaining delta I'm missing.AI use: checked by Devin (Cognition, SWE-2); merge attempted locally, no code changes.
Imported from ivall/xcl. Originally posted by ksanjeev284 on 2026-11-24T12:38:33Z.
Closing as
384f7f7(#1009) just landed on main covering reusable allocator retention across a failed Reset.upstream-sync referenced this pull request2026-11-24 23:06:49 +00:00
upstream-sync referenced this pull request2026-11-25 16:10:51 +00:00
Pull request closed