Repository navigation
D3D12.X: clear dispatch_chain shared scratch on list lifecycle transitions - #2543
ramon-victor wants to merge 1 commit into
Conversation
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
Test run on exact head Tested
Regression run (60 s, default settings, a retail title) main: this PR: No crash or device removal; frames 104 % of Not tested
AI use
|
|
AMD run (listed as untested; the reports above are NVIDIA): the new test passes on an RX 9070 XT. Head
Not tested: the whole suite with this PR, Intel, a title. |
|
Independent AMD RDNA4 (native wave64) verification of exact PR head Tested
(Compare against Not tested
AI use
|
|
Tested: current PR head merged onto current
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. |
…ry (port upstream xcl-dev#2469 + xcl-dev#2532 + xcl-dev#2543 + xcl-dev#2629) (cherry picked from commit bc14f1d8b191b3935c9829a539454b6226c542d0)
|
Independent desktop NVIDIA verification of PR #2543 at head Environment
Targeted release tests & build (
|
| Command | Result |
|---|---|
cargo test --release -p xcl --lib list_lifecycle_transitions_clear_shared_scratch -- --nocapture (3 consecutive runs) |
1 passed; 0 failed; 0 ignored; 1324 filtered out × 3 (0.27s, 0.19s, 0.19s, 0 skipped — live D3D12 execution on RTX 4060) |
cargo test --release -p xcl --lib hle::d3d12x::real::dispatch_chain:: -- --test-threads=1 (3 consecutive runs) |
3 passed; 0 failed; 0 ignored; 1322 filtered out × 3 (0.33s × 3, 0 skipped) |
cargo test --release -p xcl --lib hle::d3d12x::list_x:: -- --test-threads=1 (3 consecutive runs) |
40 passed; 0 failed; 0 ignored; 1285 filtered out × 3 (1.16s, 1.14s, 1.14s, 0 skipped) |
cargo build --release -p xcl |
Clean build (1m 08s, exit 0, 0 new warnings) |
Paired quiet 60 s retail smoke (title: 29640639)
Exact parent & merge-base (e1d84b7d9153f86a97d2ec5d209d196046fc0bea, cached baseline on the same machine):
xcl-smoke v1
commit: e1d84b7d9153f86a97d2ec5d209d196046fc0bea
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1531 (PresentX 1531)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 13982 MB
PR #2543 (12141ccbfa162b7e169d913a20c1b7e3fd1bf1dd):
xcl-smoke v1
commit: 12141ccbfa162b7e169d913a20c1b7e3fd1bf1dd
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1589 (PresentX 1589)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 13979 MB
Runtime log observations (xcl.log)
9220log lines,0[ERROR]/ device-removal / panic lines.- Final draw/memory telemetry in log:
19477 draws with translated pipelines (0 skipped, 0 with PC pipelines), 1024 dispatches (0 skipped); last memory sample13979 MB committed by the process; video memory 6115 MB local, 4651 MB non-local.
Limits of coverage
- Clearing
dispatch_chainshared scratch across command-list lifecycle transitions was exercised directly on desktop D3D12 / RTX 4060 vialist_lifecycle_transitions_clear_shared_scratch(3/3,0skipped),hle::d3d12x::real::dispatch_chain::(3/3× 3), andhle::d3d12x::list_x::(40/40× 3). - The 60 s retail smoke on
title: 29640639confirms zero runtime regression across normal list recording/reset/release cycles (frame-count delta vs. cached parent reflects single-run startup variance, not this PR).
AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).
Clears
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.