summaryrefslogtreecommitdiff
path: root/indra/newview/llvocache.cpp
diff options
context:
space:
mode:
authorJonathan "Geenz" Goodman <geenz@lindenlab.com>2025-09-18 15:25:31 -0400
committerGitHub <noreply@github.com>2025-09-18 15:25:31 -0400
commitf316a92f308be836b57f638514dcd56f3851a89a (patch)
tree9a1431c0c311de41388879b31f26c6faa8bf5e89 /indra/newview/llvocache.cpp
parentbadeccbebcfa73a11cf0f8a4562c9a0d386834c1 (diff)
parent82e431e0906647dcfc4a64b057e6bc305c9add8e (diff)
Merge pull request #4700 from secondlife/geenz/2025.07-develop
Geenz/2025.07 -> develop
Diffstat (limited to 'indra/newview/llvocache.cpp')
-rw-r--r--indra/newview/llvocache.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp
index ac73c2def6..52a6afc2d0 100644
--- a/indra/newview/llvocache.cpp
+++ b/indra/newview/llvocache.cpp
@@ -488,13 +488,11 @@ void LLVOCacheEntry::updateDebugSettings()
static const F32 MIN_RADIUS = 1.0f;
F32 draw_radius = gAgentCamera.mDrawDistance;
- if (LLViewerTexture::sDesiredDiscardBias > 2.f && LLViewerTexture::isSystemMemoryLow())
+ if (LLViewerTexture::isSystemMemoryCritical())
{
- // Discard's bias maximum is 4 so we need to check 2 to 4 range
// Factor is intended to go from 1.0 to 2.0
- F32 factor = 1.f + (LLViewerTexture::sDesiredDiscardBias - 2.f) / 2.f;
// For safety cap reduction at 50%, we don't want to go below half of draw distance
- draw_radius = llmax(draw_radius / factor, draw_radius / 2.f);
+ draw_radius = llmax(draw_radius / LLViewerTexture::getSystemMemoryBudgetFactor(), draw_radius / 2.f);
}
const F32 clamped_min_radius = llclamp((F32) min_radius, MIN_RADIUS, draw_radius); // [1, mDrawDistance]
sNearRadius = MIN_RADIUS + ((clamped_min_radius - MIN_RADIUS) * adjust_factor);