fix: a host pipeline library another setup rejects is kept beside the new one #392
No reviewers
Labels
No labels
accessibility
bloqué : binaire console
bug
chargeur
console-dll
cpu
documentation
duplicate
enhancement
good first issue
gpu
help wanted
invalid
performance
question
runtime-gdk
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/LooperSalty--AnyXboxX!392
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-392"
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?
@Skyfrye on GitHub · 2026-11-26 15:42 UTC · original
Skyfrye:nep/pipeline-library-slots→main· +240 −33 · 1 files · 2 commits · merged 2026-11-26 17:51 UTCChange
A host pipeline library that the host rejects is no longer replaced by an empty one. It is kept beside the new library as
host-pipelines.other. The next start of the setup it belongs to loads it from there.Why: two setups of the host on one machine, sharing the cache folder, rejected each other's library:
D3D12SDKVersion/D3D12SDKPath(apps/victory/src/main.rs), so with aD3D12\folder beside the executable they run on the redistributable D3D12 runtime (1.620).D3D12\folder beside it (nothing exported) loaded the library as usual.With one file:
In the runs of the title this fork works on, where diagnostics and release runs took turns, 10 of the last 40 starts on one day began empty this way. The worst: 1,750 to 2,700 pipelines being made and 0.1 to 1.5 fps for over two minutes of the opening cutscene. A run of the same build with its library loaded did not wait for pipelines there. The library lost was 703 MB.
What the change does (
pipeline/library.rs,open_dir):host-pipelines.otheris tried. When the host takes that one, the two files swap names: this run's saves replace its own library, and the rejected one stays for its setup.host-pipelines.other, in place of an older one that this setup rejected too. This run's first save makes a new library file.VICTORY_LIBRARY_OTHER=0keeps one file, as before.Linked issue: none.
Verification
Windows 11 26300, Rust 1.98.1 (MSVC), RTX 5080, on upstream
mainat84aa3c3(rebased onto8473267; no file of this PR changed in between), fromthird_party/victory:New tests:
setups_taking_turns_keep_each_others_librarycovers:The loader holds the mapped file open while the files are renamed, as the host's library does.
one_file_without_the_othercoversVICTORY_LIBRARY_OTHER=0: the rejected file stays where it is, and the other file is not looked at.Neither test builds without the change.
In the world, my copy of the game, Series X, release build of this PR on
mainat84aa3c3, with #354, #381 and #382 stacked:host-pipelines.other, and 64 KiB ofXwas put in its place.host-pipelines.binheld the 276 MB library, andhost-pipelines.otherheld the 64 KiB.D3D12\runtime. The unit test covers two setups taking turns.Oracle and test data
No game file. The figures come from the logs of my own runs of my copy of the game.
Checklist
E_NOTIMPL), never a fake success. (Nothing unimplemented here.)AI assistance: written with Claude Code (Claude Opus 5.5): finding the cause in the run logs, the change, its tests, the game run and this description.
🤖 Generated with Claude Code
Two setups of the host sharing the cache folder rejected each other's library ("created for a different version of the driver" one way, "the parameter is incorrect" the other). Each start after the other setup's began empty, and its first save replaced the other's library: the opening cutscene then made every pipeline anew. The rejected library's file now becomes host-pipelines.other. A start whose library is rejected tries that file, and when the host takes it the two files swap names. VICTORY_LIBRARY_OTHER=0 keeps one file. Co-Authored-By: Claude Opus 5.5 <[email protected]>@Lewandox on GitHub · 2026-11-26 16:42 UTC · original · reviewed
Reviewed
third_party/victory/crates/victory-gpu/src/pipeline/library.rs:Blob::at,VICTORY_LIBRARY_OTHER=0opt-out, dropping the rejectedBlobbefore renaming, and the two unit tests (setups_taking_turns_keep_each_others_libraryandone_file_without_the_other) cover the happy paths well.open_dir): If step 2 (rename(&other_path, &path)) fails (e.g. transient AV/Wine lock on the mappedother_path),pathhas already been moved tohost-pipelines.swapand isn't restored, leavinghost-pipelines.swapstranded (and unlikeNEXT_FILEinBlob::of, a leftoverSWAP_FILEafter a failed swap or mid-swap crash isn't recovered on the next start). Restoringrename(&swap, &path)on step-2 error (or recovering a leftoverSWAP_FILEinopen_dirwhenOTHER_FILEis missing) would make the swap resilient to partial failure.Not a blocker for the normal case — CI is 4/4 green and the logic looks solid.