perf(pipeline): start a host pipeline when a list being recorded binds it (VICTORY_PIPELINE_KICK, VICTORY_PIPELINE_BOOST; off by default) #637
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/lobomfz--VIctory-xmem!637
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-637"
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?
@Raptorbk45 on GitHub · 2026-12-05 22:37 UTC · original
Raptorbk45:perf/pipeline-start-at-bind→main· +193 −7 · 6 files · 1 commits · openWith list calls only written down (
list::thin) and translated later, a frame's new pipelines are found one after the other: each draw queues its own host pipeline at translation time and waits for it before the next draw is even looked at. In one long frame we traced, nine new pipelines of 25–90 ms each stood the frame for 344 ms while seven pipeline workers were idle.VICTORY_PIPELINE_KICK=1:SetPipelineState,Resetand list creation (the title's call, before translation) queue the pipeline's host pipeline if it is neither made nor asked for, without waiting and without marking it used. A new queue levelKICKEDsits between the draw-requested ones and the early (prewarm) ones; a draw asking for it later promotes it as before.VICTORY_PIPELINE_BOOST=1: a non-screen worker making a pipeline that a draw asked for (or, with the kick, a list bound) runs atBELOW_NORMALinstead ofLOWESTwhile it makes it.Both off by default. With both off nothing is queued at bind (
pipeline::kickreturns at the switch check), the queue never seesKICKED, and the worker priority is not touched: same behaviour asmain. Compared by reading the paths; the only runtime cost when off is one cachedOnceLockread per bind.How it was checked
Run after the final edit, on Linux (CachyOS), against
mainat8c4e6633:./build.sh check(release, MSVC target): passes; the one warning (room_latelynever used,resource.rs) is already onmaincargo xtask policy: passescargo test -p victory-core --lib menu(therun.conf.defaultentries parse): 18 passedPKG=victory-gpu ./build.sh test --lib -- pipeline::makeunder Wine: 9 passed, the two new ones includedNot run: the game. Nothing here was observed in play on this branch.
Branch head:
b42982aa.New tests in
pipeline/make.rs:bound_pipelines_go_between_the_early_and_the_asked_for(queue order and single hand-out; fails to compile/pass withoutKICKED) anda_bind_starts_the_pipeline_without_waiting_for_it.Data (old, from our fork, not re-measured on this branch)
On our fork on 2 December 2026 (a base of
mainfrom that day plus our own changes), kick + boost against neither, one play session each, frames of 100 ms or more went from 174 to 6 and of 200 ms or more from 6 to 2, at the same average (24.3 fps). Conditions: RX 7700 XT 12 GB, Ryzen 5 5600X, CachyOS, RADV fromsetup.sh's Mesa,CONSOLE=series-s, 1920x1080, no hardware ray tracing (VICTORY_BVH_HARDWARE=0),VICTORY_FRAME_INTERVAL_MS=0. The route of the two sessions was not fixed and there is one run each, so treat it as indicative. Whether it holds on currentmainwith a fully prepared pipeline cache (first-use waits are rarer then) is not known. Measurements welcome: comparelong framelines and thePipelineWaitUscounter (diagnostics build) with and without the switches.Cost
A pipeline bound and never drawn is now made anyway (when on). The boost may make workers compete with the translating threads during world entry on small CPUs; that is why it is a separate switch.
Checks
maindocs/SETTINGS.md(experimental speed switches) andrun.conf.defaultVICTORY_PIPELINE_WAIT_MSPR (same file, different functions; both add a test at the end of the tests module, so the second to land needs a trivial rebase)cargo xtask policy@Milkhaus-tech on GitHub · 2026-12-06 03:53 UTC · original
RDNA 4 A/B for
VICTORY_PIPELINE_KICK=1+VICTORY_PIPELINE_BOOST=1.Setup: RX 9060 XT 16 GB (RDNA 4, Navi 44), Ryzen 7 5800X, 32 GB RAM, Ubuntu 26.04 (kernel 7.0.0-44), repo Mesa 26.3.1 RADV, GE-Proton11-11, resizable BAR on. Series X profile, potato preset, 1920x1080 output,
VICTORY_FSR_4K=balanced, ML frame generation, ray tracing off.Method:
VICTORY_BENCH_ROUTE=downtown, with the same save restored before each run. I measured route start +30 s to +330 s from thestats: frame5 s windows (about 59 per run). Rendered fps is shown; generated frames are not counted. "p10" is the 10th-percentile 5 s window. One arm per run; the arms were interleaved, not all A then all B. The default arm varied from 31.6 to 33.4 fps over 8 runs, so differences under about 2 fps are noise.Build:
main@8c4e663+ #596 + #637 + #639 (runs 1-2). For run 3, #611, #599 and #626 were also merged, all with switches off. Every pipeline was prepared before the game started, and no run had a pipeline built live.The average frame rate didn't change. Frames over 100 ms were about half the default rate, and the p10 window was consistently at the top of the default range. With a full pipeline cache, this route has no first-use misses, so I'd expect the gain to be larger in a session with a cold cache. Visuals matched the default in screenshots. No errors or crashes.
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.