Fix host pipeline caching on Wine #1

Manually merged
github merged 1 commit from gh-pr/1/head into gh-pr/1/base 2026-11-26 05:50:20 +00:00
Owner

@⁠gmankab on GitHub · 2026-11-25 12:51 UTC · original
gmankab:fix/wine-pipeline-library → main · +23 −1 · 1 files · 1 commits · merged 2026-11-25 12:59 UTC

On Wine with vkd3d-proton, opening a fresh host pipeline library with a zero-length Rust slice passes a non-null blob pointer. vkd3d rejects it, and KLBF continues compiling pipelines without a host library to save for the next run.

This carries AugustoZFJ's null-blob fix over to KLBF's current pipeline library. It preserves the file-mapping and save logic and only changes how an empty library is created.

On an empty cache, the original prebuild attempted 1,428 pipelines before I stopped it and created no host pipeline library. With the fix, the first batch saved 220 pipelines and reopened the library. Further batches reported library hits.

Based-on: https://github.com/Marvisak/VIctory/pull/347
Tested-on: RX 6800, Fedora Linux 45, Wine and vkd3d-proton on RADV
Assisted-by: gpt-6.2 sol xhigh

**@⁠gmankab** on GitHub · 2026-11-25 12:51 UTC · [original](https://github.com/PastiiJay/klbf-lab/pull/1) `gmankab:fix/wine-pipeline-library` → `main` · +23 −1 · 1 files · 1 commits · merged 2026-11-25 12:59 UTC On Wine with vkd3d-proton, opening a fresh host pipeline library with a zero-length Rust slice passes a non-null blob pointer. vkd3d rejects it, and KLBF continues compiling pipelines without a host library to save for the next run. This carries AugustoZFJ's null-blob fix over to KLBF's current pipeline library. It preserves the file-mapping and save logic and only changes how an empty library is created. On an empty cache, the original prebuild attempted 1,428 pipelines before I stopped it and created no host pipeline library. With the fix, the first batch saved 220 pipelines and reopened the library. Further batches reported library hits. Based-on: https://github.com/Marvisak/VIctory/pull/347 Tested-on: RX 6800, Fedora Linux 45, Wine and vkd3d-proton on RADV Assisted-by: gpt-6.2 sol xhigh
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.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:50:18 +00:00
github manually merged commit 08f9ac1e3a into gh-pr/1/base 2026-11-26 05:50:20 +00:00
Author
Owner

@⁠PastiiJay on GitHub · 2026-11-25 12:59 UTC · original

Thank you @⁠gmankab, clean fix and well measured. Merged into main; it will also go into the next test build on KLBF Lab Beta. Credits to AugustoZFJ for the original fix (Marvisak/VIctory#347).

**@⁠PastiiJay** on GitHub · 2026-11-25 12:59 UTC · [original](https://github.com/PastiiJay/klbf-lab/pull/1#issuecomment-7163146219) Thank you @⁠gmankab, clean fix and well measured. Merged into main; it will also go into the next test build on KLBF Lab Beta. Credits to AugustoZFJ for the original fix (Marvisak/VIctory#347).
This discussion has been locked. Commenting is limited to contributors.
No description provided.