summaryrefslogtreecommitdiff
path: root/indra/newview/llviewertexture.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2024-12-05 11:52:03 -0800
committerGitHub <noreply@github.com>2024-12-05 13:52:03 -0600
commit1120a7ccb91223df91aa92b1354dfe2c3b65a577 (patch)
treecffbc33c37f7f1ac7387ecd310de5d67dc787b62 /indra/newview/llviewertexture.cpp
parent396b97aebfb3294287a4a598f0be3900ccada69a (diff)
#3210 Fix for "Texture will be downscaled" happening too often. (#3212)
Diffstat (limited to 'indra/newview/llviewertexture.cpp')
-rw-r--r--indra/newview/llviewertexture.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index e14ddc4360..14647d6f84 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -559,7 +559,10 @@ void LLViewerTexture::updateClass()
// lower discard bias over time when free memory is available
if (sDesiredDiscardBias > 1.f && over_pct < 0.f)
{
- sDesiredDiscardBias -= gFrameIntervalSeconds * 0.01f;
+ static LLCachedControl<F32> high_mem_discard_decrement(gSavedSettings, "RenderHighMemMinDiscardDecrement", .1f);
+
+ F32 decrement = high_mem_discard_decrement - llmin(over_pct, 0.f);
+ sDesiredDiscardBias -= decrement * gFrameIntervalSeconds;
}
}