feat(renderer): mid-session texture eviction system (DX11)#592
Open
noisethanks wants to merge 2 commits into
Open
feat(renderer): mid-session texture eviction system (DX11)#592noisethanks wants to merge 2 commits into
noisethanks wants to merge 2 commits into
Conversation
…guards - Add r__tex_evict_interval cvar (default 600, min 60, max 3600) controls frames between eviction passes, previously hardcoded - Wrap all TexEvict Msg() calls and counter variables in #ifdef DEBUG so release builds have zero logging overhead - Four cvars now expose the complete eviction tuning surface: r__tex_evict_enabled, r__tex_evict_age_frames, r__tex_evict_batch_size, r__tex_evict_interval
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.
This is a refocused version of #589. EvictAllTextures has been removed since it duplicated existing functionality.
This PR contains only EvictStalledTextures, which adds an age-based LRU texture eviction during gameplay sessions. No equivalent exists in the codebase.
UnloadAllTexturesOnLevelUnload() handles level transitions only; nothing currently evicts stale textures during a single play session.
Tunable via console variables:
At the default batch size of 200, the engine clears out 100-200Mb of VRAM every 30 seconds on my configurations and it seems to add no stuttering or instability.