D3D12.X: no disk driver blob for a graphics pipeline with static samplers on NVIDIA #3169
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3169"
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 KDenKC on 2026-11-28T15:32:00Z.
On NVIDIA, a translated graphics pipeline created from what another process made loses the linear filtering of its static samplers. In the retail title the tone map samples its 33³ LUTs through such a sampler, so a tone map made that way sampled them as point, giving contour bands (#505). On main, "what another process made" is two XCL artifacts:
CachedPSO), written by the preparation workers or an earlier run;This keeps translated graphics pipelines with static samplers (and the mesh pass of two-pass ones) off both on NVIDIA, and on an adapter whose vendor is not known (fail closed). Blobs this process keeps in memory still apply. It covers XCL's own artifacts of translated pipelines only: a title's own native pipeline library or cached PSO passes as before.
The cause and the fix are claudetools-gh's (#505 7235526172: RTX 5070 Ti, 621.01: levels and gaps per channel on a flat wall 10/2, 10/2, 13/1 with the tone map from a disk blob; 23/0, 16/0, 12/0 built without it or by the game process; 24/0, 17/0, 13/0 with the fix). They pointed out that the pipeline library is the same cross-process case (7236405511).
Part of #505.
What is in it (three commits;
real.rs,README.md, and tests)graphics_artifacts_across(device, static_samplers): a pipeline without static samplers always may take and keep what another process made. One with them may only on a known adapter that is not NVIDIA's (blob_across_processes, DXGI VendorId 0x10DE).adapter_vendorasks the device's adapter by LUID, and only for a pipeline with static samplers.translated_graphics_pso_once(descriptions and description-compatible streams): no library load or store, no disk blob. The library load and the disk path go throughgraphics_from_other_processes, the store throughkeep_for_other_processes;finish_two_pass: the mesh pass (with its pixel shader's samplers): no library load or store, no disk blob. The NGG compute pass keeps the compute rules as they are;every_translated_graphics_artifact_path_uses_the_static_sampler_policypins all graphics artifact call sites;adapter_info_caches_failed_lookups_and_keeps_identity_without_vendorpins failed-lookup caching and the vendor/identity result.a_static_sampler_graphics_pipeline_takes_and_keeps_no_artifact_of_another_process: with an entry of XCL's pipeline library and a blob file of a translated graphics pipeline there (a real device), the desc path's load and disk path take them, and its store keeps a new entry, only where the policy lets them across. It fails if a gate in those functions is removed.pipeline_library::load_graphics, so it is behind the same gate (a guarded pipeline is neither imported from the last run's library nor stored into this one). #3175's first-use manifest only logs names and holds no pipeline: nothing to gate there. #3244 changes the title's root signatures only, not the translated pipelines this gates.Tested
RTX 3090 VM, Windows 26300, NVIDIA driver 32.0.16.2124, Intel i7-10700T, Rust 1.99.1, debug,
XCL_NETWORK=0, heade3a81f91on main1c8b5514:a_static_sampler_graphics_pipeline_takes_and_keeps_no_artifact_of_another_process(1 passed),every_translated_graphics_artifact_path_uses_the_static_sampler_policy(1 passed), andadapter_info_caches_failed_lookups_and_keeps_identity_without_vendor(1 passed).--test-threads=4: 2,759 passed, 4 failed, 31 ignored; no crash. Failures:placed_title_textures_share_vram_and_preserve_pixelsand the threestream_recheck_*tests.1c8b5514, same isolated command/settings: 2,754 passed, 4 failed, 31 ignored; no crash, with the same four title-texture failures. The rebased head adds five passing tests and introduces no new failure.Regression run
Both arms used the seeded profile and held Enter. The 600 s JIT head arm for
e3a81f91is compared with the reused gate-batch-t main block (1c8b5514); the head's merge base is1c8b5514. Head: 1,977 frames, 0 removals, 48,493 MB peak commit; main: 1,724 frames, 0 removals, 47,581 MB. Both arms exited cleanly; frame and memory checks pass.Main block (verbatim):
#3169 head block (verbatim):
Not tested
compute_containerand the two-pass mesh compute pass, remain outside this graphics-only change and still use cross-process artifacts when their static-sampler root signatures do.every_translated_graphics_artifact_path_uses_the_static_sampler_policypins the desc, two-pass mesh, and stream call sites. It does not build a retail console shader pair with a static sampler.AI use
AI use: an agent swarm: Claude Opus 5.5, Claude Sonnet 5.5, GPT-6.2-Sol, Gemini 4 Neon and Gemini 4 Hydrogen (tools: Claude Code, Codex, Antigravity).
Generated with Claude Code
https://claude.ai/code/session_013oPUFCA9W9F8Qb5MPK33bR
Imported from ivall/xcl. Originally posted by andrewDoing on 2026-11-28T15:51:08Z.
RTX 5070 12 GB, NVIDIA 616.92, native Windows: A fresh process accepted the graphics PSO blob with a different sampler creation order, then returned the point-sampled value for a static linear sampler. With the PR's disk guard enabled, the same process setup returned the expected linear value on all 16 pixels.
At head
4c20b5c32f1c1458dbcfd7ab2e9de5cd95b8dead, I added a test-only native graphics fixture. A pixel shader samples halfway between black and white texels through a static linear sampler. Each row used a fresh process. PSO state, shader bytes, texture and sample coordinate were identical. In the last two rows the fixture created a point-sampler root signature first and kept it alive. Each process read back the entire 4×4 RGBA32F render target.The driver accepted the 2,274-byte blob in both replay controls. The fixture uses XCL's native adapter vendor lookup, ABI static sampler root signatures,
blob_across_processesandgraphics_pso_through_cache. It supplies synthetic DXIL and the cache path directly. It covers graphics PSO reuse and the resulting pixels. Console shader translation, two-pass mesh, title performance and retail image quality were outside this test. Four runs completed, zero skips.AI use: OpenAI Codex (GPT-6) designed and ran the native fixture and prepared this report.
Imported from ivall/xcl. Originally posted by Aniseto on 2026-11-28T18:02:04Z.
Ran the static-sampler disk-blob tests at
4c20b5c3on an NVIDIA Blackwell desktop part:Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, wave32 only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09), MSVC 14.44.35207, DXC 1.9.2609.5, debug build.
Both new tests pass: a graphics pipeline with static samplers skips the cross-process disk blob on NVIDIA, and other vendors keep theirs. The thread already has RTX 5070, 3090 and 5090 reports; this adds a 5070 Ti datapoint for the two focused tests. It is a pipeline-selection test, not a rendered tone-map comparison. The PR is a draft pending the sampler-prelude experiment.
Not tested: a retail title, the tone-map contour A/B, a paired smoke run, the full workspace suite, AMD and Intel GPUs, native wave64 hosts, Wine, release profile, game data.
AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used.
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T09:40:03Z.
Triage (#1607) – head
395d6bcNo open or merged PR makes the same change. #902 (same area, title similar) adds a disk cache for slow graphics blobs and has no vendor or static-sampler gating. Among the other #505 PRs, none skips the pipeline library and driver blobs for static-sampler pipelines on NVIDIA.
The gate (
graphics_artifacts_across) is applied to the load and the store in all three translated graphics paths: the desc path,finish_two_pass(the mesh pass) andtranslated_graphics_stream_once. In-processGRAPHICS_BLOBSstill apply. The desc-path store keeps its oldcacheablecondition throughacross.Minor:
adapter_vendorrepeatsuma_driver::vendor, adding a per-LUID cache. Reusing that helper would avoid a second DXGI lookup.Recommendation: keep open.
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 Foniass on 2026-12-01T09:53:07Z.
Review (head
395d6bcc, diff read, not a merge-check;PR descriptionred: its smoke block names9f81b661, and the text still calls that the head):acrossvalue tographics_from_other_processes/keep_for_other_processes. Changing ~8130 tolet across = cacheable;, or removing the filters at ~9495 / ~11041, would fail no test. andrewDoing's fixture that reproduces the wrong sampling isn't in the PR.compute_containerand the two-pass compute pass (abi_rs_for(tp.samplers)) still take blobs and library entries from other processes. Whether their sampling breaks too is unverified.XCL_PREPARE=0from the same translated cache and didn't reach the world. Preparation workers also build pipelines they can no longer hand off, as the description says.adapter_vendor(~9390) adds one besideADAPTER_VENDOR(real.rs~227 / ~1015),driver_cache::note_vendoranduma_driver::vendor, and #3516 (yours) addsgpu::adapter::note_main_vendor.driver_identityalready callsEnumAdapterByLuidper LUID and could record it once.Fine: the gate covers all three graphics paths (desc, both
finish_two_passcallers, stream), and gating the mesh form onps_samplersis right. Blobs kept in memory still apply. The vendor comes from each device's own adapter by LUID, so preparation and title agree, and an unknown vendor counts as possibly NVIDIA (fail closed). Disabling is a sound stopgap; #2326 (one fixed sampler order) is the structural fix.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 Foniass on 2026-12-01T20:58:56Z.
Follow-up review (head
656ede24, since395d6bc, diff read, not a merge-check):acrossfromgraphics_artifacts_acrosson the real adapter (real.rs~14307), so the live vendor lookup is exercised. The call sites are still not covered: making ~8131let across = cacheable;, or dropping themesh_acrossfilters at ~9496 / ~9498 / ~9671 or the filter at ~11041, fails no test, and the fixture that reproduces the wrong sampling is still not in the PR.compute_container(~6342 library load, ~6353 disk path) and the two-pass compute pass still take blobs and library entries from other processes; whether their static samplers break the same way is unverified.adapter_vendor(~9390) is unchanged besideADAPTER_VENDOR(~227 / ~1015); the first commit's subject is 92 characters; the disk-cache bullet inREADME.md(~370-372) does not mention the NVIDIA static-sampler exception.PR descriptionred: fixed; the smoke block names656ede24.New:
656ede24the test runs only the adapter's ownacrossvalue (~14307-14318). On AMD, Intel or WARP onlyacross == trueruns, so removing theif !acrossreturn ingraphics_from_other_processes(~9438) orkeep_for_other_processes(~9455) fails nothing there, including the maintainer's RDNA4 batch run (CI has no GPU). The previous version ran both values on any GPU; keep the live-policy assertion and also call both helpers withtrueandfalse.--test-threads=1plus e2e and listsgpu_direct_image_get_resinfo_d16as failing, which is not among main's failures on that machine; the full-workspace counts are from9f81b661.Fine: the gate still covers the desc path, the two-pass mesh pass and the stream path; the desc path keeps its old
cacheablecondition throughacross; an unknown vendor counts as possibly NVIDIA (fail closed); blobs kept in memory still apply.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 Foniass on 2026-12-01T23:02:14Z.
Follow-up review (head
ea02c3e6, since656ede24, diff read, not a merge-check; checks red):graphics_from_other_processesandkeep_for_other_processeswith bothfalseandtrueon any GPU (real.rs~14327-14346) and still checks the live policy.every_translated_graphics_artifact_path_uses_the_static_sampler_policy(~14355-14368) pins the text of the desc-path line (~8131), the twomesh_acrossfilters (~9512 / ~9514),mesh_stored(~9687) and the stream filter (~11057), but not the line that definesmesh_across(~9511), solet mesh_across = true;still fails nothing. It matches source text, not behaviour.note_guarded_static_sampler_pipeline(~9413) logs a running count, but no run reports it; README (~374-378) now says compute is outside the rule, which is still unchecked.adapter_vendorshares one DXGI lookup per LUID withdriver_identitythroughadapter_info(~9335-9351) and README describes the NVIDIA exception; the first commit's subject is still 92 characters.PR descriptionis red again.New:
Tests:commit changes runtime behaviour.ea02c3e6also replaces thedriver_identitycache withadapter_info(~9335-9351) and adds an info log. A failed DXGI lookup used to be cached asNoneand now is not, so every pipeline creation on that adapter makes a DXGI factory again; and a failedGetDescnow drops the driver identity too, which turns off disk blobs and pipeline-library keys. That needs its own commit (or a squash into theD3D12.X:one) and a line in the description.finish_two_passortranslated_graphics_stream_oncewould fail no test; the source-anchor test now catches most of those lines.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 Foniass on 2026-12-02T06:48:24Z.
Follow-up review (head
ef59339c, sinceea02c3e6, diff read, not a merge-check; checks red):Tests:commit changed runtime behaviour: partly fixed. Theadapter_inforefactor now lives in theD3D12.X:commit, and a failed lookup is cached again while a failedGetDescleaves only the vendor unknown (adapter_info_parts, withadapter_info_caches_failed_lookups_and_keeps_identity_without_vendor). The top commitef59339cis still titledTests:but still changes runtime code: theadapter_info_partssplit, theGUARDED_STATIC_SAMPLER_PIPELINEScount and its log line (real.rs), and a README paragraph.mesh_across(~14376). It still matches source text, not behaviour.ef59339cagainstmain1c8b5514, but noxcl-smokepair for this head (the reasonPR descriptionis red), and the description says the earlier pair does not validate it.New: none.
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 KDenKC on 2026-12-02T06:49:08Z.
@Foniass thanks for the follow-up. The updated head is
ef59339c.every_translated_graphics_artifact_path_uses_the_static_sampler_policy, which pins the descriptor, two-pass mesh, and stream call sites, anda_static_sampler_graphics_pipeline_takes_and_keeps_no_artifact_of_another_process, which tests both allow and deny behavior for library/disk loads and stores.adapter_info_caches_failed_lookups_and_keeps_identity_without_vendorcovers per-LUID failed factory/adapter caching and preserves a driver identity whenGetDesccannot provide a vendor. The retail wrong-sampling fixture and a visual reproduction are still not included.compute_containerand the two-pass mesh compute pass remain able to use cross-process artifacts. There is no compute-specific reproduction in this change.GetDescleaves the vendor unknown without dropping the independent driver identity. The runtime change is in the D3D12.X commit; its subject is 66 characters, and the README documents the graphics-only NVIDIA rule.ef59339ccompleted without a crash: 2,735 passed, 5 failed, 31 ignored. The failures weregpu_direct_image_get_resinfo_d16plus the fourtitle_texturestests. The isolated main1c8b5514lib run also completed without a crash: 2,754 passed, 4 failed, 31 ignored; it had the same four title-texture failures. The additional D16 failure is on this branch's older9dfbe3eabase and was fixed later on main by466b75c5; the count comparison is not patch-only. No full workspace suite has run onef59339c.656ede24vs9dfbe3ea; it does not validate this head. A fresh pair foref59339cis queued after the combined-stack runs. No current-head title result is claimed.AI use: an agent swarm: Claude Opus 5.5, Claude Sonnet 5.5, GPT-6.2-Sol, Gemini 4 Neon and Gemini 4 Hydrogen.
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-02T07:03:31Z.
Follow-up review (head
e3a81f91, sinceef59339c, diff read, not a merge-check; checks red):git range-diffshows all three commits identical tode8a9d23/6f5614ca/ef59339c; this push only rebases onto a newermain. Still open: theTests:commit's runtime changes and the missingxcl-smokepair for this head.New: none.
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 KDenKC on 2026-12-02T09:44:23Z.
@Foniass the 600 s JIT smoke pair for
e3a81f91is now recorded in #3169’s Regression run: 1,977 frames for the head versus 1,724 for main, with zero removals in both arms (48,493 MB versus 47,581 MB peak commit).AI use: an agent swarm: Claude Opus 5.5, Claude Sonnet 5.5, GPT-6.2-Sol, Gemini 4 Neon and Gemini 4 Hydrogen.
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.