Repository navigation
Conversation
…in the world), not first after 180 s A cold run is one burst of new pipelines from start to end, so the busy save (one every VICTORY_LIBRARY_SAVE_BUSY_S, 180 s by default) saved nothing until its first 180 s. A run that died before that (a device lost 40 s into the world) left the library as it was at launch, and the next start was cold again. VICTORY_LIBRARY_SAVE_MADE (off by default) only covers libraries under 64 MB at launch and saves every 20 s. Two early saves, each once a run, from the pipeline workers' busy save (never the submitting thread): - once 200 pipelines were added since the last save; - once the title has been 30 s in the world, with something added. Neither while a library load is in the driver (whatever VICTORY_LIBRARY_SAVE_AFTER_LOADS says): the save stays due for a later pipeline. Neither once the library is 256 MB or more (its last save, else its file at launch): a warm library is as before. save()'s own interval, its memory-pressure interval and the other run's writer lock still apply; an early save is marked done only once one wrote the library. The busy saves then come every VICTORY_LIBRARY_SAVE_BUSY_S from the last early one. VICTORY_LIBRARY_SAVE_EARLY=<pipelines>,<seconds> (default 200,30; either 0: not that one; 0: none, as before). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…w, not as a load that failed A load answers E_INVALIDARG for a name the library does not hold: the first time of every pipeline. The trail said "the library did not load it (... 0x80070057)", and device-loss reports quoted that as a failure. It now says "new: not in the library yet"; other refusals, and every one with VICTORY_LIBRARY_LOADS=never, are told as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A run that dies in its first minutes keeps none of the pipelines it made, and the next start is cold again.
save_while_busy()saves at most everyVICTORY_LIBRARY_SAVE_BUSY_S(180 s), and the first busy save of a run waits a full interval. The save when the queue runs dry never comes in such a run.VICTORY_LIBRARY_SAVE_MADE=N(Pipeline library: VICTORY_LIBRARY_SAVE_MADE=N saves a library under 64 MB at launch in a burst too once N pipelines were added, so a cold run that dies keeps what it made (off by default) #1679) is off by default, and only covers libraries under 64 MB at launch.the library did not load it: ... (0x80070057). A load answersE_INVALIDARGfor a name the library does not hold, which is the normal first time of a pipeline. v2026.11.29.02: DXGI_ERROR_DEVICE_HUNG after 40-190s on RTX 5080, pipeline library fails to load 72/72 entries #3050 read that line as "the pipeline library fails to load 72/72 entries".Fix
Early saves (
library.rs,save_while_busy). Two saves, each once a run, from the pipeline workers (the only callers ofsave_while_busy, threadsvictory-pipelines-N), never from the submitting thread:crate::world_since, the first frame of 500 draws), with at least one pipeline added.Gates, in
Early::due(a pure function, unit-tested):loads_running(), whateverVICTORY_LIBRARY_SAVE_AFTER_LOADSsays). The serialise waits for the load and every later load waits behind the serialise (the comment's 20.8 s save and 15 s freeze). The save stays due, and a later pipeline makes it. Loads are asked only of a save that is due, so the steady state takes no extra lock.save()'s own rules still apply: its interval (save_every, at least 20 s), the longer interval under memory pressure,VICTORY_LIBRARY_SAVE_QUIET, and another run's writer lock. An early save counts as made only once a save wrote the library (a newSAVEScounter). One that was refused stays due.After an early save, the busy saves come every
VICTORY_LIBRARY_SAVE_BUSY_Sfrom it, as before. The save when the queue runs dry and the one at exit are unchanged.VICTORY_LIBRARY_SAVE_EARLY=<pipelines>,<seconds>: default200,30. Either part0turns that save off;0alone turns both off, as before.Log:
host pipeline library saved early (VICTORY_LIBRARY_SAVE_EARLY=0: not) added=N by="pipelines added"|"time in the world".The trail (
not_loaded): a pipeline the library does not hold isnew: not in the library yet. Other refusals, and every one withVICTORY_LIBRARY_LOADS=never, read as before (the library did not load it: <error>). This is a separate commit; drop it if you want one change per PR.Verification
Windows 11, rustc 1.98.1 (the pinned toolchain), Ryzen 7 9800X3D. On 2a33b73 (rebased onto 41adb55), with its own target directory (
C:\gt-lib):cargo check -p victory-gpu --locked -j 6: passes (the log showsvictory-gpubuilt fromC:\g-libsave\crates\victory-gpu). None of the crate's 18 warnings is inlibrary.rs; they are existing dead code and unused names elsewhere (shader_cache.rs:14,host/font.rs:55,host.rs,resource.rs:3573,streamline.rs:1004and others).cargo test -p victory-gpu --lib --locked -j 6 -- library: 20 passed, 0 failed, 0 ignored. The new ones:the_early_saves_by_the_switch: unset or unreadable gives200,30;0(and0,0) none;50,50,10,0,10,50,0.each_early_save_comes_once: 199 pipelines none, 200 the first; made once; 30 s in the world the second, whether or not the first was made; the pipelines' first when both are due, then the world's; nothing added, none; either part 0.no_early_save_of_a_large_library_or_beside_a_load: none at 256 MB or for a warm 1.3 GB library; none while a load runs, and still due after it; loads asked only of a save that is due.a_pipeline_not_in_the_library_is_new:E_INVALIDARGis "new",E_OUTOFMEMORYis told as it came.cargo clippy -p victory-gpu --all-targets --locked -j 6and the same with--all-features: no warning on a touched line. The two inlibrary.rsare on main's lines:incompatible_msrvat 90 (try_lock) andmanual_is_multiple_ofat 776. Both runs finish with warnings only (victory-gpu lib 27 / 25, lib test 30 / 24, victory-shader 3), all outside the diff.NOT tested
loadedagainstmade(the T06 check, under 5 min of game);library.saving) unlessVICTORY_LIBRARY_STORE_LATERhands the pipelines out first (on by default).Serializeafter a removal is not known to work.save()'s own interval lets one through, andEARLY_DONE'sfetch_orlogs once.Overlap
gh pr list --state open --search: "library save", "pipeline library", "LIBRARY_SAVE", "save early", "cold library", "save_while_busy".VICTORY_LIBRARY_SAVE_MADE=N(off by default; the code is already on main). This branch keeps it as it is. The early saves come first insave_while_busy, so with both, the first early save is this one, thenSAVE_MADE's every N.VICTORY_LIBRARY_SAVE_AFTER_LOADS=1. The early saves never run beside a load, with or without it.compact). Same file, merges cleanly.compact()and the writer lock. Merges cleanly.AI use
Claude Code (Claude Opus 5.5) wrote the change and its unit tests, ran the checks listed above, and wrote this note. Nothing was run in game.
🤖 Generated with Claude Code