summaryrefslogtreecommitdiff
path: root/indra/newview/llviewertexturelist.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2024-10-20 23:20:58 +0300
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2024-10-25 13:53:11 +0300
commitfa5aba2b67a029c7415c48270c8c84cd35e73a24 (patch)
tree19cddf89740707b909041e84cdf7a0392d6a4d3a /indra/newview/llviewertexturelist.cpp
parent72ce0248f1669e3e172e38beeab96147d7eaea3b (diff)
viewer#2875 Proportionally agressive vram cleanup
Diffstat (limited to 'indra/newview/llviewertexturelist.cpp')
-rw-r--r--indra/newview/llviewertexturelist.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index 08e9151940..0d609b8084 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -1169,6 +1169,11 @@ F32 LLViewerTextureList::updateImagesFetchTextures(F32 max_time)
//update MIN_UPDATE_COUNT or 5% of other textures, whichever is greater
update_count = llmax((U32) MIN_UPDATE_COUNT, (U32) mUUIDMap.size()/20);
+ if (LLViewerTexture::sDesiredDiscardBias > 1.f)
+ {
+ // we are over memory target, update more agresively
+ update_count = (S32)(update_count * LLViewerTexture::sDesiredDiscardBias);
+ }
update_count = llmin(update_count, (U32) mUUIDMap.size());
{ // copy entries out of UUID map to avoid iterator invalidation from deletion inside updateImageDecodeProiroty or updateFetch below