GPU: give screen passes dedicated pipeline workers and wait budget (fixes #2433) #2435
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!2435
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2435"
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?
@pushkarreddyy on GitHub · 2026-11-25 13:28 UTC · original
pushkarreddyy:feat/gpu-screen-pass-pipeline-workers→main· +89 −26 · 2 files · 1 commits · openFixes #2433.
Root Cause
One-off screen passes (no vertex input, no depth/stencil testing, triangle topology) — such as
PS_IntegrateEnvBRDF*andPS_AreaLightIlluminancethat fill lighting tables once at world entry — previously shared the same worker pool and 500 ms per-frame wait budget (BUDGET) as 1,200+ world mesh and compute pipelines. Stuck behind world pipelines, they waited past the frame budget and were dropped, leaving diffuse lighting tables unpopulated.Implementation Details
crates/victory-gpu/src/pipeline/host.rs):GraphicsState::screen_pass(&self) -> bool, returningtruewheninputsis empty,depth_format == DXGI_FORMAT_UNKNOWNor bothDepthEnableandStencilEnableare false, andtopology == D3D12_PRIMITIVE_TOPOLOGY_TYPE_TRIANGLE.crates/victory-gpu/src/pipeline/make.rs):screen: booltoPending.QUEUES,WORKERS, andwait()'s per-frameFRAME/WAITED_UStracking into two independent kinds: ordinary pipelines (BUDGET = 500 ms,2..=8workers) and screen passes (SCREEN_BUDGET = 20 s,2dedicatedvictory-pipelines-screen-*workers).Verification
screen_pass_requires_triangle_without_inputs_or_depthunit test incrates/victory-gpu/src/pipeline/host.rsverifying depth-free triangle pass classification, depth-enabled rejection, and vertex-input rejection.draws_go_ahead_of_early_startsandfirst_use_is_made_by_a_workertests inmake.rsremain intact.Scope & Limitations
@Belobug'sVIctory-Belobug-AMD@18e57dbonto currentmain(940d32f).@pushkarreddyy on GitHub · 2026-11-25 13:36 UTC · original
Hi @Marvisak — this PR resolves #2433 (dedicated pipeline workers and 20 s per-frame budget for screen passes so first-frame lighting table draws like
PS_IntegrateEnvBRDF*andPS_AreaLightIlluminanceare not dropped behind world pipelines), adapted from@Belobug'sVIctory-Belobug-AMD@18e57dbontomain(940d32f). Ready for review and merge whenever convenient!@pushkarreddyy on GitHub · 2026-11-25 14:19 UTC · original
If any testers on untested GPU models (NVIDIA RTX 30/40/50 series, AMD RDNA2/RDNA3/RDNA4, Intel Arc, or Linux/Wine/vkd3d-proton) can test
deefe98at world entry for first-frame diffuse lighting / indoor bloom, test reports would be greatly appreciated!AI-assisted: yes (Gemini 4 Neon)
@kotekompotek on GitHub · 2026-11-25 14:24 UTC · original
Reviewed — the split is coherent:
screen_passclassification is safe: no vertex input + triangle topology can only be a procedural/fullscreen draw; depth disabled or absent matches the lighting-table fills. A misclassified draw would only get the longer budget — benign.FRAME/WAITED_USbudget accounting, and per-kind wait inwait()keep the two pools fully independent — a screen draw cannot drain the ordinary 500 ms and vice versa.SCREEN_BUDGET= 20 s stays under the title 30 s watchdog, so the drop path remains the documented fallback.Merge note: this rewrites
queue()where #2250'sVICTORY_PIPELINE_THREADSreads its env — whichever lands second should apply the env to the ordinary kind (and probably not the screen kind, whose size is deliberate).@Venom2054 on GitHub · 2026-11-25 14:31 UTC · original
I compared #2435 at
deefe988with the same local integration without the PR, on native Windows 11 build 26200, RTX 5070 Ti, driver 621.01 and i7-14700. With a populated VIctory pipeline library, both builds showed the people and the watchtower through the opening in the prologue. The foreground character remained a silhouette and the wall to the right stayed dark in both.These are medians of per-frame means from fixed image regions. I sampled the nearest saved frame to each five-second mark from 225 through 250 seconds after GameInput creation (six distinct frames without the PR, five with it). I checked the framing against the character, opening and tower. Both runs loaded the same 295,036,268-byte pipeline library with 2,618 entries on the early-start list.
With an initially empty VIctory pipeline directory, the two runs diverged. Without the PR the yard, people and tower were visible at 306 and 316 seconds after GameInput creation. With the PR the prologue title card was still visible at 285 seconds, and the captures at 310 and 318 seconds were almost black. The host continued submitting draws. I stopped both runs at 321.5 seconds from launch. I could not compare the yard lighting directly under this condition or establish what caused the difference.
One run per build per cache condition. The empty-library pair ran control first, and the populated-library pair ran PR first. Each pair used isolated copies of the same save, settings and translated shader cache, with identical scripted inputs. The NVIDIA driver cache was left in place. The control window briefly lost focus during the empty-library run. The source trees differed only in the two files from this PR. All four runs ended at their planned cutoff without a logged device removal. All 24 targeted GPU pipeline tests passed on the PR build. Local integration details.
@Venom2054 on GitHub · 2026-11-25 14:56 UTC · original
Following up on the RTX 5070 Ti yard test at
deefe988, I traced the four lighting passes named in #2433. In two fresh runs, one with #2435 and one without, the host recorded one three-vertex draw for each pass. Both runs started with an empty VIctory pipeline library.I then repeated the pair with a local diagnostic that associated the currently bound color target with each named draw and read back mip 0 at the next present. The four pairs of raw texture digests matched exactly. Each target contained varying values.
The digest covered the active texel bytes of each row, excluding D3D12 row padding, before conversion to PNG. Each pair used separate copies of the same save and translated shader cache. The driver cache stayed in place. The trace pair ran PR first, and the readback pair ran control first. The independently built readback versions had identical diagnostic changes and differed only in the two source files from #2435.
On this setup the control already produced all four tables at first use. Both builds still showed the dark foreground in the earlier yard comparison. We have not checked how a later pass samples these tables, or compared their values with a console reference.
@Marvisak on GitHub · 2026-11-25 15:58 UTC · original · edited 2026-11-25 22:23 UTC
Automated triage for the maintainers.
Needs rebase. This PR no longer merges cleanly into
main(conflict incrates/victory-gpu/src/pipeline/make.rs). It will be reviewed again once it is rebased.From the earlier needs-work note, still open: a run where
maindemonstrably drops these lighting passes and this PR fixes it, and a narrowerscreen_passclassification or budget so ordinary full-screen passes cannot stall for seconds.Generated by Claude Code
deefe98805tod783c095c7@pushkarreddyy on GitHub · 2026-11-26 15:07 UTC · original
Rebased cleanly onto latest
main(63bcca4) ind783c09, resolving thePendingstruct merge incrates/victory-gpu/src/pipeline/make.rswhile keepingskipped_shader.Thank you
@Venom2054for the RTX 5070 Ti readback trace! If testers on untested GPU models (e.g., AMD RDNA2/RDNA3/RDNA4, NVIDIA RTX 30/40 series, Intel Arc, or Wine/vkd3d-proton) under cold-cache first-frame world load can verifyd783c09, test reports would be appreciated.AI-assisted: yes (Gemini 4 Neon)
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.