D3D12.X: skip direct draws and unmatched ExecuteIndirect on two-pass MS/GS PSOs #2028
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!2028
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2028/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?
@raylitebull on GitHub · 2026-11-25 01:15 UTC · original
raylitebull:fix/bind-twopass-close-invalidarg-v2→main· +144 −1 · 2 files · 1 commits · merged 2026-11-25 10:49 UTCPrevents
bind.rsfrom falling through to raw PCDrawInstanced,DrawIndexedInstanced, and non-DispatchMeshExecuteIndirectcalls against finished two-pass MS/GS mesh-shader pipelines, eliminatingID3D12GraphicsCommandList::Close()E_INVALIDARG(0x80070057) failures.Part of #1833.
What is in it
crates/xcl/src/hle/d3d12x/bind.rs(+128 / -1): guardgraphics_boundand theexecute_indirectnon-DispatchMeshfallthrough ontwo_pass_of(...)so finished two-pass pipelines registered inTWO_PASSare never bound with the title's graphics root signature for incompatible direct/indirect draw calls, plus CPU regression unit tests (hle::d3d12x::bind::).crates/xcl/src/hle/d3d12x/real.rs(+17): add#[cfg(test)]helperregister_two_pass_for_testfor the unit tests.Tested
rustc 1.99.1 (58cf8f9c3 2026-10-13), base279d3ea(a7b478b).cargo check --workspace --tests: passed (0new warnings).cargo test -p xcl --lib hle::d3d12x::bind::: 7 passed, 0 failed.scripts/smoke.ps1regression pair on NVIDIA GeForce RTX 3060 (@Anon64): passed (0 device removals, 0 crashes).Regression run
60 s
scripts/smoke.ps1pair on exact heada7b478bvsmain(NVIDIA GeForce RTX 3060 12 GB, driver 581.80, Windows 11 26200, release,XCL_NETWORK=0, A pressed every 4 s from 20 s on a retail title), contributed by@Anon64:main:
this PR:
Not tested
scripts/smoke.ps1pair ona7b478b, fullcargo test --workspacesuite, runtime GPU execution across AMD / NVIDIA / Intel hardware, and Linux/Wine/vkd3d-proton.AI use
@Anon64 on GitHub · 2026-11-25 02:28 UTC · original
Regression run for this PR: head
a7b478b, based onmain0be6ce8. RTX 3060 12 GB (581.80, wave32), Windows 11 26200, release,XCL_NETWORK=0, A pressed every 4 s from 20 s,scripts/smoke.ps1on a retail title for 60 s, back to back with themainrun.main
0be6ce8:this PR:
No device removals or crashes; 94 % of main's frames, 119 % of its peak commit.
Not tested: the whole suite; world loading; whether the title reaches the changed code in these 60 s.
Written with Claude Code (Claude Opus 5.5) from runs on this machine.
@JoaoPauluu on GitHub · 2026-11-25 02:33 UTC · original
A regression run under Wine on Linux on the retail title: no device removal, no crash, frames level with
main(1398 here, 1357 and 1365 on the twomainruns). Neither of the PR's new warnings appears in the log, so the two-pass MS/GS path is not reached in this 60 s run; this is a regression run only.Tested
x86_64-pc-windows-gnu.a7b478bas it is (based on0be6ce8) andmaincbc296a, no uncommitted changes. Retail title 1.0.2.1,scripts/linux/smoke.sh(#257) for 60 s, no input. Runs in order: main, this PR (with other PRs in between), main.Regression run
main (first run):
this PR:
The second
mainrun: 1365 frames,exit: 0x0, no device removal, no crash. Under Wine,peak commitreads 0 MB, so these blocks do not check memory.Not tested
AI use
@JJAutoCompare on GitHub · 2026-11-25 02:42 UTC · original
Empirical verification — PR #2028 (
a7b478ba50c2afabb6421ada995af029cd9bef5a)Tested clean detached PR head
a7b478ba50c2afabb6421ada995af029cd9bef5aon STOR-WINLAB.Environment
26200.9974, AMD Ryzen 7 3800X, Intel Arc A770 16 GiB (driver32.0.101.9175, wave range 8–32,DoublePrecisionFloatShaderOps=0,d3d12SDKLayers.dllabsent).rustc 1.100.0 (0ef1bc386 2026-11-09)(CARGO_INCREMENTAL=0, debug info 0). Standalone DXC/DXIL1.9.2609.5was onPATH; the test title logged Windows SDK DXC1.9.2602.17(21d28f72).Tested
cargo build --workspaceandcargo test --workspace --no-runexited 0 outside the GPU lock.cargo test -p xcl --lib two_pass_pso_skips_direct_draw_and_unmatched_execute_indirect -- --nocapture: 1 passed, 0 failed, 0 ignored, 0 skipped (also passed in workspace suite; verified both direct-draw guard and unmatchedExecuteIndirectskip without binding graphics root signature or calling fake nativeExecuteIndirect).cargo test --workspace --no-fail-fast -- --test-threads=4(underInvoke-ArcTest.ps1, exited 101): 1,054 passed, 27 failed, 46 ignored across 20 test binaries, with 23SKIPPEDlines across 13 tests (excluded from coverage; libtest pass counts include early returns).xcl --libshader/DXIL tests (22CreateComputePipelineState0x80070057, 4 shader output assertions:gpu_nonfused_mad_and_mac_prevent_fma_contraction,gpu_ps_image_sample_offset_implicit_lod_between_mips,gpu_valu_16_and_64_bit,gpu_wave64_ps_whole_wave_reductions) pluse2e::test_title_runs_and_game_folder_is_untouched(RSSetDepthBiasX#94 blue vs green). Unrelated to two-pass MS/GS guards (no same-runmainbaseline).0x887A002D).Not tested
scripts/smoke.ps1, matchedmainbaseline, and D3D12 debug-layer validation.AI use
gpt-6.2-sol,reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity,gemini-4-neon) verified counts againstpr2028-suite.logand published this report.@DavidM1911 on GitHub · 2026-11-25 04:12 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!
@raylitebull on GitHub · 2026-11-25 10:38 UTC · original
Thanks @Anon64 for running and sharing the exact-head 60 s
scripts/smoke.ps1pair ona7b478b(0 device removals, 0 crashes) — added to the PR description!