D3D12.X: keep reusable allocator in aside when Reset fails (#1004) #1051
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!1051
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1051/head"
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?
@ksanjeev284 on GitHub · 2026-11-24 10:55 UTC · original
ksanjeev284:pr-1004-alloc-pool-reset→main· +112 −42 · 1 files · 1 commits · closed without mergingFixes #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
@DavidM1911 on GitHub · 2026-11-24 11:13 UTC · original
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.
@ksanjeev284 on GitHub · 2026-11-24 12:38 UTC · original
Closing as
384f7f7(#1009) just landed on main covering reusable allocator retention across a failed Reset.Pull request closed