Drain idle upload buffers without allocating during OOM recovery #4871

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

@⁠senduora on GitHub · 2026-12-01 12:09 UTC · original
senduora:fix/drain-idle-upload-buffers-on-oom → main · +7 −10 · 1 files · 1 commits · closed without merging

What it changes

When upload buffer creation returns E_OUTOFMEMORY, the recovery path used to allocate a new vector to collect the idle upload buffers it was about to release. Move each pool's existing vector out under its lock, then drop the buffers after unlocking. The existing retry and the set of pools drained stay the same.

How it was tested

  • Windows unit tests on c103ddc, without game data.
  • cargo test --locked --offline -p victory-gpu --lib host::spare -- --nocapture --test-threads=1 passed 5 tests. One timing benchmark was ignored by the harness.
  • The suite covers upload retry after a synthetic out-of-memory error and the spare pool's trimming semantics. Driver-level OOM and gameplay memory use were not measured.

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. Related: #2671 changes which pools can be reclaimed, and #4138 changes ordinary retirement. This change removes a temporary allocation from the existing synchronous retry path.
**@⁠senduora** on GitHub · 2026-12-01 12:09 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4870) `senduora:fix/drain-idle-upload-buffers-on-oom` → `main` · +7 −10 · 1 files · 1 commits · closed without merging ## What it changes When upload buffer creation returns `E_OUTOFMEMORY`, the recovery path used to allocate a new vector to collect the idle upload buffers it was about to release. Move each pool's existing vector out under its lock, then drop the buffers after unlocking. The existing retry and the set of pools drained stay the same. ## How it was tested - Windows unit tests on `c103ddc`, without game data. - `cargo test --locked --offline -p victory-gpu --lib host::spare -- --nocapture --test-threads=1` passed 5 tests. One timing benchmark was ignored by the harness. - The suite covers upload retry after a synthetic out-of-memory error and the spare pool's trimming semantics. Driver-level OOM and gameplay memory use were not measured. ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. Related: #2671 changes which pools can be reclaimed, and #4138 changes ordinary retirement. This change removes a temporary allocation from the existing synchronous retry path.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 12:09:58 +00:00
Author
Owner

@⁠trustno1-coder on GitHub · 2026-12-01 18:30 UTC · original

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.

**@⁠trustno1-coder** on GitHub · 2026-12-01 18:30 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4870#issuecomment-7321047172) 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.
github-bot closed this pull request 2026-12-01 18:36:21 +00:00

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!4871
No description provided.