Repository navigation
The empty pipeline library asks for a null blob: vkd3d-proton refuses a pointer at nothing - #119
Merged
Merged
Conversation
… a pointer at nothing
|
No actionable comments were generated in the recent review. Walkthrough
Change: Bug fix Merge Risk:
|
pablogonz12
added a commit
that referenced
this pull request
Nov 25, 2026
Main moved with #114, #119 and #126. Three conflicts: - `CREDITS.md`: both sides kept — fxceless's fork, Wasler's fork (the interval, the gap-coalesced rehash, the integer blend bypass) and vitutu1/ZigZagBoi1 beside JMAN730/victory's `project-flamingo#672`. - `descriptor/host.rs` and `texture.rs`: main's narrowed-SRV work (#672, #126) stands on the present-order machinery and the live `switches` module this line does not carry (`Order`, `Present`, `crate::switches::b`, `copystat::C::ViewNarrowed`, `Staging::present`), so the two files stay this line's. Porting that work is its own change, not something a merge resolution can decide. `HostHeap::copied`, this line's record fingerprint, is kept.
This was referenced Nov 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
ID3D12Device1::CreatePipelineLibrarywith no bytes was called through windows-rs'&[u8]binding, whichpasses a non-null pointer (Rust's empty-slice pointer) and a length of 0. Windows D3D12 accepts that as "make
an empty library"; vkd3d-proton rejects it with
E_INVALIDARG, becaused3d12_pipeline_library_inithas(
libs/vkd3d/cache.c; its own internal empty library is created withd3d12_pipeline_library_create(device, NULL, 0, ...)).Since vkd3d-proton is the host of every run we ship,
open()fell through toNoneon the first run of atitle, so the pipeline cache never existed: no
StorePipeline, nohost-pipelines.bin, no early list — the wholepipeline-library feature was dead under Proton while CI (windows-latest, WARP) stayed green because real D3D12
takes both forms.
create()now calls the interface's vtable entry directly with a null blob when there are no bytes (and thebytes' own pointer otherwise), which both Windows and vkd3d-proton accept, and takes ownership of the returned
reference with
Interface::from_raw. Everything else (open's rejection path, the mapped-file bookkeeping) isunchanged.
The test
a_rejected_blob_gives_an_empty_librarynow asserts the behaviour we rely on in both cases: no blob atall (first run) and a blob the host rejects both give a library with a serialisable size and
Blob::Nonekept.The first case is exactly what failed; it was the one case no test covered.
Not a test assumption
The failure was a real behaviour difference under vkd3d-proton (above), not a test assumption: the difference is
in the argument, and the code now sends the argument both hosts take. No env switch: the old call is not a
behaviour anyone can want back, and there is nothing to compare against.
Gates
cargo xwin clippy --target x86_64-pc-windows-msvc --workspace --all-targets -- -D warnings: clean.WINEDLLOVERRIDES="d3d12,d3d12core=n"),--test-threads=1: 155 passed, 0 failed, 1 ignored (before the fix the same run: 1 failed — the emptylibrary
0x80070057 E_INVALIDARG,open→None).--exact pipeline::library::tests::a_rejected_blob_gives_an_empty_library --nocapture: ok.Not tested in a game run.
Summary by CodeRabbit