[pr-fix][rendering] Skip resize preparation while retry is cooling down #244
Loading…
Reference in a new issue
No description provided.
Delete branch "andrewpozdnakov7-jpg/Darner:port/4923-skip-resize-preparation-during-backoff"
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?
Contributor role (optional)
What it changes
After a failed swap-chain resize, the existing retry guard blocks further ResizeBuffers calls for a second. The presentation path currently waits on the GPU and notifies DLSS and FSR before it reaches that guard. Check the same deadline before preparation. Eligible attempts follow the original path.
Restores locally saved VIctory-NVIDIA work from December 1, 2026. Recovered revision: f017360. Adapted by andrewpozdnakov7-jpg (GitHub profile).
How it was tested
a14e39donf3840d7.Checklist
Checked for overlap
Independent Windows build, gate, and code-read review of
a14e39d4e(based onmainf3840d73d). Not run in-game.Environment
x86_64-pc-windows-msvc), MSVC 19.44.35230.Measured results
cargo clippy --workspace --all-targets --locked -- -D warnings): PASScargo clippy --workspace --all-targets --all-features --locked -- -D warnings): PASScargo xtask policy: PASS (asset policy: 555 files ok)cargo test --locked -p darner-gpu --lib host::tests: PASS (123 passed; 0 failed; 3 ignoredin 1.47 s).Code-read audit
main(crates/darner-gpu/src/host.rs:20185-20196): during resize retry cooldown, every mismatched frame ransettle_now(WHY_SYNC),streamline::resizing(), andstreamline::fsr::resizing()beforeretry.attempt(...)returnedNone.Presentation::retrybetweenpresenter()(:20139) andResizeBuffers(:20190) is consistent, and the twoInstant::now()calls (waitingthenattempt) are monotonic-safe.20157-20183(p.pace.take(true)->p.show(...),present_aside::wait(), andComposer::new/composer_aside) still execute before the cooldown check at:20190. In particular, ifplanes.is_some()andComposer::newfails during a resize cooldown, each frame still retries composer creation and falls back toshow_base_only()before reachingretry.waiting. Sincebuffers(:20184) only reads pure switch/state flags, moving the(width, height, format, buffers)+retry.waitingearly return above:20157would skip that work too. Adding a directretry.waiting(...)assertion inhost.rs:2762would also keep the new helper covered in-tree.Verdict: PASS (with minor optional polish note).
AI-assisted: yes (Gemini 4 Neon).
Thanks for the independent Windows check. The 123 passing host tests and the code-read confirm the cooldown now skips the GPU settle and frame generation resize notifications. The composer can still do its existing preparation before that check. I am keeping that separate because this PR changes the retry path after a resize failure.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.