GPU: save early pipeline list without re-serialising the library #3181
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!3181
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3181"
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-26 11:21 UTC · original
fuzeofficlal:fix/gpu-early-pipeline-save-no-serialize→main· +148 −28 · 1 files · 1 commits · openSummary
pipeline::library::savepreviously checkedl.added == 0 && !l.prebuilt_changed && !USED_CHANGED.swap(false, Ordering::Relaxed)underlibrary.state, and then unconditionally calledGetSerializedSize(), allocated a buffer, calledID3D12PipelineLibrary1::Serialize(), and rewrotehost-pipelines.bineven whenadded == 0and onlyearly-pipelines.txt(USED_CHANGED) had changed. In addition, ifzeroed(size)orSerialize()failed and returned early,USED_CHANGEDhad already been cleared so theearly-pipelines.txtupdate was lost.Fix
l.added > 0 || l.prebuilt_changedand releaselibrary.statebefore calling a helpersave_files.USED_CHANGEDindependently by writingearly-pipelines.txtwithout serializing or rewritinghost-pipelines.binwhen the library itself has no new pipelines; restoreUSED_CHANGED = trueif creating the directory or writingearly-pipelines.txtfails so a later save retries.library_changedis true, keepingearly-pipelines.txtintact even if serialization fails or runs out of memory.Verification
Added three deterministic unit tests in
crates/victory-gpu/src/pipeline/library.rs:saving_only_the_early_list_skips_the_librarysaving_the_early_list_survives_failed_serializationsaving_the_early_list_retries_after_an_io_errorRan:
cargo test --locked -p victory-gpu pipeline::library -- --test-threads=1: 14 passed, 0 failedcargo clippy -p victory-gpu --all-targets --locked -- -D warnings(default and--no-default-features): cleancargo test -p xtask --locked policy::tests::repository_passes_policy: passed@Dukestar69 on GitHub · 2026-11-26 11:26 UTC · original · approved these changes
Verified on RTX 5090 against
origin/main(63bcca4):cargo test -p victory-gpu --lib pipeline::library:: -- --test-threads=1: 14/14 passed (includingsaving_only_the_early_list_skips_the_library,saving_the_early_list_retries_after_an_io_error, andsaving_the_early_list_survives_failed_serialization).cargo clippy -p victory-gpu --all-targets -- -D warnings: clean.cargo xtask policy: 191 files ok.Cleanly saves the early pipeline list independently without re-serializing the full pipeline library.
Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
@steven-seagull27 on GitHub · 2026-11-26 12:05 UTC · original
Confirmed
8a216f5across fresh processes on the RTX 5080 and Windows inbox WARP. An early-list-only save left the compiled binary untouched on both. When I held the early list open during a full save and released it before the retry, the next process recognized all 3/3 prebuilt keys, loaded all three PSOs from the disk cache and read back 96/96 correct words. Repeated twice per adapter.Writing the early list independently makes a measurable difference here: the overlapping #3188 head loses all three prebuilt keys under the same one-time sharing violation. Four-revision comparison and reusable restart test
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.