D3D12.X: name persisted compute driver blobs for NodeMask 1 as node 0 #3214
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3214"
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?
Imported from ivall/xcl. Originally posted by Kalmarv on 2026-11-28T21:03:18Z.
Since
efdebc82a compute pipeline's driver blob name carries its NodeMask when it is nonzero (-n<mask>), so the nodes of a linked adapter keep their blobs apart. A title creates its compute pipelines with NodeMask 1.xcl shaders --precompileand the startup-preparation workers create them with 0. D3D12 reads both masks as the first node, but the names differ, so in play none of the precompiled compute blobs are found and the driver compiles each one cold.On title: ea3b5e4d, after a full precompile, a 600 s run from a save past the prologue logged
driver blob absentfor programs whose blob the precompile had saved under the name without the node part. 323 compute pipelines were built cold in play. 71 of the compiles were of 256 KB or more of DXIL; 65 finished, most of them 0.7-1 MB at 30-131 s each. They held the huge-pipeline slots, graphics queued behind them, and presents stopped at 231 s. Afterwards the cache held 15,376 blobs without a node part and 378 with-n1, all written by title runs.This change maps mask 1 to 0 wherever the blob is named. Masks 2 and up keep their own names. The desc passed to the driver is not changed.
What is in it
crates/xcl/src/hle/d3d12x/real.rs:driver_cache::persisted_node_mask();name_for_root_node_with_ext(plain, chain and indirect-chain names, also used as the compute pipeline-library name) andcompute_blob_key_for(the in-memory blob key) use it;Graphics pipelines need no change. Their recipes record the title's own NodeMask and preparation replays it, so both sides use the same name; in the run above, every graphics and mesh compile in play had
driver blob supplied. Two-pass compute takes its node from the recorded stream in the same way.Tested
cargo test -p xcl --lib -- node_masks_zero_and_one_share_a_blob_name a_node_zero_compute_blob_is_accepted_for_node_mask_one linked_adapter_nodes_have_distinct_compatible_names direct_and_indirect_chain_roots --test-threads=1: 4 passed, 0 failed, 0 skipped.cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4(DXC 1.9.2609 viaXCL_DXC_DIR), at30a39948: 2595 passed, 1 failed, 49 ignored.gpu_compute_e2e::a_preparation_worker_also_builds_a_split_programs_whole_form. It fails the same way on main765b2c5bwith the same command, where the counts are 2590 passed, 1 failed, 49 ignored; that run skipped three uma_driver tests, and this change adds two tests.-n1blobs moved out. The exe was built from 309c44f7, which has the same tree as the head30a39948; the exe built at30a39948is byte-identical. Before → after:driver blob absent: 71 → 0;-n1blobs;Regression run
Main (
daae0330, whose tree is main765b2c5b; main has since gained #3213, a test-only change):This PR (
30a39948):Both runs use the same 150 s recipe on the same warm cache, and the blocks are pasted from the runner. Their timelines match. Main: startup preparation 40 s, first button press at 125.0 s, window end 191.5 s. This PR: 35 s, 125.0 s, 189.7 s. In the 60 s after the press, main presented 1300 frames and this PR 1332. Main started 10 compute driver compiles of 256 KB or more with
driver blob absent, and its presents stopped about 6 s before the end of the window (last eight 2 s windows: 17 34 34 45 7 0 0 0). This PR had 0 compute compiles withdriver blob absent. The 150 s window ends close to where main stops, so the 600 s pair under Tested is the proof of the fix.Not tested
XCL_PSO_MANIFEST) were read, not run: they are graphics-only and hash the title's own serialized recipe, so this change does not touch them.-n1blobs. They are no longer looked up, and they are not deleted.AI use
🤖 Generated with Claude Code
Imported from ivall/xcl. Originally posted by Kalmarv on 2026-11-28T21:12:34Z.
The 4 failures in
Build and test (Windows, no GPU)are main's own. The same tests fail on main beeb81be's CI run (job 141111232719):shaders::pipeline_library::tests::builder_deduplicates_names_and_atomically_replaces_output, plus the three tests that fail on its poisoned lock (graphics_pipeline_round_trips_through_serialized_library,mesh_pipeline_round_trips_through_serialized_library,warm_library::tests::cold_publish_makes_an_unchanged_corpus_reusable). This change does not touchpipeline_library.Imported from ivall/xcl. Originally posted by Prime1997 on 2026-11-28T23:26:24Z.
Review: APPROVED
Approving on a merge-check run on an RTX 3060 Ti 8 GB (driver 32.0.16.1714, i5-10400, Windows 11 Pro 26200, Rust 1.100.0).
30a39948bc7a8e7dbe93bf6dd59e3fd9b2a08f2bmerged cleanly ontomain7db2f391, and the workspace builds.cargo test --workspace --no-fail-fast -- --test-threads=4on the merge: 2,596 passed, 0 failed, 49 ignored, 29 SKIPPED (21 of them no wave64). Both new tests pass, including the driver check: this card accepts a NodeMask 0 blob for a NodeMask 1 pipeline.scripts/smoke.ps1withXCL_PREPARE=0: 1,460 frames against 1,385 onmain, peak commit 15,280 MB against 15,626 MB, no device removal, no crash.driver blob absent.Build and testrun on this head failed in the four pipeline-library tests that #3221 fixes (builder_deduplicates_names_and_atomically_replaces_outputand the three behind its poisoned lock). The same four fail intermittently on plainmainhere, so it is not this change.AI use: Claude Code ran the builds, tests and smoke on Prime's PC and wrote this text. Approving is Prime's decision.
I use a temporary Discord to coordinate my work. Anyone helping test XCL or compare results is welcome. Test coordination on Discord
Imported from ivall/xcl. Originally posted by UncommonDLL on 2026-11-29T02:06:23Z.
Following up on the RTX 3060 Ti explicit CachedPSO result, we tested the named pipeline-library path on a physical RTX 5070 Ti with NVIDIA driver 621.40, using
30a39948bc7a8e7dbe93bf6dd59e3fd9b2a08f2bplus a local synthetic validation fixture.A fresh process loaded the pipeline by name with NodeMask 1 after a writer stored it with NodeMask 0.
LoadComputePipelinereturnedS_OK. The exact returned PSO reached dispatch with zero target fallback creations, the fence completed, and all 64 output words matched.Named 0→0 and 1→1 also passed. Explicit CachedPSO 0→0, 1→1 and 0→1 succeeded on their first creation calls. The deliberately missing-name control returned
E_INVALIDARG, then successfully used the saved blob on its first creation call.All three writers and seven readers passed in fresh processes, with zero failures, skips or timeouts. An independent review verified all 448 output words.
This covers one synthetic whole-compute shader on one single-node adapter and driver. The D3D12 information queue was unavailable. No performance timings or retail preparation/play comparison were performed, and this is not a full merge-check.
AI assistance: ChatGPT Work/Codex coordinated execution, and a separate Codex reviewer checked the evidence. The session exposed the GPT-6 family but not the exact model variant.
Imported from ivall/xcl. Originally posted by moombathepilot on 2026-11-29T06:21:38Z.
merge-check
base:
fa204595a4head:
30a39948bcmerge: clean
build: cargo build --workspace --offline --locked -> ok; release xcl build also passed
tests: cargo test --workspace --offline --locked --no-fail-fast -- --test-threads=4 --nocapture -> 2602 passed, 12 failed, 49 ignored; SKIPPED: 12 notices (6 unsupported per-lane float cases, 2 no heap windows, 3 missing D3D12 debug layer, 1 driver cache could not be disabled). Both new tests passed. All 12 failures also appeared on this exact base in an earlier run: DXIL fuzz (1), mesh shader-cache (1), title-texture tests (8), and two-pass driver-cache integration test (parent and child, 2).
review: Read the full diff. No blocking code finding. The cache-key change preserves the descriptor passed to the driver. Linked-adapter hardware was not tested.
performance: On RX 7800 XT, offline precompile through present 512 wrote one compute blob. The retail title reused it for record 1e32f25121c1552f with XCL_PSO_DISK_CACHE=1 (408 ms cold on main, 0 ms logged in the driver on the trial merge). In 60 s smoke runs, main showed 1583 frames at 16085 MB peak commit and the trial merge showed 1597 frames at 15106 MB. Both exited 0x0 with zero crashes or device removals. Reused the earlier smoke result from the exact base with matching settings. Time to gameplay was not measured.
verdict: not yet: the required Windows CI check is red. The targeted AMD cache test passed, and the local suite showed no failure unique to the trial merge.
hardware / tool and model: AMD Radeon RX 7800 XT, driver 32.0.32029.2010, Ryzen 7 5700X3D, Windows 11 build 26300.9974, rustc 1.100.0 MSVC / OpenAI Codex (GPT-6, exact variant unavailable) ran the tests, reviewed the diff, and drafted this report.
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T05:09:31Z.
Review (head
30a39948, diff read, not a merge-check; it conflicts with main, so not built or run):52f02888("D3D12.X: canonicalize single-node NodeMask 1 to 0 so precompiled driver blobs hit at runtime", same author, merged via #3495) addscanonical_node_mask(1 -> 0) and applies it inname_for_root_node_with_ext(so plain, chain and indirect-chain names all match), incompute_container's desc and so its in-memory key, infinish_two_passand inComputeBuildKey. The conflict is that same line (real.rs~6526). Nothing behavioural is left to rebase.Fine: the change and its tests were right for their base, and the before/after measurement is what motivated main's fix. Recommendation: close as superseded by
52f02888.AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.
Imported from ivall/xcl. Originally posted by throny on 2026-12-01T13:01:24Z.
Closing as superseded: this change is already on
main(52f02888). main real.rs canonical_node_mask (1 to 0) is applied in name_for_root_node_with_ext, the compute build key and the PSO desc copy, with a test; PR's only extra is a GPU blob-acceptance testTwo independent checks found this: Foniass's close list on #1607 and ours against current
main. If something here is still missing onmain, say so and reopen it, or ask and I will.AI use: Claude Code (Claude Opus 5.5); the per-PR comparison was done by Claude Sonnet 5.5 sub-agents.
Pull request closed