Repository navigation
GPU: pipeline workers at the title's priority, not below it - #1505
KevinPratap wants to merge 1 commit into
Conversation
In the world the title's own threads keep the processors busy, and below-normal workers get almost no time: VIctory measured 236 pipelines a minute at the start screen and 7 a minute in the world. XTP's Series S sessions since 18:28 drop 571 to 747 draws a frame waiting for a pipeline "being made" (watch pass 6, item 120). Critical review: XTP already takes the first-used pipeline first (its queue plays the part of VIctory #546), so this change only decides whether the workers run. The cost is CPU time taken from the title's threads while a backlog drains; the pool stays at half the logical processors (2 to 16). Measure draws "being made" and the frame's preparation time in the next Series S session. Ported from Marvisak/VIctory#1505 (head ade80d2) by KevinPratap Co-authored-by: KevinPratap <98597979+KevinPratap@users.noreply.github.com>
Below normal, the world's busy threads starved the workers: on an RTX 4050 Laptop (16 logical processors) pipelines were made at 236 a minute at the start screen and 7 a minute once in the world, with about 1,700 waiting, and draws whose pipelines are not made yet are dropped. At normal priority the same kind of run made 100-300 a minute in the world. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ade80d2 to
d4ef6a5
Compare
|
Rebased onto today's |
Three review workers over ~30 PRs against the freshly merged upstream tree, plus three of our features the merge had discarded, re-applied with their tests: f32_to_half NaN/nearest-even (Marvisak#843), unique-temp atomic library writes (Marvisak#1660), VICTORY_PIPELINE_WORKERS (Marvisak#1728). Integrated: Marvisak#1146, Marvisak#1161, Marvisak#1474, Marvisak#1592, Marvisak#1058, Marvisak#1505, Marvisak#1177, Marvisak#1507, Marvisak#1236, Marvisak#1180 (with a new regression test for the cached opcode name). Duplicates confirmed against upstream's own code: Marvisak#957, Marvisak#1103, Marvisak#1057, Marvisak#299. Obsolete: Marvisak#513 (title_args no longer exists), Marvisak#1507's sibling Marvisak#334 covers it. Refused: Marvisak#1030 (zip dump of game data), Marvisak#962 (deletes .gitignore). Verified before this merge: fmt 0 differing, both Clippy gates exit 0, xtask policy 220 files ok, workspace 662 passed / 0 failed (10 GPU tests skipped that fail identically on upstream/main itself on this host).
Port upstream #1505 and #1728: workers no longer run below the title's priority, where busy world threads starved them, and VICTORY_PIPELINE_WORKERS can raise the worker count on many-core Linux/Windows hosts. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…ty-wave * GPU: copy shader writes into write-watched pages under Wine Port upstream #1831: when WriteProcessMemory/NtWriteVirtualMemory refuses an untouched MEM_WRITE_WATCH page under Wine, use the kernel read path into that destination so copy-back still lands. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * GPU: load cached pipelines outside the library lock Port the Wine part of upstream #1722. vkd3d-proton treats a library load as a full compile, so holding the global library lock serialised all workers. Loads of different names can now overlap; same-name loads remain serialised as D3D12 requires. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * GPU: drop unready indirect calls before the argument clamp Port upstream #1635: a call whose host pipeline is not ready cannot run, so do not refresh and clamp records that nothing will read. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * GPU: run indirect mesh dispatches as one-record ExecuteIndirect Port upstream #1749: DispatchMeshX with group counts in GPU memory now uses the host indirect mesh path instead of being dropped. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * Shaders: leave runaway translated loops after 2^14 iterations Port upstream #1819. The previous 2^20 limit could outlast a driver reset; 2^14 bounds runaway loops to milliseconds per wave while VICTORY_SHADER_LOOP_LIMIT remains an override. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * Input: keep the keyboard stand-in while XInput pads are idle Port upstream #1430: virtual or untouched controllers no longer disable keyboard controls; real input outside the XInput deadzones takes over, and fallback keys regain control once host pads are idle. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * GPU: keep pipeline workers competitive and configurable Port upstream #1505 and #1728: workers no longer run below the title's priority, where busy world threads starved them, and VICTORY_PIPELINE_WORKERS can raise the worker count on many-core Linux/Windows hosts. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --------- Co-authored-by: stoltembergg <stoltembergg@gmail.com> Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
Automated triage for the maintainers. Merge candidate. Removes the CI: no check runs reported for this head. Generated by Claude Code |
Problem
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