GPU: retry texture staging with smaller blocks after out-of-memory #986

Closed
github-bot wants to merge 1 commit from github-bot/gh-986 into main AGit
Owner

@⁠yumaste on GitHub · 2026-11-28 10:37 UTC · original
yumaste:nvidia/port-texture-staging → main · +170 −40 · 2 files · 1 commits · closed without merging

Port of Marvisak/VIctory#3259 to this fork's texture staging pool. The pool already backs off after a refused block, but currently tries only a 64 MiB block. The texture's existing dedicated-buffer fallback can also be deferred after that out-of-memory result.

After E_OUTOFMEMORY, try smaller blocks down to the request rounded to 64 KiB, with bounded retries. Reuse a successful smaller growth size during the 500 ms backoff interval. Account for the actual block size when reusing, reclaiming and reporting staging memory. Keep the existing speculative admission policy. Related to #816, which moves block creation outside the pool lock.

Windows validation: all 11 pool tests passed with cargo test -p victory-gpu --locked --lib pool::tests. The new tests simulate allocation refusals, verify reuse and reclamation, and cover recovery to the normal block size.

**@⁠yumaste** on GitHub · 2026-11-28 10:37 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/986) `yumaste:nvidia/port-texture-staging` → `main` · +170 −40 · 2 files · 1 commits · closed without merging Port of Marvisak/VIctory#3259 to this fork's texture staging pool. The pool already backs off after a refused block, but currently tries only a 64 MiB block. The texture's existing dedicated-buffer fallback can also be deferred after that out-of-memory result. After `E_OUTOFMEMORY`, try smaller blocks down to the request rounded to 64 KiB, with bounded retries. Reuse a successful smaller growth size during the 500 ms backoff interval. Account for the actual block size when reusing, reclaiming and reporting staging memory. Keep the existing speculative admission policy. Related to #816, which moves block creation outside the pool lock. Windows validation: all 11 pool tests passed with `cargo test -p victory-gpu --locked --lib pool::tests`. The new tests simulate allocation refusals, verify reuse and reclamation, and cover recovery to the normal block size.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 14:31:13 +00:00
github-bot closed this pull request 2026-11-28 19:25:03 +00:00
Author
Owner

@⁠trustno1-coder on GitHub · 2026-11-28 19:23 UTC · original

Thanks for this. I'm closing it without merging because it conflicts with the current main in several places (main has moved a lot since it was opened, with about 100 pull requests merged today), and I can't resolve that safely on your behalf. If you'd still like it in, please rebase it on the current main and open a new pull request.

**@⁠trustno1-coder** on GitHub · 2026-11-28 19:23 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/986#issuecomment-7244503708) Thanks for this. I'm closing it without merging because it conflicts with the current main in several places (main has moved a lot since it was opened, with about 100 pull requests merged today), and I can't resolve that safely on your behalf. If you'd still like it in, please rebase it on the current main and open a new pull request.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!986
No description provided.