GPU: persist early-pipeline keys even without a host pipeline library #1428
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1429"
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?
Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-24T17:58:00Z.
Fixes #768.
Summary
early-pipelines.txtpersistence fromlibrary()inpipeline::library::saveso hosts or compatibility layers whereID3D12PipelineLibrary1is unavailable (or fails serialization) still atomically write sortedearly-pipelines.txtkeys wheneverUSED_CHANGEDis set.SAVE_EVERYthrottle timestamp when dirty state exists, and restoreUSED_CHANGEDon directory or atomic-write errors.Verification
early_pipeline_keys_persist_and_reload_without_a_host_librarytestinglibrary == Nonepersistence, deduplicated sorted output, and next-launch reload viawanted_earlyacross RTX 5090, AMD Radeon(TM) Graphics, and D3D12 WARP.cargo clippy --workspace --all-targets --all-featuresandcargo xtask policy: passed.Imported from Marvisak/VIctory. Originally posted by Filip722 on 2026-11-25T00:28:59Z.
I tested the Windows MSVC build of
48bf0d7under Proton Experimental 11.0-20261112 on Bazzite 44, RTX 5060 Laptop GPU, driver 615.78.08 and vkd3d-protonec20719. The new missing-library test passed, including reloading the saved keys. The focused library suite on the PR head was 2 passed and 1 failed. The failure was the existing rejected-blob test at empty library creation.Adding only #347 (
197c7ac) to the same head gave 3 passed and 0 failed in the same suite (0.82 s). This covers the missing-library path through the regression fixture. OpenAI Codex assisted with the build, tests and report.I also pushed a test-only follow-up on this PR head. It forces directory creation and atomic replacement to fail, removes each obstruction and verifies the original keys are saved and reloaded. Removing the dirty-flag restoration on a failed write reproduced the expected test failure. Restoring it passed on the same Proton setup (0.81 s). Cherry-pickable test commit.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T01:27:35Z.
Automated triage for the maintainers.
Merge candidate. It merges cleanly. On
main,library::save(crates/victory-gpu/src/pipeline/library.rs) returns early whenlibrary()isNone, so a run where the host refuses the pipeline library never writesearly-pipelines.txt, and the next launch has nothing to start early (#768, measured under Proton). The PR splits the saving intosave_to. The early list is written wheneverUSED_CHANGEDwas set, with or without a library.USED_CHANGEDis restored when the directory or the write fails. The library path behaves as before. I checked it againstnote_usedandwanted_earlyon main. One point for the maintainer:early_pipeline_keys_persist_and_reload_without_a_host_librarysets the process-wideDIRto a temp directory and depends on the globalUSED_CHANGED. Any other test in the same binary that reachesmake.rsnote_usedorsavecan race with its first assertion, and later saves go to the deleted temp path. A test-local cache path would make it robust.CI: passing (
check).Generated by Claude Code
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T22:01:13Z.
Automated triage for the maintainers, second look (a review against current
main, with builds and tests where they could change the verdict).Closing because it serves no host once the cause is fixed. On Windows
library()isNoneonly without a GPU or withoutID3D12Device1, and then no pipeline is made either. The case measured in #768 is Wine/vkd3d-proton refusing the non-null empty blob, which #1722 fixes directly. This also rewritessave(), which several other open PRs change, and its test sets the process-wideDIRto a temporary directory and asserts on the globalUSED_CHANGED, so other tests in the same binary can race it.If this is mistaken, reply here with what was missed and it will be looked at again. Thank you for the contribution.
Pull request closed