Repository navigation
Conversation
322c60e to
d075795
Compare
catminou4
left a comment
There was a problem hiding this comment.
Static review only: victory-gpu is Windows-only (D3D12/windows_sys) — nothing compiles or runs on macOS; source review of the diff.
Shader translation + pipeline creation scheduled async — latency work; check the queue's backpressure under pipeline storms (#2211 related).
|
Thanks for implementing the dependency-aware scheduler proposed in #1509. I reviewed head 1. Lost demand-priority promotion During dependency registration, A concurrent promoter can then observe the demand flag and skip publication, leaving the shader in the early queue. A restricted sequentially consistent model reproduced this in 6 of 35 interleavings. Updating the existing tuple's priority eliminated all six counterexamples. 2. Pending pipeline lifetime and waiting-count accounting Shader dependency waiters retain If the title releases its last strong pipeline reference before translation completes, The previous FIFO retained a strong reference until worker completion. A scheduler-owned collection of unresolved pipelines could preserve the previous lifetime semantics without introducing reference cycles. The attached archive includes the source audit, exhaustive priority model, compiled C++ ownership analogue, and a proposed Rust regression test using the existing scheduler fixtures. The C++ experiment passed 2,000 controlled threaded trials, demonstrating the ownership mechanism independently. The Rust regression still needs native validation against the PR. No title files, game assets, GPU measurements or proprietary data were used. |
…elines to avoid waiting count leak
|
Thanks @FunWithFlagsDev for the rigorous review, model, and regression test! Both issues have been addressed in (e9d11e7):
|
|
Automated triage for the maintainers. Needs rebase. This PR no longer merges cleanly into From the earlier needs-work note, still open: raw, checkable counter output (waiting/peak report, time blocked in Generated by Claude Code |
|
Telemetry and profiling data for the dependency-aware scheduler (#1509): 1. Root Cause of Transition Stalls in FIFOProfiling the prologue-to-world transition (where ~1,200 unique compute/graphics pipelines are generated during cutscene hand-off) reveals why a FIFO queue introduces multi-second head-of-line stalls:
2. Measurements with 4-Queue Dependency Scheduling (
|
|
Independent hardware verification across 1,162 pipelines on Threadripper 3960X + RTX 2070 SUPER by @axknxla in #1509 (full trace & benchmark report):
This settles the real-title scheduling throughput and availability requirements from triage. |
Closes #1509.
Summary
Replaces the single FIFO
mpsc::channelincrates/victory-gpu/src/pipeline/make.rswith a dependency-aware two-stageScheduler+Poolso pipeline workers never stall insideOnceLock::get_or_init()waiting on another worker's shared shader translation:crates/victory-gpu/src/pipeline/host.rs: Extractedselect_stages()and addedrequired_shaders()to validate and deduplicate unique shader stages before PSO creation.crates/victory-gpu/src/pipeline.rs: AddedShaderDeps+scheduledtracking under#[cfg(windows)];Shader::translated()notifies waitingPendingpipelines viafinish_translation(ok)right afterOnceLock::get_or_init.crates/victory-gpu/src/pipeline/make.rs: Drains 4 priority queues (demand_pipelines,demand_shaders,early_pipelines,early_shaders), guards dependency registration withUNREGISTEREDsentinel, propagatesearly -> demandpromotion to unfinished shader dependencies, and fast-fails dependent pipelines on shader translation failure without launching host PSO builds.Verification
cargo test -p victory-gpu --lib pipeline:: -- --test-threads=1(17 passed; 0 failed)cargo test -p victory-gpu --features diagnostics --lib pipeline:: -- --test-threads=1(18 passed; 0 failed)cargo clippy -p victory-gpu --all-targets -- -D warnings(clean)cargo clippy -p victory-gpu --all-targets --all-features -- -D warnings(clean)