summaryrefslogtreecommitdiff
path: root/indra/newview/llviewertexture.cpp
diff options
context:
space:
mode:
authorHoward Stearns <howard.stearns@gmail.com>2022-06-13 14:03:04 -0700
committerHoward Stearns <howard.stearns@gmail.com>2022-06-13 14:03:04 -0700
commit9d9c2037e10966bdf4b07ef3fed081c04a4ed30a (patch)
tree2650993a565233f5995e6abe44f14d48d48619ac /indra/newview/llviewertexture.cpp
parent91a9665e35a3bfeb5a2bc81586a23e70bb2c7596 (diff)
parentc9a48a1cdd23a592eb25454d5e2d6c316ec93445 (diff)
Merge branch 'DRTVWR-564' of bitbucket.org:lindenlab/viewer into SL-17485
Diffstat (limited to 'indra/newview/llviewertexture.cpp')
-rw-r--r--indra/newview/llviewertexture.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index a6e7b01df7..3584fffd44 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -803,14 +803,8 @@ void LLViewerTexture::addTextureStats(F32 virtual_size, BOOL needs_gltexture) co
}
virtual_size *= sTexelPixelRatio;
- /*if (!mMaxVirtualSizeResetCounter)
- {
- //flag to reset the values because the old values are used.
- resetMaxVirtualSizeResetCounter();
- mMaxVirtualSize = virtual_size;
- mNeedsGLTexture = needs_gltexture;
- }
- else*/ if (virtual_size > mMaxVirtualSize)
+
+ if (virtual_size > mMaxVirtualSize)
{
mMaxVirtualSize = virtual_size;
}
@@ -1801,6 +1795,12 @@ void LLViewerFetchedTexture::updateVirtualSize()
return;
}
+ if (sDesiredDiscardBias > 0.f)
+ {
+ // running out of video memory, don't hold onto high res textures in the background
+ mMaxVirtualSize = 0.f;
+ }
+
for (U32 ch = 0; ch < LLRender::NUM_TEXTURE_CHANNELS; ++ch)
{
llassert(mNumFaces[ch] <= mFaceList[ch].size());