gpu: scale texture VRAM floor and per-frame staging budget from VRAM #45

Open
github-bot wants to merge 2 commits from github-bot/gh-45 into main AGit
Owner

@⁠fever308 on GitHub · 2026-11-24 20:53 UTC · original
fever308:feat/auto-vram-texture-budgets → main · +85 −16 · 2 files · 2 commits · open

Summary

 State::heap_textures()
+  memory = host.video_memory()
-  per_frame = 192 MiB
+  per_frame = staging_budget_per_frame(memory.budget)   # 96 / 192 / 256 / 384 MiB
-  room = resource::room()                               # 2nd video_memory() query + fixed 2 GiB floor
+  room = resource::room(memory)                         # floor = min(2 GiB, budget / 4)

Evidence

  • Before: Fixed 2 GiB unconditional host-texture floor (bypassing the 90% VRAM budget guard on 4–6 GiB adapters) and fixed 192 MiB per-frame staging cap.
    After:
    • cargo test -p victory-gpu scales_with_vram_budget: 2 passed (staging_budget_scales_with_vram_budget, texture_floor_scales_with_vram_budget), 0 failed.
    • cargo clippy -p victory-gpu --all-targets -- -D warnings (default and --all-features): clean.

Merge Danger

Door: two-way

Scoped to draw.rs and resource.rs; VICTORY_TEXTURE_BUDGET_MB still overrides admission directly.

Blast Radius: Textures

Adjusts host texture admission floor on < 8 GiB cards and per-frame texture upload pacing across VRAM tiers.

**@⁠fever308** on GitHub · 2026-11-24 20:53 UTC · [original](https://github.com/fxceless/victory-fork/pull/45) `fever308:feat/auto-vram-texture-budgets` → `main` · +85 −16 · 2 files · 2 commits · open ## Summary ```diff State::heap_textures() + memory = host.video_memory() - per_frame = 192 MiB + per_frame = staging_budget_per_frame(memory.budget) # 96 / 192 / 256 / 384 MiB - room = resource::room() # 2nd video_memory() query + fixed 2 GiB floor + room = resource::room(memory) # floor = min(2 GiB, budget / 4) ``` ## Evidence - **Before:** Fixed `2 GiB` unconditional host-texture floor (bypassing the 90% VRAM budget guard on 4–6 GiB adapters) and fixed `192 MiB` per-frame staging cap. **After:** - `cargo test -p victory-gpu scales_with_vram_budget`: 2 passed (`staging_budget_scales_with_vram_budget`, `texture_floor_scales_with_vram_budget`), 0 failed. - `cargo clippy -p victory-gpu --all-targets -- -D warnings` (default and `--all-features`): clean. ## Merge Danger **Door:** two-way Scoped to `draw.rs` and `resource.rs`; `VICTORY_TEXTURE_BUDGET_MB` still overrides admission directly. **Blast Radius:** Textures Adjusts host texture admission floor on `< 8 GiB` cards and per-frame texture upload pacing across VRAM tiers.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:35:09 +00:00
github-bot referenced this pull request from a commit 2026-11-26 03:40:07 +00:00
github-bot force-pushed github-bot/gh-45 from 8b938b29ad to 7f27573877 2026-11-26 08:48:50 +00:00 Compare
github-bot force-pushed github-bot/gh-45 from 7f27573877 to 0ddd31b03f 2026-11-26 11:20:32 +00:00 Compare
This pull request has changes conflicting with the target branch.
  • crates/victory-gpu/src/draw.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/45/head:github-bot/gh-45'
git switch 'github-bot/gh-45'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-45'
git switch 'github-bot/gh-45'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-45'
git switch 'github-bot/gh-45'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-45'
git switch 'main'
git merge --squash 'github-bot/gh-45'
git switch 'main'
git merge --ff-only 'github-bot/gh-45'
git switch 'main'
git merge 'github-bot/gh-45'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.