Keep the D3D12 pipeline cache on Proton #151

Open
gomeaw wants to merge 2 commits from upstream-pr/151 into main
gomeaw commented 2026-11-26 07:59:03 +00:00 (Migrated from github.com)

Imported from avatarmanz/VIctory-7900XTX. Originally posted by gomeaw on 2026-11-26T07:59:03Z.


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.

<!-- greyfinch-sync:avatarmanz/VIctory-7900XTX:issue:6622141894 --> Imported from [avatarmanz/VIctory-7900XTX](https://github.com/avatarmanz/VIctory-7900XTX/pull/151). Originally posted by [gomeaw](https://github.com/gomeaw) on 2026-11-26T07:59:03Z. --- 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.
bordersky commented 2026-11-26 10:23:38 +00:00 (Migrated from github.com)

Imported from avatarmanz/VIctory-7900XTX. Originally posted by bordersky on 2026-11-26T10:23:38Z.


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.

<!-- greyfinch-sync:avatarmanz/VIctory-7900XTX:comment:7189305698 --> Imported from [avatarmanz/VIctory-7900XTX](https://github.com/avatarmanz/VIctory-7900XTX/pull/151#issuecomment-7189305698). Originally posted by [bordersky](https://github.com/bordersky) on 2026-11-26T10:23:38Z. --- 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 cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/151:upstream-pr/151'
git switch 'upstream-pr/151'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/151'
git switch 'upstream-pr/151'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/151'
git switch 'upstream-pr/151'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/151'
git switch 'main'
git merge --squash 'upstream-pr/151'
git switch 'main'
git merge --ff-only 'upstream-pr/151'
git switch 'main'
git merge 'upstream-pr/151'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
avatarmanz/VIctory-7900XTX!151
No description provided.