GPU: a screen pass's own pool never waits longer than the frame budget (fixes #2433) #2580
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2582"
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 Marvisak/VIctory. Originally posted by kais7654 on 2026-11-25T16:11:29Z.
Takes #2435 by @pushkarreddyy (adapted from @Belobug's tree) onto current main,
authorship preserved in the first commit, and addresses its triage's two
points.
What stays: the screen-pass classification (no vertex input, no depth or
stencil, triangle topology —
GraphicsState::screen_pass), and twopipeline kinds with their own queues, workers and per-frame budget
accounting: the ordinary pool (2..=8 workers) and two dedicated screen
workers. The lighting-table fills of #2433 (
PS_IntegrateEnvBRDF*,PS_AreaLightIlluminance, drawn once at world entry) are no longer stuckbehind a world's worth of pipelines, and a world's waits can no longer
spend a screen pass's budget.
What changes from #2435: no 20 s budget. A screen-classified pass is
nearly every full-screen draw the title runs, so a cold one could hold
the frame for seconds — the stall the budget exists to prevent. Both
kinds now share the same half-second budget; a misclassified pass can
only move pools, never wait longer than the ordinary pool allowed. The
screen workers make the one-off fills within moments, so a longer wait
is not needed for them.
Also, a draw whose pipeline was not made within its kind's budget is now
logged once by key ("a draw's pipeline is not made within the frame's
budget; the draw is skipped") — the drop the triage asked to see, so a
run that loses a once-drawn pass shows it and testers (thanks to the
readback protocol of #2435's thread) can turn it into the missing
evidence on the hardware where the drop happens.
Local check: clippy --workspace --all-targets with and without
--all-features, -D warnings clean; victory-gpu tests pass on a capped
RTX heap except the two failures that #1943's not-yet-merged fix owns.
Merge note (from #2435's review): #2250's
VICTORY_PIPELINE_THREADSenvadds worker count control where
queue()starts its pool — when itlands, its env should apply to the ordinary kind only.
Imported from Marvisak/VIctory. Originally posted by oni-swr on 2026-11-25T16:33:51Z.
oni-swr verification — head
44d4ade12bab84d01f78ac9ede603b3c0f19e715(merge baseda82e44, two commits behind main),origin/main67e8ae1401df112248aed36d0024483181b718b7Environment: Windows 11 Pro (26200), rustc 1.98.1, WARP only (
VICTORY_D3D12_WARP=1with--features diagnostics, which is what makes the host device the software adapter; Windows SDK 10.0.26100.0dxil.dllon PATH). No hardware GPU use in the reported runs, no game files, no retail data. Merge check:git merge-tree --write-tree origin/main <head>is clean. Tested both the PR head and the merge withorigin/main(7d523f8).Commands / results
cargo test --locked -p victory-gpu --features diagnostics --lib -- screen_pass pipeline::: head 17 passed, merged 17 passed, 0 failed, 0 ignored (includes the newscreen_pass_requires_triangle_without_inputs_or_depth)cargo test --locked -p victory-gpu --features diagnostics(lib 199 passed, 1 ignored): merged 3/3 runs green; head 2/3 green, 1 run failed onlymemory::tests::a_submission_that_missed_leaves_the_copies_at_once— a pre-existing WARP flake I also measured onorigin/main(9/60 runs), unrelated to this diff.cargo clippy --locked -p victory-gpu --features diagnostics --all-targets -- -D warnings(merged tree): clean.Review: The classification and the two-kind queue/budget bookkeeping look correct (per-kind
FRAME/WAITED_USarrays, per-kindQUEUES/WORKERS, workers named per kind;startearly-start path uses the same queues). Both kinds keep the 500 ms budget, so a misclassified pass cannot wait longer than before, a reasonable replacement for #2435's 20 s. Small notes, none blocking: (1) thedroppedwarning fires when a draw merely missed this frame's budget, and that pipeline can still be made later, so "the draw is skipped" is true for that frame only; (2) the new behaviour is only unit-tested via the classifier, and the dedicated-worker/budget separation has no test (needs timing, so understandable); (3) a draw is warned about once per key for the process lifetime (smallHashSet<String>, bounded by pipeline count).Overlap: this is the same fix as open #2435 (also "fixes #2433", the original by @pushkarreddyy): #2582 states it supersedes it with different budget semantics, so only one of the two should land. #2250's
VICTORY_PIPELINE_THREADS(mentioned in the description) is not open in the list I checked. #2556 and #2471 touchpipeline/make.rs/pipeline/host.rsand merge cleanly with this PR.AI disclosure: this review and verification were done by Claude Code (Claude Sonnet 5.5), not a human reviewer. Comment-only; no code changed.
Imported from Marvisak/VIctory. Originally posted by kais7654 on 2026-11-25T16:45:18Z.
@oni-swr Thanks for the verification @oni-swr — points 1 and 2 are addressed in
fd872f4:drawn only once is lost", which is exact under both classifications.
a_screen_pass_is_made_by_its_own_workersruns a screen-classified pipeline through
ready, so both workerpools' spawn paths are exercised (the ordinary kind was the only one
covered before). Timing behavior itself stays untested, as you said —
that needs a real run, which the logged drop should make reportable.
On 3, agreed — that is the shape I went for: one warning per key for the
process lifetime, bounded by the pipeline count.
On the overlap: #2582 supersedes #2435's 20 s budget — happy for
@pushkarreddyy to test/review this one, and if the maintainers prefer
landing the cherry-pick + budget revision as updates to #2435 itself, I
am fine with that too: same two-pool design either way, and only one
should land.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T22:14:56Z.
Automated triage for the maintainers.
Needs rebase. This PR no longer merges cleanly into
main: it conflicts incrates/victory-gpu/src/pipeline/make.rs. No content review was done this time; it will be reviewed once it is rebased onto currentmain.Generated by Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.