Sweep: the parts after the texture sweep run in turn under a time budget, each part timed #3858
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3858"
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?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by duckey-dev on 2026-11-30T09:31:14Z.
What this does
The once-a-second sweep on the submission thread runs four things back to back: the host copies of textures (
resource::let_go_idle), the windows and staging buffers, the dead render targets, and slot eviction. When each is costly (while streaming), the frame with the sweep in it pays for all of them.With this PR:
VICTORY_SWEEP_SPREAD, on unless0). The texture sweep runs at every sweep, as main bounds it. The other three run one after the other whileVICTORY_SWEEP_BUDGET_MS(3) lasts from the sweep's start, at least one a sweep. A sweep the submission thread asks for and a flush (F7/F8) run all their parts at once.=0is main's order exactly.What it no longer does (1 Dec)
Earlier versions of this PR also bounded the texture sweep itself, the dead render targets' walk and slot eviction. @paales measured on an RTX 5070 Ti 16 GB (comments below) that the texture sweep's bounding released less per sweep, held about 300 MB more of the card and brought slot eviction forward by ten seconds, with textures gray after cuts; with it off (
VICTORY_SWEEP_BOUNDED=0) the run matched the base. Main has since boundedlet_go_idleitself and looks for slot-eviction victims on a thread of its own (VICTORY_SLOT_EVICT_ASIDE).So those parts are removed (
a7823981):VICTORY_SWEEP_BOUNDED,VICTORY_SLOT_EVICT_BOUNDEDandVICTORY_SLOT_EVICT_BACKOFF_MSare gone, and @tyr0nsur's fix to the bounded slot eviction went with them. Main'slet_go_idle, dead render targets and slot eviction are unchanged apart from being timed and callable in turn. One commit, 333 lines added against main.Measurements
The figures this PR was opened with (frames over 100 ms from about 25 a run to 0-2 on an RX 7900 XTX) were measured with the removed bounding in and do not describe this version. The closest measurement so far is @paales' run of the earlier branch with
VICTORY_SWEEP_BOUNDED=0: card use, slot eviction and textures made again all as the base, no gray textures in captures every 250 ms. A measurement of this version itself is to come.Checks
Both of CI's clippy runs add no warning over main (
e1251c31) here.cargo test --workspace: no failure that main does not have on this machine (two, inlist::thinandshader_cache, fail on main too).🤖 Generated with Claude Code
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by tyr0nsur on 2026-11-30T09:49:19Z.
A deadline cut can look like a complete empty pass and trigger the 30-second rest. The table cursor can wrap before the candidate loop runs. If the first candidate became active again and the deadline cuts the loop before the next one,
PASS_WHOLEandwent == 0can still arm backoff. The same mistake occurs if an earlier window was cut and the final window had no candidates.Follow-up 063d3d9 records a cut across windows and only arms the rest when the attempts finished. The bounded path also counts bytes actually released. It can move past a renewed candidate to the next oldest while there is time, with the existing deadline and cap. The unbounded path still uses the preselected candidate set.
A deterministic regression failed on the old pass accounting. It now covers both an earlier window cut and a final window cut, plus the complete empty-pass control. A second test exercises a failed first candidate, an expired deadline, and progress when the next attempt has time. The targeted sweeping and resource diagnostics suite passed on Windows (58 passed, 1 ignored), as did staged asset policy. Gameplay frame pacing remains to be measured.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by duckey-dev on 2026-11-30T10:41:23Z.
@tyr0nsur You're right, thank you. The rest was armed on "the walk wrapped, the pass began at the table's start, nothing went", and the letting-go loop stops at the deadline after its first candidate. So a window whose first candidate was in use again, cut before the second, read as a whole pass that let nothing go, and slot eviction rested for 30 s with candidates never tried. The same holds when an earlier window was cut, as you say.
I read
063d3d9and ran it on Windows on top of this branch: the sweeping tests (15, with your two), the resource tests, and both of CI's clippy runs, which add no warning over main. I've added it to this PR's branch as your commit, unchanged. Its move from the preselected oldest-covering set to "oldest first until the bytes actually released meet the need" on the bounded path is a behaviour change I agree with: a renewed candidate no longer uses up the allowance.Not measured in the game on my side yet either; I'll say here when it is.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by ColorC on 2026-11-30T11:53:42Z.
Open-World Walking Cross-Validation on RTX 5070 Ti (
VICTORY_HW_RT=1, 1440p DLSS Quality + 3x MFG)Merged PR #3858 (default
VICTORY_SWEEP_BUDGET_MS=3) into our HWRT build and ran a 4-minute open-world streaming walk + 6-scene multi-time-of-day teleport stress test (Noon / Sunset / Night / Misty Dawn; 0 crashes):victory_gpu::sweeping&frame_times)VICTORY_SWEEP_BUDGET_MS=3)> 100 ms(4-min walk)>100 ms = 0on all 4 steady scenesNote on edge cases: Under very heavy
VICTORY_CARD_METER_PIPELINES=1+VICTORY_SUBMIT_FRAMES=2telemetry runs,first/slot evictionparts still occasionally showed5–19 mssweeps whiletexturesstayed strictly bounded at1.7–2.1 ms(stopped at the budget), confirming the texture-sweep time budget works as designed and eliminates the dominant streaming hitch source. Strong LGTM!Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by botto854 on 2026-11-30T14:23:35Z.
Same-binary A/B on a 32 GB machine, where the sweep's cost turns out to sit mostly outside the bounded parts.
Setup: i9-14900K (8P+16E), RTX 4090 24 GB, 32 GB RAM (the layer treats it as limited host RAM), Windows 11 Insider 26300, driver 617.14. Series X profile, DLAA, FG off, RT as
playsets it, diagnostics build of v2026.11.29.05 + #2305 + this PR's three commits (incl.063d3d9), warm shader/pipeline cache. Unattendedscripts/bench.ps1runs from one copied save (standing on a balcony: camera pans and a few steps back and forth, about 8,000–9,500 draws/frame), 30 s warm-up then 240 s measured. Both variants from the same binary, interleaved run by run (on, off, on, off …): "off" =VICTORY_SWEEP_BOUNDED=0,VICTORY_SLOT_EVICT_BOUNDED=0,VICTORY_SWEEP_SPREAD=0. Frame times from the frame log (every frame), not the 5-s lines.(Medians of the per-run figures, range in brackets. A fifth "off" run was lost to the #2393 SSE4a fault while loading, unrelated.) Every "on" run had fewer >100 ms frames than every "off" run, so the gain is real here, but it is about −16 % of the >100 ms frames and −8 % p99, not the near-zero reported above.
Why so much is left — the sweep's own timing lines (
victory_gpu::sweeping) over all runs:The texture walk is held to its budget as designed (
textures … longest 3.0, stopped at the budget), but on this machine the long sweeps are almost entirely thefirstpart (residency refresh and, under pressure, the spare/idle trims,pool::room,memory_now) — e.g.first 1x longest 71.7next totextures 1x longest 3.1. With 32 GB of RAM the layer entershost memory pressureabout 30 s into the world and never leaves it (oneWARN victory_gpu::residencyper run, no way back; free physical memory median ~1 GB, minimum ~0.4 GB per thecompile memorylines), so the pressure trims infirstrun at every sweep and are not underVICTORY_SWEEP_BUDGET_MS. Machines with 64 GB probably never take that branch, which may explain the difference to the 7900 XTX / 5070 Ti results.I haven't profiled which call inside
firstit is yet; I'll add that here when I have it. Happy to run a build with finer timing of that part if useful.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by duckey-dev on 2026-11-30T14:40:07Z.
@botto854 Thank you, this is the measurement the description was missing. Agreed on all of it: what this PR puts under
VICTORY_SWEEP_BUDGET_MSis the texture walk, the dead render targets' pass and the slot eviction. Thefirstpart is only taken in turn with the others and timed; nothing inside it is bounded. My numbers come from a 64 GB machine that never enters host memory pressure, so the trims infirstcost next to nothing there, and the "about 25 to 0-2" figure should be read as "on a machine without host memory pressure". On 32 GB your -16 % of frames over 100 ms is the honest size of it. I'll put that limit in the description.Your finer timing of
firstwould be very welcome (which of the residency refresh, the spare/idle trims,pool::roomandmemory_nowholds the 70 ms). If it is the trims, the natural follow-up is to give them the same treatment as the other parts: a walk that goes on from where it stopped under the sweep's budget, in turn with the rest, with a flush still doing everything at once. I can write that as a separate PR, but I cannot reproduce the pressure here (64 GB), so it would rest on your A/B. If you would rather write it, the helpers aresweeping::walkandin_turn.This branch also needs a rebase onto current main (conflicts in
host.rsandresource.rs); I'll do that.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by botto854 on 2026-11-30T15:02:27Z.
Timed each step of
sweep()on v2026.11.30.01 (+ #2585, without this PR, so the whole sweep is one piece), same14900K / 4090 / 32 GB, same route, two 4-minute runs. Sweeps over 5 ms are logged: 202 of 229 and 223 of 252,
all but one with
pressured()true.Total per sweep: median 25 / 24 ms, p95 55 / 53 ms, max 147 / 77 ms (run 1 / run 2).
send::trimresource::let_go_idle(end of sweep)trim_spare_chunkslist::trim_idleshadow::let_go_idletexback::sweep_read_backsresidency::refresh,pool::room,memory_now,video_memory,trim_library,texture::let_go_idle(ms, run 1 / run 2;
trim_spare_uploads,trim_spare_linear,trim_snapshot_pool,uav_sparenever reached0.1 ms.
shadow::let_go_idlewent over 20 ms in only 2 sweeps of run 1, none of run 2.)So it's the trims, not refresh / room / memory_now. Within
first,send::trim+trim_spare_chunksare ~80 % in both runs.Two things I noticed reading them (not measured separately, so treat as hypotheses):
send::trimdrops theMemorybuffers (release of mapped upload resources) while holdingSPARE, andsend::memory()takes the same lock.trim_spare_chunksalready drops outside its lock.keeps_under_pressure()(8 GiB physical free) is never true, so every sweep cuts both pools to the16 MiB floor, and the next frames presumably allocate fresh send buffers / chunks again. That would be churn
at 1 Hz rather than reclaiming idle memory. Using a low-water mark over the last few sweeps (only free what
wasn't touched since) might fix the cost and the churn in one go.
Happy to A/B a follow-up on this box. If you'd rather I write it, say so, but you know the sweeping
module better, so I'd go with your version and test it.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by duckey-dev on 2026-11-30T17:18:21Z.
@botto854 That settles where it is:
send::trimandtrim_spare_chunksare about two thirds of what this PR leaves, andlet_go_idleis the third it already bounds. Thank you for the step timing.Both of your readings look right to me from the code, and I'll take the follow-up; your A/B is the only measurement it can have, since a 64 GB machine never takes those branches. What I am writing, as a separate PR stacked on this one, each part behind its own switch (on,
=0as before) so you can A/B them one at a time:send::trimtakes the buffers out underSPAREand releases them after the lock is let go, astrim_spare_chunksdoes.firstunder the sweep's budget and in turn with the other parts (a flush still does all of it at once), and each of them timed in the sweep's line, so the split you measured by hand shows in every log.I'll post here when the branch is up. The rebase of this PR onto current main is done locally (main merged another bounding of
let_go_idlein the meantime, so this now sits on top of that); I'm measuring it in the game once more before I push it.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by botto854 on 2026-11-30T17:31:39Z.
Thanks, sounds good. One thing that changes the plan a bit: #3994 (Lyrnc) was merged into main at 16:28 UTC and
is in v2026.11.30.02. It already does your points 1 and 2 for the send spares (what the window used stays, the
rest is released on its own thread). On .30.02
send::trimis gone from the sweep here (0 %, max 0.3 ms).What is left of
firstistrim_spare_chunks, same pattern: on .30.02 it is 40-42 % of the sweep time,and it frees a median of 62-70 MiB of chunks every sweep that the next frames make again.
I tried the low-water rule for the chunk pools only, on top of .30.02: under pressure (not critical) a pool
frees only what no list took since the last sweep (the existing
Spare::low+trim_above(SPARE_FLOOR)),critical commit still drops everything, plenty free still keeps
SPARE_MOST; the freed chunks go to #3994'sfreeing thread. Same 14900K / 4090 / 32 GB, same route, two runs each:
trim_spare_chunksmedian / p95 / maxuav_pool::trim_uav_spare_pressure* one
texback::sweep_read_backsspike of 132 ms, unrelated.Frame times over those four runs are within noise (2 vs 2 is not enough to say more; the sweep runs once a
second, so I'd expect it in the long frames rather than the median). I'll run a proper interleaved 5×2 A/B
tomorrow.
So my suggestion: since #3994 covers the send side, I can open the chunk part as its own small PR (two
functions in
host.rs,send::free_asidemade generic so the chunks reuse #3994's thread, one unit test),and you keep point 3 (the trims under the sweep's budget, timed in its line) in yours. Or, if you'd rather
have it all in one PR, take the diff from me and I'll A/B yours. Either way is fine.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by tillo88 on 2026-11-30T17:58:52Z.
Replay bench: #3858 merged on top of v2026.11.29.05, 2 measured runs, against 19 runs of the same release without it.
One of the two runs ended at +2:12, just before the prison -> plane cut, with the device lost:
relay: the device was lost before fence value 99542 was reached ... device removed: ... (0x887A0006).This is the known #2237 crash family at that cut (the release alone ended there or ~20 s later in 14 of 43 runs, device loss included), so I don't attribute it to this PR.
The other run:
The fps is inside the base's range (run-to-run sd 0.69 fps, about 2.3%), so one run shows no measurable fps difference. Its p99 (114.8 ms) is below every one of the 19 base runs, which fits what the PR aims at (the long sweep frames), but it is a single run and I would not draw a conclusion from it. This route is a cutscene-heavy start of the game, not an open-world walk.
Setup: Ryzen 7 9800X3D, RTX 5070 Ti 16 GB (driver 621.40), 32 GB RAM, Windows 11, release build, Series X 1440p, DLSS Quality, frame generation off, ray tracing off. Route: the same save restored before each run, prison cutscene, plane cutscene, first boat section (about 6 minutes).
Measured unattended on a replay bench (same save, recorded controller input via VICTORY_INPUT_REPLAY); numbers and text prepared with Claude.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by hasekenmustafa-ctrl on 2026-11-30T18:26:42Z.
Another walking A/B in support of this PR, plus one sweep cost it doesn't cover.
Setup. RTX 5080 16 GB, Ryzen 7 9800X3D, 31 GB RAM (system-managed pagefile, so the layer runs under host-memory pressure the whole time), Windows 11 26200. Series X profile, 1440p DLSS Quality, frame generation and ray tracing off, release build. Same save and auto-driven start, a 30 s settle, then the same scripted 240 s zigzag walk; stats from the
frame_timeslines inside the walk.The build is a fork build (palmlight, based on VIctory-NVIDIA
923e38c), not this PR. It carries an independent fix of the same stall. Mechanically it's close to yours:slot_evictevery 5 s with 5 s worth of bytes;Old = the same binary with all of it switched off. 3+3 runs:
The bounded run at 31.1 fps had about half the draws, so it isn't comparable on fps.
The sweep's parts timed one by one (old):
resource::let_go_idleslot_evictinside itpool::roomSo the same picture as @botto854's on a 32 GB machine.
One part not covered here or by #3994:
pool::room's block release. When the spare limit drops under pressure,Pool::reclaimsets*block = Noneon empty 64 MiB heaps on the submitting thread. The driver's release of one took up to 84 ms in our walks. Dropping those blocks on a release thread, the same way #3994 does for the send spares, took that part to 0.03 ms each (longest 0.8 ms) with no other change in behaviour. If that's useful, I can send it as a small separate PR so this one stays as it is; or @duckey-dev, fold it into your follow-up withtrim_spare_chunksif you'd rather.AI use: Claude Code (Claude Opus 5.5) ran the runs and wrote this comment for hasekenmustafa-ctrl, who approved posting it. Telemetry only, no game data.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by duckey-dev on 2026-11-30T18:36:14Z.
@tillo88 @hasekenmustafa-ctrl Thank you both.
@tillo88: agreed on reading one run as no more than a hint; a p99 under all 19 base runs fits where this PR works, and the device loss at the prison-to-plane cut is not on a path it touches (that cut loses the device on the release alone, as you say).
@hasekenmustafa-ctrl: an independent fix of the same stall landing on the same shape (parts in turn, the age scan in windows under a budget, slot eviction rested) and the same result (frames over 100 ms from 20 / 1 / 6 to 1 / 0 / 0) is good evidence for the approach, more than another run of mine would be. On
pool::room's block release: please send it as its own small PR. It is a different mechanism (who releases, not how much is looked at), it stands without this PR, and it is measured on your machine, so it should be yours and reviewable by itself. My follow-up for the trims (send::trimreleased outside its lock, a low-water rule for the two spare pools, those trims under the sweep's budget and timed in its line) is written and stacked on this branch; I'll leave the empty blocks' release out of it so the two do not overlap, and mention yours in its text.The rebase of this branch onto current main is in progress (main has moved under it twice today); I'll post when it is pushed.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by duckey-dev on 2026-11-30T19:10:18Z.
Rebased onto current main (
e1251c31) and pushed; no conflicts now. Both of CI's clippy runs add no warning over main here, andcargo test --workspacehas no failure that main does not have on this machine.What changed in the rebase, because main moved under it twice today. The description above is out of date on these points and I'll correct it:
VICTORY_SLOT_EVICT_ASIDE, the #3750 approach, which this PR's description already called the better one for that cost). So this PR's slot-eviction window, its rest (VICTORY_SLOT_EVICT_BOUNDED,VICTORY_SLOT_EVICT_BACKOFF_MS) and @tyr0nsur's fix act only withVICTORY_SLOT_EVICT_ASIDE=0; with the default, main's path runs unchanged and the part gives its turn on.let_go_idle. Main has its own bounding now (a window and a 4 ms stop). With this PR's switch on, its window, deadline andheld_untilare used; withVICTORY_SWEEP_BOUNDED=0, main's bounding runs, where "=0" used to mean the unbounded walk.VICTORY_SWEEP_SPREAD) and the timing line.@botto854 a correction to what I wrote about the follow-up: main's rework of
send.rssince your timing already releases whatsend::trimlets go outside the lock, on a thread of its own, and keeps what recent sweeps used. So that part of the follow-up fell away, and the 31-40 % you measured forsend::trimpredates it; it would be worth timing once more on current main before anything else. What is left in the follow-up is the low-water rule for the scratch chunks and the trims in turn under the budget, each timed in the sweep's line. It is rebased and passes the same checks; I'll open it once this one's shape is settled.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by mstrmoos on 2026-11-30T19:22:39Z.
Picked onto our branch with #3753, #3756, #3760, #3881, #3832, #3858 and four that have since merged (#3818, #3850, #3874, #3871). #3760 needed a hand merge on top of the others.
All of victory-gpu's and victory-shader's tests passed. On the RTX 5080 16 GB, Ryzen 7 9800X3D, Windows 11, Series X profile, same save and 90 s bench route each run, the frame median went from 40.4 to 39.1 ms for the whole set. I didn't measure the PRs one by one, so this is evidence of no regression rather than this PR's own gain. Screenshots looked clean.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by paales on 2026-11-30T20:51:55Z.
Written by 🤖:
In-game numbers for this PR, in one combination. PC: RTX 5070 Ti 16 GB, Ryzen 9 5900X, 32 GB, Windows 11. Series X, 1440p, DLSS Performance, frame generation off. Each run: a new game (settings save, no story save), one A press, the first cutscene for 60 s from its first frame. On this PC the same build's submitting thread took 24 ms a frame in one run and 35 ms in another half an hour later, so only large differences count. 30 fps cap.
Base:
main84bd61e2with #3918, #1727, #3553, #3043 and #4206. #3918 lets slot eviction start at the texture queue's line, and #3848 is inmain. That combination may be what differs from your runs. One run each, first 60 s:On screen: textures gray or metallic for about a second after cuts (a white top looked silver). I did not take it into my build.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by KruIN689 on 2026-11-30T21:13:55Z.
Datapoint for this PR from our fork. RTX 5080 16 GB (driver 621.40), Ryzen 9 9950X3D, 47 GB, Windows 11. Series X, native 1440p, DLSS off,
VICTORY_HW_RT=1.Method: auto-driven roaming (walk and drive), 6 min per run, stats over the last 4 min. Three builds alternated in one session, 3 rounds each, so the session's luck (traffic, time of day) falls on all three alike:
e1251c31(+ #4247 switched off)84bd61e2+ our set829188e9+ fixes)"Our set" adds these on top of upstream main:
unmapped_onlycheck;VICTORY_SUBMIT_SPLIT=1.The set gave +5.7 fps and about 4× fewer frames over 50 ms against upstream main. I have not split that gain by change, so I can't say how much is the sweep. In earlier single-build tests the sweep spread alone took the sweep from 5.9 to 0.3 ms a frame after 15–20 min of play, and frames over 100 ms in the last 5 min from 193 to 68. It is the largest single piece of the set we measured.
Logs are available on request. (Measured and written with Claude Code, for KruIN689.)
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by duckey-dev on 2026-11-30T21:17:27Z.
@paales Thank you for measuring this; the gray textures are a real regression and I'd rather know. I can't reproduce it on 24 GB with slot eviction off, so this is a reading of the code, not a measurement. With this PR's switch on, the idle-texture sweep looks for half of a 3 ms budget where main's own bound stops at 4 ms. It may release less per sweep, so the card's use crosses the line where slot eviction starts (with #3918 that is the queue's line), and eviction then takes textures in use. If you have the two logs: the card's use over the minute and the sweep's timing line would show it. A run with
VICTORY_SWEEP_BOUNDED=0(main's bounding, the parts still in turn) would separate the two halves. If that run is clean, I'll cut this PR down to the parts in turn and the timing line and leave the texture sweep's bounding to main.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by paales on 2026-11-30T21:44:22Z.
Written by 🤖:
Thank you. The logs agree with your reading. Same PC and build as before (
main84bd61e2with #3918, #1727, #3553, #3043 and #4206, then this PR), first cutscene, seconds from its first frame. The room is the texture queue's line: in use, minus free in texture blocks, plus kept for render targets, against the line after face headroom.2 stopped at the budget), about 1.5 to 3.0 ms in the texture part.So the textures in use cross the line by 22 to 40 MB, and slot eviction (with #3918, at the queue's line) then lets go of 1.1 to 1.8 GB. The second half is #3918's side; I look at that in #3918.
The run you asked for,
VICTORY_SWEEP_BOUNDED=0on the same build, and the base again, both 70 s:VICTORY_SWEEP_BOUNDED=0With main's bounding the run is as the base: both cross the line after the scene change at about 51 s, and both let go of textures there. Captures every 250 ms of the
VICTORY_SWEEP_BOUNDED=0run show no gray textures from 56 s to 63 s. So the parts in turn and the timing line are clean in these runs, and the eviction at 57 s is not from this PR.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by duckey-dev on 2026-11-30T22:47:30Z.
@paales Thank you, that settles it. The texture sweep's bounding in this PR stopped at its budget on every sweep, released less, and brought slot eviction forward by ten seconds; with main's own bounding the run matches the base.
I've cut the PR down to what your
VICTORY_SWEEP_BOUNDED=0run showed clean (pushed,a7823981): the parts after the texture sweep taking turns underVICTORY_SWEEP_BUDGET_MS, and the sweep's timing line.let_go_idle, the dead render targets and slot eviction are main's code unchanged apart from being timed and callable in turn.VICTORY_SWEEP_BOUNDED,VICTORY_SLOT_EVICT_BOUNDEDandVICTORY_SLOT_EVICT_BACKOFF_MSare gone. One commit, 333 lines added against main, where it was 984.@tyr0nsur your fix applied to the bounded slot eviction, which is no longer in the PR, so the commit went with it. Thank you for it all the same.
One fix on the way: a texture flush (F7/F8) arriving during a sweep in turns skipped the dead render targets; it now runs every part at once.
The figures in the title and description were measured with the bounding in. I'll re-measure with this version before claiming a number for it, and correct the title and description now.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by botto854 on 2026-12-01T11:17:05Z.
The interleaved A/B I promised for the chunk low-water rule. Same 14900K / 4090 / 32 GB, Series X profile,
DLAA, frame generation off, diag builds; base v2026.11.30.02 (+ #2585), chunk rule on top (f9f20710).
Five runs each, interleaved with a third build in the same rounds, 30 s settle + 240 s scripted route:
So on this PC the rule takes most of
trim_spare_chunksout of the sweep (as in my earlier numbers), but it does notshow in frame times: every range overlaps, and five base runs alone spread by about �1 ms in the median and �2 ms in p99.
I'd read that as "no regression, no measurable frame-time gain here"; a PC that is shorter on memory may well differ.
Fine with it going into your follow-up as you planned.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by andrewpozdnakov7-jpg on 2026-12-01T11:33:24Z.
I cherry-picked
a7823981onto currentmain5fabb46eas03349fa3d46e1d887ce398f4fe11f59cffcfb251. The stable patch ID and original author match, and the branch contains only the four sweep files. It retains the current version of the PR that uses main's texture sweep and slot-eviction logic.On Windows/MSVC with Rust 1.98.1 the exact
sweeping::tests::a_part_with_nothing_to_do_gives_its_turn_to_the_nextcase passed. That check builds the GPU crate and exercises the budget scheduler when one part has no work. The staged policy also passed. The next step is to adopt this commit here and measure this version in the game, as you noted in the description.AI-assisted with OpenAI Codex.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by tillo88 on 2026-12-01T12:06:55Z.
Re-measured the cut-down version (head
a7823981, the sweep parts in turn plus the timing line) merged on top of v2026.11.30.03, against the bare release on the same bench and route. My earlier comment here was on the older, bounded version and v2026.11.29.05.first1.5–1.6 s,textures~0.67 s,dead targets~0.08 s,windowsandslot eviction~0.02 s each,pipelinesandstaging0.drain for itappeared in ~130 sweeps per run, longest 39 and 58 ms. So on this route most of the sweep's time is infirstandtextures; the parts that take turns add little here.a host command list did not close (0x80070057), one second after the masked twin[mesh 480d53fc48107a50, pixel f41ec9d9437c021c-mask]was made. That is the known prison → plane cut crash of #2237 (5 of 27 runs on the bare release), not something this PR adds. Both measured runs finished the route.Setup: Ryzen 7 9800X3D, RTX 5070 Ti 16 GB (driver 621.40), 32 GB RAM, Windows 11, release build, Series X 1440p, DLSS Quality, frame generation off, ray tracing off. Route: same save restored before each run (start of the game), prison cutscene, plane cutscene, first boat section, about 6 minutes; warm-up run not counted for speed.
Measured unattended on a replay bench (same save, recorded controller input via VICTORY_INPUT_REPLAY); numbers and text prepared with Claude.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by duckey-dev on 2026-12-01T15:39:28Z.
@tillo88 @botto854 Thank you both. Fifteen base runs against the cut-down version is a clear answer: on that route it makes no measurable difference to frame times, and the chunk rule doesn't either. So what this PR still offers is the timing line, which shows where the sweep's time goes (
firstandtexturesin your runs, neither of which this PR changes). I've removed the performance claim from the description already; if the maintainer would rather have the timing line alone, I'll cut it down to that. @andrewpozdnakov7-jpg thank you for carrying it onto current main and running the scheduler test. I'm rebasing this branch onto current main and will say here when it is pushed.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by trustno1-coder on 2026-12-01T18:48:10Z.
Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.
Pull request closed