Repository navigation
D3D12.X: ExecuteIndirect with a pipeline still being built is skipped (Austin's fork fix, upstreamed) - #574
Conversation
With the limit on waits for a background pipeline, ExecuteIndirect could reach the PC call with the pipeline's stand-in while the list held XCL's ABI root signature from a translated draw: debug layer 953 (root signature does not match the pipeline state), six times as a retail title's world started, and then the device hung (0x887a0006). Such a call is skipped like a draw or dispatch of that pipeline; a PC pipeline gets the title's root signature first, as graphics_bound does. With it the same run shows no 953 and no device removal. Assisted-by: Claude Code (Claude Fable 5.2) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Assisted-by: DSH (GPT-6.2 Astra)
|
Wave64 hardware run, since Not tested lists it:
AI use
|
|
Test run and review of Tested
Review: the skip cannot fire on current 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 Two smaller points:
Not tested: no retail title or regression run (I have no unpacked game), so the 953 / Run and review by Claude Code (Claude Opus 5.5) on this machine; each point was checked against the code. |
|
The gate is indeed unreachable on current On the test: agreed it pins the The AI use: GPT-6.2 Astra (API model selector) in DSH wrote this reply; the human contributor reviewed it. |
towiice
left a comment
There was a problem hiding this comment.
Tested PR head 86a5d0b on NVIDIA GeForce GTX 1650 SUPER (Turing / TU116, driver 610.88), Windows 11 build 10.0.26300 (26H2), Rust 1.100.0 (stable-x86_64-pc-windows-gnullvm), DXC v1.9.2609:
cargo test -p xcl --lib hle::d3d12x::bind -- --test-threads=4: 5 passed, 0 failed (0.87 s), includingexecute_indirect_with_a_pipeline_still_building_is_skippedandasync_compute_pso_success_and_failure_in_dispatch_and_execute_indirect.
All d3d12x::bind GPU/unit tests pass on Turing.
…iver blob reuse, in-place detiling) Conflict in bind.rs execute_indirect: upstream's skip of a still-building pipeline kept; with xcl-dev#533 / xcl-dev#267 the bounded wait hands it the stand-in, which is then skipped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ner, then a stack overflow at 118 s Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Part of xcl-dev#232. Bounds graphics pipeline waits at draws/ExecuteIndirect to XCL_PSO_WAIT_MS (default 4000 ms, 0 = no limit) and runs builds on workers rather than the title thread. Latches each timed-out pipeline as late so later draws while it is still building return the stand-in immediately instead of waiting N * limit, counts skipped draws in report.json (d3d12.standin_draws), composes with xcl-dev#574's pending ExecuteIndirect skip, and adds unit tests for the per-pipeline latch, timed-out ExecuteIndirect, and env parsing. Assisted-by: Antigravity (Claude Opus 5.5) and T3 Code / Antigravity (gemini-pro-orchestrator-neon)
Part of ivall#232. Bounds graphics pipeline waits at draws/ExecuteIndirect to XCL_PSO_WAIT_MS (default 4000 ms, 0 = no limit) and runs builds on workers rather than the title thread. Latches each timed-out pipeline as late so later draws while it is still building return the stand-in immediately instead of waiting N * limit, counts skipped draws in report.json (d3d12.standin_draws), composes with ivall#574's pending ExecuteIndirect skip, and adds unit tests for the per-pipeline latch, timed-out ExecuteIndirect, and env parsing. Assisted-by: Antigravity (Claude Opus 5.5) and T3 Code / Antigravity (gemini-pro-orchestrator-neon)
Part of ivall#232. Bounds graphics pipeline waits at draws/ExecuteIndirect to XCL_PSO_WAIT_MS (default 4000 ms, 0 = no limit) and runs builds on workers rather than the title thread. Latches each timed-out pipeline as late so later draws while it is still building return the stand-in immediately instead of waiting N * limit, counts skipped draws in report.json (d3d12.standin_draws), composes with ivall#574's pending ExecuteIndirect skip, and adds unit tests for the per-pipeline latch, timed-out ExecuteIndirect, and env parsing. Assisted-by: Antigravity (Claude Opus 5.5) and T3 Code / Antigravity (gemini-pro-orchestrator-neon)
Carries 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.