Pipeline cache: save the early list when there is no host pipeline library (Wine/Proton) #259
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork!259
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-259"
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?
@Ortomanic on GitHub · 2026-11-24 23:02 UTC · original
Ortomanic:fx/early-list-save→main· +78 −11 · 3 files · 2 commits · openChanges
pipeline::library::save()returned before writingearly-pipelines.txtwhen there was no host pipeline library. vkd3d-proton refuses the empty blob the library is created from (no host pipeline library: pipelines are not kept), so under Wine/Proton the list of pipelines a run drew with was never written. The next launch then started nothing during loading and found every pipeline at its first draw, in the world.The early list is now saved whether or not a library exists. Nothing changes where a library is made.
This is separate from #147 (cache key, worker placement), #164 (save races) and #172 (skipped pipelines): none of them writes the list when the library is missing.
Validation
the_early_list_is_saved_with_or_without_a_librarypasses and fails with the old early return (run under Wine with the otherpipeline::tests, 12 passed).cargo clippy --workspace --all-targets --locked -- -D warningsfor the Windows target, with and without--all-features, andcargo test -p victory-shader -p xtaskpass on this branch (cross-compiled from Linux with the pinned toolchain).AI-assisted patch with local build and runtime validation.
@avt0m4t48 on GitHub · 2026-11-24 23:42 UTC · original
I reproduced a retry gap on this exact head (
dfbc779) withlibrary()returningNone. A source-built control writes the early list successfully. In the failure case, a directory atearly-pipelines.txtmakes the first rename fail. After removing that obstruction, callingsave(true)again without anothernote_used()returns without saving the list.The no-library path clears
USED_CHANGEDbefore publication, so no later sweep sees pending work unless a new pipeline key arrives. Restoring the bit when the write fails made the same filesystem probe pass. This is the no-library counterpart of the retry behavior discussed on #164. The driver boundary was simulated and the file operations were real.@Filip722 on GitHub · 2026-11-25 02:40 UTC · original · edited 2026-11-25 02:48 UTC
On Bazzite 44 with the RTX 5060 Laptop GPU (8 GiB), I can confirm the missing-library case and a separate write-retry issue on this PR.
With this change alone, the focused early-list test passed under Proton. The rejected-blob → empty-library check failed, and a second request for the same synthetic mesh pipeline compiled it again. Applying Marvisak/VIctory#347’s null empty-blob argument made all three tests pass, including the application library’s per-pipeline load counter.
I also compared two no-input Series S menu launches per build, with matching cache/prefix seeds and each build retaining its own cache between starts. The control used our local display and physical-page test tree. It could not create the library, wrote no early list and started with zero keys on both launches. Adding this PR and the null-blob call saved four keys and an 824-byte library on the first launch. The second read four keys and reopened the library. All four reached the account picker.
A subsequent loading run from that menu cache recorded
loaded=4, started_early=4, made=5, which verifies actual application-library hits across the restart on this GPU. It saved 1,218 distinct early keys. The next launch opened the 8,888-byte library and recorded 33 hits at the account picker. After confirming the picker on a further restart, the title reached loading artwork with 273 application-library hits from a 53,624-byte library. The host-memory pressure guard ended that run at 143 seconds. World rendering and load-time improvement remain unverified.I reproduced a retry failure on public head
dfbc779by putting a directory at the early-list destination, noting one key, saving, removing the directory and saving again. The second save left the file missing (Windows error 2). With the dirty state restored on write failure, it saved the original key without another draw. The isolated regression passed, and the repository asset-policy check passed. Cherry-pick the focused retry fix and test.NVIDIA 615.78.08, Proton Experimental 11.0-20261112, vkd3d-proton 3.2.0
ec20719452e916b, Windows MSVC release builds. OpenAI Codex (GPT-6.2-Sol) prepared the local integrations and retry fix, ran the tests and wrote this report.@Ortomanic on GitHub · 2026-11-25 15:11 UTC · original
Thanks @avt0m4t48, @Filip722 and @ErRusso. The retry gap is fixed on this branch.
9baa3acis a cherry-pick of @Filip722's6ca0174(authorship kept). The dirty flag is now taken together with the key snapshot, after the library branch, and set again when the write fails. A failedserialisereturns before the flag is taken, so that path keeps it too, which covers the second case in the review.the_early_list_is_saved_with_or_without_a_libraryto put a directory atearly-pipelines.txt, save, remove it and save again without anothernote_used().pipeline::tests (11 on the branch, 12 on the tree merged with0b0074e).0b0074e;cargo test -p victory-shader -p xtaskpasses on the merged tree. Clippy with-D warningspasses on the branch in both feature sets; on the merged tree it fails only with the errors0b0074ehas on its own (#982, #841).Not done here: the null empty-blob argument from Marvisak/VIctory#347 that @Filip722 tested alongside. That makes the library itself work under vkd3d-proton, which is a larger change than this PR's "save the list when there is no library"; I would rather it went in on its own. The head was not rebased.
AI-assisted (Claude Code); built and tested locally on CachyOS, Wine 11.22, RTX 5080.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.