Pipelines: a pipeline's draws wait for it once a run, not every frame (VICTORY_PIPELINE_WAIT_ONCE_MS) #3819
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!3819
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3819"
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?
@Remag501 on GitHub · 2026-11-30 08:22 UTC · original
Remag501:perf/pipeline-wait-once-cap→main· +102 −1 · 1 files · 1 commits · closed without mergingDisclosure
This change was written by an LLM coding agent (Kimi, via OpenCode), working with its operator, who reviewed the design and the diff.
What it changes
A draw that binds an unmade pipeline waits for it within the frame's shared budget (
VICTORY_PIPELINE_WAIT_MS, 500 ms). Because the budget is per frame, a slow pipeline that is bound every frame takes the budget again every frame until it is made — the re-burn measured in fxceless/victory-fork#1181 (a median of 761 ms a frame, 1.3 fps, under vkd3d-proton). And the tree's own numbers say the re-waits nearly never pay: every screen wait that ran out its 10 s once ran out again (55 waits, 550 s; 34 of the 43 waits after such a one too), while every wait under 5 s got its pipeline (make.rs, thescreen_wait_oncecomment).With
VICTORY_PIPELINE_WAIT_ONCE_MS=<ms>, one pipeline is waited for at most its cap in the whole run, passes over the screen included; past the cap its draws drop at once while the workers build it, exactly as after the frame's budget today. The cap is per pipeline and cumulative across frames, so the worst case for one frame is bounded and flat instead of occasionally 500 ms rechargeable by the same pipeline the next frame. Unset or 0: the frame's budget alone, as before. It composes with the frame budget (e.g.VICTORY_PIPELINE_WAIT_MS=50for a small consistent per-frame cost), and a pipeline that exhausts its cap is logged at powers of two.This is the same idea as the fork tiadiff/VIctory-NVIDIA-LowStutter's
VICTORY_PIPELINE_WAIT_ONCE, written against current main with the screen class folded in, per-pipeline accounting (Pending::waited_ms), and unit tests.How it was tested
dropped 466 (573 being made)).--set VICTORY_PIPELINE_WAIT_ONCE_MS=100 --set VICTORY_PIPELINE_WAIT_MS=50: the log showshost pipeline wait budget per frame millis=50and the newpipelines whose once-wait is spentlines firing n=8, 16, 32 — pipelines spending their cap once and their draws dropping at once while workers kept building; the run completed world entry with no crash and no watchdog stop. A matched play-window A/B (same player, same route, cold library both arms) is the one measurement still owed; the switch is off by default until then.cargo testpassed for the crates it touches: yes —victory-gpulib tests cross-built and run under Proton: 32 of 33pipeline::maketests pass (the one failure,a_waiting_draw_raises_the_worker_making_its_pipeline, fails identically on the unmodified tree under Wine, which does not honor the thread-priority raise), including the three new tests for the cap; the full lib suite's failure set is byte-identical before and after.cargo clippy -p victory-gpushows no new warnings.Checked for overlap
VICTORY_PIPELINE_WAIT_ONCE); fxceless/victory-fork#1181 (the re-burn report);VICTORY_SCREEN_WAIT_ONCEandVICTORY_PIPELINE_WAIT_FREEinmake.rsitself.@ -1051,6 +1094,20 @@ fn wait(p: &Pending, frame: u64) {boost(p, false);}let waited = started.elapsed().min(left);let before = p.waited_ms.fetch_add(waited.as_millis() as u64, Ordering::Relaxed);@andrewpozdnakov7-jpg on GitHub · 2026-11-30 08:30 UTC · original
The cumulative cap loses fractional milliseconds at this line. Both
held_room()and the remaining frame budget can leave less than 1 ms. Each such wait contributes zero towaited_ms, so a pending pipeline can keep consuming these slices across frames without spending its cap.I ran the exact
wait_once_leftand charge expression from6749a6bsequentially in a native Windows Rust fixture. With a 2 ms cap and wait slices of 750, 750, and 500 µs, the reported room was 2,000 → 2,000 → 2,000 µs. With nanosecond accounting it reached 1,250 → 500 → 0 µs. This reproduces the rounding loss with one waiter.Could the counter retain fractional milliseconds and include this case in the cap tests? The configuration can keep accepting milliseconds. The RTX 3080 Ti log from #3781 is also a Windows case of one screen pipeline consuming its per-frame timeout repeatedly.
If you reuse the regression case, please retain its authorship with
Co-authored-by: andrewpozdnakov7-jpg <[email protected]>.@trustno1-coder on GitHub · 2026-12-01 18:48 UTC · original
Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.
Pull request closed