summaryrefslogtreecommitdiff
path: root/indra/newview/llviewertexture.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2025-01-09 17:15:15 +0200
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2025-01-11 00:20:15 +0200
commit203ef2f8d89a593ffe3af2f9556eebffd8d535a5 (patch)
tree19fe58b82f57eeecb9e417525db089e1ab2edd0a /indra/newview/llviewertexture.cpp
parent4ff1cbfbfffe17edbbf4e3b5a6c3984a0618c7ad (diff)
#3364 Decrement bias only if there is 10prcnt free space
Instead of when there is any space.
Diffstat (limited to 'indra/newview/llviewertexture.cpp')
-rw-r--r--indra/newview/llviewertexture.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 36b6787ace..26eaa3c5bb 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -556,12 +556,13 @@ void LLViewerTexture::updateClass()
// don't execute above until the slam to 1.5 has a chance to take effect
sEvaluationTimer.reset();
- // lower discard bias over time when free memory is available
- if (sDesiredDiscardBias > 1.f && over_pct < 0.f)
+ // lower discard bias over time when at least 10% of budget is free
+ const F32 FREE_PERCENTAGE_TRESHOLD = -0.1f;
+ if (sDesiredDiscardBias > 1.f && over_pct < FREE_PERCENTAGE_TRESHOLD)
{
static LLCachedControl<F32> high_mem_discard_decrement(gSavedSettings, "RenderHighMemMinDiscardDecrement", .1f);
- F32 decrement = high_mem_discard_decrement - llmin(over_pct, 0.f);
+ F32 decrement = high_mem_discard_decrement - llmin(over_pct - FREE_PERCENTAGE_TRESHOLD, 0.f);
sDesiredDiscardBias -= decrement * gFrameIntervalSeconds;
}
}