GPU: pipeline library saves run one at a time, with per-process temporary files #237
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!237
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-237"
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?
@fffluffy-dev on GitHub · 2026-11-24 22:58 UTC · original
fffluffy-dev:gpu/pipeline-library-saves→main· +97 −12 · 1 files · 1 commits · openTwo saves of the pipeline library could run at once: the end-of-run
save(true)and a pipeline worker's periodicsave(false). Both wrote the samehost-pipelines.tmpandearly-pipelines.tmp, so one could truncate the file the other was about to rename over the library. Nothing keeps two runs off one cache folder either.one_save): a periodic save that finds one running is skipped; the end-of-run save waits for it. Same idea as Marvisak/VIctory#1660..tmp-<pid>) and removed when a rename fails.addedis lowered by what was saved only after the rename succeeds. Before, it was zeroed before the rename, so a failed rename dropped those pipelines until another one was added.Validation (cargo-xwin, x86_64-pc-windows-msvc, tests under Wine):
cargo test -p victory-gpu112 passed, 1 ignored, with two new tests (a_periodic_save_skips_a_running_one_and_an_end_of_run_save_waits,a_save_leaves_a_whole_file_and_no_temporary_one); clippy-D warningsclean with and without--all-features;cargo xtask policyok. Not run against the title.AI use: written with Claude Code (Claude Opus 5.5); reviewed and posted with my approval. No game files were used.
@kaayzouee on GitHub · 2026-11-25 01:24 UTC · original
Duplicate of #164?
@BradRoland on GitHub · 2026-11-25 23:42 UTC · original
I tested recovery of the early-pipeline list on Windows with this change integrated onto
32b31f7. I used a real D3D12 pipeline library, preloaded one synthetic key, requested a second key, and keptearly-pipelines.txtopen without delete sharing duringsave(true). That prevented the rename and preserved the original list. After closing the handle I calledsave(true)again, without requesting any new pipelines.On unmodified main, the second save still left only the original key on disk. With
fb89610it retained both keys. All seven pipeline-library tests passed on the default hardware path. The retry case also passed on WARP. This exercises failure and recovery through the public save path with an actual Windows sharing violation.I published the regression test as a separate commit that applies cleanly to this PR head. It runs with
cargo test --locked -p victory-gpu --lib --features diagnostics failed_early_list_replacement_is_retried_without_new_pipelines -- --nocapture. Regression testView 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.