Repository navigation
D3D12.X: a build a submit will wait for is wanted from the put-off call on - #2832
NWProgramming00 wants to merge 1 commit into
Conversation
…ll on A call put off to the submit (`need_by_submit`) moved its build before the workers' queue, but the build stayed unwanted until the submit itself waited for it. A huge unwanted build waits for commit headroom in `big_compile_turn`, and while a title loads its world on a machine with little free commit that headroom does not come: put-off builds then went through the gate one at a time, each only once its submit waited for it. The build is now wanted from the put-off call on, so it takes a slot of the wanted cap (`XCL_HUGE_PSO_WANTED_CONCURRENCY`, default 2) without the commit wait. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@NWProgramming00 heads-up before reviewers find it: #2579 (@Royalflamejlh, open) makes the same one-line change, AI use: Claude Code (Claude Opus 5.5) compared the two diffs and wrote this. |
|
Independent Windows/NVIDIA check of current #2832 head
I checked the overlap already raised with #2579: both add Not tested: a cold world-load timing comparison, retail smoke, AMD/Intel, or Linux/Wine. The focused result verifies demand propagation, not faster first-frame time. AI use: Codex (GPT-6.2 Sol) reviewed the diff and overlap, ran the tests and local control, checked the baseline failure, and drafted this report. |
…RC_SCC tracking, wave32 VALU read64-skip) xcl-dev#2833 (f5a52c3): lane_masks::reads_scc goes pub(super) with SDWA S0/S1 refinement (VSRC 253 only when the S-bit selects the scalar source; v253 VGPR reads excluded), movrels/VOP3-unused-SRC2 exclusions, and implicit-field filtering; lower.rs src_bit/src64 gain the 253 arm (zext(scc) & lane==0), compute_scc_liveness and bridged-SCC input both delegate to lane_masks::reads_scc. Tests: sdwa_and_vop3_src_scc_reads_are_classified_accurately + explicit_src_scc_in_salu_valu_bridge_and_wave_liveness, verbatim. xcl-dev#2834 (653f8f1): Direct DXIL wave32 VALU lane-mask sources skip the 64-bit read (read + 0 instead of read64) for OPR_SREG/OPR_VCC 64-bit operands; 279-line wave32_mask_src_tests module added with one twin delta: #[cfg(all(test, windows))] instead of #[cfg(test)], because validate/runner are Windows-only in this tree until the Phase-D SPIR-V backend lands (same bucket as the other dxil translation test modules in dxil/mod.rs). xcl-dev#2832 (e2ecdfa) triaged SKIP: single-file d3d12x/pso_async.rs need_by_submit wanted-cap change, Windows-only, zero Linux twin. Gates: both checks 0 errors; lib 780/0/1 threads=4 (+2, zero regressions); title e2e 4 passed/1 failed by design, 12 unique FAILs all D3D12.X, 0 non-GPU; retail HOLDS (exit 139 SIGSEGV exe+0x2237320, stubs 20, xgr exactly XAsync/XNetworking/XUser). Lock audit: 0 new lock().
…e tags Scan: upstream/main still 8b957be (is-ancestor, zero fallout); per-PR probe xcl-dev#2832..xcl-dev#2850 + spot: xcl-dev#2832-34 pins hold, xcl-dev#2835+ missing. Triage index Most-actionable items 1-5 verified LANDED in tree (cae046e/f0f9ea34/27d80dbd/trio/e1bec690+52e9014e); fixed there. Gates: both checks 0 errors, lib 780/0/1, e2e 12-GPU-only, retail HOLDS (SIGSEGV exe+0x2237320).
…XIL (verbatim) + step-117 sync log Upstream xcl-dev#2838 ef36b7d (single commit, still OPEN): packed G16 gradients start each derivative direction at a new dword. Fix hunk context byte-identical in tree; all 4 additions (fix + helper + 3 tests) verified byte-identical to upstream head. recomp/tests.rs is cfg(all(test, windows)) so new tests are parse-verified only here; execution waits for Windows CI (pre-fix failure by construction: G16 cases expect 3/4/7/9 legacyF16ToF32 conversions, pre-fix emits 0). Scan xcl-dev#2832..xcl-dev#2920: only xcl-dev#2838 new since step-116 (push race, not builder fault). Gates: checks 0 errors (22+28 warnings); lib 783/0/1; e2e 4/1 by design, 24 FAIL lines all D3D12.X; retail exit 139 at exe+0x2237320, stubs 20, xgr XAsync/XNetworking/XUser HOLDS.
… all pins re-verified)
… all pins re-verified)
Part of #2088. It also bears on the world-start stalls in #505, a step on the #1833 roadmap.
A call put off to the submit (
need_by_submit, from #2118's dispatches and #2611's graphicsExecuteIndirects) moves its pipeline's build before the workers' queue, but the build stays unwanted until the submit itself waits for it. A huge unwanted build waits inbig_compile_turnfor both the unwanted slot and 3 GB of commit headroom. While a title loads its world on a machine with little free commit, that headroom does not come. Put-off builds then go through the gate one at a time, each only once its submit waits for it, while the other workers sit in the gate.This makes the build wanted from the put-off call on. A submit is going to wait for it anyway. A huge one then takes a slot of the wanted cap (
XCL_HUGE_PSO_WANTED_CONCURRENCY, default 2) without the commit wait, as the build a submit already waits for does today. The cap still bounds how many huge builds the driver runs at once.@KDenKC suggested this go in its own PR (#2611 (comment) and the reply below it).
What is in it
crates/xcl/src/hle/d3d12x/pso_async.rs:need_by_submitcallswant()the first time a pipeline is needed by a submit. The rest is unchanged: theNEEDEDqueue, the wanted cap, and the commit wait for builds nothing needs yet (preloads and plain background builds).a_pipeline_a_submit_needs_is_wanted_before_the_submit_waits: a worker's build seesbuild_is_wanted()turn true afterneed_by_submit, with nobody waiting. It fails onb49be18: the build never became wanted.Tested
XCL_ADAPTER=radeon), AMD Ryzen 7 9700X, 31 GB RAM (commit limit 41.7 GB), Rust 1.100 MSVC, release.b49be18("a call put off to the submit did not make its build wanted") and passes with the change. All 15pso_asynctests and the 11big_compilegate tests pass.cargo build --release --workspace, thencargo test --release --workspace --no-fail-fast -- --test-threads=4, with and withoutXCL_DIRECT_DXIL=all, against baseb49be18on the same machine:b49be18e2ecdfa)XCL_DIRECT_DXIL=allXCL_DIRECT_DXIL=allThe +1 is the new test. The failing tests are the same on base and PR in every row:
fuzz_validate_and_gpu_0..3on NVIDIA (#1905) andfuzz_validate_and_gpu_1on the Radeon (#2115).SKIPPEDlines: 46 on NVIDIA, 28 on the Radeon, the same on base and PR.XCL_NETWORK=0 XCL_ACTIVITY=1, RTX 5070 Ti). These were made with the same change behind a local switch, onb49be18+ D3D12.X: a graphics ExecuteIndirect waits for its pipeline at the submit, not in the call #2611 + Shaders: warm runtime-selected graphics DXIL variants in --precompile #2613, from the same cache copy. Details: D3D12.X: a graphics ExecuteIndirect waits for its pipeline at the submit, not in the call #2611 (comment)big_compile_turnand the title's submit inrecord_deferred → resolve_wait.D3D12 device removed: 0x887a0005, with no DRED or shader-code count. I cannot tell whether that is NVIDIA: the device is removed when the pipelines in use need more than 512 MB of shader code (0x887a0005) #2403's shader-code heap, reached sooner because pipelines are made faster, so I do not claim either way.mainalone the change reaches D3D12.X: a dispatch waits for its pipeline at the submit, not in the bind #2118's put-off dispatches. I have no run that isolates their gate waits.Regression run
Base (
main), NVIDIA GeForce RTX 5070 Ti:This PR, same card:
These 60 s runs end in the title's menus, before the world load where put-off builds pile up, so they check that nothing else changed.
Not tested
AI use
🤖 Generated with Claude Code