Repository navigation
GPU: mip-drop large sampled textures on low-VRAM adapters - #19
Merged
Merged
Conversation
Adapted from upstream Marvisak/VIctory#1272 and the hardware findings in #1296, integrated with this fork's separate staging/host-written texture state. The host now chooses the hardware adapter with the most dedicated VRAM instead of blindly taking DXGI's default, records the selected adapter memory, and defaults pure sampled power-of-two textures to one dropped top mip on adapters with at most 8.5 GiB dedicated VRAM. VICTORY_TEXTURE_MIP_DROP overrides the baseline and allocation E_OUTOFMEMORY raises pressure monotonically, retrying with another surviving mip where legal. Render targets, depth targets, UAVs, MSAA, NPOT UI/artwork, small textures, and BC-misaligned extents are exempt. Explicit SRV mip windows are rebased and clamped onto the surviving host chain; staging detiles console mip host_mip + drop; texture copies, CopyResource fallbacks, and resolves remap or prune dropped subresources. The host recheck fingerprint now uses the console texture memory size rather than the smaller staging allocation. Validation on this Linux VM: fmt, policy, Windows-target workspace check and all-features clippy with -D warnings. No real GPU, game data, Windows, Wine/Proton, or retail-title run here. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
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.
Summary
RX 580 memory/VRAM wave, adapted from upstream Marvisak/VIctory#1272 plus the hardware findings in Marvisak/VIctory#1296, and integrated with this fork's newer separate staging/host-written texture state.
VICTORY_TEXTURE_MIP_DROP=0..=3overrides this.E_OUTOFMEMORYand retry allocation where legal.VICTORY_TEXTURE_MIP_DROP_MIN_SIZEdefaults to 1024.host_mip + dropinto the smaller staging allocation.CopyResource, and resolves.Upstream measured the mip-drop family as eliminating
E_OUTOFMEMORYon 6-8 GB cards with about 1.1-1.2 GiB VRAM saved. This PR does not claim an FPS gain: upstream found frame pacing remains dominated by CPU-side copies. The expected RX 580 benefit is reaching/keeping world streaming within memory budget so other optimizations can matter.Validation on this Linux VM: fmt, asset policy (186 files), Windows-target workspace check, and Windows-target all-features clippy with
-D warnings. Not run with the title, real GPU, Windows, Wine/Proton, or game data here.Link to Devin session: https://app.devin.ai/sessions/75bbf6b4192940fea34014b13a016bee
Open in Devin Desktop: https://app.devin.ai/desktop/session/75bbf6b4192940fea34014b13a016bee?variant=devin
Requested by: @Personed