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

Manually merged
github merged 2 commits from github-bot/gh-1472 into main 2026-11-30 14:17:30 +00:00 AGit
Owner

@⁠yumaste on GitHub · 2026-11-28 20:26 UTC · original
yumaste:nvidia/texture-staging-backoff → main · +178 −55 · 2 files · 2 commits · merged 2026-11-30 14:12 UTC

Replaces #986, rebased onto 923e38cc. Port of Marvisak/VIctory#3259.

The staging pool starts with 64 MiB blocks. If D3D12 returns E_OUTOFMEMORY, retry with smaller blocks down to the request rounded to 64 KiB. Reuse a successful smaller size for 500 ms and account for its actual capacity when suballocating, reclaiming, and reporting memory. Block creation still runs outside the pool lock, and speculative growth keeps the existing budget check.

Windows / WARP: cargo test --locked -p victory-gpu --lib --features diagnostics pool::tests -- --test-threads=1 passed 18 tests, with 2 benchmarks ignored. The tests cover allocation refusals, reuse of smaller blocks, recovery to the default size, and concurrent staging.

**@⁠yumaste** on GitHub · 2026-11-28 20:26 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1472) `yumaste:nvidia/texture-staging-backoff` → `main` · +178 −55 · 2 files · 2 commits · merged 2026-11-30 14:12 UTC Replaces #986, rebased onto `923e38cc`. Port of Marvisak/VIctory#3259. The staging pool starts with 64 MiB blocks. If D3D12 returns `E_OUTOFMEMORY`, retry with smaller blocks down to the request rounded to 64 KiB. Reuse a successful smaller size for 500 ms and account for its actual capacity when suballocating, reclaiming, and reporting memory. Block creation still runs outside the pool lock, and speculative growth keeps the existing budget check. Windows / WARP: `cargo test --locked -p victory-gpu --lib --features diagnostics pool::tests -- --test-threads=1` passed 18 tests, with 2 benchmarks ignored. The tests cover allocation refusals, reuse of smaller blocks, recovery to the default size, and concurrent staging.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 20:28:46 +00:00
github manually merged commit 004a71148c into main 2026-11-30 14:17:30 +00:00
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!1472
No description provided.