diff options
Diffstat (limited to 'indra/newview/llviewertexture.cpp')
| -rw-r--r-- | indra/newview/llviewertexture.cpp | 8 | 
1 files changed, 7 insertions, 1 deletions
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 609ad38e96..a0723db479 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -489,7 +489,12 @@ void LLViewerTexture::updateClass()      }      LLViewerMediaTexture::updateClass(); - +    // This is a divisor used to determine how much VRAM from our overall VRAM budget to use. +    // This is **cumulative** on whatever the detected or manually set VRAM budget is. +    // If we detect 2048MB of VRAM, this will, by default, only use 1024. +    // If you set 1024MB of VRAM, this will, by default, use 512. +    // -Geenz 2025-03-03 +    static LLCachedControl<U32> tex_vram_divisor(gSavedSettings, "RenderTextureVRAMDivisor", 2);      static LLCachedControl<U32> max_vram_budget(gSavedSettings, "RenderMaxVRAMBudget", 0);      F64 texture_bytes_alloc = LLImageGL::getTextureBytesAllocated() / 1024.0 / 512.0; @@ -500,6 +505,7 @@ void LLViewerTexture::updateClass()      F32 used = (F32)ll_round(texture_bytes_alloc + vertex_bytes_alloc);      F32 budget = max_vram_budget == 0 ? (F32)gGLManager.mVRAM : (F32)max_vram_budget; +    budget /= tex_vram_divisor;      // Try to leave at least half a GB for everyone else and for bias,      // but keep at least 768MB for ourselves  | 
