feat(gpu): add adaptive DXGI and system RAM budget scaling across tiers #3447

Open
legayclightning22 wants to merge 1 commit from upstream-pr/3447 into main
legayclightning22 commented 2026-11-27 03:01:10 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by legayclightning22 on 2026-11-27T03:01:10Z.


Summary

Adds adaptive video-memory (DXGI budget) and system RAM tier scaling with pressure hysteresis so 8 GB VRAM / 16 GB RAM setups avoid OOM and excessive retention while high-capacity systems keep full throughput budgets.

Changes

  • Sample DXGI video memory budget/usage and system RAM/commit state to classify Low, Balanced, and Full memory tiers with hysteresis.
  • Scale render-target reserve, texture admission limits, spare/staging pool counts, upload-ahead caps, host-lock limits, idle texture timeouts, and worker counts per tier.
  • Add unit tests covering tier classification, budget-scaled caps, and pressure hysteresis.

Verification

  • cargo test --locked -p victory-gpu --lib
  • cargo clippy --locked -p victory-gpu --all-targets --all-features -- -D warnings
  • cargo xtask policy
<!-- greyfinch-sync:Marvisak/VIctory:issue:5520428202 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3447). Originally posted by [legayclightning22](https://github.com/legayclightning22) on 2026-11-27T03:01:10Z. --- ## Summary Adds adaptive video-memory (DXGI budget) and system RAM tier scaling with pressure hysteresis so 8 GB VRAM / 16 GB RAM setups avoid OOM and excessive retention while high-capacity systems keep full throughput budgets. ## Changes - Sample DXGI video memory budget/usage and system RAM/commit state to classify `Low`, `Balanced`, and `Full` memory tiers with hysteresis. - Scale render-target reserve, texture admission limits, spare/staging pool counts, upload-ahead caps, host-lock limits, idle texture timeouts, and worker counts per tier. - Add unit tests covering tier classification, budget-scaled caps, and pressure hysteresis. ## Verification - `cargo test --locked -p victory-gpu --lib` - `cargo clippy --locked -p victory-gpu --all-targets --all-features -- -D warnings` - `cargo xtask policy`
Dukestar69 commented 2026-11-27 03:07:40 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Dukestar69 on 2026-11-27T03:07:40Z.

Review: APPROVED


LGTM — verified on Windows (RTX 5090):

  • cargo test -p victory-gpu --lib passed (234/234, including all 4 new budget::tests::, skipping the 2 pre-existing origin/main RTX 5090 failures)
  • cargo clippy -p victory-gpu --all-targets -- -D warnings passed with 0 warnings
  • cargo xtask policy passed (195 files ok)

Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).

<!-- greyfinch-sync:Marvisak/VIctory:review:6082949545 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3447#pullrequestreview-6082949545). Originally posted by [Dukestar69](https://github.com/Dukestar69) on 2026-11-27T03:07:40Z. **Review:** APPROVED --- LGTM — verified on Windows (RTX 5090): - `cargo test -p victory-gpu --lib` passed (234/234, including all 4 new `budget::tests::`, skipping the 2 pre-existing `origin/main` RTX 5090 failures) - `cargo clippy -p victory-gpu --all-targets -- -D warnings` passed with 0 warnings - `cargo xtask policy` passed (`195 files ok`) Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/3447:upstream-pr/3447'
git switch 'upstream-pr/3447'

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.

git switch 'main'
git merge --no-ff 'upstream-pr/3447'
git switch 'upstream-pr/3447'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/3447'
git switch 'upstream-pr/3447'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/3447'
git switch 'main'
git merge --squash 'upstream-pr/3447'
git switch 'main'
git merge --ff-only 'upstream-pr/3447'
git switch 'main'
git merge 'upstream-pr/3447'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
Marvisak/VIctory!3447
No description provided.