Persist first-use pipeline history without serializing the driver library #1989
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1989"
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 trustno1-coder/VIctory-NVIDIA. Originally posted by NotADonky43 on 2026-11-29T05:56:34Z.
Fixes #1982. A burst of new actual-use keys starts one background writer. It coalesces observations for one second, merges with the on-disk set under a cross-process lock, and atomically replaces only early-pipelines.txt. Clean processes (including warm workers) do not publish. Failures leave a pending retry; a forced save also flushes pending hints. No changes to sampler safety, dispatch ordering, shader translation, or the pressured native-library save interval. Abrupt termination before the first checkpoint can still lose uncheckpointed observations. Native test covers locked-file retry, racing observation, preservation of existing keys, and no-op clean flush. Real Windows RTX 5070 Ti test on cumulative 8388c62b: seeded a private run with 1627 hints, observed 1629 before closing at the checkpoint. Native library SHA256 unchanged. A second process loaded the 1629-key list. Normal cumulative start with 1787 hints reached six heavy rendering windows. No title data or cache contents attached. Related performance evidence in #1268; this PR verifies persistence, not a new FPS gain.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Nazzgy on 2026-11-29T11:22:33Z.
Independent reproduction on the unpatched
829188eSeries S build under low Windows commit headroom. Two full PSO keys kept recurring in draw-drop records late in gameplay. Both were already in known-pipelines.bin, and both were missing from the early list and completed warm-up set. The run repeatedly took around half a second per frame while new compiles were being deferred.A useful end-to-end case for this PR is a late PSO request that reaches the memory guard, followed by an exit before the next library save. Check that its exact key is already in early-pipelines.txt, the subsequent warm-up stores it, and the next game loads that library. Also check the rendered 3D scene before comparing FPS. A white or dark world can still present successfully with a visible HUD and FPS counter.
Targeted warm-up follow-up on the same
829188eexecutable and checkpoint with the same Series S window settings. A private copy of the library stored all 12 observed keys and loaded on the following run. The two recurring keys stopped appearing in draw-drop logs. From 120 to 180 seconds after the first DLSS upscale, one-second reports containing a frame of at least 480 ms went from 51 of 51 to 1 of 57. The draw counts differed in that interval, so this comparison characterizes the stall pattern in these runs. It documents why retaining late PSO keys matters for the next warm-up.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by ArturoWolff on 2026-11-29T11:28:26Z.
Corroborating Nazzgy's late-PSO history result on Linux/Proton, with two retained runs of unmodified
829188e9(RTX 4060 8 GB, 16 GB RAM, GE-Proton 11-14). Both used the same ordinary starting profile and effective rendering settings, including requested RT, full write-back and DLSS/FG off. The second seeded the first run's ordinary application caches, not its driver cache. Both reached a defective opening cinematic, not rendered gameplay; the guard remained enabled.I compared the exact distinct keys in the normal capped
draws dropped for pipelines not made yetrecords with each retired run'searly-pipelines.txtandslow-pipelines.txt, without changing either list.The receiving baseline's
readyalready records demand before the PSO is ready;note_usedmarks new keys dirty. But the persisted early list still depends on the successful native-library/slow-list writes. This is consistent with the late-history gap in #1982 and explains why a nonempty but incomplete early list is not evidence of useful prewarm coverage.The log exposes at most 16 distinct keys per emitted record, and not every frame is logged. These are lower bounds, not the full requested set or a count of driver allocation failures. I have not established that every missing key has a persisted recipe, tested this PR, or obtained a matched prewarm/gameplay improvement. I agree with the proposed request-after-save regression: verify persistence of late requested keys independently, then distinguish described recipes, successful native PSO creation/storage, loads on the next clean start, and actual scene progress. This also seems useful for the separate RT preparation/restart work in #2148. No raw keys, shader bytes or cache contents attached.
AI assistance: Hermes Agent, working on behalf of ArturoWolff. (GPT 6.2 Sol High).
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by andrewpozdnakov7-jpg on 2026-12-01T10:40:04Z.
I cherry-picked your
fd1732f5onto currentmain5fabb46e, preserving your Git authorship. The two conflicts were inlibrary.rs, wheremainnow orders periodic and shutdown saves and uses the adapter-scopedsave_library. The rebased commit keeps that flow and checkpointsearly-pipelines.txtseparately. The newearly_history.rsis byte-for-byte identical to your patch. Rebased commit7dc512d2056b1a5785dfc8f2b3fa22e0a83fbb43On Windows/MSVC with Rust 1.98.1, the exact
checkpoint_retries_without_losing_old_or_concurrently_observed_keysregression passed. It covers a sharing conflict, existing entries and an observation racing the checkpoint.cargo xtask policy --stagedpassed for the two changed files.The branch is ready for your review and for use in this PR if you agree with the conflict resolution.
AI-assisted with OpenAI Codex.
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.