D3D12.X: ExecuteIndirect with a pipeline still being built is skipped (Austin's fork fix, upstreamed) #574
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!574
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/574/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?
@ryosen0 on GitHub · 2026-11-24 01:58 UTC · original
ryosen0:ei-test→main· +40 −0 · 1 files · 2 commits · merged 2026-11-24 02:43 UTCCarries theaustinayers'
ExecuteIndirectfix from his fork's build 10 (f879d4e) ontomain, with a unit test for the gate. Credit for the change and the diagnosis is his; this PR is the upstreamable form (he has not opened one for it).Scope on current main: the skip half needs a bounded
esolve_wait (#267 / #533 direction, as in the fork's build) - on unmodified main
esolve_wait waits without a limit, so the pending gate cannot fire there; the root-signature half applies now. Stacks naturally on #267 or #533.
The bug: with the bounded wait for a background pipeline (#267's direction),
ExecuteIndirectcould reach the PC call with the pipeline's stand-in while the list still held XCL's ABI root signature from a translated draw before it. Debug layer 953 ("the currently set Root Signature doesn't match the currently set Pipeline State Object"), six times as a retail title's world started, then the device hung (0x887a0006).What is in it
crates/xcl/src/hle/d3d12x/bind.rs(Austin's change, verbatim): anExecuteIndirectwhose bound pipeline is still being built is skipped like a draw or dispatch of that pipeline; a PC pipeline gets the title's root signature first, asgraphics_bounddoes for draws.execute_indirect_with_a_pipeline_still_building_is_skipped: lazy-submitted pipelines under the test's control - pending stays pending (the skip case), built resolves to the real pipeline, failed resolves to the stand-in and is not pending, released is forgotten.Tested
cargo build --workspace,cargo test --workspace --no-fail-fast -- --test-threads=1: 681 passed, 0 failed, 41 ignored; 2 GPU SKIPPED lines (no wave64 on this adapter).XCL_NETWORK=0 XCL_ACTIVITY=1) held 60 presents / 2 s through world streaming with brief dips at t≈120 s and t≈482-484 s (memory pressure, 23-24 GB commit on this 32 GB machine), no device removal, no hang - the failure Austin describes without the fix. The run ended by the window being closed, not a crash.Not tested
Regression run
Main
508a0c7:Head
86a5d0b:AI use
The runtime change is Austin's (assisted by Claude Code per his commit). GPT-6.2 Astra (API model selector) in DSH wrote the test, ran the builds/tests/smokes above, and drafted this description; the human contributor reviewed everything before posting.
@ghost on GitHub · 2026-11-24 02:06 UTC · original
Wave64 hardware run, since Not tested lists it:
86a5d0bmerged ontomain9ce2070(clean merge): pass. AMD Radeon RX 9060 XT (RDNA4, native 64-lane waves), driver 32.0.32029.2010; Ryzen 7 5800X3D; Windows 11 Pro 26200; Rust 1.100.0 MSVC; DXC 1.9.2602.17; debug..\scripts\test.ps1: 685 passed, 0 failed, 41 ignored; noSKIPPEDGPU tests.execute_indirect_with_a_pipeline_still_building_is_skippedpasses.AI use
@MesshM on GitHub · 2026-11-24 02:08 UTC · original
Test run and review of
86a5d0b3b7f49ba15e957c917f6488322b09e5d4on AMD RDNA4; the PR was tested on NVIDIA only. The branch is based on508a0c7, so I merged it onto currentmain9ce2070locally (clean merge, onlybind.rs) and tested that tree.Tested
stable-x86_64-pc-windows-msvc, debug.\scripts\test.ps1(cargo build --workspace+cargo test --workspace -- --test-threads=4) on the merge: 685 passed, 0 failed, 41 ignored, exit code 0;xcllib tests 645 passed, 0 failed, 21 ignoredSKIPPED;execute_indirect_with_a_pipeline_still_building_is_skippedpassesReview: the skip cannot fire on current
mainexecute_indirectstarts withlet pso = super::pso_async::resolve_wait(with(this, |s| s.pso));. Onmain,resolve_waitruns the job itself if no worker has, then waits on the condvar untildone; it has no time limit. So when the new branch askspso_async::is_pending(with(this, |s| s.pso)), that entry is always done andis_pendingisfalse: thereturnbefore the PC call is unreachable onmain. It only takes effect together with a boundedresolve_wait(the #267 direction, which the description mentions and which is what the fork's build has). It might be worth saying so in the description, or stacking this on #267.The other half applies now: a pipeline that resolves to no translation (a PC one, or a failed build whose stand-in is the original
pso) gets the title's root signature before the PC call, asgraphics_bounddoes for draws, which fixes the 953 pairing on the paths that do reach it.Two smaller points:
pso_async's states (pending, built, failed, released), notexecute_indirectitself, so it would still pass if the gate inbind.rswere removed.rs_gfx); the compute root signature is not touched there. Harmless for the draw case this is about; just noting it.Not tested: no retail title or regression run (I have no unpacked game), so the 953 /
0x887a0006case was not reproduced here; noXCL_SAMPLE_*tests, release build; the PR's head on its old base was not run, only its merge ontomain.Run and review by Claude Code (Claude Opus 5.5) on this machine; each point was checked against the code.
@ryosen0 on GitHub · 2026-11-24 02:13 UTC · original
The gate is indeed unreachable on current
main—resolve_waitthere has no time limit, so the entry is always done by the timeis_pendingis asked. The change is Austin's fork fix carried as-is: his build has the bounded wait (the #267 direction), and there the skip fires — his log had six 953s and a0x887a0006device hang as a retail world started, gone with it. Onmainonly the root-signature half applies, as you say. I've amended the description to state this plainly: the skip half takes effect with a boundedresolve_wait(#267 / #533); until then it is the PC-pipeline root-signature binding that fixes the 953 pairing on the paths that reach it.On the test: agreed it pins the
pso_asyncstates the gate reads, not the call path throughexecute_indirect— an integration test would need a real command list and a pending pipeline, which the unit harness here doesn't build. Keeping it as the gate's contract test; the retail evidence is in the description.The
rs_gfxnote for indirect dispatches: noted, not touched here — the change is Austin's verbatim, and the compute path waits (resolve_for_bind), so a PC compute pipeline atExecuteIndirecthas already resolved. Worth a follow-up if a failed compute build ever reaches it.AI use: GPT-6.2 Astra (API model selector) in DSH wrote this reply; the human contributor reviewed it.
mainreaches on Windows; the obstacle is replaced vtables — proposal: proxies #175