Repository navigation
perf(gpu/queue): let the title's present go once the frame ahead has at most n submissions left (VICTORY_PRESENT_RELEASE, 2 in play) - #330
Conversation
…at most n submissions left (VICTORY_PRESENT_RELEASE, 2 in play)
|
Read-only security & triage review on
|
|
Automated triage for the maintainers (not an approval). Verdict: Review SummaryClean, well-scoped change to async submission pacing in Code & Correctness Checks
Why
|
|
Allowlist & Architect Deep Review ( Code audit (
Next step ( |
Summary
With the submission line (
VICTORY_ASYNC_SUBMIT/VICTORY_THIN), a title thread presenting frame N waits until present N-1 has been done by our thread. Our line and the card then run dry while the title has not started frame N+1 (4.2-6.6 ms a frame of an empty queue in a new game's street, nearly all of it while the title had not submitted).VICTORY_PRESENT_RELEASE=<n>lets the title go on once present N-1 is being done or has at mostnsubmissions in front of it in the line (0: when we take it). It is less thanVICTORY_SUBMIT_FRAMES=2(a whole frame more in the line), and never lets the title run with two presents ahead of its own. Unset in the layer (unchanged behaviour);2inplay's settings and inverify-world.ps1's PlayParity block. Diagnostics builds can switch it inside a run (VICTORY_AB; on = the variable'sn, else 0). The lane's frame line now says how many presents a frame were let go early.In our fork's play defaults since 30 Nov.
Changes
crates/victory-gpu/src/queue/behind.rs:Lane::wait_presents_aheadandLane::released(same lane state, no new locks);release_ahead();present()uses it; frame-line counter; unit testthe_title_is_let_go_as_the_present_ahead_comes_near.apps/victory/src/play.rs,scripts/verify-world.ps1:VICTORY_PRESENT_RELEASE=2(parity kept).Rig Specs Tested On (our fork, not this tree)
Run Settings & Profile
VICTORY_AB(4-8 switches, 10 s phases in a mixed order, 56 phases at the busiest place of a saved game), drift fitted;n= 2Measurements & Verification
main3230974; offline,--locked, toolchain 1.98.1-msvc):cargo clippy --workspace --all-targets --locked -- -D warningscargo clippy --workspace --all-targets --all-features --locked -- -D warningscargo test(not run by us on this tree)cargo xtask policy(not run;host.rsuntouched)Limits
behind.rsis an older form of ours); MiniVI's folded entries count as submissions in front of a present, as ours do.VICTORY_SUBMIT_FRAMES=2, the bigger version of the same idea, was measured and rejected in our fork (median -1.4 ms but p90 +9.3 +- 1.2 ms, run big-fg-1).