GPU: keep VICTORY_TEXTURE_BUDGET_MB within DXGI video-memory budget (#415) #507
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork!507
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-507"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@axolotlpriv on GitHub · 2026-11-25 01:52 UTC · original
axolotlpriv:fix/texture-budget-vram-check→main· +51 −11 · 1 files · 1 commits · openWhat
In
resource::room(), settingVICTORY_TEXTURE_BUDGET_MBbypassed the DXGI adapter video-memory budget check and decided solely onKINDS[1](filled texture copies). On an 8 GB card where buffers, pipelines, and render targets already consume several GiB, settingVICTORY_TEXTURE_BUDGET_MB=6144still admitted new host texture copies past the adapter's DXGI budget (Issue #415, traced by @Kcaiooooo). Also,mb << 20could wrap on very large values.resource::room()now:mb.saturating_mul(1 << 20)when parsingVICTORY_TEXTURE_BUDGET_MB.texture_room(...)so a manualVICTORY_TEXTURE_BUDGET_MBcap still respectsused < budget / 100 * room_percent()when DXGI video-memory telemetry is available, while preserving fallback to the manual cap if telemetry is unavailable and preserving the default path unchanged.Addresses the
VICTORY_TEXTURE_BUDGET_MBadmission check in #415 (does not cover the non-mesh fallback or Agility SDK questions in that issue).Testing
Added
resource::tests::manual_texture_limit_respects_adapter_video_memory_budgetcovering:None)budget / 100 * percent(90% and custom 96%)Validated locally on Windows:
cargo test -p victory-gpu --locked -- resource::tests(10 passed, 0 failed)cargo clippy --workspace --all-targets --all-features --locked -- -D warningscargo xtask policyAI use: written and tested with AI assistance; reviewed before posting. No game files were used.
@fladit123 on GitHub · 2026-11-25 23:03 UTC · original
While investigating VRAM admission on an 8 GB RTX 4060, I found this PR.
When rebasing, please consider preserving the current main's
card_room_kept()andtargets_room_kept()accounting, as well astiles::given_total()in the filled-texture calculation.Checking only current DXGI usage against the budget could admit textures into memory intended for later buffer and render-target allocations.
It may also be worth coordinating with #605 and #1122 so that the admission changes remain consistent.
This is a static observation; I have not tested the combined implementation yet.
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.Merge
Merge the changes and update on Forgejo.