GPU: pipeline workers at the title's priority, not below it #1505
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!1505
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1505"
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?
@KevinPratap on GitHub · 2026-11-24 18:35 UTC · original
KevinPratap:gpu/pipeline-workers-normal-priority→main· +4 −6 · 1 files · 1 commits · openProblem
Pipeline workers lower themselves to
THREAD_PRIORITY_BELOW_NORMAL. In the world, the title's own threads keep every processor busy, and below-normal threads then get almost no time. Draws whose pipelines are not made yet are dropped, so the screen stays black until the backlog clears, and on a laptop it never did.Measured on an RTX 4050 Laptop (16 logical processors, diagnostics build, counting
host pipelinelog lines per minute):With the backlog draining, the same run went from about 10 to up to 1,475 recorded draws a frame.
Fix
The workers keep the title's priority (the call is removed). #546 decides which pipeline a worker takes next; this decides whether the workers run at all. The two are independent and merge together.
Verified
cargo clippy -p victory-gpu --all-targets: no new warnings;cargo test -p victory-gpu --lib pipeline::makepasses.Only
crates/victory-gpu/src/pipeline/make.rschanges.AI-assisted.
🤖 Generated with Claude Code
@KevinPratap on GitHub · 2026-11-24 22:33 UTC · original
Rebased onto today's
main(70564ae0). The new queue already puts draw-requested pipelines first (as #546 did), butwork()still lowers the workers toTHREAD_PRIORITY_BELOW_NORMAL; this removes that call.cargo clippy -p victory-gpu --all-targets -- -D warningsis clean, and thepipeline::maketests pass. With the pre-build from the shader pack, fewer pipelines are made in the world, so this matters most on a first run and for pipelines the pack doesn't cover. AI-assisted.@Marvisak on GitHub · 2026-11-25 03:16 UTC · original
Automated triage for the maintainers.
Merge candidate. Removes the
SetThreadPriority(..., THREAD_PRIORITY_BELOW_NORMAL)call fromwork()incrates/victory-gpu/src/pipeline/make.rs, so the pipeline workers (half the logical processors, clamped to 2..8) run at normal priority. I checked that nothing else inmake.rsdepends on the lower priority and that the change is limited to that call. The measurements in the description mix this change with others (#546, #1129), so the gain from this change alone is shown only by the 7-pipelines-a-minute starvation row; whether normal-priority workers cost the title's own threads too much is a maintainer's call.CI: no check runs reported for this head.
Generated by Claude Code
@fuzeofficlal on GitHub · 2026-11-26 00:56 UTC · original
Code review and RTX 5090 + WARP verification at head
d4ef6a596be3merged cleanly ontomain(63bcca43c6a0):crates/victory-gpu/src/pipeline/make.rs:295-300):SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_BELOW_NORMAL)(and itsunsafeFFI block) so pipeline compilation workers run at normal priority alongside title threads instead of starving under load, while preserving the(cpus / 2).clamp(2, 8)pool sizing andnow-before-earlyqueue priority. Verified no otherSetThreadPrioritycalls remain in the repo.VICTORY_D3D12_DEBUG=1, Rust 1.98.1):cargo xtask policy:191 files ok;cargo clippy --locked -p victory-gpu --tests -- -D warnings(default +--features diagnostics): 0 warningsvictory-gpu --lib -- pipeline::: 23/23 passed default on RTX 5090; 26/26 passed (--features diagnostics) on both RTX 5090 and WARP.LGTM.
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.