Skip to content

GPU: pass null for empty D3D12 pipeline libraries on Proton - #885

Open
Filip722 wants to merge 3 commits into
fxceless:mainfrom
Filip722:gpu/null-empty-d3d12-library
Open

Filip722 wants to merge 3 commits into
fxceless:mainfrom
Filip722:gpu/null-empty-d3d12-library

Conversation

@Filip722

@Filip722 Filip722 commented Nov 25, 2026 •

Copy link
Copy Markdown

vkd3d-proton rejects a non-null pointer paired with a zero-length initial pipeline-library blob. When an existing blob is rejected, VIctory retries with an empty slice and can lose use of the native pipeline cache for the entire run.

This ports AugustoZFJ’s null-pointer call for an empty library to the fork’s current library structure. Nonempty initial blobs keep the existing call. Upstream PR #347

Validation

  • Windows MSVC release tests built with Rust 1.98.1 and run under GE-Proton 11-14 on Bazzite 44 with an RTX 5060 Laptop GPU, NVIDIA 615.78.08 and vkd3d-proton build cae8353ed7959c4+.
  • The rejected-blob fallback and mesh-pipeline cache-hit tests both failed on f85101b and both passed with this port. The mesh fixture checks the actual library load counter on the second request.
  • The Series S launcher with the same construction change saved a 222,584-byte native library. A fresh process reopened and mapped that file. A warm replay using the same executable and a 512 MiB larger title cgroup allowance later reported 1,228 library hits and one new pipeline build. The final captures showed the black loading transition before the host-memory guard stopped the title.
  • Staged asset policy passed for the changed file, and full asset policy passed for all 175 files.

Ported, tested and drafted with OpenAI Codex (GPT-6.2-Sol High) assistance. The commit preserves the upstream patch author.

Refresh against fork main

Commit ec90a68 brings in c36971b and keeps main's rename of a rejected library before creating the empty library. On the RTX 5060 Laptop GPU under GE-Proton 11-14, the Windows MSVC release build passed all 4 pipeline-library tests (including rejected-blob fallback) and the mesh pipeline cache-hit test. The full asset policy passed for 185 files. This refresh used synthetic tests. OpenAI Codex (GPT-6.2-Sol High) resolved the conflict and ran the retest.

An empty slice still has an address, and vkd3d-proton answers E_INVALIDARG to a non-null blob of length 0, so under Wine no pipeline library was ever created and host pipelines were not kept.

Port of Marvisak/VIctory#347 (197c7acf1fb0a1bd51db4f54d6ae934f91edcf25). Keep the fork’s existing
Blob ownership and save synchronization. The port was prepared with
Codex assistance.
@ArturoWolff

Copy link
Copy Markdown

Confirmed the rejected-blob fallback independently on a desktop RTX 4060 (NVIDIA 620.73.4, GE-Proton 11-14). I cross-built the unmodified victory-gpu release tests with Rust 1.97.1 for x86_64-pc-windows-gnullvm, using separate build directories and separate copies of the same initialized prefix. Both runs initialized vkd3d on the hardware adapter.

--exact pipeline::library::tests::a_rejected_blob_gives_an_empty_library:

Revision Result
Direct parent f85101b Failed at expect("an empty library"), exit 101
PR head caf5cd2 Passed, exit 0 (the test requires nonzero serialized size and no retained rejected blob)

This matches the fallback result on the author's 5060 Laptop. Both of our earlier 180 s Series S runs logged no host pipeline library: pipelines are not kept, regardless of physical backing mode. Those are pre-fix observations, not a retail A/B of this PR. I didn't test mesh cache hits, frame time, or a world frame here. The diff also passes git apply --check on a253706.

AI disclosure: Hermes Agent ran the comparison and wrote this comment for ArturoWolff.

Merge current fork main, retaining its rejected-library rename before the null-pointer fallback. Assisted by OpenAI Codex (GPT-6).
Keep the chained check for preserving a rejected library and retry with a null blob pointer. Revalidated the rejected-blob fallback and mesh cache hit on the RTX 5060 Laptop GPU under GE-Proton.

Assisted by OpenAI Codex.
@Filip722

Filip722 commented Nov 26, 2026 •

Copy link
Copy Markdown
Author

I refreshed this branch against db53666 in 664a251. The change preserves main’s rejected-library rename before retrying with a null pointer for the empty blob.

Matched Windows MSVC release tests on Bazzite 44, GE-Proton 11-14 and an RTX 5060 Laptop GPU (NVIDIA 615.78.08, vkd3d-proton cae8353ed7959c4+) reproduced both failures on main. The rejected-blob fallback failed in the library suite, and the mesh test missed the second-request cache hit. With the fix, all four library tests and the mesh cache-hit test passed. The repository asset-policy check passed for all 208 files.

OpenAI Codex (GPT-6.2-Sol High) assisted with the merge and retest.

@ArturoWolff

Copy link
Copy Markdown

Follow-up to the earlier RTX 4060 fallback test and Filip722's refresh: the null-pointer construction also restores actual native pipeline reuse across two retail processes on our low-memory Proton receiving build. It does not by itself restore the world or establish a frame-rate gain.

Receiver and scope. RTX 4060 desktop, 8 GB VRAM / 16 GB host RAM, Linux, NVIDIA 620.73.04, GE-Proton 11-14, vkd3d-proton 71cae091b06571e. Windows GNU-LLVM release cross-build, Rust 1.98.1, diagnostics. I used the private 51700c6d-based integration from our earlier paired-wave test, with the later local texture fixes and fair-order adaptation, and the generation observer off. The prior two retail executions of that receiver both logged the host makes no pipeline library (0x80070057) and no host pipeline library: pipelines are not kept by us. I adapted only the empty-library production hunk of AugustoZFJ's 197c7acf (Marvisak/VIctory#347), as ported in caf5cd2 and retained by Filip722's refresh 664a251. The receiver's nonempty-blob path, rejected-file rename, mapping ownership and save synchronization are unchanged. Matching GPL-3.0 license files. This is not a test of the entire refreshed PR head or current fork main.

Synthetic hardware regression (same two fixtures before and after, separate build directories, guarded private display, actual RTX 4060 selected in both test processes). The local fixture adaptation requires a real device instead of returning early and compiles the existing synthetic mesh/pixel HLSL through the receiver's DXC DLL helper rather than dxc.exe, which is not installed here.

Test Before After
pipeline::library::tests::a_rejected_blob_gives_an_empty_library failed at an empty library, test exit 101 passed, serialized size 56 bytes
pipeline::host::tests::a_mesh_pipeline_loads_from_the_library failed, second-request load counter 0 -> 0, test exit 101 passed, counter 0 -> 1

Two executed tests per build, no skip on the after run. Each after test reported 1 passed, 0 failed, 0 ignored. This expands the older fallback-only result on this card to the mesh-library path in the actual receiving integration.

Native-library-only warm replay: same fixed executable in both arms; Series X, 1920x1080 private display, file backing, paired waves, levels on demand and fair ordering as in the previous receiving run. Original starting Wine prefix, saves, title cache (including the 1,662-entry early list) and driver cache were byte-matched. For the second arm I copied only the first arm's final 294,584-byte native library into a new copy of that original seed, not its updated early/shader/driver caches. Each run received one A at the visible account picker and ended on the scheduled ~335 s bound with the host-memory guard enabled. No host OOM, unhandled exception, or logged device loss.

New empty library Saved library only, new process
Library opening absent; created/saved loaded, bytes=294584 mapped=true
First host pipelines all made: made / loaded / started early 1470 / 90 / 1561 0 / 1561 / 1562
Last saved counters: made / loaded 1540 / 128 64 / 1666
Last saved size (bytes) 294584 306296
First all-made message, seconds from picker A 108.64 149.31
First recognizable 3D in sampled display frames, seconds from picker A about 259 about 208
Minimum available host RAM (MiB, sampled) 3081 2374
Peak game scope swap / device VRAM (MiB, sampled) 4168 / 7138 3822 / 7513

The warm process also saved a host-pipelines.next of 306,296 bytes while the original mapped file remained intact. The counts are the layer's native library events, not counts of unique console shaders. The first all-made message was later in the warm launch despite the hits: title progression and compilation scheduling vary. The first recognizable world frame appeared earlier in the warm display samples, but the scenes/input-to-scene timing are not deterministic enough to credit a speedup. Both launchers showed dark opening exterior geometry, and the warm run reached readable subtitles over very dark characters. Near the end both still reported roughly 0.2–0.3 FPS. No correctly lit world, gameplay control, or sustained FPS established. This is evidence for keeping the native pipeline cache enabled to remove repeated pipeline creation as a confound in the next Linux tests, not an estimate of steady-state gameplay performance. No title data, paths, binaries, or captures attached.

AI assistance: Hermes Agent, working on behalf of ArturoWolff. (GPT 6.2 Sol High).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants