perf(gpu): low-latency join fast-kick/signal-stop and DXGI waitable swap chain #18
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
needs-logs
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ToLIManl--VIctory-Hydra!18
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/18/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?
@justadudeinbulgaria on GitHub · 2026-11-30 23:19 UTC · original
justadudeinbulgaria:pr/low-latency-join-and-swapchain→main· +269 −28 · 3 files · 1 commits · closed without mergingSummary
Adds two opt-in, default-off low-latency frame-pacing controls targeting GPU-idle bubbles and multi-frame input lag:
VICTORY_JOIN_LOW_LATENCY=1(crates/victory-gpu/src/queue/behind.rs,crates/victory-gpu/src/host.rs):host::card_busy()(LAST_SENT_FENCEvs non-blockingID3D12Fence::GetCompletedValue()).Job::take_along, stops absorbing additionalJob::Runparts when the GPU currently has zero flights in flight (immediate idle-GPU fast-kick) or once aJob::Signalhas been attached to the current batch (so title threads waiting on early-part fences wake up immediately instead of stalling behind subsequent joined parts).idle-GPU fast-kicksandsignal-boundary stopsinbehind::linewhen active.VICTORY_MAX_FRAME_LATENCY=1..16(crates/victory-gpu/src/host.rs,crates/victory-gpu/src/frame.rs):DXGI_SWAP_CHAIN_FLAG_FRAME_LATENCY_WAITABLE_OBJECT(passing matching flags toResizeBuffers, and falling back automatically without the flag if a proxy swap chain declines it), callsIDXGISwapChain2::SetMaximumFrameLatency(n), and pairsWaitForSingleObject(waitable, 250)1:1 withPresentviaLATENCY_WAIT_ARMEDinframe::wait(ORIGIN)so input sampling aligns to display availability without risking stalls on un-presented boot/loading frames.Verification
cargo test --release -p victory-gpu --lib latency_swapchain_tests(1/1) &queue::behind::tests(6/6) pass.waitable=true, max_frame_latency=1with 100% frame generation (0prepare failures).VICTORY_JOIN_LOW_LATENCY=1fired0.5–0.9idle-GPU fast-kicks and5.0–7.1signal-boundary stops per frame.VICTORY_SUBMIT_FRAMES=1,VICTORY_JOIN_PARTS=6: GPU utilization rose from63–71%to82%, frame time dropped from110–118 msto104.5 ms(MAX 107 ms,2.5 msjitter), and end-to-end input queue depth dropped by >2.5x.@ToLIManl on GitHub · 2026-12-01 00:47 UTC · original
Integrated into \main\ in commit \
64f4cb9\ (with \Co-authored-by\ attribution).Both \VICTORY_JOIN_LOW_LATENCY=1\ and \VICTORY_MAX_FRAME_LATENCY=1..16\ remain opt-in (off by default). Verified on RTX 3060 12 GB (\rrors=0, \mem_pressure=0, \mean_fps=15.12, \median_fps=15.09, \p99_ms=108.4, \19.4\ signal-boundary breaks/frame) and via \ictory-gpu\ unit tests (\rame::\ \2 passed, \queue::behind::\ \6 passed).
Pull request closed