GPU: prioritize pipeline work requested by draws #546
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!546
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/546/head"
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?
@melon0918 on GitHub · 2026-11-24 04:43 UTC · original
melon0918:fix/prioritize-requested-pipelines→main· +117 −33 · 1 files · 1 commits · closed without mergingChange
Compile pipelines needed by a draw or dispatch ahead of speculative early work. A first request promotes a pipeline that is still in the early queue. Workers claim each pipeline once and preserve FIFO order within each priority. The same frame wait budget applies to the request.
#275 addresses wait accounting and cache saves. This change addresses which pending job a worker takes next.
Verification
victory-gpudiagnostics suite passed 46 tests with one existing ignored test. The queue regression checks promotion, FIFO order within each priority, and single processing of a promoted entry. The asset policy passed.The reviewed captures show opening credits and 2D imagery. Live 3D rendering remains unverified. The prioritization run recorded substantially more draws at a lower median frame rate and encountered device removal. The queue measurements are evidence of scheduling behavior.
AI-assisted contribution. All test data and captures stayed local.
@geiyiliyabumo on GitHub · 2026-11-24 11:43 UTC · original
Independent verification & code review on Windows 11 Pro (build 26100) + AMD Radeon RX 9060 XT (RDNA4, driver
32.0.32029.2010, Rust1.98.1), cleanly merged ontomain(ffe310e):cargo xtask policy: PASS (154 files ok)cargo clippy -p victory-gpu --all-targets --locked -- -D warnings: PASScargo clippy -p victory-gpu --all-targets --features diagnostics --locked -- -D warnings: PASScargo test -p victory-gpu --locked: 51 passed, 0 failed, 1 ignored (including newpipeline::make::tests::draws_promote_early_pipelines_without_claiming_them_twice)Diff review (
crates/victory-gpu/src/pipeline/make.rs): very clean state machine (NOT_QUEUED -> EARLY -> REQUESTED -> MAKING) serialized underQUEUE:EARLYentry toREQUESTEDpushes it torequestedwithout double-incrementingWAITING, andpop()skips promoted entries left inearly(queue_state != EARLY) so no pipeline is ever compiled twice.QUEUEbeforep.make(), and the no-workers fallback (!workers()) builds inline safely without touchingWAITING.AI-assisted; synthetic tests only, no game files.
@Mumogg on GitHub · 2026-11-24 17:57 UTC · original · edited 2026-11-24 19:08 UTC
A data point for why this is needed even once library loads run in parallel (#1000), from Linux (RTX 5070 Ti, driver 615.78.08, Wine 11.22 Staging, vkd3d-proton from GE-Proton11-14; r4tedx
integration/testersupdate 9, diagnostics build, warm cache with 1,167 pipelines on the early list).One caveat first: I could not run this PR's code on that tree.
make.rsconflicts with #275, which the testers tree carries (the per-pipeline wait pair and the frame budget), so what I ran is a local change with the same idea: two queues, a pipeline a frame asks for goes to the urgent one even if it is already waiting in the early one, workers drain urgent first. A rebase of this PR over #275 would let testers run the real thing.Warm start, same cache, at world entry:
With only the lock fixed, the frame's own pipelines still sat behind several hundred early compute pipelines, each a multi-second load here.
(AI-assisted, Claude Code; runs on my machine.)
Edit: the Wine version was 11.22 Staging, not 11.21 (the system had updated before these runs).
@Marvisak on GitHub · 2026-11-25 00:24 UTC · original
Automated triage for the maintainers. Closing because this change is already in
main, ormainhas since replaced the code it patches.Already in main: make.rs has a queue for pipelines draws wait for ahead of the early starts, with promotion of a still-queued early entry and single processing (enqueue, test draws_go_ahead_of_early_starts).
If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.
Pull request closed