Keep the D3D12 pipeline cache on Proton #151

Open
github-bot wants to merge 2 commits from github-bot/gh-151 into main AGit
Owner

@⁠gomeaw on GitHub · 2026-11-26 07:59 UTC · original
gomeaw:fix/proton-empty-pipeline-library → main · +38 −3 · 1 files · 2 commits · open

Fixes #136.

vkd3d-proton rejects a non-null blob pointer with length zero. The Windows slice wrapper passes such a pointer for &[], so an absent or rejected cache file can leave the process without a native pipeline library for the entire run.

Port AugustoZFJ's null-blob call and Filip722's adaptation to this fork's library. Nonempty blobs still use the Windows wrapper. The empty-library path logs the HRESULT if it fails.

The Windows WARP regression rejects a synthetic invalid blob, creates a fresh library, serializes it, and reopens the resulting nonempty blob. The donor reports native cache hits across processes on a Proton RTX 5060 Laptop GPU. Five Windows library tests passed. A repeat on this branch will verify persistence in this fork.

**@⁠gomeaw** on GitHub · 2026-11-26 07:59 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/151) `gomeaw:fix/proton-empty-pipeline-library` → `main` · +38 −3 · 1 files · 2 commits · open Fixes #136. vkd3d-proton rejects a non-null blob pointer with length zero. The Windows slice wrapper passes such a pointer for `&[]`, so an absent or rejected cache file can leave the process without a native pipeline library for the entire run. Port [AugustoZFJ's null-blob call](https://github.com/Marvisak/VIctory/pull/347) and [Filip722's adaptation](https://github.com/fxceless/victory-fork/pull/885) to this fork's library. Nonempty blobs still use the Windows wrapper. The empty-library path logs the HRESULT if it fails. The [Windows WARP regression](https://github.com/gomeaw/VIctory-7900XTX/actions/runs/45778873406) rejects a synthetic invalid blob, creates a fresh library, serializes it, and reopens the resulting nonempty blob. The donor reports native cache hits across processes on a Proton RTX 5060 Laptop GPU. Five Windows library tests passed. A repeat on this branch will verify persistence in this fork.
Port the null-blob ABI fix from Marvisak/VIctory#347 (197c7acf1fb0a1bd51db4f54d6ae934f91edcf25) and Filip722’s adaptation in fxceless/victory-fork#885. The nonempty path still uses the slice wrapper. Report the HRESULT if the empty library cannot be created.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 08:04:19 +00:00
Author
Owner

@⁠bordersky on GitHub · 2026-11-26 10:23 UTC · original

Confirming on Linux: RX 7900 XT, GE-Proton10-34's Wine, vkd3d-proton master, on main 9576c45.

Before this PR, every session logged no host pipeline library: pipelines are not kept. With it:

  • First start: no host pipeline library yet; starting an empty one, then host pipeline library saved bytes=322232 early=1783.
  • Next starts: host pipeline library loaded bytes=349688 mapped=true, growing to 422456 over five starts. The latest one logged host pipelines all made made=0 loaded=1576 started_early=1576.

Loading from a checkpoint is visibly quicker since. No problem seen over six starts.

**@⁠bordersky** on GitHub · 2026-11-26 10:23 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/151#issuecomment-7189305698) Confirming on Linux: RX 7900 XT, GE-Proton10-34's Wine, vkd3d-proton master, on main `9576c45`. Before this PR, every session logged `no host pipeline library: pipelines are not kept`. With it: - First start: `no host pipeline library yet; starting an empty one`, then `host pipeline library saved bytes=322232 early=1783`. - Next starts: `host pipeline library loaded bytes=349688 mapped=true`, growing to 422456 over five starts. The latest one logged `host pipelines all made made=0 loaded=1576 started_early=1576`. Loading from a checkpoint is visibly quicker since. No problem seen over six starts.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/151/head:github-bot/gh-151'
git switch 'github-bot/gh-151'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-151'
git switch 'github-bot/gh-151'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-151'
git switch 'github-bot/gh-151'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-151'
git switch 'main'
git merge --squash 'github-bot/gh-151'
git switch 'main'
git merge --ff-only 'github-bot/gh-151'
git switch 'main'
git merge 'github-bot/gh-151'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.