GPU: cap cumulative wait per pipeline across frames and guard worker panics (#73) #125
No reviewers
Labels
No labels
accessibility
already-solved
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
merged
needs-decision
needs-game-run
needs-rebase
not-merged
nvidia
obsolete
question
security
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/avatarmanz--VIctory-7900XTX!125
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-125"
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?
@ESAT586 on GitHub · 2026-11-26 05:25 UTC · original
ESAT586:avatarmanz/pipeline-wait-cap-and-unwind→main· +111 −23 · 1 files · 1 commits · openFixes #73.
Problem
Fix (crates/victory-gpu/src/pipeline/make.rs)
Verification (zero game data)
(Authored and verified with Gemini 4 Neon — High Mode, AI coding agent — with zero game data.)
@gomeaw on GitHub · 2026-11-26 07:20 UTC · original
I reproduced a gap in the cumulative cap using the PR's
wait_withunchanged in a small host-independent harness. With shared frame budgets enabled, holdDONE.0, start a waiter for frame 1, and wait untilSPENTshows its reservation. Then start a waiter for frame 2 and wait for its reservation before releasingDONE.0. Both waiters read the samewaited_usbefore either charges it. With a 250 ms pipeline budget, they each waited 250 ms and the final charge was 500 ms.I would reserve the pipeline allowance before blocking, independently of frame accounting, and give back the unused allowance alongside the frame refund. A test with overlapping frames can cover this with shared frame budgets enabled. With
VICTORY_PIPELINE_WAIT_SHARED=0, callers in the same frame can also overlap.One other race to close while here: when
catch_unwindsurroundsget_or_init, another caller ofmakecan start initializing the emptiedOnceLockbetween the panic andset(None). Handle the unwind inside the initializer and returnNonethere so the refusal is published by the same initialization. That covers the synchronousnowcaller overlapping a pipeline worker.@gomeaw on GitHub · 2026-11-26 07:32 UTC · original
The reservation and initializer fixes are ready as a PR against your branch. The overlap test holds the first waiter before completion and checks that the second frame gets no reservation. The Windows job repeats that test eight times. The change is a single commit,
c326c7a, if you prefer to cherry-pick it.@avatarmanz on GitHub · 2026-11-26 07:36 UTC · original
Left open: a pipeline past its total wait is dropped instead of waited for, on every card; needs an in-game check on the 7900 XTX first.
@gomeaw on GitHub · 2026-11-26 07:46 UTC · original
The hardware A/B branch applies #125 and the reservation fix to
39031cb, with only pipeline scheduling and its tests changed. A paired 7900 XTX run with the same initial cache can compare the first world frame, screen passes that run once, and the p95 Present interval. The overlap regression passed eight consecutive times on Windows.View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.