Skip to content

[upstream #1124] D3D12.X: skip ExecuteIndirect with two-pass mesh/GS pipelines - #36

Closed
ufoptg wants to merge 1 commit into
mainfrom
upstream-pr/1124
Closed

ufoptg wants to merge 1 commit into
mainfrom
upstream-pr/1124

Conversation

@ufoptg

@ufoptg ufoptg commented Nov 24, 2026

Copy link
Copy Markdown
Owner

Two-pass mesh and ES+GS pipelines are built with XCL's mesh root signature and registered in TWO_PASS rather than TRANSLATED_GRAPHICS. In execute_indirect, XCL checked translated graphics/compute pipelines and pending async PSOs, but did not check real::two_pass_of(pso). A two-pass PSO therefore fell through to the PC ExecuteIndirect path with the title's graphics root signature and zeroed root descriptors, causing an immediate GPU page fault at VA 0x0 (0x887a0006).

This adds a 1-line guard to skip ExecuteIndirect when real::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 xcl-dev#724; this is a minimal crash fix so main stops removing the device in the meantime.)

What is in it

  • crates/xcl/src/hle/d3d12x/bind.rs: skip execute_indirect when super::real::two_pass_of(pso).is_some() alongside pso_async::is_pending(...), and add unit test execute_indirect_with_a_two_pass_pipeline_is_skipped.
  • crates/xcl/src/hle/d3d12x/real.rs: add #[cfg(test)] register_two_pass_for_test helper matching the existing register_translated_*_for_test helpers.

Tested

  • Hardware / OS / Rust: NVIDIA GeForce RTX 3060 (driver 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.
  • SKIPPED GPU 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)
  • Retail title (ProjectAmericas, loading Story Mode 3D world on RTX 3060): before this fix, 8/8 runs hit 0x887a0006 (nvlddmkm Event ID 13 Graphics SM Warp Exception: MMU Fault, DRED page fault at GPU VA 0x0); after this fix, 0/6 runs hit 0x887a0006 and the title progressed into rendering 3D world geometry.

Regression run
main:

xcl-smoke v1
commit: 47efa2ecea0a12934719ae69b81930cf02a4b1c3
gpu: NVIDIA GeForce RTX 3060
title: ProjectAmericas
seconds: 60
exit: 0x0
frames shown: 1646 (PresentX 1646)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14797 MB

PR head:

xcl-smoke v1
commit: 4248e64a6e31ac3a50dd157ea229583676b0317f
gpu: NVIDIA GeForce RTX 3060
title: ProjectAmericas
seconds: 60
exit: 0x0
frames shown: 1601 (PresentX 1601)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14893 MB

Not tested

  • AMD GPUs and wave64-capable hardware (the two wave64 GPU tests were skipped on this RTX 3060).
  • The 60 s scripts/smoke.ps1 regression run stays in the title menu and does not enter the 3D world path that issues ExecuteIndirect with 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

  • Antigravity (exact model name not given to the agent) assisted with root-cause investigation, writing the fix, unit test, and PR description, and running the test suite and smoke runs.

Mirror of xcl-dev#1124 (auto-synced, do not edit).

Two-pass mesh and ES+GS pipelines are built with XCL's mesh root signature and registered in TWO_PASS rather than TRANSLATED_GRAPHICS. ExecuteIndirect checked translated graphics/compute and pending async PSOs, but not two_pass_of(pso), so a two-pass PSO fell through to the PC path with the title's graphics root signature and zeroed root descriptors, triggering an immediate GPU page fault at VA 0x0 (0x887a0006).

Skip ExecuteIndirect when two_pass_of(pso).is_some(), matching the existing guard for pending async PSOs, and add a unit test covering this path.
@ufoptg

ufoptg commented Nov 25, 2026

Copy link
Copy Markdown
Owner Author

Upstream PR xcl-dev#1124 was closed or merged.

@ufoptg ufoptg closed this Nov 25, 2026
@ufoptg
ufoptg deleted the upstream-pr/1124 branch November 25, 2026 00:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants