D3D12.X: separate compute driver blobs by static sampler state #1410
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1420"
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 venglov on 2026-11-24T15:47:03Z.
Two translated compute pipelines can have identical DXIL and flags while using different static samplers in their root signatures. The disk cache assigned them the same filename, so either pipeline could overwrite or discard the other pipeline’s blob. This is a follow-up to #744.
What is in it
real.rsand the offline precompiler inshaders.rs.Tested
cargo check --workspace --tests --locked --offline --target x86_64-pc-windows-msvcpassed with cross-target SDK headers.Regression run
Pending Windows GPU and retail-title runs for main and this PR’s head.
Not tested
AI use
Imported from ivall/xcl. Originally posted by anes66 on 2026-11-24T16:15:42Z.
Native Windows/MSVC follow-up for
7490d75a17e950aab1ed49c5155543ba5a3be437, merged onto mainb7aa9f3bd212088e0d927439284dc5ed325ce3c7.Tested integration 873dd8e retains your runtime/test changes. Only README needed a merge resolution: both the DRED note and your cache note are kept. Temporary control instrumentation was removed before the final build and suite.
Tested
cargo test --locked -p xcl --lib hle::d3d12x::real::driver_cache::tests -- --test-threads=1 --show-output: 5 passed / 0 failed, includingidentical_dxil_with_different_static_samplers_uses_separate_files.name()to use the legacy DXIL/length/flags branch even for nonempty samplers, keeping the new signature. The sampler regression fails on the identical filename5752dfa9a5b8154b-7-0.pso. This is a legacy-key simulation, not a build of unmodified main.cargo build --locked --workspace -j 4: passed.cargo test --locked --workspace --no-fail-fast -j 4 -- --test-threads=4 --show-output: 771 passed / 0 failed / 41 ignored, exit 0. The existing cross-process offline compute-cache GPU test passed. Two native-wave64 skips:gpu_geometry_wave32_prefix_count_over_a_maskandgpu_wave32_program_in_wave64_hardware.XCL_SAMPLE_*unset; their counted passes are not title coverage.Not tested: your head on its old base, release, AMD/Intel/native wave64, title smoke, or actual driver-blob reuse/rendered output for two different nonempty sampler states. The new key regression is a unit test; the existing GPU reuse fixture has no static samplers. This supplies the missing native build/suite check, not the required main/head title regression run.
AI use: Codex (GPT-6; exact variant unavailable) integrated the patch, ran the checks and negative control, and prepared this report. Your feature code was not rewritten.
Rebase check: current head
867d307572af1e5ec5c980902d611a1c3df2be2ehas identical files to the tested873dd8eintegration except README bullet order. Rust code and tests are unchanged. I compared the trees; I did not rerun the suite on the new commit.Combined #759 / #1420 native cache check
83ac24b combines the #759 integration/cache/help fixes (
ffc40b3) with #1420's rebased867d307on mainb7aa9f3. The clean merge initially failed E0061: the journal warmer still supplied two arguments to the new three-argumentdriver_cache::path. It now passes&compiled.samplers.A new synthetic native-driver regression goes beyond the filename unit test:
The focused test
journal_warmer_reuses_offline_blobs_for_distinct_static_samplerspassed 1 / 0, no skips. A control that supplied an empty sampler slice to the warmer made the code compile but failed its cache-hit assertion. The corrected caller passed. The shared journal encoder is the existing synthetic fixture, factored for reuse.Full results on the RTX 3060 / Windows 10 / Rust 1.100.0 / DXC 1.9 / Agility 1.620.2 setup:
cargo test --locked --workspace --no-fail-fast -j 4 -- --test-threads=1 --show-output: 780 passed / 0 failed / 41 ignored, exit 0, two native-wave64 skips.--test-threads=4: 777 / 3 / 41, five explicit skips. Failures werelist_x::tests::write_buffer_immediate_on_open_existing_heap_visible_to_cpu,rotating_queue_self_deadlock_and_non_monotonic_rescue_do_not_hang, andtimestamps_outside_unified_memory_land_after_the_queue, at queue creation. Additional no-device skips were the console depth-target test, shader-cache-session fallback test and placed-texture test. The cause of these parallel failures is unresolved; this is not a green default-suite claim.Samples were unset. The new regression compiles pipelines and checks cache loading; it does not dispatch the sampler shaders or compare rendered output. No retail title smoke, Wine, AMD/Intel, native wave64, or real driver update. #1368 is not part of this integration.
AI use: Codex (GPT-6; exact variant unavailable) prepared the integration and fixture, reproduced the API/caller failures, ran validation and wrote this update.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T17:13:06Z.
Verification on RTX 3060 Ti (Windows 11): merge conflict with current
main(b7aa9f3) inREADME.md— needs a rebase before it can be tested.Imported from ivall/xcl. Originally posted by raylitebull on 2026-11-25T02:06:11Z.
Please rebase #1420\ onto current \main\ to clear the \CONFLICTING\ state (e.g. \README.md), update the \Regression run\ section with a matching \xcl-smoke v1\ pair so \PR description\ passes, and obtain an AMD verification pass on the rebased head.
Imported from ivall/xcl. Originally posted by Toons29 on 2026-11-25T03:29:35Z.
Regression run of
867d3075on the retail title, for this PR's Regression run section. Both blocks are fromscripts/smoke.ps1as printed, not edited:mainon4178e888, this PR on its head commit with no uncommitted changes, same title and time.Against the limits in CONTRIBUTING.md: 101 % of
main's frames, 100 % of its peak commit, no crash, no device removal.AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0,
cargo build --release -p xcl, 60 s,XCL_NETWORK=0. This is a regression check only: it does not show whether the run reaches the code this PR changes.AI use: Claude Code (Claude Opus 5.5) built both trees and ran
scripts/smoke.ps1; I checked the blocks before posting.Imported from ivall/xcl. Originally posted by voiceovarian1-max on 2026-11-25T08:07:24Z.
Linux + NVIDIA check of
867d307on a local stack: a second offline pass reuses every pipeline of the first.Setup: RTX 4070 Ti 12 GB (NVIDIA 620.73.04), i7-14700K, CachyOS kernel 7.3.5, Proton Experimental's Wine (wine-11.0), vkd3d-proton v3.1 +
scripts/linux/vkd3d-proton-xcl.patch. Release,x86_64-pc-windows-gnu. Tree:main9e3831e+ #1315/#1316 + #867 + #871 + #877 + #1321 + #684 + #640 + #605 + #495 + this PR's diff (shaders.rshunk applied by hand: its context had moved).xcl shaders shaders.rpf --precompile --pipelines --only cs, restricted by a local name filter to the retail pack's records whose name holdscloth_(9 compute pipelines), 6 pipeline threads, vkd3d-proton's and NVIDIA's own caches off so that only XCL's blobs can make a second pass fast:After the first pass 6 of the 9 files carry the sampler suffix (
<hash>-<len>-<flags>-<sampler hash>.pso); the other 3 have no static samplers and keep the old name.I have no clean before/after of the collision itself on this tree: the title's refusals I saw at the time turned out to be the node mask (#1368).
Not tested: the PR's head as a whole, its unit tests, Windows, AMD.
AI use: Claude Code (Claude Fable 5.2) ran the runs and wrote this report; posted with the account owner's approval.
upstream-sync referenced this pull request2026-11-25 16:10:51 +00:00
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T00:26:39Z.
Re-verification on RTX 3060 Ti (Windows 11): still a merge conflict with current
mainon the new head — needs another rebase before it can be tested.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T05:41:34Z.
Triage (#1607) – head
867d307Main already does this: commit
ba44b52c("D3D12.X: key compute driver blobs by static samplers", merged with #2959) addeddriver_cache::name_for_root/path_for_root*, which append an fnv64 of the ordered sampler words and compare flag to the file name, andtranslated_compute_psoandshaders.rsuse them. Empty sampler lists keep the old name, as here.Recommendation: close (superseded by main commit
ba44b52).AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
Imported from ivall/xcl. Originally posted by throny on 2026-12-01T12:45:34Z.
Closing as superseded: this change is already on
main(ba44b52c). main keys compute driver blobs by static samplers (driver_cache::name_for_root* with fnv64 of sampler words), used by real.rs compute path and shaders.rs precompile (path_for_root); same suffix scheme and a distinct-names 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