d3d12: give an empty pipeline library a null blob (D3D12-VKD3D-EMPTY-PIPELINE-LIBRARY) #2654
Code
Clone this repository
Checkout
From your project repository, check out a new branch and test the changes.
git fetch -u origin "github-pr/2654:github-pr/2654" git switch "github-pr/2654"
Open
leonida/mandy
kuzeyc wants to merge 4 commits from
github-pr/2654 into main
pull from: github-pr/2654
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/2789
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/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!2654
Loading…
Reference in a new issue
No description provided.
Delete branch "github-pr/2654"
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 branch is out-of-date with the base branch
Reviewers 0 approvals
Details
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Item:
D3D12-VKD3D-EMPTY-PIPELINE-LIBRARY(claim: https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7263775300)What is wrong
pipeline/library.rs(open) makes the empty host pipeline library withCreatePipelineLibrary(&[]). Thewindowscrate passes an empty slice's pointer, which is dangling, not null, with a length of 0. Microsoft's D3D12 takes that. VKD3D-Proton answersE_INVALIDARG(0x80070057), andmake(&[]).ok()?dropped the error, so under Wine and Proton the run keeps no library:Nothing is stored or saved (
cache/pipelines/host-pipelines.binnever appears), and every start makes every pipeline again.The change
CreatePipelineLibrarythroughblob_pointer(), which gives a null pointer for an empty blob.the host refused an empty pipeline library, with the error) instead of dropped.an_empty_blob_is_given_as_a_null_pointer.One file,
d3d12/crates/leonida-gpu/src/pipeline/library.rs.Tested
cargo xwin test --target x86_64-pc-windows-msvc -p leonida-gpu --features diagnostics -- pipeline::library, run under Wine 11.23: 7 passed, 0 failed (the new test and the six that were there).play-linux.shof #2577.919c0a9e2, with a log line added at that call):CreatePipelineLibrary refused error=Invalid parameter. (0x80070057), thenpipelines are not kept.cache/pipelines):host pipeline library saved bytes=248 ... made=1. With the same fix on #2577's tree, the next start loggedhost pipeline library loaded bytes=6584andhost pipelines all made made=0 loaded=34.python -I scripts/check_no_game_data.py d3d12/crates/leonida-gpu/src/pipeline/library.rs: clean.The new unit test checks the pointer, not the host: it passes on
maintoo as far as the D3D12 call is concerned, since Microsoft's runtime accepts the dangling pointer. The failure only shows under VKD3D-Proton, which is what the hardware runs above are for.Related
AI-assisted (Claude Code).
🤖 Generated with Claude Code
Independent synthetic A/B of
f1794125(GitHub merge71250d7bonto452d1d1b). Win64 MSVC-target Rust 1.98.1, Wine 11.22, VKD3D-Proton71cae091, DXC1.8.2505.32, RTX 4070 SUPER (620.73.04) and Radeon Raphael (RADV 26.3.1).depth_bounds_pipeline_loads_and_filters_drawsanda_mesh_pipeline_loads_from_the_library. With this PR each passed 3/3, including both depth readbacks. The library unit group went from 5 passed and the rejected-blob test failing to 7/7 on each GPU. An initial blank NVIDIA process timeout was outside the completed baseline sample.CreatePipelineLibrary(&[])call returned0x80070057. The PR path created one PSO and serialized the library, 15,664 bytes on NVIDIA and 3,136 bytes on RADV. A new process loaded the first PSO (loaded=1, made=0) and left the file size unchanged. It also rebuilt and saved successfully after I substituted a malformed blob. Each case passed 3/3 per GPU.8f5f02d80combined cleanly with this PR (local tree1b933a60). Cold and warm behavior matched the standalone PR. Replacing onlyhost-pipelines.fingerprintwith a stale value forced a rebuild and a fresh save, in 3/3 per GPU. All 36 instrumented invocations passed the depth fixture.This resolves the local Wine library assertion I reported in #2648. The hosted native Windows pixel failure there remains open. Small build note: the
!empty.as_ptr().is_null()assertion atlibrary.rs:906emitsuseless_ptr_null_checks. The test already checks the converted pointer immediately above.Synthetic fixtures only. AI-assisted with OpenAI Codex.
Thanks for the A/B on both GPUs, and for checking it together with #2569.
55ac5d337: drops the!empty.as_ptr().is_null()assertion thatuseless_ptr_null_checksflags. The converted pointer is still checked just above.pipeline::libraryis 7/7 under Wine 11.23, and clippy has no warnings inlibrary.rs.main" question better than my new unit test does. Under VKD3D-Proton,a_rejected_blob_gives_an_empty_library,depth_bounds_pipeline_loads_and_filters_drawsanda_mesh_pipeline_loads_from_the_libraryfail onmainand pass with this PR, on both your RTX 4070 SUPER and RADV.AI-assisted (Claude Code).
We independently landed exactly this on our tree and can confirm it end-to-end under Wine. Before the null-pointer fix, with
CreatePipelineLibraryreceiving the dangling non-null + 0, the library was dead here under Wine + VKD3D-Proton master (RTX 4090, NVIDIA 620.73.04): every start logged "no host pipeline library: pipelines are not kept", nothing was written at clean exit, and the entry backlog peaked ~1038 every run. With this shape — vtable call, null for the empty blob — the loop closes:saved bytes=448760 made=2347at a clean close, loadedmapped=trueat the next start, compounding 605,624 → 641,336 bytes over the next three windows with the entry backlog shrinking each time. Yourblob_pointerhelper is the cleaner way to state the rule; we inlined the same thing. Happy to test this PR as-is on our machine if useful. AI-assisted; measured logs on the setup above.Current-head hardware check of the empty-library call on
55ac5d33, merged into66c79286f, and combined on that same base with #2938 (69485a86). Win64 under Wine 11.22 / VKD3D-Proton 3.1.0, RTX 4070 SUPER (620.73.4) and Radeon RADV (26.3.1).On each adapter, the unmodified
a_mesh_pipeline_loads_from_the_libraryfailed 3/3 on main and 3/3 with #2938 alone after both PSO requests returned. A diagnostic loggedCreatePipelineLibraryreturningE_INVALIDARGfor the empty library, before load or store. The stockpipeline::library::testsalso had exactly one failure under both trees,a_rejected_blob_gives_an_empty_library.This PR alone and the combined tree each passed 3/3 mesh-library runs and 7/7 stock library tests on each adapter, with no skips. The existing GPU mesh test reaches the production
opencall and checks that the second request actually loads from the library, which complements the pointer helper’s unit test on Wine. This run covers an empty library and in-process reuse.MEASURED with synthetic shader inputs, OpenAI Codex and a separate read-only review.
Thanks @KelboLive, all three done in
f4ae7b922:origin/maininto the branch (c3ecaa558), no conflicts, so the d3d12 cargo-test CI from #2648 should now run. Merged rather than rebased, per the maintainer guide (no rebase, no force-push).tests/replay.rs: the empty library there now goes through the vtable withnulland 0, the same aspipeline::library(f4ae7b922).a_frame_is_recorded_and_replayedpasses under Wine 11.23.an_empty_blob_is_given_as_a_null_pointeronly pins the helper. The check thatopenuses it is the existing GPU testa_mesh_pipeline_loads_from_the_library, which goes through the realopen: per merzleckeier's run above it fails 3/3 on main and passes 3/3 with this PR on both an RTX 4070 SUPER and RADV under VKD3D-Proton. Puttingbytes.as_ptr().cast()back at the call site would fail it there, though not on native D3D12. If you'd still like a seam that checks the pointeropenpasses without a GPU, say so and I'll add it.pipeline::libraryis 7/7 under Wine on the merged tree. AI-assisted (Claude Code).Tested on Linux/NVIDIA:
f4ae7b922merged (locally, nothing pushed) intomainf37c4a87d, against plainf37c4a87d. Same save, same settings (scripts/play-linux.shdefaults,LEONIDA_SKIP_BINK=1), shader cache already translated for this build (leonida shaders).Setup: RTX 4050 Laptop 6 GB, NVIDIA 580.196.07, Fedora 44, Wine 11.21 Staging, VKD3D-Proton 3.2.0 (
71cae091b06571e+). Built with--target x86_64-pc-windows-gnullvm(not the msvc route).mainf37c4a87dno host pipeline library: pipelines are not kepthost pipeline library saved, 331,640 bytes, made=1728cache/pipelines/early-pipelines.txtleonida warm --used83670 pipelines known ... 0 to make1828 to make,1828 made in 186 s, 0 badSo on Wine/VKD3D-Proton the empty-library refusal does not only lose the library:
savereturns beforeearly-pipelines.txtis written, which leaveswarm --usedwith nothing to make on every Linux setup. This PR fixes both here. One run per row; themain"next start" run had the driver's own cache warm from an earlier run, not a library.AI-assisted: yes (Claude Code, Claude Opus 5.5): the runs, logs and this comment.
Ran natively on Windows 11, head
f4ae7b922merged into currentmain(2fc7383b9, no conflicts), toolchain 1.98.1,--locked. The 7/7 native run above covers the unit tests. This one adds the debug layer, WARP, the rawCreatePipelineLibraryresults for each kind of blob, the serialised round trip of an empty library, and the empty-file paths.Tests on the merge
pipeline::library(7) +a_mesh_pipeline_loads_from_the_library+depth_bounds_pipeline_loads_and_filters_drawstests/replay.rsa_frame_is_recorded_and_replayedcargo test -p leonida-gpu --lib: 697 passed, 0 failed, 59 ignored. Clippy (--all-targets) reports nothing inlibrary.rsorreplay.rs.Native
CreatePipelineLibraryand the empty library (a throwaway test, not committed)This calls the vtable directly with each blob, then serialises the result.
S_OK, serialised size 900S_OK, 872main)S_OK, 900S_OK, 872CreatePipelineLibrary(&[])S_OKS_OKS_OK, same size, re-serialises to identical bytesE_INVALIDARGE_INVALIDARGE_INVALIDARGE_INVALIDARGSerializeinto a buffer one byte shortE_INVALIDARGE_INVALIDARGThe production
opengave a library in all three cases:Blob::None, a junk blob (it fell back to an empty one), and the serialised empty library (loaded as is, no fallback).So on native D3D12 the change makes no difference: the runtime accepts null and dangling alike, and the debug layer is silent on both. The bug can only be seen under VKD3D-Proton, which matches the earlier runs above. An empty library still serialises to a few hundred bytes, not 0.
savedoes not serialise at all whileadded == 0, andBlob::oftreats a 0-byte file as no file. So I found no path that writes, or chokes on, an empty library file.Not checked: Wine/VKD3D-Proton (covered above by others), AMD/Intel native drivers, a full save-and-reopen across two processes on native.
GPUs tested: one NVIDIA desktop card + WARP.
AI-assisted: yes (Claude Code).
Triage of head
f4ae7b922(merge base1fff69129, 334 commits behind;git merge-treeagainst currentmain45dc41f95: no conflicts).2 files:
pipeline/library.rs(+37/-3),tests/replay.rs(+15/-7).CI is at
action_requiredon this head (fork workflow approval).Existing verification: Verified by @merzleckeier (Wine/VKD3D-Proton, RTX and RADV), @z3r0rc (same fix landed independently), @deynesdev (Linux/NVIDIA in game on this head) and @Kal0s-design (native, debug layer, WARP, raw
CreatePipelineLibraryper blob kind).This check: Not re-reviewed in depth: the empty library is created from a null blob instead of an empty slice's dangling pointer, which VKD3D-Proton rejected. Root cause, small, verified on both Windows and Proton. It touches
library::open, notlibrary::pipeline, so it does not interact with #3185.I did not build it: the crate is Windows-only (or the C++ runtime's Windows build), so no red/green was run here.
Verdict: ready (root-cause fix verified natively and under Proton; needs CI approval).
AI-assisted verification: Claude Opus (Claude Code), separate agent per batch.
Generated by Claude Code
RUN (independent run on Windows, head
f4ae7b922bc591918b43c4761e69f77572a4c8ac, merged intomainb41763227aeed2d23c98af84bcbc1bddc7acdc90withgit merge --no-ff)PR #2654,
D3D12-VKD3D-EMPTY-PIPELINE-LIBRARY: the empty host pipeline library is created from a null blob (newblob_pointer()helper and a raw vtable call) instead of an empty slice's dangling pointer. It also logs a refused empty library, andtests/replay.rsmakes its library the same way. Two files, +52/-10.Merge: clean, no conflict. Toolchain from the repo,
--locked,--release, native Windows 11, one shared target directory, noleonida.exerunning during the builds.Green
cargo test -p leonida-gpu --release --locked --lib: 704 passed, 0 failed, 59 ignored. All 7pipeline::librarytests pass, including the newan_empty_blob_is_given_as_a_null_pointer.cargo test -p leonida-gpu --release --locked --features diagnostics --lib: 785 passed, 0 failed, 59 ignored. I ran this one becausetests/replay.rsis behindfeature = "diagnostics".cargo test -p leonida-gpu --release --locked --features diagnostics --test replay:a_frame_is_recorded_and_replayedpasses (1/1). Without the feature this file compiles to 0 tests.Red
The PR's only new test is in
library.rs, next to the code it tests. Checking out main'slibrary.rsremoves the test andblob_pointertogether, so it cannot go red that way. I mutated the new code instead, one change at a time, then restored the file withgit checkout HEAD --:blob_pointeralways returnsbytes.as_ptr()(the old behaviour)blob_pointer(&[]).is_null()(6 passed, 1 failed)openusesbytes.as_ptr().cast()instead ofblob_pointer(bytes)M2 is the gap KelboLive pointed out in review. The unit test checks the helper, not that
openuses it. The raw-vtable call also passes a dangling pointer without error on native D3D12, so no native test can see the bug. Only VKD3D-Proton refuses it.Review
d3d12/docs/switches.mddoes not need regenerating.makestill builds the library from the bytes kept beside it inLibrary. A null pointer with length 0 is only given for an empty blob.rawis wrapped byfrom_rawonly after.ok()?succeeded, so an error leaves nothing to release.blobis still dropped before the empty library is made. No fences are involved.docs/d3d12_vulkan.md(§ onCreatePipelineLibrary) already says a null pointer with a size isE_INVALIDARG. A null pointer with size 0 is the opposite case and is not recorded there. That is a docs gap, not a blocker.D3D12-VKD3D-EMPTY-PIPELINE-LIBRARYwith a link to a claim comment on issue 2570.replay.rschange KelboLive asked for is done (f4ae7b922). (3) Theuseless_ptr_null_checkswarning is fixed in55ac5d337.git merge-treeof this head against #2789 (stale library driver stamp) conflicts inpipeline/library.rs, so whichever lands second needs a small merge. Against #3185 and #3150 it is clean. #2569, which the body mentions, is closed.f4ae7b922): one by deynesdev, Linux, Wine 11.21 plus VKD3D-Proton 3.2.0, RTX 4050 Laptop. Onmain, "no host pipeline library: pipelines are not kept". With the PR, the library is saved (331,640 bytes) and loaded at the next start. Median fps in the last 20 lines is 12.4 for both. It is a Wine/Proton run, not a native Windows in-game run. Kal0s-design ran native Windows with the debug layer and WARP on a merge (f4ae7b922into2fc7383b9): 9/9 on card and WARP, with and without the debug layer. merzleckeier and z3r0rc report Proton runs on earlier heads.Not covered
E_INVALIDARGfrom a dangling pointer) cannot be reproduced on native D3D12, so my green run does not show the bug is gone. It shows nothing broke natively.Verdict
PARTIAL: green on the merge, and the new unit test is killed by 2 of 3 mutations. M2 survives (the call site's use of
blob_pointeris not asserted), and the real failure is only visible under VKD3D-Proton, where others have already confirmed it on this head. The fix is small and the code reads as correct. A conflict with #2789 inlibrary.rsis to be expected. In-game run still required on native Windows if the maintainers want one on this head; a Proton in-game run is already posted on this head.AI-assisted (Claude Code), models: Claude Opus 5.5 (checker), separate Claude Opus 5.5 judge.
tested this merged onto main ef35d683e on linux: proton experimental 11.0, vkd3d-proton master f8c1cae83, rtx 4050 laptop 6 gb, nvidia 620.73.04
the fix does what it says. main logs "no host pipeline library: pipelines are not kept" on every start. with this the first launch started an empty library and saved it as it went (1327 made, 259 kb host-pipelines.bin), and the second launch logged "host pipeline library loaded" and loaded 1405 of 1418 early pipelines, with only 1 made fresh
it didn't take the long stalls away on this setup though. both launches still had 10-16 s present gaps in the world, and the median fps was lower than my main runs (7.8 to 9.0 against 12.2 to 13.6). those are single runs on a 6 gb card that's at its vram limit, so i wouldn't read the fps much, but whatever causes the 10 s waits here is not only the missing library
AI-assisted: yes (claude). runs played by me
RUN (in game, gate-style): head f4ae7b922 tested in a batch of nine pull requests: #2609 (3fbcacc4e), #2654 (f4ae7b922), #2686 (4ce795127), #2823 (854796496), #2841 (24ff8f24c), #2890 (262439781), #3154 (854fc3441), #2588 (598930e5b) and #3119 (6097c033c), merged in that order with
git merge --no-ffontomainf3865cae8. One conflict, in the credit table ofd3d12/README.mdwhen #2588 went in (both rows kept); no code conflict. Files touched by more than one of the nine:d3d12/docs/switches.md(#2686, #3119, #3154) andd3d12/README.md(#2588, #3119). Built withdiagnostics,mimalloc, targetx86_64-pc-windows-msvc. RTX 3090 24 GB, NVIDIA 621.40, Windows 11 Pro (build 26300).Launcher defaults except
-PrecompileUsed, Series S settings,-NoDlss -NoFrameGen, standing at the save. On thismainthe launcher precompiles every recorded pipeline by default (88,671 here: a first warm-up with the plain defaults had made 9,000 of them after 660 s when it was stopped), so the runs use-PrecompileUsed(the 2,455 pipelines earlier runs drew with). A warm-up run first (#2686 changes the translator, so everything was translated again), then one run with the memory safety stop, ended 330 s after reaching the world:Warnings: only kinds that a run on the same
mainwith another pull request (#3128) printed too, in about the same numbers; no new kind. No pipeline refused other than the 29 "creation method that is not implemented" lines that run has as well. The last frame saved (8192) shows the world drawn normally.This pull request's own lines: on Windows with NVIDIA the host pipeline library loaded (477 MB, mapped) and was written at the end of the run, as on
main. The data folder already held a library, and the case this fixes (VKD3D-Proton refusing the empty blob) is not on this path; no "the host refused an empty pipeline library" line appeared.Verdict: PASS for the batch (a pass covers each of the nine; a failure would not have said which). Not covered here:
-RayTracing, DLSS and frame generation, other GPUs, Wine/Proton.AI-assisted: Claude Code (Claude Opus 5.5)
VERIFY-2654 — Windows nativo: 9 tests de
librarypasan, y el cambio es a mano por una razón concretaDos ficheros,
library.rs+40 ytests/replay.rs+22/−10, seis días abierto:El cambio, que es lo interesante: deja de llamar
device.CreatePipelineLibrary(bytes)y llama a la entrada de la vtable a mano:Y la razón está en el nombre de la función que aparece:
blob_pointer(bytes)— con un blob vacío tiene que pasarnull, y la envoltura dewindows-rsno ofrece esa forma:CreatePipelineLibrary(bytes)toma una slice, y una slice vacía produce un puntero no nulo con longitud cero, que es exactamente lo que el runtime rechaza.Así que el
vtablea mano es el precio de pasarnulldonde la API lo permite y la envoltura no. Es la clase de cambio que parece «bajar a la vtable por gusto» en un diff y es todo lo contrario — y el comentarioSAFETY:lo dice: "an empty blob is a null pointer (blob_pointer);rawis ours on success."Y
tests/replay.rscambia con él (22 líneas), que es donde el caso del blob vacío se ejerce de verdad — el test delibraryde arriba es el de la unidad.Lo que no probé: el caso concreto de
#…— un pipeline library con blob vacío contra VKD3D o contra el runtime de verdad, que necesita el título; aquí sólo compila y pasan los tests de la unidad.Written with an AI assistant.