Pipelines: the early list started from the book at the title's first pipeline (builds on #1114) #1268
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!1268
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1268"
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?
@mrp1no on GitHub · 2026-11-28 16:46 UTC · original
mrp1no:pipeline-prefetch→main· +262 −26 · 6 files · 2 commits · openBuilds on #1114 (its commit is the first one here); only the last commit is new. Without #1114 there is nothing to gain: the pipelines with static samplers are compiled at every start, and those compiles set the pace. Measured: 1,301 made, the queue empty 205 s after the world's first frame, as without this.
What happens
The early list (
early-pipelines.txt: the pipelines earlier runs drew with) is started when the title creates each pipeline. The title creates about 1,400 of them at its start, and about 900 more only when it loads a save, a few seconds before the world's first frame. Those 900 are loaded from the library then. While the title's threads run, a load takes 0.1-0.2 s on the lowest-priority workers.Measured with #1114 alone on an RTX 3060 (driver 621.40), i7-11700K, 32 GB, Series S, 720p:
What this changes
known-pipelines.bin(the bookVICTORY_PIPELINE_BOOK=1keeps;playturns it on) and started at once, on a thread of their own: 2,383 described in 0.2-0.3 s. They load during the logos and the menu.make::adoptgives it the same pending pipeline, so each is loaded once. Only keys on the early list are shared; every other pipeline gets its own, as now.VICTORY_PIPELINE_PREFETCH=0: as before.load_ms_each,make_ms_each).Measured (same PC, same save, warm library)
It varies with how soon the save is loaded after the menu (Enter was pressed by a script within seconds).
Tests
pipeline::make::tests::a_pipeline_made_ready_is_the_one_the_title_gets(new): a key on the early list gives one pending pipeline; any other key gives each its own.cargo test -p victory-gpu --lib -- pipeline::: 28 passed.cargo clippy -p victory-gpu --all-targets: only theshadow.rswarning that main has.🤖 Generated with Claude Code
@cxy0072019-sketch on GitHub · 2026-11-28 17:30 UTC · original
I ran a paired startup check on an RTX 5070 Ti (621.24) with an i5-14600KF, Series S mode, and 1080p output. Both runs used the same executable with #1114, identical copies of a recorded pipeline library and story save, separate driver cache directories, DLSS Quality, and 3× frame generation. The startup input script was the same.
The enabled run logged
wanted=2664 described=2627 started=2615 ms=244. I did not reproduce a faster queue drain in this pair. The meter reports roughly every five seconds, and the first qualifying samples had different draw counts (6,315 and 8,595), so this is one startup observation on this configuration. Both queues were empty by the later doorway test. The enabled run needed an extra reposition at the handle, which makes the two doorway FPS samples unsuitable for estimating the effect of prefetch.@mrp1no on GitHub · 2026-11-28 18:37 UTC · original
Thanks for the paired run. Your setup is the case where this cannot help, and I should have said so more plainly in the description.
With separate, fresh driver caches, about 700 pipelines were still pending at the first 3,000-draw sample in both runs. That queue is set by compiles, not loads:
The library's save line now tells the two cases apart. Could you look at
host pipeline library saved ... made=… loaded=… load_ms_each=… make_ms_each=…near the end of each log?madewithmake_ms_eachof a second or more: the drain is compile-bound, and the same with or without this.loadedat tens of milliseconds each: that is the case this targets.A second start on the same driver caches, with the library from the first, would show it.
72658a4434to4a18c322cc@NotADonky43 on GitHub · 2026-11-29 05:32 UTC · original
Independent evidence on early recipe coverage, not a test of this PR or #1114. RTX 5070 Ti, cumulative 901559a4, Series X opening, same precompiled shader seed (25,728 entries) and 110,956,160-byte native library. Followed the exact recordings delaying queued presents. One 2.58 s gap overlapped 2.44 s of a required pipeline wait; its one native creation took 2.81 s. It correctly bypassed the cross-process library for static samplers. Other slow keys really missed library lookup. Nine keys on the blocking recordings were all absent from the 1,550-entry early list; eight were present in independent prior compatible run histories. Changing only the private early list to the 1,787-key union, those eight built in both treatment openings, with no recorded >=2 ms first-use wait on the cohort in either. Total >=2 ms worker waits were 18.21 vs 0.50 and 6.63 vs 3.50 summed seconds (not wall time). Median reported p95 was 74.4 vs 64.3 and 59.65 vs 60.1 ms; different shots, warmed launch order base/union/base/union. Long opening gaps remained. Does not justify loading unsafe static sampler PSOs across processes or disabling required waits. It suggests preserving lightweight actual-use history independently of the heavyweight native-library save is worth investigating, particularly for sessions that close under pressure before another save. No game-derived keys, shaders or caches attached.
@trustno1-coder on GitHub · 2026-11-29 08:28 UTC · original
Thank you! An earlier version of this pull request was merged into main with its original commits and is part of v2026.11.29.01, where you are credited. GitHub does not show it as merged because new commits were pushed here after that merge. It stays open so those newer commits can be looked at next.
@Marsietiss on GitHub · 2026-11-29 20:29 UTC · original
Hi, a note from a fork. We took the idea of this PR (start the early list at the title's first pipeline, on its own thread) and built our own version of it. It is on by default in our pre-release: https://github.com/Marsietiss/Mangrove/releases/tag/v0.3.0-dev.1
One limit we found: on an empty cache the prefetch starts nothing, because it needs a book with the shaders, so a true first start does not get it from this alone. Whether a player's own book helps on later starts is not measured yet.
What helped a first start most was the rest of the batch: more workers, a slow lane, compute and base pipelines first, a seeded early list, and holding the first world frames briefly. The seeded list idea comes from ScarlettPort #154 and #254 (ZigZagBoi1/ScarlettPort); the rest is ours.
Dropped draws on a first start, one run each, RTX 5080 + Ryzen 9 9950X3D, Series S mode, fresh exe name (cold driver cache), empty pipeline cache, empty save, not a ranking:
So roughly 8-15x fewer dropped draws on a first start. Thanks for the idea.
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.