D3D12.X: skip ExecuteIndirect with two-pass mesh/GS pipelines #1124
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!1124
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1124/head"
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?
@spidermodders on GitHub · 2026-11-24 12:08 UTC · original
spidermodders:fix/execute-indirect-two-pass→main· +48 −2 · 2 files · 1 commits · closed without mergingTwo-pass mesh and ES+GS pipelines are built with XCL's mesh root signature and registered in
TWO_PASSrather thanTRANSLATED_GRAPHICS. Inexecute_indirect, XCL checked translated graphics/compute pipelines and pending async PSOs, but did not checkreal::two_pass_of(pso). A two-pass PSO therefore fell through to the PCExecuteIndirectpath with the title's graphics root signature and zeroed root descriptors, causing an immediate GPU page fault at VA0x0(0x887a0006).This adds a 1-line guard to skip
ExecuteIndirectwhenreal::two_pass_of(pso).is_some(), matching the existing guard for pending async PSOs. (Complementary to / superseded by full two-pass mesh shader execution in #724; this is a minimal crash fix somainstops removing the device in the meantime.)What is in it
crates/xcl/src/hle/d3d12x/bind.rs: skipexecute_indirectwhensuper::real::two_pass_of(pso).is_some()alongsidepso_async::is_pending(...), and add unit testexecute_indirect_with_a_two_pass_pipeline_is_skipped.crates/xcl/src/hle/d3d12x/real.rs: add#[cfg(test)] register_two_pass_for_testhelper matching the existingregister_translated_*_for_testhelpers.Tested
32.0.16.2124), AMD Ryzen 7 5800X, Windows 11 Home 10.0.26300,rustc 1.100.0 (0ef1bc386 2026-11-09), debug (test suite) and release (scripts/smoke.ps1).cargo test --workspace -- --test-threads=4: 742 passed, 0 failed, 41 ignored.SKIPPEDGPU tests (2):gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask(no wave64)gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware(no wave64)ProjectAmericas, loading Story Mode 3D world on RTX 3060): before this fix, 8/8 runs hit0x887a0006(nvlddmkmEvent ID 13Graphics SM Warp Exception: MMU Fault, DRED page fault at GPU VA0x0); after this fix, 0/6 runs hit0x887a0006and the title progressed into rendering 3D world geometry.Regression run
main:PR head:
Not tested
scripts/smoke.ps1regression run stays in the title menu and does not enter the 3D world path that issuesExecuteIndirectwith a two-pass PSO; that crash path was verified separately by loading Story Mode (reported under Tested) and by the new unit test.AI use
@AlexandreSchuelter on GitHub · 2026-11-24 12:15 UTC · original
Test report on AMD wave64 hardware (RX 6900 XT, RDNA2): no new failures, and
execute_indirect_with_a_two_pass_pipeline_is_skippedpasses.Tested
stable-x86_64-pc-windows-msvc, debug; DXC 1.9.2602.17;XCL_NETWORK=0,XCL_REQUIRE_GPU=wave64; no SKIPPED testscargo build --workspace+cargo test --workspace --no-fail-fast -- --test-threads=4:main47efa2e4248e64(based on47efa2e)main: the RDNA2 packed-mip failure inplaced_title_textures_share_vram_and_preserve_pixels(fixed by #470 / #1028) and its twoPoisonErrorcascades (#673).Not tested
scripts/smoke.ps1(no game here), so not theExecuteIndirectpath a title takes; the new test uses a fake list and does not depend on the GPUAI use: Claude Code (Claude Opus 5.5) fetched the branch, ran the suite and wrote this report; the runs are real, on the hardware above.
@Aniseto on GitHub · 2026-11-24 12:32 UTC · original
Ran the new ExecuteIndirect test and the whole
bindunit set at4248e64:Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, wave32 only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC 14.44.35207, DXC 1.9.2609.5, debug build.
execute_indirect_with_a_two_pass_pipeline_is_skippedpasses, and the two existing ExecuteIndirect tests are unaffected. These are unit-level tests, so the adapter is not the variable; the datapoint is the Windows 11 build 26200 / MSVC 14.44.35207 / DXC 1.9.2609.5 toolchain next to the author's run.Not tested: a mesh or GS title going through the two-pass path (no unpacked title here), RDNA2/RDNA4 and Intel GPUs, Wine, release profile.
AI-assisted (OpenCode), model: DeepSeek V4.1 Flash 1017 - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified.
@tiagonleal on GitHub · 2026-11-24 13:45 UTC · original · edited 2026-11-24 14:34 UTC
Windows / NVIDIA retail test of
4248e64a6e, on top ofmain47efa2e+ #684 (e56dbc3f43), all clean merges (treeef7e61b). #684 is in both builds because without it one of mymainruns ended earlier in aVCRUNTIME140read fault.Tested
cargo build --workspace && cargo test --workspace -- --test-threads=4(debug) onef7e61b: 745 passed, 0 failed, 41 ignored. SKIPPED:gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask,gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware(no wave64).XCL_NETWORK=0 XCL_PSO_WAIT_MS=50 XCL_PRESS_AT=30:A, the two builds alternated, warm DXIL / driver-blob caches:queue.Wait … released on CPUwarnings+0x23cf683write at 0x0, 172.7 s+0x23cf683, 229.6 sD3D12 device removed: 0x887a0006, 163.6 s+0x23cf683, 231.6 sD3D12 device removed: 0x887a0006, 140.9 sEdit: a later run with this PR ended in
0x887a0006too (last row; acargo test --workspaceran alongside part of it), so this PR does not remove it on this card: 1 of 3 runs with it, 2 of 4 with #684 alone, 1 of 10 onmain(too few runs to say whether it is rarer).In every run, with and without this PR, the presents stop when the first
GPU queue.Wait … did not complete within 5000 ms – released on CPUwarning appears (e.g. q3 waiting on q0's 0x70d while q0 has completed 0x709), so the remaining+0x23cf683stop looks unrelated to this PR.Edit 2: two later runs of the same tree plus #1046 (which changes nothing without its variable) had presents end at 120 and 126 s, one ending in
0x887a0006at 131.0 s and one in a read fault atgame+0x4684e7. Runs of one build vary a lot here, so the 200 s runs above are not a reliable gain.Not tested: a build with this PR and without #684; more runs (two per build); AMD / Intel; Windows 10. An Idle-priority shader precompile ran alongside all four runs.
Run and written with Claude Code (Claude Opus 5.5).
@DavidM1911 on GitHub · 2026-11-25 08:15 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!
@Prime1997 on GitHub · 2026-11-26 01:02 UTC · original
Closing because main already covers this, from
a7b478ba("D3D12.X: skip direct draws and unmatched ExecuteIndirect on two-pass MS/GS PSOs"). Inbind.rsexecute_indirect, main checkstwo_pass_of(pso)and skips an ExecuteIndirect whose command signature does not match the two-pass pipeline, the case that invalidated the command list. It still runs a matching DispatchMesh indirect. This PR skips every ExecuteIndirect on a two-pass pipeline, so main's version is narrower and keeps draws this one would drop.Compared at head
4248e64aagainst main08db802. Reviewed with Claude Code (Claude Opus 5.5); I checked the comparison before closing.Pull request closed