summaryrefslogtreecommitdiff
path: root/indra/newview/llviewertexture.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2018-12-16 13:51:15 -0500
committerNat Goodspeed <nat@lindenlab.com>2018-12-16 13:51:15 -0500
commitf5f504b0f946582efc85b0e76f38e9242aed11bb (patch)
tree5367768d3d45352966456e15b950aa4de2fb3d7a /indra/newview/llviewertexture.cpp
parent3c53f8abded5da7e9743b743170538a1ede5635a (diff)
parenta3b3ad727f53aa280ffbcc1b61ccfbb48e988708 (diff)
DRTVWR-447: Merge up to latest viewer-release
Diffstat (limited to 'indra/newview/llviewertexture.cpp')
-rw-r--r--indra/newview/llviewertexture.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 2e366835d9..41da58f94f 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -111,9 +111,9 @@ const F32 desired_discard_bias_max = (F32)MAX_DISCARD_LEVEL; // max number of le
const F64 log_2 = log(2.0);
#if ADDRESS_SIZE == 32
-const U32 DESIRED_NORMAL_FETCHED_TEXTURE_SIZE = (U32)LLViewerFetchedTexture::MAX_IMAGE_SIZE_DEFAULT / 2;
+const U32 DESIRED_NORMAL_TEXTURE_SIZE = (U32)LLViewerFetchedTexture::MAX_IMAGE_SIZE_DEFAULT / 2;
#else
-const U32 DESIRED_NORMAL_FETCHED_TEXTURE_SIZE = (U32)LLViewerFetchedTexture::MAX_IMAGE_SIZE_DEFAULT;
+const U32 DESIRED_NORMAL_TEXTURE_SIZE = (U32)LLViewerFetchedTexture::MAX_IMAGE_SIZE_DEFAULT;
#endif
//----------------------------------------------------------------------------------------------
@@ -1586,10 +1586,6 @@ void LLViewerFetchedTexture::processTextureStats()
else
{
U32 desired_size = MAX_IMAGE_SIZE_DEFAULT; // MAX_IMAGE_SIZE_DEFAULT = 1024 and max size ever is 2048
- if (mBoostLevel <= LLGLTexture::BOOST_SCULPTED)
- {
- desired_size = DESIRED_NORMAL_FETCHED_TEXTURE_SIZE;
- }
if(!mKnownDrawWidth || !mKnownDrawHeight || mFullWidth <= mKnownDrawWidth || mFullHeight <= mKnownDrawHeight)
{
if (mFullWidth > desired_size || mFullHeight > desired_size)
@@ -3171,6 +3167,7 @@ void LLViewerLODTexture::processTextureStats()
if (mKnownDrawWidth && mKnownDrawHeight)
{
S32 draw_texels = mKnownDrawWidth * mKnownDrawHeight;
+ draw_texels = llclamp(draw_texels, MIN_IMAGE_AREA, MAX_IMAGE_AREA);
// Use log_4 because we're in square-pixel space, so an image
// with twice the width and twice the height will have mTexelsPerImage
@@ -3211,7 +3208,7 @@ void LLViewerLODTexture::processTextureStats()
U32 desired_size = MAX_IMAGE_SIZE_DEFAULT; // MAX_IMAGE_SIZE_DEFAULT = 1024 and max size ever is 2048
if (mBoostLevel <= LLGLTexture::BOOST_SCULPTED)
{
- desired_size = DESIRED_NORMAL_FETCHED_TEXTURE_SIZE;
+ desired_size = DESIRED_NORMAL_TEXTURE_SIZE;
}
if (mFullWidth > desired_size || mFullHeight > desired_size)
min_discard = 1.f;