Defer completed command-list recycling by default #4109
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4109"
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 vilaris on 2026-11-30T16:09:44Z.
## Why
Completed command lists were still reset and returned to the idle pool on the late-submit thread. A drain can do several milliseconds of allocator and command-list work after the current submission has been published, delaying the next one.
Change
VICTORY_DEFER_LIST_RECYCLEto enabled. The existing late helper drains up to eight completed flights at a time and schedules another pass if more are ready.VICTORY_DEFER_LIST_RECYCLE=0and as a fallback for serial late submissions if the helper cannot start.VICTORY_POST_SUBMIT_TIMING=1opts into aggregated timings for post-submit work, pool acquisition and settling reasons.Before and after
Same instrumented release binary on an RTX 4070, using the same gameplay routine and alternating only the recycle flag. The runs were close in duration and gameplay inputs were manual. These measurements come from the experimental checkout before the change was adapted to current main.
Selected timing records, transcribed from the local logs:
The long baseline wait was triggered by the in-flight list limit while the pool still had free slots. The measurements confirm that recycling left the submit path. They do not establish why the second run avoided the in-flight limit. The active run also had a 2.89 s outlier outside the final 15 windows.
Validation
cargo check --locked -p victory-gpucargo xtask policy --stagedgit diff --checkImported from trustno1-coder/VIctory-NVIDIA. Originally posted by Zeyphers on 2026-11-30T20:20:09Z.
Merged onto main
84bd61e2and benched on an RTX 2080 Super 8 GB and Ryzen 7 5800X (Series S, DLSS Quality, standing scene, 180 s): 9.4 fps median vs 9.2–9.7 baseline, so no measurable change on this CPU-bound rig. Two baseline runs differed by about 0.5 fps, so that's the noise. Only one run per PR, in a standing scene, not a walk.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by nicolasabosch on 2026-11-30T22:38:35Z.
Tested on an RTX 4070 Laptop 8 GB: no measurable fps difference in this scene (2 runs).
Tested on main
e1251c31with this PR (53633864) merged on top and nothing else changed. Release build, same profile as main.Setup
victory play --series-s --dlss performance --framegen 2, with no fps cap and the window minimized.host:reports, about 200 s. These are real frames, not generated ones.On this laptop, identical main runs differ by up to about 2–2.5 fps, so only an effect of roughly 2–3 fps or more would be visible in this scene. Frames over 100 ms were 2 of 2749 in the fixed-save run, against 1–4 per run of about 2650 on main, so they were rare either way in this scene. A third start ended about 50 s in, during loading. Its stderr shows a first-chance 0xc000001d, an illegal instruction, inside the title's own code. No other start of the 32 here did that, main's included. I can't say it has anything to do with this PR, which changes list recycling, but I'm reporting it anyway. The first run also translated every shader again, because the PR edits a file under
crates/victory-shader/src.Not tested: driving, camera turns, interiors, an image comparison, other GPUs.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by trustno1-coder on 2026-12-01T18:46:39Z.
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