D3D12.X: run split pieces for dispatches with no title allocator or in a bundle #2519
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!2519
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2519"
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?
@b3IKK on GitHub · 2026-11-25 21:24 UTC · original
b3IKK:review/2372-whole-scratch→main· +581 −14 · 7 files · 3 commits · openStacked on #2404 (
5ca9c23).dispatch_chain::dispatchonly used a chain's scratch when the list had a title allocator and was not a bundle. Every other dispatch — a bundle, or a list whose allocator XCL cannot see (a console list, a Wait64 segment) — fell back toChain::whole, a 0.7–1.1 MB unsplit compute pipeline that the driver takes 20–35 s to compile. On the retail 1.0.2.1 title (RTX 5080,XCL_DIRECT_DXIL=1, default wait) 46 such whole forms were still asked on the #2404+#2097 stack, and the first one stalled presentation at 92–94 s. Prebuilding the known forms at creation did not help (92–94 s), because each run asks ~20 new ones.This gives those dispatches an XCL-owned scratch keyed by the list. The recording is held in
LIST_RECORDINGSuntil the title resets that list or bundle, and the already-compiled chain pieces run instead of the whole form.What is in it
crates/xcl/src/hle/d3d12x/real/dispatch_chain.rs:LIST_RECORDINGS;dispatchtreatsallocator == 0or a bundle as XCL-owned (scratch_for(..., 0)), stores the recording under the list, andlist_resetdrops it; testa_bundle_dispatch_runs_the_pieces_with_an_xcl_scratch_not_the_whole_form.Retail A/B (RTX 5080, retail 1.0.2.1,
XCL_DIRECT_DXIL=1, default wait, one run each):400c095, 400 s)50af98e, 300 s)At 260 s the bundle-inclusive run had 270 programs split, 2,629 pieces, 121 Dispatch chains and 150 ExecuteIndirect chains, with no whole forms. The whole-form counts are the reliable difference (0 vs 37); the presentation times are one run each, and the wall in both is #2403 — how much code the title has in use decides when it lands.
The next wall is the driver's shader-code heap (#2403), not the split path. On the same stack with #2097 (
9820c9b, 298 programs/2,786 pieces) the device was removed at 91.7 s withXCL_DRED=1: DRED's page-fault output was empty (GPU VA 0x0; allocations there: []; recently freed: []), there were no breadcrumb nodes, and no driver compile happened in the last 12 s. At the 90 s snapshot only 10 chained dispatches had been issued (0 ExecuteIndirect), during the title's own 9,067-dispatch/2 s burst.Tested
stable-x86_64-pc-windows-msvc), DXC 1.9.2609.5, debug (scripts/test.ps1) and release (scripts/smoke.ps1).\scripts\test.ps1(cargo build --workspace+cargo test --workspace -- --test-threads=4): 1220 passed, 1 failed, 26 ignored. The failure isgpu::recomp::lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier(3 group barriers; the base's expectation is 1).68a284a's test expectation is fixed on main byc828d8c("Tests: check divergent block barriers in a_bridged_mask_write"), and this PR does not touch the recompiler.ownedforced tofalse: 0 passed, 1 failed (the dispatch falls back to the whole form).no heap windows, andcannot disable the driver cache (Windows Developer Mode is required).Regression run
main (
426a5a7, clean tree, no local changes):PR (
50af98e, clean tree, no local changes):(The main block is
426a5a7, an ancestor of the currentmain, from the same machine and data folder.)Not tested
ExecuteBundle.AI use
scripts/smoke.ps1pair, ran the retail A/B (bundle-inclusive vs narrowed), the DRED pass, and wrote this.@DavidM1911 on GitHub · 2026-11-25 21:45 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: 1038 passed, 1 failed in one parallel run; the failing test passes on a single-threaded rerun (1039/0). Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.Thanks!
@b3IKK on GitHub · 2026-11-25 21:46 UTC · original
Thanks for the 3060 Ti run. That is the known parallel-run flake (#1978): the same single test passes when the suite is rerun single-threaded, and our 5080 shows the same pattern.
The head is now
400c095, re-stacked directly on #2404 (5ca9c23) and narrowed to lists whose allocator XCL cannot see (bundles keep the whole-form fallback, #2459). On this machine its suite is 1220 passed / 1 failed / 26 ignored; the one failure isa_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier, a base68a284aexpectation that main fixes inc828d8cand that this PR does not touch. Smoke: 1622 frames, 0 removals. I am updating the PR body with the full pair and the retail numbers.AI use: OpenCode, Claude Fable 5.2 wrote this.
@emirduran707 on GitHub · 2026-11-25 21:56 UTC · original
Independent AMD RDNA4 (native wave64) test report on exact head
50af98ed1f5e95d4e9af2195e93d395d2ae187d7(clean detached checkout, no local changes).Tested
stable-x86_64-pc-windows-msvc), DXC 1.9.2602.17; tests debug, smoke release.cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4: 1288 passed, 3 failed, 46 ignored; 8 SKIPPED (6 inlower_dxil::tests::{f16,f32}_programs_on_the_gpurefused by per-lane form;heap_window_out_of_memory_falls_back_to_the_switch_form;pso_measurement_compiles_an_exact_synthetic_record). All native wave64 GPU tests ran and passed.hle::d3d12x::real::dispatch_chain::scratch_tests::a_bundle_dispatch_runs_the_pieces_with_an_xcl_scratch_not_the_whole_form.main:gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1(seed 722) andfuzz_validate_and_gpu_3(seed 1599) on this GPU, plusgpu::recomp::lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier(from50a9fde/ #2074, fixed later onmainin #2420).Regression run (60 s retail-title smoke,
XCL_NETWORK=0, release)(Matched
main68a284abaseline on the same machine today: 1573 frames, 14420 MB peak, 0 device removals, 0 crashes.)Not tested
AI use
@SlopTart on GitHub · 2026-11-25 22:49 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): 164 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
a_bundle_dispatch_runs_the_pieces_with_an_xcl_scratch_not_the_whole_form: 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.
@DavidM1911 on GitHub · 2026-11-26 01:36 UTC · original
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
main:cargo test -p xcl --lib: 1 failure under parallel scheduling; clean on--test-threads=1rerun (1307 passed, 0 failed, 27 ignored, 81s). Intermittent single-test flake — tracked in #1978.Thanks!
— Devin
@luckyteagirl on GitHub · 2026-11-26 07:16 UTC · original · reviewed
Could the bundle path keep using the whole pipeline until split dispatches can be recorded without a bundle-forbidden command? The new branch sends bundles to
record_dispatch_chain, which emits a UAVResourceBarrierbefore the second piece, before a second slab, or when it reuses scratch. D3D12 does not allowResourceBarrierin bundles. The new test records one piece in one slab with fresh scratch and does not call nativeCloseorExecuteBundle, so it misses that path.A test that records an actual two-piece chain, executes the bundle, and checks output with the D3D12 debug layer enabled would catch the dropped barrier. Exact-head source review of
50af98ed1f5e95d4e9af2195e93d395d2ae187d7. Microsoft's command-list and bundle API table says the runtime drops forbidden bundle calls and the debug layer reports them. No GPU run. AI-assisted review with Codex.@luckyteagirl on GitHub · 2026-11-26 07:16 UTC · original · reviewed
Could allocatorless direct-list scratch stay alive until the submitted recording completes?
list_resetremoves the recording fromLIST_RECORDINGS. Its scratch is otherwise held only by that recording, with a weak reference inSHARED. D3D12 permits resetting a command list while a queued recording of it is in flight, using another eligible allocator. A title can submit the old list behind a queue wait, reset the command list, then release the wait. The old dispatch still refers to the scratch GPU address after the owning reference can be dropped.Keep the recording alive through its submission fence or allocator, or retain the whole-pipeline fallback where completion cannot be tracked. A gated queue test can assert that a successful command-list Reset leaves scratch alive until the old fence completes. Exact-head source review of
50af98ed1f5e95d4e9af2195e93d395d2ae187d7. Microsoft Reset contract. No GPU run. AI-assisted review with Codex.View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.