D3D12.X: clear dispatch_chain shared scratch on list lifecycle transitions #2543
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!2543
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2543"
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?
@ramon-victor on GitHub · 2026-11-25 22:25 UTC · original
ramon-victor:fix/dispatch-chain-shared-scratch-reset→main· +78 −0 · 3 files · 1 commits · openClears
dispatch_chain::SHAREDentries when command lists are created, released, recycled as split segments, or reset/closed viaconsole_list, preventing a new recording from reusing an in-flight recording's split-dispatch scratch buffer.Previously
real::dispatch_chain::list_resetwas called only fromlist_x::reset_copy_scratch, never fromlist_x::on_create,list_x::on_release,list_x::clear_segment_state, orconsole_list(create_with_allocator,cl_reset,cl_release,close). When a command list recording split compute dispatches on allocatorAwas submitted and released while in flight, a newly created command list reusing the same pointer onA(or a recycledWait64split segment or reset console list) matchedSHARED[list]and reused the active scratch buffer without synchronization.Part of #2459 (specifically item 1; item 2 is tracked separately by #2333/#2519).
What is in it
crates/xcl/src/hle/d3d12x/list_x.rs: callsuper::real::dispatch_chain::list_resetinon_create,on_release, andclear_segment_statealongsidetitle_textures::list_reset.crates/xcl/src/hle/d3d12x/console_list.rs: callsuper::real::dispatch_chain::list_resetfor the backing PC list increate_with_allocator,cl_reset,cl_release, andclose.crates/xcl/src/hle/d3d12x/real/dispatch_chain.rs: addtests::list_lifecycle_transitions_clear_shared_scratchverifying thatlist_x::on_release,list_x::on_create,list_x::clear_segment_state, andconsole_listReset/Releaseall clearSHAREDso subsequentscratch_forcalls allocate a fresh scratch buffer.Tested
621.24, wave32), AMD Ryzen 7 5700X, 32 GiB RAM, Windows 11 Pro (26300),rustc 1.99.0(x86_64-pc-windows-msvc), DXC/DXIL1.8.2502.11(Windows SDK10.0.26100.0).cargo test -p xcl --lib list_lifecycle_transitions_clear_shared_scratch -- --nocapturefailed (0 passed, 1 failed:on_release must clear shared dispatch scratch).cargo test -p xcl --lib hle::d3d12x::real::dispatch_chain::tests -- --test-threads=1:3 passed, 0 failed, 0 ignored..\scripts\test.ps1, debug):1424 passed, 0 failed, 46 ignored(skipped on this adapter: wave64-only GPU tests, unsupported per-lane semantics variants,no heap windows).cargo build --release -p xcl) and clean 60 s retail smoke run (.\scripts\smoke.ps1).Regression run
Baseline (
main):PR (
12141cc):Not tested
list_lifecycle_transitions_clear_shared_scratch).AI use
dispatch_chain::list_resetacross the missing command-list and console-list lifecycle hooks with a failing-first test, ran.\scripts\test.ps1, release build, and the 60 ssmoke.ps1run, and drafted this PR description.@DavidM1911 on GitHub · 2026-11-25 22:32 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
@xpatfussy69x on GitHub · 2026-11-25 22:40 UTC · original
Test run on exact head
12141cc(12141ccbfa162b7e169d913a20c1b7e3fd1bf1dd, on its basee1d84b7), clean tree.Tested
cargo test --workspace -- --test-threads=4: 1424 passed, 0 failed, 46 ignoredV_MUL_F16/V_PK_MUL_F16/V_CVT_F16_F32(onmaintoo)cargo test -p xcl --lib list_lifecycle: 1 passed, 0 failedlist_lifecycle_transitions_clear_shared_scratch: okcrates/xcl/src/hle/d3d12x/real/dispatch_chain.rs(git merge-treeof both heads); whichever lands second needs a rebaseRegression run (60 s, default settings, a retail title)
main:
this PR:
No crash or device removal; frames 104 % of
main's, peak commit 100 %.Not tested
main(tested on its own base; it merges intoe1d84b7without conflicts)AI use
@DarkPanda69 on GitHub · 2026-11-25 22:42 UTC · original
AMD run (listed as untested; the reports above are NVIDIA): the new test passes on an RX 9070 XT.
Head
12141ccapplied onmaine1d84b7, debug, Windows 11 Pro 26200, RX 9070 XT (RDNA4, driver 32.0.32029.2010):cargo test -p xcl --lib -- list_lifecycle_transitions_clear_shared_scratch --nocapture: 1 passed, 0 failed, no SKIPPED.D3D12CreateDevice(None, ..)), which is the RX 9070 XT here, so they ran on the AMD driver, not WARP.Not tested: the whole suite with this PR, Intel, a title.
AI use: Claude Code (Claude Opus 5.5) ran the test on this machine and wrote this report.
@emirduran707 on GitHub · 2026-11-25 22:52 UTC · original
Independent AMD RDNA4 (native wave64) verification of exact PR head
12141ccbfa162b7e169d913a20c1b7e3fd1bf1ddon Windows 11 Pro 26300 (AMD Radeon RX 9060 XT 16 GB, driver32.0.31044.16, Ryzen 5 5600, Rust 1.100.0 MSVC, DXC1.9.2602.17).Tested
cargo build --workspace(debug): passed (0errors).cargo test --workspace --no-fail-fast -- --test-threads=4:1422 passed, 2 failed, 46 ignored(8 SKIPPED: 6 per-lane DXIL forms refused by host adapter/driver, 1heap_window_out_of_memory_falls_back_to_the_switch_formno heap windows, 1pso_measurement_compiles_an_exact_synthetic_recordWindows Developer Mode off).hle::d3d12x::real::dispatch_chain::tests::list_lifecycle_transitions_clear_shared_scratchpassed.gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1andfuzz_validate_and_gpu_3) are pre-existing on unmodifiedmainon this RX 9060 XT / driver32.0.31044.16.cargo build --release -p xcl+ 60 s retail-title smoke test (scripts/smoke.ps1, offline):(Compare against
main68a284aon this machine:1573 frames, 14420 MB peak, 0 device removals, 0 crashes.)Not tested
AI use
@SlopTart on GitHub · 2026-11-25 23:24 UTC · original
Tested: current PR head merged onto current
origin/main(clean), Linux (Arch, kernel 7.2.15), Mesa 26.2.5 RADV, Radeon RX 7900 XT (NAVI31), cargo targetx86_64-pc-windows-gnurun under wine-11.0 (Proton), rustc 1.94.0, vkd3d-proton 3.1 with the XCL patch, official MS DXC (binaries 2026-09-29).gpu_suite (cold cache): 165 passed / 3 failed, no crashes. The three are the known baseline on this lane (seed-1003 fuzz, mad/mac contraction, promoted-UAV-clear driver gap, PR #2490); none caused by this PR.Targeted run of
list_lifecycle_transitions_clear_shared_scratch: passed.Not tested: retail titles (no title data on this lane, counts only).
AI use: Hermes agent (local Qwen-class) ran both machines and drafted this; I checked it before posting.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.