GPU: persist early-pipeline keys even without a host pipeline library #1429
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!1429
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1429/head"
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?
@fuzeofficlal on GitHub · 2026-11-24 17:58 UTC · original
fuzeofficlal:fix/early-pipeline-keys-without-library-768→main· +146 −37 · 1 files · 1 commits · closed without mergingFixes #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.@Filip722 on GitHub · 2026-11-25 00:28 UTC · original · edited 2026-11-25 00:32 UTC
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.
@Marvisak on GitHub · 2026-11-25 01:27 UTC · original · edited 2026-11-25 06:27 UTC
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
@Marvisak on GitHub · 2026-11-25 22:01 UTC · original
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