D3D12.X: the window title counts driver pipeline builds too #2670
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!2670
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2670"
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?
@Kalmarv on GitHub · 2026-11-26 05:41 UTC · original
Kalmarv:titlebar-driver-count→main· +127 −14 · 2 files · 1 commits · openThe window title's "compiling shaders: N running, M done" counts only XCL's DXC compiles. While the NVIDIA driver built cold pipelines (2 - 5 s each, some on the title's own thread, some waiting for the huge-compile slot) it read "0 running", which looked like a hang. This PR also counts the driver's pipeline builds in the title, and logs the slow ones that were only visible with
XCL_PSO_TRACE=1.Part of #2088.
The driver counter idea comes from #214, but there the counter sits inside a ~380-line driver-concurrency change that no longer merges into
main. This PR is only the title and log part, onmain's own huge-compile gating. #214's author is welcome to take it into their PR instead.What is in it
crates/xcl/src/hle/d3d12x/real.rs:driver_psomakes everyCreate*PipelineStatecall XCL makes, on a worker or on a title thread. It now counts each build while it runs and once it is done.driver_compile_identifiedcounts the huge ones waiting for their slot. A call given a driver blob of an earlier build is a load and is not counted. A driver compile below the huge size that takes 1 s or more now logsslow driver compile #N: <kind> PSO, <bytes> B DXIL[, record …, driver blob …], <ms> ms on <thread>withoutXCL_PSO_TRACE=1. Two tests: the counter itself, and that a call throughdriver_psois counted while a blob load is not.crates/xcl/src/hle/d3d12x/present.rs: the title readscompiling shaders: DXC N running, M done | driver N building[ (W waiting for a slot)], D done[, Q pipelines queued][, F failed]. It stays up while driver builds run or wait, as well as for DXC compiles. One test of the text.Tested
cargo test -p xcl --lib -- hle::d3d12x::real::big_compile_tests hle::d3d12x::present::tests --test-threads=4(debug): 20 passed, 0 failed, 0 ignored.cargo test --workspace --no-fail-fast -- --test-threads=4(debug) onca6a0cc0: 1426 passed, 0 failed, 46 ignored. SKIPPED: 21 for no wave64 on this adapter, 1 for no heap windows (heap_window_out_of_memory_falls_back_to_the_switch_form), and 3 per-lane f16/f32 forms that the translator refuses (V_MUL_F16,V_PK_MUL_F16,V_CVT_F16_F32, #1426).Tested by others
ca6a0cc0as it is (not merged onto currentmain): RTX 4080 SUPER (driver 621.40), Ryzen 5 7600X, Windows 11 build 26300, rustc 1.100.0, DXC 1.9.2602.17, debug:cargo test --workspace -- --test-threads=4: 1426 passed, 0 failed, 46 ignored; the 3 new tests pass; the SKIPPED tests are the same as onmainon that machine (report). Thanks!Regression run
scripts/smoke.ps1 -Seconds 60, the same retail title, both from release builds of clean trees, run back to back in one queue job on the machine above, beside other GPU-queue work. A CPU-bound shader precompile ran on the same machine beside the head side for all of its run, and beside themainside from partway through (it started during that run), so the head side ran under at least as much load asmain's.maine1d84b7d(this PR's base):This PR's head
ca6a0cc0:Not tested
AI use
🤖 Generated with Claude Code
@luckyteagirl on GitHub · 2026-11-26 05:43 UTC · original · reviewed
Could the two-pass compute PSO pass its cache-hit state into the driver counter? This path attaches a prior blob to
cdesc.CachedPSO, but callsdriver_compile_identified(..., None, ...); that setsBLOB_SUPPLIEDto false, sodriver_psocounts the warm load as a new build/done. The latercreusedbranch confirms the same successful call was reused. A separate cache flag would let the uncached retry continue to count as a build without inventing a tracing record hash. Exact-head source review atca6a0cc0e8f5bed2a3f7f96c23429674961a02ae; no title runtime or GPU test. AI-assisted review with Codex.@sage-sage on GitHub · 2026-11-26 07:05 UTC · original
Test report: passes on NVIDIA. Exact head
ca6a0cc0(its basee1d84b7is 7 commits behind currentmainb49be18; tested as it is, not merged).Tested
cargo test --workspace -- --test-threads=4: 1426 passed, 0 failed, 46 ignored; the 3 new tests passmainon this machine): 21 wave64 tests (NVIDIA is wave32 only), 3 per-lane wave32 f16/f32 forms (refused), 3 D3D12 debug layer (d3d12SDKLayers.dllnot installed), 1no heap windows, 1pso_measurement_compiles_an_exact_synthetic_record(Developer Mode off)Not tested
main.Claude Code (Claude Opus 5.5) ran the tests and wrote this report.
@Kalmarv on GitHub · 2026-11-26 07:11 UTC · original
Thanks @sage-sage for the run on the RTX 4080 SUPER: it is now under Tested by others in the description. Your Not tested points (the title on a real run, the merge onto current
main) are open on our side too. The smoke pair here reached the title, butsmoke.ps1does not record the window text.Claude Code (Claude Opus 5.5) wrote this reply.
@emirduran707 on GitHub · 2026-11-26 10:32 UTC · original
Independent AMD RDNA4 (native wave64) verification of exact PR head
ca6a0cc0e8f5bed2a3f7f96c23429674961a02aeon Windows 11 Pro 26300 (AMD Radeon RX 9060 XT 16 GB, driver32.0.31044.16, Ryzen 5 5600, Rust 1.100.0 MSVC, DXC1.9.2602.17).Tested
cargo build --workspace(debug): passed (0errors).cargo test --workspace --no-fail-fast -- --test-threads=4:1424 passed, 2 failed, 46 ignored(8 SKIPPED: 6 per-lane DXIL forms refused by host adapter/driver, 1heap_window_out_of_memory_falls_back_to_the_switch_formno heap windows, 1pso_measurement_compiles_an_exact_synthetic_recordWindows Developer Mode off).hle::d3d12x::present::tests::the_title_counts_dxc_compiles_and_driver_buildshle::d3d12x::real::big_compile_tests::driver_builds_count_while_running_and_once_donehle::d3d12x::real::big_compile_tests::every_driver_call_is_counted_and_a_blob_load_is_notgpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1andfuzz_validate_and_gpu_3) are pre-existing on unmodifiedmainon this RX 9060 XT / driver32.0.31044.16.cargo build --release -p xcl+ 60 s retail-title smoke test (scripts/smoke.ps1, offline):(Compare against
mainb49be183on this machine:1603 frames, 18576 MB peak, 0 device removals, 0 crashes.)Not tested
AI use
@Kalmarv on GitHub · 2026-11-26 10:37 UTC · original
Thanks @emirduran707 for the RX 9060 XT run on
ca6a0cc: 1,424 passed, with the two fuzz failures you saw on main too; all 3 new tests passed; the 60 s smoke drew 1,617 frames with 0 removals and 0 crashes. That covers AMD for this PR; NVIDIA beyond our own card, Intel and Linux are still untested by others.AI use: Claude Code (Claude Opus 5.5) drafted this comment from the linked report.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.