D3D12.X: ExecuteIndirect skips failed shared compute stand-ins #2332
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2342"
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?
Imported from ivall/xcl. Originally posted by ChalanaGimhanaX on 2026-11-25T15:58:17Z.
Fixes a regression introduced by shared stand-in pipelines (
625a0f3) wherebind::execute_indirectfailed to skip indirect dispatches of a console compute pipeline whose background build failed, letting the shared dummy compute pipeline reach PCExecuteIndirectwith XCL's ABI compute root signature still bound (D3D12 debug layer 953 / GPU hang). Part of #1833.With shared stand-ins enabled (default since
625a0f3),real::dev_create_compute_psorecords the title-facingstandin::Shellpointer inCONSOLE_COMPUTE, whilepso_async::resolve_waitreturns the shared driver pipeline once the background build finishes with failure (is_pendingis nowfalse).bind::execute_indirectpreviously checkedreal::is_console_compute(pso)only on the resolved driver pointer, which is not inCONSOLE_COMPUTE.What is in it
5983162(crates/xcl/src/hle/d3d12x/bind.rs): keep the title-facing pipeline pointer (raw_pso) inbind::execute_indirect, reuse it forpso_async::is_pending(raw_pso), checkreal::is_console_compute(raw_pso) || real::is_console_compute(pso)before forwarding aDispatchindirect signature to PCExecuteIndirect, and add unit testexecute_indirect_skips_failed_shared_console_compute_standincovering failed shared stand-ins, succeeded sibling shells sharing the same driver pipeline, and address reuse after release.Tested
32.0.16.1714, wave32 only), Intel Core i5-10400F, 15.9 GB RAM, Windows 11 Pro (build26200),rustc 1.100.0, DXC1.8.2502.11.execute_indirect_skips_failed_shared_console_compute_standinfails on unmodified0829441(fake.execute_indirect_callswas1, expected0) before applying the fix, and passes after (cargo test -p xcl --lib hle::d3d12x::bind::tests:8 passed, 0 failed, 0 ignored)..\scripts\test.ps1on5983162):1273 passed, 0 failed, 46 ignored.SKIPPEDGPU test notices on this adapter (26 total): 21 wave64 (8 (no wave64)plus 13 per-suite wave64 checks:f32 rounding,mask_ff0_flbit,f32 conversions,integer arithmetic,integer carries,f32 transcendentals,f32 three-source,f16 arithmetic,f32 arithmetic,const_mask,f64,f16 packed,f32 compares), 3 wave32 per-lane unsupported ops (V_MUL_F16,V_PK_MUL_F16,V_CVT_F16_F32), 1no heap windows, 1cannot disable the driver cache (Windows Developer Mode is required)..\scripts\smoke.ps1) onmain0829441and PR5983162below (0crashes,0device removals).Regression run
Not tested
XCL_HEAP_WINDOWS.XCL_SAMPLE_*tests (environment variables not set).Dispatchsignature underXCL_D3D12_DEBUG=1(verified synthetically throughbind::execute_indirectin the new unit test).AI use
625a0f3againstbind::execute_indirect, wrote the fix and regression test, ran.\scripts\test.ps1and.\scripts\smoke.ps1, and drafted this PR description.Imported from ivall/xcl. Originally posted by SlopTart on 2026-11-25T16:22:31Z.
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).No Linux/Wine report in the thread yet; adding one.
gpu_suite (--release --locked,--test-threads=2): 144 passed / 3 failed / 1 ignored, same three baseline failures as plainorigin/mainon this rig (rig's known baseline: fuzz seed 1003 of #2115,gpu_nonfused_mad_and_mac_prevent_fma_contraction,gpu_depth_buffer_created_for_unordered_access_is_placed).hle::d3d12x::bind::tests::execute_indirect_skips_failed_shared_console_compute_standin(outside thegpu_suite filter): passes on this lane, targeted run; the stand-in log line is visible (pipelines whose shaders are not compiled yet get a stand-in and are built in the background).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.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T18:25:25Z.
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!
Imported from ivall/xcl. Originally posted by thiagocalile on 2026-11-25T18:49:22Z.
Independent test and smoke report for head
5983162be19b4c0e77cd5de2ab6007eb908ba504on an AMD Radeon RX 6600 (8 GB VRAM, RDNA2, native wave64).Tested
32.0.21045.29003,XCL_ADAPTER=radeon), AMD Ryzen 7 5700X3D, 47.9 GB RAM, Windows 11 (10.0.26200.0), Rust1.100.0(stable-x86_64-pc-windows-msvc), DXC1.8.2502.11.XCL_ADAPTER=radeon cargo test --no-fail-fast -p xcl --lib -- standin --test-threads=4: 3 passed, 0 failed, 0 ignored (0skipped).Regression run (
scripts/smoke.ps1, release builds,XCL_ADAPTER=radeon)main(50a9fde):PR
#2342(5983162):Not tested: NVIDIA/Intel GPUs, Linux/Wine, or world load past the 60 s smoke window.
AI use: Antigravity (Gemini 4 Neon) ran the builds, tests, and smoke runs and drafted this report; the account owner reviewed and approved posting.