Linux/Proton: host pipeline library never created - CreatePipelineLibrary(&[]) passes a non-null pointer with length 0 (E_INVALIDARG from vkd3d-proton) #136
Labels
No labels
accessibility
already-solved
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
merged
needs-decision
needs-game-run
needs-rebase
not-merged
nvidia
obsolete
question
security
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/avatarmanz--VIctory-7900XTX#136
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@DevLazo on GitHub · 2026-11-26 06:46 UTC · original
Under Proton/vkd3d-proton, Victory never gets a host pipeline library. Every launch logs
no host pipeline library: pipelines are not keptand recompiles all host pipelines. #129 notes that "vkd3d-proton refuses the pipeline library" and keeps the early list without one. This issue gives the cause and a fix that makes the library itself work.Cause
open()incrates/victory-gpu/src/pipeline/library.rsmakes the empty library withmake(&[]). Thewindows0.62.2 wrapperCreatePipelineLibrary(&[u8])passesslice.as_ptr(), which for an empty slice is a dangling non-null pointer, with length 0. vkd3d-proton rejects exactly that ind3d12_pipeline_library_init(libs/vkd3d/cache.c), both in the build in Proton Experimentalexperimental-11.0-20261112(2576c0b4adfae4a) and in master (71cae091):Native D3D12 accepts the call, which is why it only shows up on Linux. With the HRESULT logged:
CreatePipelineLibrary refused an empty blob error=Invalid parameter. (0x80070057). The.ok()?on that path hides the code, so a warning with the HRESULT would help either way.The same fix is open as fxceless/victory-fork#885 ("GPU: pass null for empty D3D12 pipeline libraries on Proton"), tested there on an RTX 4060 with vkd3d-proton
71cae091. This is an independent confirmation on AMD/RADV.Fix
Call the vtable entry with a real null pointer for the empty library. Only the empty path changes; loading an existing blob is untouched.
Patch against
crates/victory-gpu/src/pipeline/library.rsResults (RX 6800 XT 16 GB, RADV / Mesa 26.3.1, Proton Experimental 11.0-20261112, release build)
empty library made (null blob), then periodic saves. The last save hadmade=2059, andhost-pipelines.binwas about 395 KB.host pipeline library loaded bytes=394808 mapped=true. The last save hadmade=51 loaded=2274 started_early=2278.0x887E0002(D3D12_ERROR_DRIVER_VERSION_MISMATCH), and a new empty one is made through the fixed path.Separately, I confirm the six compute pipelines from #111/#129 on this card. With dxil-spirv
114e664e(Proton's), the standalonedxil-spirvtool recurses forever (CFGNode::recompute_immediate_dominator↔find_common_dominator, viaflatten_subgroup_shuffles). dxil-spirvb540c8a2(vkd3d-proton master) converts all six. With vkd3d-proton master next tovictory.exe, the steady-state median here went from 11.0 to 15.9 fps.@YaBulochka on GitHub · 2026-11-26 12:08 UTC · original
The cause is right, and the vtable call fixes it. We ported it from
viyourmom/victory-8gb-linux-lowram69cca8aand it works on this fork too, AMD/RADV:with
open()'smakecalling it instead ofdevice.CreatePipelineLibrary(&[]).Measured (retail 1.0.2.1, RX 7600 XT 8 GB, RADV Mesa 27.0.0, Wine 11.22, vkd3d-proton master): the log goes from
host pipeline library rejected; starting an empty one error=0x887E0002andno host pipeline library: pipelines are not kepttohost pipeline library loaded bytes=1912952 mapped=true, and the file survives the run. No other change was needed.Unrelated but adjacent, and it removes a whole class of picture defects on Wine: with Microsoft's
d3dcompiler_47.dllin the prefix (d3dcompiler_47=n, nodxcompiler.dllbeside the exe) the indirect clamp and the card-compare build throughD3DCompileas on Windows. The DXC fallback compiles them too, but under DXC we got axis-aligned rectangles of another surface over characters — a detail for issue #1270/#1285 in the parent fork.