Repository navigation
Conversation
… call `execute_indirect` resolved the bound pipeline (`resolve_wait`) and then asked `is_pending` again to decide whether what it got is a stand-in of a pipeline still being built. A build that ended between the two calls made `is_pending` false while `pso` was still the stand-in (or the shared stand-in driver pipeline). With a signature that is not a Dispatch one the call then went to the PC ExecuteIndirect with the stand-in and the list's root signature, the pair the skip exists to avoid (debug layer 953, a retail title's GPU hang 0x887a0006). `pso_async::bound_unbuilt(raw, pso)` answers for what the bind got: `pso` is the stand-in and the build did not fail. A build that ended since does not change that; a failed build's stand-in still goes on to the console compute check below. The window is reached when a bind does not wait for the build to the end: `XCL_PSO_WAIT_MS`, `XCL_PSO_IMAGE_SKIP=1`, and without any wait if a bind stops building cold pipelines itself. Assisted-by: Claude Code (Claude Opus 5.5)
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! — Devin |
|
Tested: current PR head merged onto current
Not tested: retail titles (no title data on this lane, counts only). AI use: Hermes agent (local Qwen-class) ran both machines and drafted this; I checked it before posting. |
…+ xcl-dev#2548 + xcl-dev#2579 + xcl-dev#2581 + xcl-dev#2598 + xcl-dev#2611 + xcl-dev#2615 + xcl-dev#2622) (cherry picked from commit 57e5c216e924452b59cd64862d2941006e24c28c)
Return ExecuteIndirect's resolved pipeline and the unbuilt state of that exact bound choice from one captured Pending. A build completing between resolution and classification can no longer send a stale stand-in to the driver with an incompatible root signature. The shared Build completion state distinguishes a successful late completion from the permanent fallback of a failed build. GNU Windows-target cargo check passed. Windows/MSVC, GPU, and title smoke execution were not available on this host. Adapted from PR xcl-dev#2598. Assisted-by: Codex (GPT-5.6-sol)
Return ExecuteIndirect's resolved pipeline and the unbuilt state of that exact bound choice from one captured Pending. A build completing between resolution and classification can no longer send a stale stand-in to the driver with an incompatible root signature. The shared Build completion state distinguishes a successful late completion from the permanent fallback of a failed build. GNU Windows-target cargo check passed. Windows/MSVC, GPU, and title smoke execution were not available on this host. Adapted from PR xcl-dev#2598. Assisted-by: Codex (GPT-5.6-sol)
gut0to
left a comment
There was a problem hiding this comment.
AI-assisted review (OpenAI GPT-6). I inspected the changed call path and its regression test; I did not run tests.
| // doesn't match the currently set Pipeline State Object"; a retail title's world then | ||
| // hung the GPU, 0x887a0006). Skipped, like a draw or dispatch of such a pipeline. | ||
| if super::pso_async::is_pending(raw_pso) { | ||
| if super::pso_async::bound_unbuilt(raw_pso, pso) { |
There was a problem hiding this comment.
Could this regression exercise execute_indirect across the build-completion window? The new unit test proves bound_unbuilt stays true for a captured stand-in, but it does not verify that this call site uses that predicate or prevents the PC ExecuteIndirect call; reverting this condition to is_pending(raw_pso) would leave the helper test green. A deterministic test could capture the stand-in, complete the build before this check, then assert the fake PC call was not made. AI-assisted review (OpenAI GPT-6): I inspected this call path and the added unit test; I did not run tests.
execute_indirectresolves the bound pipeline withresolve_wait, then asksis_pendingwhether it was a stand-in of a pipeline still being built. If the build ends between the two calls,is_pendingis false whilepsois still the stand-in (or, for a shared stand-in, the shared driver pipeline). With a signature that is not a Dispatch one, the call then goes to the PCExecuteIndirectwith the stand-in and the list's root signature. That is the pair the skip exists to avoid (debug layer 953; a retail title's world hung the GPU, 0x887a0006, see the comment above the check). The window opens whenever a bind does not wait for the build to the end: withXCL_PSO_WAIT_MSorXCL_PSO_IMAGE_SKIP=1, and for every bind of a cold pipeline with #2615, which makes no bind wait by default. Either of the two can land first.pso_async::bound_unbuilt(raw_pso, pso)takes one lookup and answers for what the bind got:psois the stand-in and the build has not failed. A build that ended since does not change the answer. A failed build's stand-in is still not "unbuilt", so it goes on to the console-compute check below, as before (#2342).#2118 puts a dispatching
ExecuteIndirectof a console compute pipeline that is still being built off to the submit. That check comes beforeresolve_waitand leaves this window as it was. A pipeline whose build ends betweenresolve_waitand the check still takes the path above. So does a call recorded at the submit, through the same function. So does a call that could not be put off: a signature that does not dispatch, or a list that cannot be split.#1652 also fixes this, with
resolve_wait_criticalreturning(pso, pending)from one lookup, as part of a much larger change (bind waits, pending-draw guards, target init). This PR is the small fix on its own. If #1652 lands first, this one is not needed.What is in it
crates/xcl/src/hle/d3d12x/pso_async.rs:bound_unbuilt.crates/xcl/src/hle/d3d12x/bind.rs:execute_indirectuses it in place ofis_pending(raw_pso).pso_async.rs):a_stand_in_bound_before_its_build_ended_stays_unbuilt_for_that_bind. A bind gets the stand-in, then the build ends.is_pendingis false (what the old check read) whilebound_unbuiltstays true. A bind after the build is not unbuilt, nor is a failed build's stand-in, nor a pipeline that is no stand-in.Tested
cargo test --workspace --no-fail-fast -- --test-threads=4on1e280117: 1429 passed, 1 failed, 47 ignored. The failure isgpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1(seed 783,res[64] = 0xc, CPU 0x7fffffff), which also fails onmain. e2e: 4 passed.lower_dxilf16/f32 per-lane programs (refused, gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426 semantics),heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows),shaders::tests::pso_measurement_compiles_an_exact_synthetic_record(the driver cache cannot be disabled without Developer Mode).cargo test -p xcl --lib pso_asyncon1e280117: 15 passed, 0 failed.Regression run (
scripts/smoke.ps1, same title, 60 s, adjacent runs in the order main, another PR's head, this PR, main)main
08db802(run 1):this PR,
1e280117:main
08db802(run 2):Not tested
execute_indirectcall: it is rare. Reproducing it needs a hook between the bind's lookup and the check. After this change there is a single lookup, so the decision isbound_unbuilt's, and the unit test covers it.graphics_boundreadsis_pending(pso)after itsresolve_waitthe same way, but only to count a dropped draw and for a frame-trace log line. Not changed here.AI use