Repository navigation
D3D12.X: an ExecuteIndirect dispatch of an untranslated compute pipeline is skipped, as Dispatch is - #1195
Conversation
|
The new guard also skips a valid native PC compute pipeline when its indirect signature is created through XCL’s console path. A synthetic one-group dispatch used a native
All three GPU runs completed with zero debug-layer messages. Windows 11 build 26300, RTX 3080 Ti / 621.35, Ryzen 7 9800X3D, Rust 1.99.1 MSVC, debug. Command AI-assisted. Codex (GPT-6, exact variant unavailable) wrote and ran the scratch checks and drafted this report. |
|
Independent verification on current Machine: Windows 11, Ryzen 9 7900X + RTX 3060 Ti; Rust stable MSVC, debug.
AI use: test runs by Devin (Cognition, SWE-2); no code changes. |
…ine is skipped, as Dispatch is Dispatch skips a console compute pipeline without a translation (a build that failed). ExecuteIndirect sent the same pipeline to the PC call after setting only the graphics root signature, so the dispatch ran with the list's compute root signature, which can still be XCL's ABI one from a translated dispatch before it. The D3D12 debug layer reports that pair as error 953 during a retail title's world load. Command signatures with a Dispatch argument are now noted when they are made (and forgotten when a signature without one is made at the same address). Compute pipelines made from a console shader that runs untranslated (a background build's stand-in, the fallback of a console shader that failed) are noted too, and dropped with the pipeline. ExecuteIndirect skips a Dispatch signature only for those; a native PC compute pipeline still goes to the PC call. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Test report on NVIDIA GeForce RTX 2070 SUPER (Turing, wave32)Commit tested Tested
Not tested
AI use
|
c1ebdac to
d6ff44c
Compare
|
@thehollowedone Thanks, you're right: the guard looked only at the signature, so a native PC compute pipeline went down with the failed console ones. Fixed in d6ff44c (squashed into the one commit). XCL now notes compute pipelines made from a console shader that runs untranslated: the stand-in of a background build, and the fallback of a console shader that failed while it was being made. They are dropped with the pipeline. The test has your case as step 4: a pipeline not made from a console shader, bound with the same Dispatch signature, reaches the PC |
|
A regression run under Wine on Linux, on a retail title. Tested
Regression run main (first run): this PR: The last Not tested
AI use
|
…vall#1142, ivall#1150, ivall#1156, ivall#1182, ivall#1191, ivall#1195, ivall#1221 Integrate 10 high-impact open upstream PRs on top of upstream/main (930e8b4): - ivall#1182: share video memory across render targets aliased onto one physical page (~1.85-2.1 GB VRAM saved) - ivall#1142: declare tiled texture pools texture-only (D3D12_HEAP_FLAG_DENY_BUFFERS) for vkd3d-proton - ivall#1097: report process memory under Wine via PagefileUsage fallback - ivall#1078: bound BCPack record scratch memory to 2 KiB stack batches - ivall#1150: convert console clear-value formats in CreatePlacedResource - ivall#1156: release the interface returned by QueryInterface in class_for - ivall#1139: check pointer alignment in is_adopted before dereferencing - ivall#1195: skip ExecuteIndirect dispatch of untranslated console compute pipelines - ivall#1191: VirtualProtect commits lazy pages in its range first - ivall#1221: unmark lazy away mappings in FreeTitlePhysicalPages Assisted-by: Antigravity (Google DeepMind)
…ll#1221, and updated Linux PRs Update fork README for upstream/main 930e8b4 (BCPack BC1-BC7, XCL_PSO_WAIT_MS, low-VA ASLR < 2^40, alloc_pool, sparse tile parking/pool reuse, direct page moves, write-watch merge), newly integrated PRs (ivall#1078, ivall#1097, ivall#1139, ivall#1142, ivall#1150, ivall#1156, ivall#1182, ivall#1191, ivall#1195, ivall#1221), and updated Linux PRs (ivall#867, ivall#871, ivall#877). Assisted-by: Antigravity (Google DeepMind)
|
Confirmed the follow-up fix on d6ff44c. Windows 11 build 26300, RTX 3080 Ti / 621.35, DXC 1.8.2502.11, Rust 1.99.1 MSVC, debug. The synthetic fixture created a real console
AI-assisted. Codex (GPT-6 family, exact variant unavailable) extended and ran the fixture and drafted this reply. |
…d harden compute/sparse paths - crates/xcl/src/hle/d3d12x/pso_async.rs (fixes 1 MiB thread stack overflow / deadlock seen alongside ivall#611): Add urgent_queue() spawning dedicated 64 MiB-stack xcl-pso-wait-* workers and offload unstarted jobs in resolve_wait_for(..., None) instead of executing job() inline on the title's 1 MiB stack threads, avoiding silent Wine thread deaths without skipping compute dispatches (ivall#675, ivall#891). Guard build() with std::panic::catch_unwind plus a Drop completion guard so panics always call complete(p, 0) and notify waiters. - crates/xcl/src/hle/d3d12x/pso_async.rs & kernelx.rs (ivall#1288, ivall#505, ivall#232): Track active pipeline bind waits via HELD / title_held() and export kernelx::Sleep backed by title_sleep() so Sleep skips counting time spent blocked on background PSO compilation (XCL_SLEEP_HOLD=0 disables). - crates/xcl/src/hle/d3d12x/bind.rs, device_x.rs & real.rs (ivall#1195): Track console compute PSOs (CONSOLE_COMPUTE) and Dispatch-capable command signatures (DISPATCH_SIGNATURES) so ExecuteIndirect skips dispatches against untranslated console compute stand-ins or fallbacks while still forwarding native PC compute pipelines. - crates/xcl/src/hle/d3d12x/sparse.rs (ivall#1419, ivall#1277): Extract wait_fence_until() to ResetEvent before SetEventOnCompletion and re-check GetCompletedValue() until target or deadline so stale signals on the reusable auto-reset event cannot end waits early; bail cleanly from upload_dirty() if ring fence reclaim times out instead of holding STATE indefinitely. - crates/xcl/src/gpu/recomp/emit.rs & tests.rs (ivall#1361): Split GFX10.30 SADDR == 0x7F (ST immediate-only 0u base) from SADDR == 0x7D (v[ADDR] base) in Em::scratch and update ENC_FLAT_SCRATCH VADDR test encodings to 0x7D. Assisted-by: Antigravity (Gemini 4 Neon)
…cl-dev#1288 Sleep hold, xcl-dev#1195 ExecuteIndirect skip) Conflicts: - tests.rs memory_windows_reject_out_of_uma_aliasing: xcl-dev#1693 builds the switch / heap form through direct_or (the direct translator with XCL_DIRECT_DXIL=1); the flat form of our flat window loads stays a DXC compile, as in gpu_sparse_vram_descriptors_buffers_and_xmem. - pso_async.rs resolve_wait: xcl-dev#1288's `Held` guard (pso_async::title_held, which kernelx::Sleep does not count) goes into our resolve_wait_in after note_use, so it covers the bind's whole wait in every form: XCL_PSO_WAIT_MS / XCL_PSO_WAIT_MS_GRAPHICS budgets, XCL_PSO_SKIP_HUGE, a build on the binding thread. Its test calls our three-argument resolve_wait_for. xcl-dev#1195 merged without conflict: in execute_indirect our skip of a pending stand-in or a two-pass pipeline comes first, then xcl-dev#1195's skip of a Dispatch signature with an untranslated console compute pipeline (a failed build's stand-in, the fallback of a console shader that failed), which we sent to the PC call, then the PC-pipeline block with 515b576's gpu_profile::end(.., breadcrumb). xcl-dev#1195's skip leaves a breadcrumb, as our other ExecuteIndirect skips do.
Dispatchskips a console compute pipeline that has no translation (its build failed).ExecuteIndirectsent the same pipeline to the PC call, after setting only the graphics root signature. The dispatch then ran with whatever compute root signature the list held, which can still be XCL's ABI one from a translated dispatch before it. The debug layer reports that pair as error 953 ("the currently set Root Signature doesn't match the currently set Pipeline State Object"). Follows #574, which skips the same call for a pipeline that is still being built.What is in it
crates/xcl/src/hle/d3d12x/device_x.rs:create_command_signature_xnotes whether a new signature has a Dispatch argument, at every creation, so a signature made later at a freed one's address does not inherit the kind.crates/xcl/src/hle/d3d12x/real.rs: compute pipelines made from a console shader that runs untranslated (the stand-in of a background build, the fallback of a console shader that failed) are noted inCONSOLE_COMPUTEand dropped with the pipeline inforget_pso.crates/xcl/src/hle/d3d12x/bind.rs:execute_indirectskips a Dispatch signature when the bound pipeline is one of those, counted as a skipped dispatch and logged likedispatchdoes. Draw signatures and native PC compute pipelines go to the PC call as before.async_compute_pso_success_and_failure_in_dispatch_and_execute_indirectgets two more cases. A failed console compute stand-in with a Dispatch signature must not reach the PCExecuteIndirect(fails without the change inbind.rs). A native PC compute pipeline with the same signature still reaches it (fails with a guard on the signature alone, the first version of this PR, found by @thehollowedone). The same address noted again without a Dispatch argument goes to the PC call, and a released pipeline's address is no longer a console one.Tested
cargo build --workspace+cargo test --workspace -- --test-threads=4: 741 passed, 0 failed, 41 ignored (SKIPPED GPU tests: 2, no wave64)XCL_D3D12_DEBUG=1,XCL_PSO_WAIT_MS=50, through the account screen into the world load. To get compute builds that fail, these runs also carry a local patch that is not part of this PR: compute programs of 768 KB of DXIL or more are refused instead of compiled (XCL_SKIP_CS_KB=768, 11 programs refused per run; on this card such programs take 60 to 97 s each in the driver).mainwithout the local patch: no compute build failed in that run and 953 did not appear, so on this title the case needs a compute program that fails to translate or that the driver rejects.Regression run
main with the cache warm. A first pair, run in the order main then PR, gave 274 and 1046 frames: whichever build ran first on a cold pipeline cache paid for it. The PR block is the current head; the first version of this PR (c1ebdac) showed the same 1558 frames as main.
main:
PR:
Not tested
AI use
🤖 Generated with Claude Code