D3D12.X: ExecuteIndirect skips failed shared compute stand-ins #2342

Manually merged
github merged 1 commit from gh-pr/2342/head into gh-pr/2342/base 2026-11-26 05:28:13 +00:00
Owner

@⁠ChalanaGimhanaX on GitHub · 2026-11-25 15:58 UTC · original
ChalanaGimhanaX:d3d12x/execute-indirect-shared-standin → main · +111 −4 · 1 files · 1 commits · merged 2026-11-25 18:28 UTC

Fixes a regression introduced by shared stand-in pipelines (625a0f3) where bind::execute_indirect failed to skip indirect dispatches of a console compute pipeline whose background build failed, letting the shared dummy compute pipeline reach PC ExecuteIndirect with 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_pso records the title-facing standin::Shell pointer in CONSOLE_COMPUTE, while pso_async::resolve_wait returns the shared driver pipeline once the background build finishes with failure (is_pending is now false). bind::execute_indirect previously checked real::is_console_compute(pso) only on the resolved driver pointer, which is not in CONSOLE_COMPUTE.

What is in it

  • 5983162 (crates/xcl/src/hle/d3d12x/bind.rs): keep the title-facing pipeline pointer (raw_pso) in bind::execute_indirect, reuse it for pso_async::is_pending(raw_pso), check real::is_console_compute(raw_pso) || real::is_console_compute(pso) before forwarding a Dispatch indirect signature to PC ExecuteIndirect, and add unit test execute_indirect_skips_failed_shared_console_compute_standin covering failed shared stand-ins, succeeded sibling shells sharing the same driver pipeline, and address reuse after release.

Tested

  • Hardware & toolchain: NVIDIA GeForce RTX 3060 12 GB (driver 32.0.16.1714, wave32 only), Intel Core i5-10400F, 15.9 GB RAM, Windows 11 Pro (build 26200), rustc 1.100.0, DXC 1.8.2502.11.
  • Confirmed execute_indirect_skips_failed_shared_console_compute_standin fails on unmodified 0829441 (fake.execute_indirect_calls was 1, expected 0) before applying the fix, and passes after (cargo test -p xcl --lib hle::d3d12x::bind::tests: 8 passed, 0 failed, 0 ignored).
  • Full workspace test suite (.\scripts\test.ps1 on 5983162): 1273 passed, 0 failed, 46 ignored.
  • SKIPPED GPU 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), 1 no heap windows, 1 cannot disable the driver cache (Windows Developer Mode is required).
  • Clean 60 s release smoke runs (.\scripts\smoke.ps1) on main 0829441 and PR 5983162 below (0 crashes, 0 device removals).

Regression run

xcl-smoke v1
commit: 082944135cd2b96288470a595861fa608eee08dc
gpu: NVIDIA GeForce RTX 3060
title: 37fe04ab
seconds: 60
exit: 0x0
frames shown: 645 (PresentX 646)
presents per 2 s (last 3): 2 13 16
device removals: 0
crashes: 0
peak commit: 14622 MB
xcl-smoke v1
commit: 5983162be19b4c0e77cd5de2ab6007eb908ba504
gpu: NVIDIA GeForce RTX 3060
title: 37fe04ab
seconds: 60
exit: 0x0
frames shown: 619 (PresentX 619)
presents per 2 s (last 3): 2 5 14
device removals: 0
crashes: 0
peak commit: 14612 MB

Not tested

  • Wave64 / AMD / Intel GPUs, Linux/Wine, and XCL_HEAP_WINDOWS.
  • XCL_SAMPLE_* tests (environment variables not set).
  • Live retail title runs past 60 s triggering a failed console compute build on an indirect Dispatch signature under XCL_D3D12_DEBUG=1 (verified synthetically through bind::execute_indirect in the new unit test).

AI use

  • Google Antigravity (Gemini 4 Neon): audited 625a0f3 against bind::execute_indirect, wrote the fix and regression test, ran .\scripts\test.ps1 and .\scripts\smoke.ps1, and drafted this PR description.
**@⁠ChalanaGimhanaX** on GitHub · 2026-11-25 15:58 UTC · [original](https://github.com/xcl-dev/xcl/pull/2342) `ChalanaGimhanaX:d3d12x/execute-indirect-shared-standin` → `main` · +111 −4 · 1 files · 1 commits · merged 2026-11-25 18:28 UTC Fixes a regression introduced by shared stand-in pipelines (`625a0f3`) where `bind::execute_indirect` failed to skip indirect dispatches of a console compute pipeline whose background build failed, letting the shared dummy compute pipeline reach PC `ExecuteIndirect` with 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_pso` records the title-facing `standin::Shell` pointer in `CONSOLE_COMPUTE`, while `pso_async::resolve_wait` returns the shared driver pipeline once the background build finishes with failure (`is_pending` is now `false`). `bind::execute_indirect` previously checked `real::is_console_compute(pso)` only on the resolved driver pointer, which is not in `CONSOLE_COMPUTE`. **What is in it** - `5983162` (`crates/xcl/src/hle/d3d12x/bind.rs`): keep the title-facing pipeline pointer (`raw_pso`) in `bind::execute_indirect`, reuse it for `pso_async::is_pending(raw_pso)`, check `real::is_console_compute(raw_pso) || real::is_console_compute(pso)` before forwarding a `Dispatch` indirect signature to PC `ExecuteIndirect`, and add unit test `execute_indirect_skips_failed_shared_console_compute_standin` covering failed shared stand-ins, succeeded sibling shells sharing the same driver pipeline, and address reuse after release. **Tested** - Hardware & toolchain: NVIDIA GeForce RTX 3060 12 GB (driver `32.0.16.1714`, wave32 only), Intel Core i5-10400F, 15.9 GB RAM, Windows 11 Pro (build `26200`), `rustc 1.100.0`, DXC `1.8.2502.11`. - Confirmed `execute_indirect_skips_failed_shared_console_compute_standin` fails on unmodified `0829441` (`fake.execute_indirect_calls` was `1`, expected `0`) before applying the fix, and passes after (`cargo test -p xcl --lib hle::d3d12x::bind::tests`: `8 passed, 0 failed, 0 ignored`). - Full workspace test suite (`.\scripts\test.ps1` on `5983162`): `1273 passed, 0 failed, 46 ignored`. - `SKIPPED` GPU 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`), 1 `no heap windows`, 1 `cannot disable the driver cache (Windows Developer Mode is required)`. - Clean 60 s release smoke runs (`.\scripts\smoke.ps1`) on `main` `0829441` and PR `5983162` below (`0` crashes, `0` device removals). **Regression run** ```text xcl-smoke v1 commit: 082944135cd2b96288470a595861fa608eee08dc gpu: NVIDIA GeForce RTX 3060 title: 37fe04ab seconds: 60 exit: 0x0 frames shown: 645 (PresentX 646) presents per 2 s (last 3): 2 13 16 device removals: 0 crashes: 0 peak commit: 14622 MB ``` ```text xcl-smoke v1 commit: 5983162be19b4c0e77cd5de2ab6007eb908ba504 gpu: NVIDIA GeForce RTX 3060 title: 37fe04ab seconds: 60 exit: 0x0 frames shown: 619 (PresentX 619) presents per 2 s (last 3): 2 5 14 device removals: 0 crashes: 0 peak commit: 14612 MB ``` **Not tested** - Wave64 / AMD / Intel GPUs, Linux/Wine, and `XCL_HEAP_WINDOWS`. - `XCL_SAMPLE_*` tests (environment variables not set). - Live retail title runs past 60 s triggering a failed console compute build on an indirect `Dispatch` signature under `XCL_D3D12_DEBUG=1` (verified synthetically through `bind::execute_indirect` in the new unit test). **AI use** - Google Antigravity (Gemini 4 Neon): audited `625a0f3` against `bind::execute_indirect`, wrote the fix and regression test, ran `.\scripts\test.ps1` and `.\scripts\smoke.ps1`, and drafted this PR description.
When shared stand-ins (standin::shell, commit 625a0f3) are enabled,
dev_create_compute_pso records the title-facing shell pointer in
CONSOLE_COMPUTE, while pso_async::resolve_wait returns the shared
driver pipeline after a failed background build. ind::execute_indirect
checked is_console_compute only on the resolved pointer, allowing a
failed console compute dispatch to reach PC ExecuteIndirect with XCL's
ABI compute root signature still bound (debug layer 953 / GPU hang).

Check both the title-facing pointer and the resolved pointer in
ind::execute_indirect, and cover failed shared stand-ins in unit
tests.

Assisted-by: Google Antigravity (Gemini 4 Neon)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:28:12 +00:00
github manually merged commit 5983162be1 into gh-pr/2342/base 2026-11-26 05:28:13 +00:00
Author
Owner

@⁠SlopTart on GitHub · 2026-11-25 16:22 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 target x86_64-pc-windows-gnu run 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 plain origin/main on 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).
  • New regression test hle::d3d12x::bind::tests::execute_indirect_skips_failed_shared_console_compute_standin (outside the gpu_ 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.

**@⁠SlopTart** on GitHub · 2026-11-25 16:22 UTC · [original](https://github.com/xcl-dev/xcl/pull/2342#issuecomment-7167874682) **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 target `x86_64-pc-windows-gnu` run 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 plain `origin/main` on 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`). - New regression test `hle::d3d12x::bind::tests::execute_indirect_skips_failed_shared_console_compute_standin` (outside the `gpu_` 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.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 18:25 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!

**@⁠DavidM1911** on GitHub · 2026-11-25 18:25 UTC · [original](https://github.com/xcl-dev/xcl/pull/2342#issuecomment-7170886722) 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!
Author
Owner

@⁠thiagocalile on GitHub · 2026-11-25 18:49 UTC · original

Independent test and smoke report for head 5983162be19b4c0e77cd5de2ab6007eb908ba504 on an AMD Radeon RX 6600 (8 GB VRAM, RDNA2, native wave64).

Tested

  • Hardware: AMD Radeon RX 6600 (8146 MiB VRAM, RDNA2, native wave64 + mesh shaders, driver 32.0.21045.29003, XCL_ADAPTER=radeon), AMD Ryzen 7 5700X3D, 47.9 GB RAM, Windows 11 (10.0.26200.0), Rust 1.100.0 (stable-x86_64-pc-windows-msvc), DXC 1.8.2502.11.
  • XCL_ADAPTER=radeon cargo test --no-fail-fast -p xcl --lib -- standin --test-threads=4: 3 passed, 0 failed, 0 ignored (0 skipped).

Regression run (scripts/smoke.ps1, release builds, XCL_ADAPTER=radeon)

main (50a9fde):

xcl-smoke v1
commit: 50a9fdef81cb796b8756a31defb0648301d002ce
gpu: AMD Radeon RX 6600
title: 3c290c16
seconds: 60
exit: 0x0
frames shown: 1501 (PresentX 1501)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 11951 MB

PR #2342 (5983162):

xcl-smoke v1
commit: 5983162be19b4c0e77cd5de2ab6007eb908ba504
gpu: AMD Radeon RX 6600
title: 3c290c16
seconds: 60
exit: 0x0
frames shown: 1532 (PresentX 1532)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14173 MB

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.

**@⁠thiagocalile** on GitHub · 2026-11-25 18:49 UTC · [original](https://github.com/xcl-dev/xcl/pull/2342#issuecomment-7171447199) Independent test and smoke report for head `5983162be19b4c0e77cd5de2ab6007eb908ba504` on an **AMD Radeon RX 6600** (8 GB VRAM, RDNA2, native wave64). **Tested** - Hardware: AMD Radeon RX 6600 (8146 MiB VRAM, RDNA2, native wave64 + mesh shaders, driver `32.0.21045.29003`, `XCL_ADAPTER=radeon`), AMD Ryzen 7 5700X3D, 47.9 GB RAM, Windows 11 (`10.0.26200.0`), Rust `1.100.0` (`stable-x86_64-pc-windows-msvc`), DXC `1.8.2502.11`. - `XCL_ADAPTER=radeon cargo test --no-fail-fast -p xcl --lib -- standin --test-threads=4`: **3 passed, 0 failed, 0 ignored** (`0` skipped). **Regression run** (`scripts/smoke.ps1`, release builds, `XCL_ADAPTER=radeon`) `main` (`50a9fde`): ``` xcl-smoke v1 commit: 50a9fdef81cb796b8756a31defb0648301d002ce gpu: AMD Radeon RX 6600 title: 3c290c16 seconds: 60 exit: 0x0 frames shown: 1501 (PresentX 1501) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 11951 MB ``` PR `#2342` (`5983162`): ``` xcl-smoke v1 commit: 5983162be19b4c0e77cd5de2ab6007eb908ba504 gpu: AMD Radeon RX 6600 title: 3c290c16 seconds: 60 exit: 0x0 frames shown: 1532 (PresentX 1532) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14173 MB ``` **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.
This discussion has been locked. Commenting is limited to contributors.
No description provided.