Repository navigation
Conversation
|
Independent verification & code review on Windows 11 Pro (build 26100) + AMD Radeon RX 9060 XT (RDNA4, driver
Diff review (
AI-assisted; synthetic tests only, no game files. |
mercuryVM
left a comment
There was a problem hiding this comment.
Tested a8bf0d3 on Windows 11, RTX 5070, MSVC: cargo test -p victory-gpu -- --test-threads=1 44 passed, including draws_promote_early_pipelines_without_claiming_them_twice. With --features diagnostics, 46 passed. Clippy's 1 warning is the existing one in host.rs.
- Every state change happens under
QUEUE's lock:pushraisesqueue_stateandpopstoresMAKING. A pipeline promoted from early to requested is therefore claimed once. Its stale early entry is skipped by the== EARLYfilter inpop, and the test covers that sequence. - The lock-free fast path in
start(load() >= priority) can only return early for a state that is already at least as high, so it never loses a promotion. WAITING/PEAKcount a pipeline once, on its first queueing, not on promotion, which matches the old accounting.
AI-assisted (Claude Code).
…ed by draws Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… pipeline the title creates (on Marvisak#546's queue) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… over VIctory #546 builds the pipelines draws ask for before those started early. fb3db31 already queues first uses ahead of early starts (pipeline/make.rs), which is most of #546's measured gain on VIctory (draws dropped for a missing pipeline 2,040 -> 1,359 per frame, against a single queue). What #546 adds, and is taken here: - A pipeline taken by a worker is MAKING, under the queues' lock. A first use of a pipeline a worker is already making no longer queues it again: before, a second worker took the duplicate and waited on the first's compile (OnceLock), one worker fewer for up to seconds. - An early entry whose pipeline was promoted, or taken, is passed over when it comes out, instead of being handed to a worker that finds it finished. - Without workers, the pipeline is made by the caller, once. - #546's queue test; the two tests that read the state now allow a worker to have taken the pipeline already (MAKING). Ported from Marvisak/VIctory#546 (head a8bf0d3) by melon0918
|
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 One caveat first: I could not run this PR's code on that tree. 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). |
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. Draws whose pipelines are not made yet are dropped, so the world stayed black for the whole 17-minute run. At normal priority (with Marvisak#546 and Marvisak#1129 also applied) the same run made 100-300 a minute in the world and drew up to 1,475 draws a frame. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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. Draws whose pipelines are not made yet are dropped, so the world stayed black for the whole 17-minute run. At normal priority (with Marvisak#546 and Marvisak#1129 also applied) the same run made 100-300 a minute in the world and drew up to 1,475 draws a frame. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit ade80d2) (cherry picked from commit bfe79fb3be43b5f518c1703a7aecf295be66686b)
|
Automated triage for the maintainers. Closing because this change is already in 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. |
Change
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.