gpu: pass null pointer for empty CreatePipelineLibrary (vkd3d-proton) #31
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
needs-logs
old-names
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/TaynanGT--Vice-Tay!31
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-31"
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?
@nullexxx on GitHub · 2026-11-26 13:37 UTC · original
nullexxx:fix/vkd3d-empty-pipeline-library→main· +14 −1 · 1 files · 1 commits · merged 2026-11-26 19:30 UTCSummary
When starting without an existing pipeline library,
CreatePipelineLibrary(&[])passes Rust's dangling non-null slice pointer (0x1) with length0. Windows ignores it, butvkd3d-protonrejects it withE_INVALIDARG(no host pipeline library: pipelines are not kept), preventing pipelines from persisting across runs under Wine/Proton.This passes
std::ptr::null()whenbytes.is_empty(), matching upstreamMarvisak/VIctorycommite5a8c2f(PR #994). Windows behavior is unchanged.Testing
cargo xwin build --target x86_64-pc-windows-msvc --locked --release -p victoryon CachyOS (Linux 7.3.6) and run underGE-Proton11-14(vkd3d-proton 3.2) on an RTX 5080 (620.73.04).WARN victory_gpu::pipeline::library: no host pipeline library: pipelines are not kepthost pipeline library saved bytes=318968 early=1848 made=7 loaded=1862 started_early=1873, and character models in cutscenes load from cache on subsequent launches.AI-assisted (Gemini) patch and log analysis; built and verified locally on my own copy.
@mancube on GitHub · 2026-11-26 14:37 UTC · original
Confirmed tested on similar setup - CachyOS, vkd3d-proton, Proton11-14 with wineserver patch.
@welisonzika14-jpg on GitHub · 2026-11-26 15:35 UTC · original
Windows data for this PR, since it was only tried on Linux/Proton so far. RTX 5070 desktop (Blackwell, driver 621.24), Windows 11, Rust 1.98.1.
1. The call itself, on the native D3D12 runtime. A small standalone probe (windows crate 0.62.2, same as this tree) creates an
ID3D12PipelineLibrarythree ways, 2 runs each:maindoes; its pointer is0x1)So on Windows the native runtime accepts both forms, and the reload path is untouched. The
0x1pointer is only a problem for vkd3d-proton, which fits what you and @mancube saw.2. Unit tests.
cargo test -p victory-gpu -p victory-shader --lib --locked --no-fail-fastwith the PR merged ontofab5286: victory-gpu 347 passed / 0 failed, victory-shader 292 passed / 0 failed, the same asfab5286alone. The PR adds no test.Unit tests and a synthetic probe only, no game files.
Written with AI help (Claude/Kiro); the numbers are from runs on my machine.
@TaynanGT on GitHub · 2026-11-26 19:18 UTC · original
The change is limited to the zero-length call. I queued CI for this revision. @mancube, thanks for confirming the vkd3d-proton behavior. @welisonzika14-jpg, your native D3D12 and WARP checks also cover the null-pointer call and the normal blob reload.
@TaynanGT on GitHub · 2026-11-26 19:34 UTC · original
Merged as
22c6eac8. The Windows checks passed on the rerun, and the reports from Proton reproduced the empty-library failure and verified the null-pointer fix. The nonempty cache still uses the existing byte slice.