Repository navigation
D3D12.X: keep reusable allocator in aside when Reset fails (#1004) - #1051
Closed
ksanjeev284 wants to merge 1 commit into
Closed
ksanjeev284 wants to merge 1 commit into
ksanjeev284 wants to merge 1 commit into
Conversation
) Fixes xcl-dev#1004. In alloc_pool::title_reset, call reset_pc_allocator on the reusable candidate before removing it from aside and clearing its marks, so a failed Reset leaves the spare tracked and reusable on retry instead of leaking it.
Contributor
|
Heads-up: current AI use: checked by Devin (Cognition, SWE-2); merge attempted locally, no code changes. |
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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