Repository navigation
D3D12.X: skip direct draws and unmatched ExecuteIndirect on two-pass MS/GS PSOs - #2028
raylitebull wants to merge 1 commit into
Conversation
…MS/GS PSOs Finished two-pass MS and GS pipelines are PC mesh shader (MS+PS) pipelines registered in TWO_PASS rather than TRANSLATED_GRAPHICS. Previously, once async compilation completed, graphics_bound and the non-DispatchMesh fallthrough in execute_indirect treated them as untranslated PC pipelines, bound the title's graphics root signature, and issued DrawInstanced/DrawIndexedInstanced/ExecuteIndirect against the bound mesh PSO, causing D3D12 Close() to fail with E_INVALIDARG (0x80070057). Guard both paths on two_pass_of(...) so finished two-pass pipelines never fall through to incompatible direct/indirect draw calls, and add a CPU regression test.
|
Regression run for this PR: head main 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. |
|
A regression run under Wine on Linux on the retail title: no device removal, no crash, frames level with Tested
Regression run main (first run): this PR: The second Not tested
AI use
|
Empirical verification — PR #2028 (
|
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
Prevents
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.Regression run
scripts/smoke.ps1pair ona7b478bvs279d3eahas not been run locally. AMD and NVIDIA reviewers are invited to test ona7b478bvs279d3ea(includingscripts/smoke.ps1and two-pass MS/GS titles) and post results in the comments.Not tested
scripts/smoke.ps1pair ona7b478b, fullcargo test --workspacesuite, runtime GPU execution across AMD / NVIDIA / Intel hardware, and Linux/Wine/vkd3d-proton.AI use