Pipelines: draws don't wait for a pipeline the memory guard put off (stalls on low-memory PCs) #4755
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!4755
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-4754"
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?
@Trillazill on GitHub · 2026-12-01 05:21 UTC · original
Trillazill:fix/no-wait-for-put-off-pipelines→main· +37 −3 · 1 files · 1 commits · closed without mergingWhat this changes
When the memory guard puts a pipeline's compile off (
Pending::defer: commit underVICTORY_COMMIT_FLOOR_MB), the pipeline pauses forRETRY_AFTER_MS(1 s) and is queued again by the next ask.ready()already skips the wait during the pause. Once the pause is over, though, every draw that asks for it waits again, up to the frame's budget (VICTORY_PIPELINE_WAIT_MS, 500 ms; 10 s for screen passes). On a PC that stays short of commit, the guard puts it off again, so frame after frame waited out its budget for a pipeline that wasn't going to be made. The draw was dropped after the wait anyway.Now
Pending::put_off_before()(the compile was put off at least once and isn't made yet) makesready()skip the wait, just as during the pause. The pipeline is still queued again after each pause, and a worker makes it once the guard lets it. Only the frame-blocking wait goes.VICTORY_PUT_OFF_WAIT=1brings the wait back. It is anasked_for!switch, soVICTORY_ABcan flip it.This sits beside #3347, which turns the guard off by default. If the guard stays on, frames no longer stall on what it puts off.
Measured (RTX 4080 16 GB, 32 GB RAM, Series X, diagnostics build of
41adb551, the prison cell, input fromVICTORY_KEYS_FILE)free_commit_mbat 0.4–2.4 GB against its 4 GB floor.VICTORY_AB=20,VICTORY_PUT_OFF_WAIT, withVICTORY_COMMIT_FLOOR_MB=60000so that the guard puts every new compile off, as it did above), 9 phases each:VICTORY_PUT_OFF_WAIT=1(as before)Both non-zero readings under this change (21.8 and 22.0 ms) are the first reading after a switch from an old phase. Frame times in that run: mean 42.5 vs 45.5 ms, p90 54 vs 56 ms. The cell needs few new pipelines, so the difference is small there. In run 3's stretch it was the whole frame.
Tests
pipeline::make::tests::a_pipeline_whose_compile_was_put_off_for_memory_is_made_laternow also checks that after the pause a draw doesn't spend its budget on the pipeline, and that it is queued again for a worker.cargo test -p victory-gpu --lib -- pipeline::make::: 30 pass.cargo test -p victory-gpu --no-fail-fast: 919 pass, 3 fail:shader_cache::tests::every_switch_of_the_translator_is_in_the_keyandhost::menu::tests::a_change_is_saved_at_once_however_the_game_was_startedfail the same way on41adb551;host::card_steps::tests::places_written_after_sending_are_learnedpasses alone.-p victory-gpu --lib --tests, with diagnostics): nothing in the lines this change adds or touches (make.rs:1337is flagged on main too).cargo xtask policy --staged: ok (1 file).No game data, logs or other files from the title are in this change.
🤖 Generated with Claude Code
@Trillazill on GitHub · 2026-12-01 06:20 UTC · original
Closing: on main
5fabb46ethis no longer happens. With #2392 (pagefile growth counts as commit left), the memory guard put off 0 compiles in a 6-minute run on the same PC and route, where it had put off 2,048 at41adb551.wait_for_pipelinealso stops waiting as soon as a build is put off now. Frames waited 0.8 ms a frame for pipelines on average (worst 72 ms), where at41adb551it was 80–500 ms.Pull request closed