Host pipelines: a draw's wait ends when the memory guard puts the compile off (500 ms held every second at the commit limit) #3398
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!3398
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3398"
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?
@Revono on GitHub · 2026-11-29 22:47 UTC · original
Revono:fix/pipeline-wait-ends-when-compile-put-off→main· +46 −6 · 1 files · 1 commits · closed without mergingNo issue filed for this; found while tracing a half-second hitch on a PC at its commit limit.
What it changes
A pipeline whose compile the memory guard puts off is paused for a second and not waited for meanwhile. When the pause ran out, the next draw queued it again and waited for it. A worker took it, was refused within the millisecond and put it off again, which wakes the waiters, but
waitonly looked at whether the pipeline was made. So the draw stood there for the rest of its 500 ms budget, once a second, for as long as memory stayed short.pipeline/make.rswait: the loop also ends when the compile was put off (Pending::retry_waits).deferalready sets the pause before the waiters are woken, so nothing is missed.a_wait_ends_when_the_compile_is_put_off_for_memory: a worker thread refuses the compile 30 ms into a wait. It waits 508 ms without the change and returns with the refusal with it.a_pipeline_made_ready_is_the_one_the_title_getstakes a key of its own. It shared the process's list of used keys with the tests that ask for a pipeline of no shaders, on other threads, and passed or failed by their order (it began to fail once the new test changed the timing).How it was tested
frame times: 13 frames, median 40.0 ms, p95 51.2, p99 506.2, the same in every one-second window, withdraws dropped for pipelines not made yet ... keys=33f518084a3194a8b5ef1c17ab96ab87once a second andhost pipeline not made: the PC is short of memory (memory guard).median 49.3 ms, p95 52.0, no frame near 500 ms in any window.cargo testpassed for the crates it touches: yes forcargo test -p victory-gpu --locked --lib pipeline::make(31 passed, run six times in a row).cargo xtask policy --staged:asset policy: 1 files ok.cargo clippy -p victory-gpu --all-targets --locked -- -D warningsstops invictory-shaderonmainas it is (two unused imports and awhile_immutable_conditioninemit/lower), before it reaches this crate; without-D warningsthis change adds no warning.Checked for overlap
wait's loop, and this does not touchmemguardorcompilemem.A pipeline whose compile the memory guard put off is paused for a second and not waited for meanwhile. When the pause ran out, the next draw queued it again and waited; a worker took it, was refused within the millisecond and put it off again, which wakes the waiters. But the wait looked only at whether the pipeline was made, so the draw stood there for the rest of its 500 ms budget, once a second, for as long as memory stayed short. Seen on an RTX 4070 Ti SUPER with the PC at its commit limit (75.1 of 75.9 GB): frame times of 38 ms median with one of about 500 ms in every second ("p99 506.2"), and "draws dropped for pipelines not made yet" for the same key each second. With this the same scene has no such frame. The wait now ends as well when the compile is put off. The test waits 508 ms without the change and returns with the refusal with it. The test of a pipeline made ready takes a key of its own: it shared the process's list of used keys with the tests that ask for a pipeline of no shaders, on other threads, and passed or failed by their order.@Zedwhyrex on GitHub · 2026-11-30 01:34 UTC · original
Confirmed in game: this fixes the 0.1 fps freeze when going into water. The PC is an RTX 4060 8 GB with a Ryzen 5 7600 and 32 GB RAM. Settings: Series X, DLSS Balanced, frame generation 2x; the system-managed pagefile gives a commit limit of 36,969 MiB.
Plain v2026.11.29.05. Going into water binds a new pass over the screen (vertex
8f5d582e91672612, pixelb2df6d3e752b4000,DXGI_FORMAT(87)). The memory guard puts its compile off: "host pipeline failed ... hr=0x8007000e", 12 ms into the wait. The draw then waits the whole screen budget, every frame:This happened 14 times, 10.0 s apart: two keys,
860c083c...anda6d3d14f..., so 20 s frames. The card was about 2 % busy.v2026.11.29.05 with this PR (merged locally on top of #3500). The same place, the same pipeline, the same deferral:
There was no "a pass over the screen was waited for" line in the whole session, and no frame over 2 s. The frames around it ran at 79-94 ms, the normal rate for that scene. The water pass is dropped until it can be made instead of freezing the game.
The same signature appears in #2303, #2319, #2385 and #3467. The regression came in with
60a08ef2: compiles are put off rather than refused, sowait()never saw a result.@SergDi on GitHub · 2026-11-30 09:32 UTC · original
Independent Windows check on RTX 4080 16 GB / Ryzen 5 7600 / 32 GB RAM / driver 610.88, base
41adb55167fa778fcaa5dc36fa18a1fa8dacd657versus that base plus this PR ata22a26d7ff687b5a37f8c5fdcad30f96f4db5ba0.Focused test: tests-only on base fails with
waited 502.3235msfor the 500 ms budget. With the full patch, the focused test passed three times andpipeline::makepassed 31/31 twice (cargo test --locked --release -p victory-gpu --lib pipeline::make -- --test-threads=1 --nocapture).Runtime mechanism check, deliberately induced: the signature was absent in my ordinary logs, so I set process-local
VICTORY_COMMIT_FLOOR_MB=7168identically on both arms. No pagefile/global setting change. Release builds, separate cold cache per leg, copied save, 1440p DLAA, FG/RT off, THIN0; order A B B A. The observation window was 120 s after the third prelude key.ms=10000 made=falsemade=trueat 2357 msms=10000 made=falseOn base, the same screen pipeline was put off by the guard, then consecutive frames exhausted the entire 10 s screen-wait budget. With the patch, no unmade wait exhausted that budget. This independently exercises the screen-pass case already reported above, in addition to the ordinary 500 ms unit test.
Limits: scenes were not matched and both arms were heavily degraded by the artificial floor. This is mechanism evidence, not a performance ABBA or a claim of higher normal FPS; other long loading frames remained. All runs closed normally. No raw title logs/dumps are attached.
AI assistance: Claude ran the isolated tests and collected the hardware evidence; Codex reviewed the report and publication wording.
Pull request closed