summaryrefslogtreecommitdiff
path: root/indra/llrender/llimagegl.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2013-06-21 11:00:47 -0700
committerRichard Linden <none@none>2013-06-21 11:00:47 -0700
commit090fa057b5ff17170d846473a2bc9ebc315c99d3 (patch)
tree781dff230ab8d1fc651e453cdd568df5aff8487a /indra/llrender/llimagegl.cpp
parent5de2f0a8970244866dc8b511caa3c8626955264f (diff)
parenta2a6bf20d71f923e9a5e43f71213fffbfea5a2a6 (diff)
merge
Diffstat (limited to 'indra/llrender/llimagegl.cpp')
-rw-r--r--indra/llrender/llimagegl.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp
index cb99a651c6..01ed946d40 100644
--- a/indra/llrender/llimagegl.cpp
+++ b/indra/llrender/llimagegl.cpp
@@ -625,7 +625,7 @@ void LLImageGL::setImage(const U8* data_in, BOOL data_hasmips)
{
is_compressed = true;
}
-
+
if (mUseMipMaps)
@@ -749,12 +749,16 @@ void LLImageGL::setImage(const U8* data_in, BOOL data_hasmips)
S32 height = getHeight(mCurrentDiscardLevel);
S32 nummips = mMaxDiscardLevel - mCurrentDiscardLevel + 1;
S32 w = width, h = height;
+
+
+ const U8* new_data = 0;
+ (void)new_data;
+
const U8* prev_mip_data = 0;
const U8* cur_mip_data = 0;
#ifdef SHOW_ASSERT
S32 cur_mip_size = 0;
#endif
-
mMipLevels = nummips;
for (int m=0; m<nummips; m++)
@@ -774,14 +778,22 @@ void LLImageGL::setImage(const U8* data_in, BOOL data_hasmips)
llassert(cur_mip_size == bytes*4);
#endif
U8* new_data = new U8[bytes];
+
+#ifdef SHOW_ASSERT
+ llassert(prev_mip_data);
+ llassert(cur_mip_size == bytes*4);
llassert_always(new_data);
+#endif
+
LLImageBase::generateMip(prev_mip_data, new_data, w, h, mComponents);
cur_mip_data = new_data;
#ifdef SHOW_ASSERT
cur_mip_size = bytes;
#endif
+
}
llassert(w > 0 && h > 0 && cur_mip_data);
+ (void)cur_mip_data;
{
// LLFastTimer t1(FTM_TEMP4);
if(mFormatSwapBytes)
@@ -1143,7 +1155,7 @@ void LLImageGL::deleteTextures(LLTexUnit::eTextureType type, U32 format, S32 mip
sDeadTextureList[type][format].push_back(textures[i]);
}
}
- }
+ }
break;
}
}