Skip to content

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

Open
yumaste wants to merge 1 commit into
trustno1-coder:mainfrom
yumaste:nvidia/texture-staging-backoff
Open

yumaste wants to merge 1 commit into
trustno1-coder:mainfrom
yumaste:nvidia/texture-staging-backoff

Conversation

@yumaste

@yumaste yumaste commented Nov 28, 2026

Copy link
Copy Markdown

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant