Stop long freezes on pipeline compiles #2580
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2580"
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 Kajcsi on 2026-11-29T14:36:18Z.
Two changes to how the pipeline maker waits. Together they fix the long stutters and freezes (half a second up to about 10 seconds) while driving and on new screens. What is left is typically a short microstutter when a pipeline is seen for the first time.
What was happening
Measured on an RTX 4090, Series S profile, DLSS with frame generation, in a long drive through the city:
VICTORY_PIPELINE_WAIT_MS), which a compiling pipeline rarely made. So the frame stalled for about 500 ms (often two frames in a row), and its draws were dropped anyway. These were the hard stutters when driving into streets not seen before.The changes
VICTORY_PIPELINE_COMPILE_GRACE_MS(default 50) once their build reaches the driver's compiler or translates a shader afresh. A pipeline already in the driver's cache arrives within that time.victory warm --waited. Before a run, it makes the book's compute pipelines and screen passes that no earlier run has drawn with, each in a process of its own.play-foxhound.ps1runs it before the game whenVICTORY_WARM_WAITED=1(off by default). Pipelines made before are skipped, so later starts spend about a second there. The first run made 3,801 pipelines in 511 s with 10 processes, none failed. Per pipeline: p90 5.9 s, p99 8.2 s, longest 33 s. Each of those used to be an in-game freeze.VICTORY_PIPELINE_WAIT_COMPILES=1restores the old waits.Results
Same PC, same profile, comparable drives:
In that run, 228 frames took over 100 ms. These are the short microstutters that remain: a pipeline's first use, with the frame going on without it.
Trade-off
A compute pass or screen pass never seen before can be skipped for a few frames while it compiles, instead of freezing the game. A one-shot compute pass skipped that way can give a wrong picture for that moment. After
warm --waitedthis is rare, because the book barely grows during play (67 new of 88,634 in one session). In the run above, one dispatch was dropped.Testing
main:cargo build --release --locked -p victorypasses. Of thevictory-gpupipelineunit tests, 75 pass, including the maker's new ones. Threepipeline::hosttests make real pipelines on the card. They failed while the game was running on the same card with the PC's memory nearly full. They test code this PR doesn't change, and I haven't rerun them on an idle card yet.VICTORY_WARM_WAITED=1. The "before" column is the same setup without either change.🤖 Generated with Claude Code
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by DrDarkDK on 2026-11-29T18:14:28Z.
I tested #2580 on an RTX 4070 Ti / Ryzen 9 7900X. I compared clean #2334 (
77427629) with #2580 (c9ffe60a) merged on top. Both runs were windowed at 2560×1440 with DLSS Ultra Performance and Frame Generation at 2×.First 55 seconds of logged gameplay:
The patched run recorded zero screen-pass timeouts across all 68 seconds of logged gameplay. This was one run per build. The draw counts differed, but the recurring 10-second wait was gone with Frame Generation still active at 2×.
AI-assisted with Codex.