Reduce serial CPU submission and command-preparation latency #1
Labels
No labels
accessibility
area: compatibility
area: docs
area: hygiene
area: infra
area: memory
area: ray-tracing
area: rendering
area: shaders
area: submission
area: textures
bug
ci
dependencies
difficulty: advanced systems
difficulty: intermediate
documentation
duplicate
enhancement
experimental
good first issue
help wanted
invalid
known issue
performance
priority: P0
priority: P1
priority: P2
proposal
question
rendering
research
testing
triage
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/VictoryX-dev--VictoryX#1
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@VictoryX-dev on GitHub · 2026-12-03 02:57 UTC · original
Problem
The dedicated submitting lane (
queue/behind.rs) is currently the single largest CPU throughput limiter in demanding Series S scenes. In a representative 25.7 ms frame (~40 FPS without Frame Generation), the submitting thread is busy for ~22.2 ms — leaving almost no headroom toward our 50–60 FPS Series S engineering target.Known Evidence
VICTORY_INDIRECT_BATCH=2,VICTORY_INDIRECT_WINDOW=1) previously reduced heavy-scene mean frame time from65–73 msto25.4–25.7 mswith zero proven stale reads.VICTORY_PREP_PIPELINE=1(host/prep_pipeline.rs): parallelizes large refresh fronts (textures + buffers) across helper threads and folds close-time plans. Synthetic real-mix probe improved from7.40 msto5.56 ms.VICTORY_ASK_BETWEEN=1(watch/between.rs): moves write-watch query resets onto a helper thread between submissions. Synthetic cost test improved from5.8–6.0 msto4.0–4.1 ms.Approaches That Did Not Work
VICTORY_LIST_FOLD=1standalone (kept off): Folding per-copy refresh steps at command-list close showed no standalone frame-time gain in gameplay A/B (24.8 msvs25.0 ms). Note thatVICTORY_PREP_PIPELINE=1reuses the fold summary internally.VICTORY_TAKE_ONCE=1(kept off): Skipping re-reads of stale pages copied after submit found only ~2% spare pages, and ~5% of those spare pages differed in content during audit.VICTORY_GUARD_DIFF=1(kept off): Page-diffing guarded 64 KiB view blocks cost 3–4× more CPU time per guarded MB than full copies.Relevant Source Modules
runtime/crates/victory-gpu/src/queue/behind.rsruntime/crates/victory-gpu/src/host.rsruntime/crates/victory-gpu/src/host/prep_pipeline.rsruntime/crates/victory-gpu/src/watch.rsruntime/crates/victory-gpu/src/watch/between.rsruntime/crates/victory-gpu/src/indirect.rsruntime/crates/victory-gpu/src/list/thin.rsExpected Contribution
VICTORY_PREP_PIPELINE=1andVICTORY_ASK_BETWEEN=1in matched gameplay runs (diagnostics A/B first, then release-package confirmation).VICTORY_*switch wired intoab.rs.Acceptance Criteria
cargo test --workspace --locked,--all-features, orscripts/run-regression.ps1.VICTORY_FRAME_METRICS=1andVICTORY_XFER=1logs (and clearly separated from synthetic micro-benchmark numbers).