d3d12: discard stale pipeline libraries across driver updates and self-heal refused entries (D3D12-PIPELINE-LIBRARY-DRIVER-STAMP) #2789
Code
Clone this repository
Checkout
From your project repository, check out a new branch and test the changes.
git fetch -u origin "github-pr/2789:github-pr/2789" git switch "github-pr/2789"
Open
leonida/mandy
zmasi wants to merge 12 commits from
github-pr/2789 into main
pull from: github-pr/2789
merge into: leonida:main
leonida:main
leonida:github-pr/3295
leonida:beta
leonida:docs/changelog-3483-3500
leonida:github-pr/3294
leonida:github-pr/2975
leonida:github-pr/2815
leonida:feat/gate-driver-start
leonida:feat/skip-pipelines-release
leonida:perf/lazy-compare
leonida:perf/mwaitx-wait
leonida:test/prio-ceiling-main
leonida:fix/ab-cpu-stdout
leonida:fix/gate-old-crashes
leonida:diag/ab-cpu
leonida:test/main-0312
leonida:github-pr/3291
leonida:diag/indirect-clamp-census
leonida:feat/barrier-enhanced
leonida:perf/texture-frame-ceiling
leonida:perf/dstorage-threads
leonida:fix/console-queue-dma-tables
leonida:fix/port-descriptors-record-parts
leonida:fix/frame-waits-fence
leonida:fix/console-sampler-words
leonida:fix/graphics-userdata-spill
leonida:fix/xg-reserved-layout-rotation
leonida:fix/barrier-console-flags
leonida:fix/switches-wait-test-child
leonida:test/list-value-waits
leonida:test/lot-gxdk-0412
leonida:fix/bvh-compacted-size
leonida:docs/i18n-quickstarts
leonida:feat/native-pipeline-slots
leonida:fix/clippy-leonida-gpu
leonida:fix/list-value-producers
leonida:fix/descriptor-page-straddle
leonida:fix/xmem-low-window
leonida:fix/ffx-jitter-never-zero
leonida:fix/run-stdout-closed
leonida:github-pr/2892
leonida:github-pr/2896
leonida:feat/warm-save-every
leonida:github-pr/2980
leonida:github-pr/2994
leonida:github-pr/3005
leonida:github-pr/3010
leonida:github-pr/3136
leonida:github-pr/3303
leonida:github-pr/3220
leonida:github-pr/3143
leonida:github-pr/3330
leonida:github-pr/3226
leonida:github-pr/3187
leonida:carry/3395
leonida:github-pr/2946
leonida:github-pr/2947
leonida:github-pr/2945
leonida:github-pr/2983
leonida:github-pr/3001
leonida:github-pr/3372
leonida:github-pr/3128
leonida:github-pr/3296
leonida:github-pr/2588
leonida:github-pr/3119
leonida:github-pr/3378
leonida:fix/crash-diagnostics
leonida:feat/dlss-mip-bias
leonida:fix/retired-out-of-order
leonida:fix/dxr-postbuild-barrier
leonida:fix/amd-relay-default
leonida:fix/removed-report-wait
leonida:feat/heap-twin
leonida:feat/vram-margin
leonida:github-pr/2472
leonida:github-pr/3123
leonida:github-pr/3088
leonida:assets/annonce-v1
leonida:github-pr/2794
leonida:github-pr/3300
leonida:github-pr/3304
leonida:github-pr/3308
leonida:github-pr/3367
leonida:github-pr/3369
leonida:fix/launcher-dlss-diagnostics
leonida:github-pr/3269
leonida:github-pr/2957
leonida:github-pr/3205
leonida:fix/crash-zero-guard
leonida:github-pr/3185
leonida:github-pr/3099
leonida:github-pr/3104
leonida:github-pr/3348
leonida:github-pr/3379
leonida:github-pr/3377
leonida:perf/darner-title-priority-ceiling
leonida:github-pr/3376
leonida:gh-readonly-queue/main/pr-3311-b5c45b663dbc5a9c3532bb3f307e5f81b32faefa
leonida:gh-readonly-queue/main/pr-3088-af22e7847ff5808f72d1a1881c24be2fafd20b54
leonida:gh-readonly-queue/main/pr-3123-7f3fa026a94c6646e89244f28e1ce22290361867
leonida:github-pr/3373
leonida:github-pr/3368
leonida:github-pr/3198
leonida:gh-readonly-queue/main/pr-3354-637baa0b77ba47222e7280b17c1a59c6a1781d57
leonida:gh-readonly-queue/main/pr-3365-d7a0e0196a43834813014b4bd3aa5502a8263b14
leonida:gh-readonly-queue/main/pr-3361-5dfe8bbd05ed12fb2f2e1718d9af77a7c5f46fd8
leonida:gh-readonly-queue/main/pr-3366-8da9148204e9d12c585efa9ac2b7cc1ab08c7682
leonida:github-pr/3346
leonida:github-pr/3375
leonida:github-pr/2958
leonida:github-pr/3151
leonida:github-pr/3307
leonida:github-pr/3278
leonida:github-pr/3374
leonida:fix/runtime-test-conservative-fixtures
leonida:github-pr/3366
leonida:ci/shard-semantic-linux
leonida:github-pr/3354
leonida:docs/fg-limit-fps-switch
leonida:github-pr/3365
leonida:fix/read-file-hard-link
leonida:github-pr/3364
leonida:fix/book-slot-heap-never-read
leonida:github-pr/3361
leonida:github-pr/3263
leonida:github-pr/3360
leonida:github-pr/3353
leonida:github-pr/3331
leonida:fix/alias-later-queued-submissions
leonida:github-pr/3352
leonida:github-pr/3228
leonida:github-pr/3349
leonida:claude/gallant-sagan-aamatr
leonida:github-pr/3200
leonida:github-pr/3132
leonida:github-pr/3323
leonida:github-pr/3332
leonida:github-pr/3340
leonida:github-pr/3311
leonida:github-pr/3334
leonida:github-pr/3297
leonida:github-pr/3256
leonida:github-pr/2567
leonida:github-pr/2851
leonida:d3d12/agility-sdk-621
leonida:github-pr/3164
leonida:github-pr/3114
leonida:github-pr/3050
leonida:github-pr/3113
leonida:github-pr/3326
leonida:github-pr/3144
leonida:github-pr/2642
leonida:github-pr/3072
leonida:github-pr/2643
leonida:github-pr/3009
leonida:github-pr/3035
leonida:github-pr/3031
leonida:github-pr/2686
leonida:github-pr/2834
leonida:github-pr/3321
leonida:github-pr/3325
leonida:github-pr/3290
leonida:github-pr/3324
leonida:github-pr/3130
leonida:claude/fervent-curie-m19lnr
leonida:github-pr/3309
leonida:github-pr/3305
leonida:github-pr/3306
leonida:github-pr/3302
leonida:github-pr/3301
leonida:github-pr/3345
leonida:github-pr/3211
leonida:github-pr/3027
leonida:github-pr/3286
leonida:github-pr/3235
leonida:github-pr/3265
leonida:github-pr/3275
leonida:codex/skip-no-hit-ray-passes
leonida:github-pr/2823
leonida:github-pr/2911
leonida:github-pr/3262
leonida:github-pr/3125
leonida:github-pr/3206
leonida:github-pr/3250
leonida:github-pr/3238
leonida:github-pr/3188
leonida:github-pr/2952
leonida:github-pr/3217
leonida:github-pr/3168
leonida:t3/preserve-fsr-sdk-restart-path
leonida:t3/propagate-host-failure-hresult
leonida:github-pr/3209
leonida:t3/launcher-custom-parameters
leonida:github-pr/3207
leonida:github-pr/3183
leonida:github-pr/3160
leonida:github-pr/3201
leonida:ci/less-to-run
leonida:github-pr/2930
leonida:github-pr/2797
leonida:github-pr/2999
leonida:perf/native-compute-shader-forms
leonida:github-pr/3191
leonida:github-pr/3011
leonida:github-pr/3019
leonida:github-pr/2996
leonida:gh-readonly-queue/main/pr-2789-45dc41f95c1cd0dcc29c2c50582e0e9af8a77259
leonida:claude/blissful-franklin-ukp7ag
leonida:github-pr/3141
leonida:github-pr/3156
leonida:github-pr/3150
leonida:github-pr/3153
leonida:github-pr/3163
leonida:github-pr/3142
leonida:github-pr/3139
leonida:github-pr/2841
leonida:github-pr/3069
leonida:github-pr/3098
leonida:github-pr/3107
leonida:github-pr/3071
leonida:github-pr/2774
leonida:github-pr/2889
leonida:github-pr/3075
leonida:github-pr/2661
leonida:github-pr/3064
leonida:github-pr/3054
leonida:github-pr/3049
leonida:github-pr/2855
leonida:github-pr/2943
leonida:github-pr/3016
leonida:github-pr/2887
leonida:github-pr/3006
leonida:github-pr/3003
leonida:github-pr/2993
leonida:notes/card-time-and-plant-flicker
leonida:github-pr/2989
leonida:feat/vulkan-rs
leonida:github-pr/2985
leonida:github-pr/2951
leonida:github-pr/2982
leonida:github-pr/752
leonida:github-pr/792
leonida:github-pr/2877
leonida:github-pr/2654
leonida:github-pr/2893
leonida:github-pr/2948
leonida:github-pr/2944
leonida:github-pr/2919
leonida:github-pr/2915
leonida:archive/ci/less-to-run/20261202T1121Z
leonida:github-pr/2800
leonida:github-pr/2822
leonida:github-pr/2833
leonida:github-pr/2840
leonida:github-pr/2831
leonida:github-pr/2832
leonida:github-pr/2801
leonida:github-pr/2890
leonida:github-pr/2891
leonida:github-pr/2664
leonida:github-pr/2807
leonida:rt-call-trace
leonida:github-pr/2755
leonida:perf/ahead-split
leonida:github-pr/2587
leonida:github-pr/2698
leonida:github-pr/2609
leonida:github-pr/3219
leonida:docs/readme-runtime-proposal
leonida:github-pr/2017
leonida:github-pr/1741
leonida:github-pr/1667
leonida:codex/coord-claim-check-20261124-7e48
No reviewers
Assignees
Clear assignees
No assignees
Labels
Clear labels
bug
Something isn't working
dependencies
Pull requests that update a dependency file
documentation
Improvements or additions to documentation
enhancement
New feature or request
missing claim
Needs a claim in #14
needs rebase
Conflicts with the base branch: rebase it on main
needs-triage
Needs maintainer evaluation before the next triage state
question
Further information is requested
ready-for-agent
Fully specified and ready for an AFK agent
submodules
Pull requests that update submodules code
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
Projects
Clear projects
No items
No project
Milestone
Clear milestone
No items
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Reference
leonida/mandy!2789
Loading…
Reference in a new issue
No description provided.
Delete branch "github-pr/2789"
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?
This pull request has changes conflicting with the target branch.
Merge manually to resolve the conflicts.
Reviewers 0 approvals
Details
This pull request has changes conflicting with the target branch.
Merge manually to resolve the conflicts.
d3d12/crates/leonida-gpu/src/pipeline/library.rsView command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Summary
Fixes #2781 (
D3D12-PIPELINE-LIBRARY-DRIVER-STAMP).Across NVIDIA driver updates (
616.64 -> 621.01),ID3D12Device1::CreatePipelineLibrarycan accept the outerhost-pipelines.bincontainer at startup whileLoadGraphicsPipeline/LoadComputePipeline/LoadPipelinesubsequently reject every stored blob withE_INVALIDARG(0x80070057). Whenpipeline()recompiled each refused PSO (410–5,228 msper hitch) and calledStorePipeline(name, &pso),StorePipelinealso failed withE_INVALIDARGbecause anID3D12PipelineLibrarycannot overwrite an existing name — leavingadded == 0(or re-serializing the stale blobs back to disk) and keeping the mismatched driver's library alive until device removal (0x887A0005).This change adds two defense-in-depth layers inside
d3d12/crates/leonida-gpu/src/pipeline/library.rs, controlled byLEONIDA_LIBRARY_DRIVER_CHECK(on by default;LEONIDA_LIBRARY_DRIVER_CHECK=0restores the previous behavior):Proactive adapter & driver stamp sidecar (
host-pipelines.driver):vendor,device,subsys,revfromDXGI_ADAPTER_DESC1plusHost::driver()whendriver != 0) alongsidehost-pipelines.bin.open_in(), ifhost-pipelines.drivernames a different adapter or driver,host-pipelines.next,host-pipelines.bin, andhost-pipelines.driverare discarded upfront beforeCreatePipelineLibraryis called, and an empty library is started cleanly.<stamp> older=1on save until replaced, preservingOrigin::doubtful()for Layer 2.Reactive self-healing swap (
Library::keep/stale/begin_anew):RwLock<Active>(keepingsavingseparate soSerializenever blocks loads).Load*Pipelineon generationg,create()succeeds,StorePipeline(name, &pso)fails withE_INVALIDARGon the same generationgwithoutnamehaving been stored in this run (Seen::stored, guarded undersame_name(name)), and a fresh empty library acceptspso,begin_anew()atomically swaps in the fresh library, replays non-title static-sampler probe pipelines (Seen::besideforpipeline::places), retains any mappedBlobinLibrary::retired(releasing its working-set pages viaVirtualUnlocksotrim()andremoval_note()never see an unmapped view), and marks the library dirty (anew) sosavereplaceshost-pipelines.binand writes this driver's plain stamp.std::ptr::null()) toCreatePipelineLibrarywhenbytes.is_empty()(avoiding Rust's dangling0x1empty-slice pointer on VKD3D-Proton), uses unique staging filenames on save, and removes any stalehost-pipelines.nextwhen an in-place rename succeeds.Verification
Tested on Windows 11 (
10.0.26200), NVIDIA GeForce RTX 3090 (driver610.88, UMD32.0.16.1088), and D3D12 WARP (0x1414):16tests inpipeline::library::tests,47passed acrosspipeline::):with_the_check_off_a_refused_pipeline_is_made_in_every_run(reproduces repeated0x80070057on bothLoadComputePipelineandStorePipeline,added == 0, unchanged file across restarts whenLEONIDA_LIBRARY_DRIVER_CHECK=0).a_pipeline_neither_loaded_nor_replaced_begins_the_library_anew(verifies swap +0.005–0.015 mssubsequent loads across both mapped and held blobs).a_library_of_another_driver_is_not_handed_to_the_hostanda_library_of_another_driver_that_cannot_be_deleted_is_not_called_this_drivers.a_name_stored_in_this_run_does_not_begin_the_library_anew(4-thread barrier benign-race test),threads_that_find_it_out_together_begin_the_library_anew_once(8-thread single-swap race test), andpipelines_kept_beside_the_titles_go_into_the_library_begun_anew(placesprobe carry-over).cargo clippy -p leonida-gpu --all-targets --lockedand--features diagnostics --all-targets --locked:0warnings inlibrary.rs; single touched file (host.rsandmake.rsuntouched).python -I tests/test_d3d12_switches.py(19/19passed) andpython -I scripts/check_no_game_data.py(rc=0).AI-assisted: authored with Claude Fable 5.2, independently reviewed with Gemini 4 Neon (XHigh), and verified with Gemini 4 Carbon (High).
Independent Windows check of
e38238383on currentmain640b0d0df(no conflict, merge5ec44016e). Native Windows 11, MSVC x64, Rust 1.98.1, with a hardware D3D12 device, so the library tests that make real pipelines throughCard(host().device→ID3D12Device1) ran rather than skipped.cargo test -p leonida-gpu --lib: 609 passed, 0 failed, 54 ignored.mainlists 653 tests, the merge 663, so the 10 newpipeline::librarytests are the only addition.pipeline::librarytests, the new ones included, run 200 times on their own in the release build with 16 test threads: 0 failures. That coversthreads_that_find_it_out_together_begin_the_library_anew_once,a_library_of_another_driver_is_not_handed_to_the_hostandconcurrent_write_atomically_never_fails_or_truncates.AI-assisted: yes
A heads-up for this pull request: the page of D3D12 switches (
d3d12/docs/switches.md) is written bytools/d3d12_switches.pyfrom the sources ofd3d12/, and 1 name this pull request reads is not on the page yet:LEONIDA_LIBRARY_DRIVER_CHECK.Nothing checks that today, so the page has drifted before (it was a name behind when this was measured). A test that checks it is waiting to be opened (DOCS-SWITCHES-PAGE-CHECK), and it would make this pull request's CI red until the page is written again. One command does that:
It writes the page with the names in it and nothing else; the diff is the new rows.
Thanks for the heads-up @Neutron-0 — regenerated
d3d12/docs/switches.md(LEONIDA_LIBRARY_DRIVER_CHECK,--checkrc 0) in573f7f216.AI-assisted: Gemini 4 Carbon.
Independent check of
573f7f216onc60ce461a. All 16 pipeline-library tests completed on both GPUs, using the Windows MSVC test binary under Wine and vkd3d-proton 3.1.0 withVKD3D_CONFIG=pipeline_library_app_cache. GPUs were AMD Raphael (RADV 26.3.1) and RTX 4070 SUPER (NVIDIA 620.73.4).The test cases cover a differing driver note, refusal of a cached compute pipeline with the check off, saving and then reloading a rebuilt entry with the check on, and concurrent detection rebuilding the library only once. The revisions to the library state were synthetic. A native Windows driver upgrade was outside the run.
AI-assisted with OpenAI Codex.
Independent check of
c44b20fecmerged cleanly onmain(1e3e316c5), on native Windows 10 Pro 22H2 (build 19045) + NVIDIA GeForce RTX 5070 12 GB (driver621.40, Ryzen 9 5950X):cargo test --locked -p leonida-gpu --lib pipeline::library -- --nocapture: 16 passed, 0 failed (live GPU self-heal tests ran on RTX 5070 /621.40, printingloaded from the library begun anew in 0.009 msand0.008 ms).cargo test --locked -p leonida-gpu --lib pipeline:: -- --skip depth_bounds_pipeline_loads_and_filters_draws: 47 passed, 0 failed, 8 ignored (depth_bounds_pipeline_loads_and_filters_drawsskipped for the separate Win10 inboxd3d12.dllSM 6.6 flag issue tracked in #2855).python -I tools/d3d12_switches.py --check d3d12/docs/switches.md: exit0;test_d3d12_switches.py: 19 passed, 0 failed.pipeline/library.rs.AI-assisted: Antigravity
Independent verification on an RTX 4090, driver 621.24 (32.0.16.2124), Windows 11 - by the method in
AGENTS.md(PR ref, merge-tree, apply it onmain, run what it touches).Applied on
main1fff69129:One thing worth knowing: a commit-by-commit cherry-pick of the range (
3dd1bf42..c44b20fec, 8 commits) does conflict inpipeline/library.rs-mainmoved under it. The squash-merge is clean, so merging is fine; a rebase would be needed only if the branch is to be kept linear.What it does here:
What I could not test, and would not claim: the case the issue is about - a library written under one driver and opened under another. Downgrading this machine's driver is not something I will do to a working setup, so the 616.64 -> 621.01 transition is verified only through your own tests (
a_library_of_another_driver_is_not_handed_to_the_hostand the two that begin the library anew), which is a fake stamp, not a driver that changed. And the title was not run with it.What that leaves as risk: the stamp is read from
DXGI_ADAPTER_DESC1, and the case that matters is a driver update that keeps the same device id and changes only the UMD version - if the driver applies its version elsewhere than the fields you read, the stamp would not move and the library would still be handed over. Worth one line in the PR saying which fields change on an update, since the person who can check it is someone who upgraded and kept the old file.AI-assisted: yes - DeepSeek v4.1 (flash).
Written with an AI assistant.
At 4cec236e4 I queried the production stamp(host) in three fresh Windows processes using one diagnostics build. The RTX 5070 returned vendor 0x10de, device 0x2f04, driver 9007199255791260. WARP returned vendor 0x1414, device 0x008c, driver 2814751477606228. Returning to the 5070 reproduced the complete first stamp byte for byte.
I then exercised both on-disk mismatch tests on the 5070, substituting that measured WARP stamp in the test sidecar. With the check enabled, the ordinary case discarded the stale library, saved a rebuilt pipeline under the current stamp and loaded it on reopen. With an exclusive handle on the stale library file, the save could not replace it. The file was not relabeled as current, and reopening started with an empty library. Both tests reached the readback assertions; I added temporary test-only output to distinguish that from an early return.
These are real D3D12 pipeline files in temporary directories, with deliberately mismatched metadata. No driver installation was changed. Codex-assisted.
This pull request touches the render path, so it needs an in-game run before it can be merged: unit tests and CI do not catch rendering regressions (a device loss after an earlier merge is why this gate exists).
Could you, or anyone with a working setup, post a run report on the current head merged onto current
main:mainSHA it was merged onto;mainalone for comparison, if you can.Please do not attach logs or screenshots that show game content. If a run on this exact head is already posted, a link to it in a reply is enough.
AI-assisted (Claude Code).
Tested this PR on RTX 3090, driver 621.14 (32.0.16.2114), Win11, -SeriesS -NoFrameGen:
pipelines=Older(unstamped)Important: this library was created fresh last night by the SAME driver (621.14),
after I had moved the previous one aside. So on this machine the blobs are refused
without any driver change; the stamp alone can't catch it, and the self-heal swap
did not trigger either.
Log attached.
play-1202-164536.log
Head tested: 4bd128a8c7.
Numbers for comparison, same PC / save / area, -SeriesS:
On main, 2 of the 4 runs had -FsrFrameGen and 2 had -NoFrameGen; all lost the device.
The PR run was -NoFrameGen.
Read the 3090 report against what this branch actually stamps, because it separates into two things that are not this change.
1. The head is right, the merge is not the requested one.
4bd128a8c7is the current head, as the report says - but it was merged with amainthat has since moved: the branch is 60 files behindorigin/mainright now (docs/lua-modding.md,scripts/play-linux.sh,tests/*), so a report on this head is not a report on "the current head merged onto current main". A fresh merge + a re-run is what @MoonEyes asked for, and it is cheap.2. The device removal is not this change.
device removed (0x887A0005) after ~5 minis #3068's exact shape ("after 7–18 min of play, right after a masked-twin ..."), and it happened onmainbefore this branch existed. Whatever the library does, that will still be there, so the two should not be read together.3. The 35 loads that failed are the interesting part, and the stamp does not explain them. What the note records is "one line that names the adapter and driver" (
library.rs:584-586), andolder=1marks a library taken over from before the check existed. A library made by another build of the layer on the same card and driver passes that check and is loaded, and the reporter says this one was "created fresh last night by the SAME driver" - so a library from a different build of the layer is exactly the case the stamp cannot see.But it is not simply "another build" either: on this machine (RTX 4090, driver 621.24) a library written by one build loads in another -
540 of 540 in the pipeline library, written in 21 sin aleonida warmrun against last night's cache. So the build is a variable, not the whole story, and0x80070057(E_INVALIDARGout ofLoadPipeline) says those particular blobs were refused rather than the library being from elsewhere.What would settle it, in that log:
host-pipelines.drivernext tohost-pipelines.bin- it names the adapter and driver, so it says whether the check thought the library was its own;the library did not load it ... (0x80070057)line with its pipeline name, and whether the same pipelines were made again in that run (they would appear in thewarm/first bindlines);AI-assisted: yes - DeepSeek v4.1 (flash).
Written with an AI assistant.
Checked the log as asked: the refused loads are new pipelines, not stale blobs.
Example: [mesh 024bb426570bd221, pixel 1dc40c638c94c4b0] "did not load it (0x80070057)".
The same log shows
shader translated stage="mesh" hash=024bb426570bd221and its first bindat 14:50:08, i.e. first time in that run. All 35 lines are in the dump printed at the removal
("ms before"), from the last ~30 s, after a burst of new pipelines in a new area.
host-pipelines.driver:
vendor=0x10de device=0x2204 subsys=0x40431458 rev=0xa1 driver=9007199255791682 older=1
(= 32.0.16.2114, the installed 621.14)
So the library looks fine here; my device loss matches #3068 rather than this PR.
AI-assisted: -Claude Opus 5.5 helped analyze the logs and draft all comments.
RUN (independent run on Windows, #2789 head
4bd128a8c, merged locally intomain5b1fff821withgit merge --no-ff)Machine: RTX 4060, driver 32.0.16.1088. Only
leonida-gpuwas built (release,--locked). The pipeline library tests make real pipelines on the card; they return early when there is no GPU, and here there is one.Red (main's
library.rsswapped back into the merged tree, same command:cargo test -p leonida-gpu --release --locked --lib -- pipeline::library)git statusclean.Green (merged tree)
-- pipeline::library: 16 passed, 0 failed (the 6 of main plus 10 new, among thema_library_of_another_driver_is_not_handed_to_the_host,..._that_cannot_be_deleted_is_not_called_this_drivers,a_library_this_driver_made_whole_is_not_begun_anew,the_line_beside_the_file_says_what_is_known_of_the_library,the_adapter_and_driver_are_named_on_one_line).leonida-gpulib: 713 passed, 0 failed, 59 ignored (the ignored ones are measurements or marked so in the code).Mutations (each one edit in
pipeline/library.rs, then the 16 library tests)if false && driver_check()inopen_in): 2 fail (a_library_of_another_driver_is_not_handed_to_the_host,..._that_cannot_be_deleted_...). Killed.Noted): 4 fail. Killed.discardno longer deleteshost-pipelines.bin): 2 fail. Killed.driver=written with the adapter revision): 1 fail,the_adapter_and_driver_are_named_on_one_line. Killed, but only by that pure test: the on-card tests build both sides with the same function, so they would not see it.Origin::Empty if replaced => return): 2 fail. Killed.5 of 5 killed.
Review
host-pipelines.driverdiffers from the current one, sodiscarddeleteshost-pipelines.next, then the library, then the line, and an empty library is begun in the same run. No crash, nothing handed to the host; every pipeline is compiled once and the first save writes a library and a line for the new driver. The test then reloads it and getsOrigin::Notedwith the pipeline loaded from the file.older=1) is read as another driver, so the library is discarded. The line is escaped and cut to 160 characters before it is logged. Non-UTF-8 bytes are read lossily, so they also mismatch.Unnoted), so nothing changes for those. The old fallback then covers it: when a load is refused and the replacement cannot take the name, the library is begun anew once. This is the case of anyone who already has a stale file from before this PR; they are fixed on the first refusal, not at open.LEONIDA_LIBRARY_DRIVER_CHECK=0returns to the old behaviour; it is inswitches.md.Host::driver(); I did not check it moves between two NVIDIA builds that share a version number (hotfix reinstall).Not covered: no in-game run from me; the 3090 run is pending. Not run: the other crates, and the real driver-update path (the tests write an older line by hand; no second driver was installed).
Verdict: PASS on the tests and the review. Red is shown by mutation, not by main's own tests.
AI-assisted (Claude Code).
RUN (in game, gate-style, as asked by MoonEyes): head 4bd128a8c tested in a batch with #2643 (2cea6871c), #3031 (a47b86855), #2789 (4bd128a8c) and #2661 (1b3f3dee0), all merged with
git merge --no-ffontomain23a51c494 (no conflict; the only file the four share isd3d12/docs/switches.md). Built withdiagnostics,mimalloc, targetx86_64-pc-windows-msvc. RTX 3090 24 GB, NVIDIA 621.40, Windows 11 Pro (build 26300).Launcher defaults, Series S settings,
-NoDlss -NoFrameGen, standing at the save; a warm-up run first (the batch changes the translator, so everything was re-translated), then one run of 420 s with the memory safety stop:This pull request's own lines:
host-pipelines.driverwas written during the warm-up (stamp with the adapter and driver,older=1as the change describes for a pre-existing library), the library then loaded (pipelines=Older) and saved with 2,330 pipelines loaded and 47 made, and no "the library did not load it" line appeared. No driver change was exercised here (the driver did not change between runs).Verdict: PASS for the batch (a pass covers each of the four; a failure would not have said which). Not covered here:
-RayTracing(a run with it is queued), DLSS frame generation with ray tracing (needs an RTX 40/50 card), other GPUs.AI-assisted: Claude Code (Claude Opus 5.5)
Merging. Head
4bd128a8cmerges cleanly withmain5b1fff821and does not force a rebase of #2566. In-game gate: enlight3d's batch run on the RTX 3090 with this head 4bd128a8c merged onto main (lot A: #2643, #3031, #2789, #2661), PASS, comment 7352941075. Independent red/green by MoonEyes' agent on 4bd128a8c: pipeline::library 16 passed, leonida-gpu lib 713 passed; 5 of 5 targeted mutations killed (stamp not compared, stamp ignored on mismatch, old file kept, wrong driver field, line never written), comment 7352861392. CI green incl. no-game-data. Not claimed as the fix for the device-removed reports, which point at #3068. Merged by MoonEyes.AI-assisted (Claude Code).
Verification triage of #2789
Head
4bd128a8cis already verified on this exact head: ninjalegxd, MoonEyes (independent run) and enlight3d (in-game gate run). MoonEyes posted "Merging" on this head at 2026-12-02 17:12. The PR is still open, its merge state is nowclean, and CI passes (6/6). No new run here (Windows-only). Verdict: ready (already verified; a maintainer is merging it).AI-assisted verification: Claude Opus (Claude Code), separate agent per batch.
Generated by Claude Code
Merged
origin/main(516c9eaabf) intob511f5c930strictly to regenerated3d12/docs/switches.md(needs rebase);d3d12/crates/leonida-gpu/src/pipeline/library.rshas a byte-identical diff againstorigin/maincompared to4bd128a8c7.AI-assisted: Gemini 4 Carbon (High) and Gemini 4 Neon (XHigh).
RUN (in game, batch of two pull requests), each head merged with
git merge --no-ffonto main516c9eaab, in one build: #2789b511f5c93, #307298a532249. RTX 4060 8 GB, driver 610.88, Windows 11. Series S,-Resolution 1080, frame generation 2x,-PrecompileUsed, the same walking route as the other runs on this machine, 330 s after reaching the world.For reference, the same machine and route rendered 13.3 to 17.2 fps on other batches in the last day. These fps are a check that nothing fell over, not a measurement of a gain.
Verdict: PASS for the in-game gate (300 s or more in the world, no device loss) for this batch, on the heads listed above. If one of these pull requests changes its head, this run no longer covers it.
Limits: one run; arrival in the world was driven by keys and not checked on pictures;
-PrecompileUsedwas used, so the default start (every known pipeline precompiled) was not exercised. Both were in earlier batches on other heads; this run covers their current heads. #2789's discard of stale pipeline libraries only acts after a driver update; the driver did not change here, so that path was not exercised.AI-assisted (Claude Code).
Integration check on
b511f5c9. The head merges cleanly with both #3286 (8c56cb6b) and #2948 (5284c6ea) in separate pairs. I built the #3286 pair for Windows MSVC and ran the synthetic driver-stamp formatting test under Wine. It passed, as did the catalog checker and all 20 catalog tests.In the merged #3286 source,
Host::driver()queries the adapter stored from the created device’s LUID. The pipeline library also finds its descriptor via that device LUID. Thus an explicit WARP selection or a change to the default adapter picker still sources both fields from the device that was actually created. The run covered the CPU stamp fixture. Live adapter switching is outside that test’s scope. AI-assisted with OpenAI Codex.Merged
origin/main(6e97990505,#3318) into4cd9d71f80strictly to regenerated3d12/docs/switches.md(needs rebase);d3d12/crates/leonida-gpu/src/pipeline/library.rshas a byte-identical diff againstorigin/maincompared tob511f5c930.AI-assisted: Gemini 4 Carbon (High) and Gemini 4 Neon (XHigh).
RUN (in game, third party, batch of five pull requests), each head merged with
git merge --no-ffonto mainb053a1813, in one build: #2686c5269801b, #26432e0b23a00, #27894cd9d71f8, #30720f1e26355, #299991537d2af. RTX 4060 8 GB, driver 610.88, Windows 11. Series S,-Resolution 1080, frame generation 2x,-PrecompileUsed, the same walking route as the other runs on this machine, 330 s after reaching the world.For reference, the same machine and route rendered 13.3 to 17.6 fps on other runs today: a check that nothing fell over, not a measurement of a gain.
Verdict: PASS for the in-game gate (300 s or more in the world, no device loss) for this batch, on the heads listed above. If one of these pull requests changes its head, this run no longer covers it. #2834 was left out of the batch (it conflicts with the others).
Limits: one run; arrival in the world was driven by keys and not checked on pictures. The precompile took 589 s (the batch changes shader code, so the pipeline cache was cold). Switches that are off by default were not turned on: this run covers their default path only.
AI-assisted (Claude Code, Claude Opus 5.5).