Repository navigation
GPU: keep VICTORY_TEXTURE_BUDGET_MB within DXGI video-memory budget (#415) - #507
Open
axolotlpriv wants to merge 1 commit into
Open
axolotlpriv wants to merge 1 commit into
axolotlpriv wants to merge 1 commit into
Conversation
|
While investigating VRAM admission on an 8 GB RTX 4060, I found this PR. When rebasing, please consider preserving the current main's 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.