GPU: keep VICTORY_TEXTURE_BUDGET_MB within DXGI video-memory budget (#415) #507
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from fxceless/victory-fork. Originally posted by axolotlpriv on 2026-11-25T01:52:16Z.
What
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.
Imported from fxceless/victory-fork. Originally posted by fladit123 on 2026-11-25T23:03:07Z.
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
Checkout
From your project repository, check out a new branch and test the changes.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.