Repository navigation
Sweeps behind flights every 15 s while memory is not pressed (a 36-100 ms frame every 1.5 s) - #340
Conversation
…_SWEEP_EVERY_MS) Each sweep made behind flights settles everything in the air first; those frames took 36-82 ms instead of ~31 on an RTX 5070 Ti, at every 1.5 s: the 0.7 frames a second over 50 ms that made the prison stutter. With no sweeps the cell had none (p99 60 -> 39 ms, worst 99 -> 48 ms). They stay at 1.5 s while the PC's memory is pressed (residency thresholds) or the card's use is over 97% of its budget. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…7% of its budget Textures are held back for room from that line on, and it is the sweep that lets idle ones go; between the line and 97% the sweep would have come every 15 s only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Testing feedback on AMD Ryzen 7 5700X (8C/16T), NVIDIA RTX 5080 16 GB, 32 GB RAM, Windows 11, Series X 1440p + DLSS Quality + DLSS MFG 4× ( Full disclosure: tested on a fork branch based on Result — 12-minute (720 s) 3D run (
|
Integrate upstream PRs trustno1-coder#850, trustno1-coder#448, trustno1-coder#630/trustno1-coder#682, trustno1-coder#340, trustno1-coder#799 and trustno1-coder#849. Preserve existing refresh batching and facial half views; retain narrow barriers as opt-in. Cover combined half-view dirty tracking and isolate synthetic raw descriptor heaps.
…m (VICTORY_SWEEP_PRESS_BY_ROOM) The pressed test compared the card's use with the texture line but left out what the pass keeps for render targets and buffer copies, so it said "not pressed" for seconds at a time while every pass held new textures back: in a cutscene thousands of slots a second were held, served up to 32 s after their write, with sweeps every 15 s meanwhile. Now it asks resource::room, as the pass does. VICTORY_SWEEP_PRESS_BY_ROOM=0: by the use alone, as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
One more commit here, since it corrects this PR's own "pressed" rule: the card now counts as pressed when the texture pass finds no room ( Why: in a cutscene on an RTX 5070 Ti (16 GB, Windows giving the process ~10.9 GB, frame generation 3x), the use-only test said "not pressed" for seconds at a time while every texture pass held new textures back: ~9,800 slots a second held for room, served a median 0.9 s and up to 32 s after their write, while sweeps ran every 15 s. Measured together with #1095 (texture pass held-slot cap) and a launcher texture line of 93 %: 23.3 -> 29.7 fps, frames over 50 ms 4.6 -> 2.2 a second, held slots 9,800 -> 1,200 a second, served median 919 -> ~220 ms. This commit's own share was not measured apart.
🤖 Generated with Claude Code |
What this fixes
A regular stutter: about one frame in every 1.5 s took 36-100 ms instead of ~31, even standing still.
With the present sent ahead (
late_free_present),submitmakes a moment with nothing in the air for the sweep every 1.5 s. It does that by settling every flight first, so that frame waits for the card to drain. A 45-frame timeline (VICTORY_TIMELINE) of the prologue's cell put the two longest frames on it:With
VICTORY_SWEEP=0there was no frame over 50 ms at all. The sweep can't simply go, though: it is what lets idle host copies, staging buffers and textures go.The change
Host::sweep_every_mssets how often a sweep is made behind flights:VICTORY_SWEEP_EVERY_MS, 15,000 by default; 1,500 restores the old cadence) while memory is not pressed;residency::pressured(), or the card's use, less the texture pool's free part, at or overresource::room_line(the line textures are made up to). From that line on, textures are held back for room, and the sweep is what frees idle ones. The first version used 97 % of the budget instead, which left textures waiting between ~93 % and 97 %.It is looked at twice a second, and the log says when it switches (
sweeps behind flights pressed=... every_ms=...). Sweeps that need no settle (nothing in the air anyway) are unchanged.Measured
RTX 5070 Ti 16 GB, Ryzen 9 9900X, 61.6 GB RAM, Windows 11. Series X profile, 2560x1440, DLSS Quality, release, pipelines warmed. Prologue cell, 40 s steady state, frame times from the present intervals:
VICTORY_SWEEP=0)The first two columns are without frame generation; the third is from five runs with it.
The last column also needs memory not to be pressed. On this PC that needed a separate fix to how commit is counted (a separate PR, "Residency: count what the pagefiles can still grow by as commit left"). Without it, the residency pressure stays on and the sweep keeps its 1.5 s pace, which is the same as today.
Tests
cargo test -p victory-gpu --lib: same results asmain(indirect::tests::host_list_budget_starts_empty_at_each_submissionandwarp_batch_charges_every_executionfail onmaintoo).watch::tests::what_is_put_in_beside_the_guards_is_told_at_every_viewfailed once in a full run and passed alone, on this branch and onmain.cargo clippy -p victory-gpu --all-targets: no new warnings.Setup
Own dump of the title. No game files are attached or quoted.
This change and its testing were done with an AI assistant (Claude Code), and the results were checked on my machine.
🤖 Generated with Claude Code