diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp index 1d6a733ec..06d8e5746 100644 --- a/indra/llimage/llimage.cpp +++ b/indra/llimage/llimage.cpp @@ -281,7 +281,7 @@ U8* LLImageBase::allocateDataSize(S32 width, S32 height, S32 ncomponents, S32 si // LLImageRaw //--------------------------------------------------------------------------- -AIThreadSafeSimpleDC LLImageRaw::sGlobalRawMemory; +AIThreadSafeSimpleDC LLImageRaw::sGlobalRawMemory; S32 LLImageRaw::sRawImageCount = 0; S32 LLImageRaw::sRawImageCachedCount = 0; @@ -358,7 +358,7 @@ LLImageRaw::~LLImageRaw() U8* LLImageRaw::allocateData(S32 size) { U8* res = LLImageBase::allocateData(size); - *AIAccess(sGlobalRawMemory) += getDataSize(); + *AIAccess(sGlobalRawMemory) += getDataSize(); return res; } @@ -367,7 +367,7 @@ U8* LLImageRaw::reallocateData(S32 size) { S32 old_data_size = getDataSize(); U8* res = LLImageBase::reallocateData(size); - *AIAccess(sGlobalRawMemory) += getDataSize() - old_data_size; + *AIAccess(sGlobalRawMemory) += getDataSize() - old_data_size; return res; } @@ -375,7 +375,7 @@ U8* LLImageRaw::reallocateData(S32 size) void LLImageRaw::deleteData() { { - *AIAccess(sGlobalRawMemory) -= getDataSize(); + *AIAccess(sGlobalRawMemory) -= getDataSize(); } LLImageBase::deleteData(); } @@ -392,7 +392,7 @@ void LLImageRaw::setDataAndSize(U8 *data, S32 width, S32 height, S8 components) LLImageBase::setSize(width, height, components) ; LLImageBase::setDataAndSize(data, width * height * components) ; - *AIAccess(sGlobalRawMemory) += getDataSize(); + *AIAccess(sGlobalRawMemory) += getDataSize(); } BOOL LLImageRaw::resize(U16 width, U16 height, S8 components) diff --git a/indra/llimage/llimage.h b/indra/llimage/llimage.h index 1e94f49f4..392155fc7 100644 --- a/indra/llimage/llimage.h +++ b/indra/llimage/llimage.h @@ -257,7 +257,7 @@ protected: void setDataAndSize(U8 *data, S32 width, S32 height, S8 components) ; public: - static AIThreadSafeSimpleDC sGlobalRawMemory; + static AIThreadSafeSimpleDC sGlobalRawMemory; static S32 sRawImageCount; static S32 sRawImageCachedCount; diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index 8164764bf..968897dde 100644 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -50,9 +50,9 @@ U32 wpo2(U32 i); U32 LLImageGL::sUniqueCount = 0; U32 LLImageGL::sBindCount = 0; -S32Bytes LLImageGL::sGlobalTextureMemory(0); -S32Bytes LLImageGL::sBoundTextureMemory(0); -S32Bytes LLImageGL::sCurBoundTextureMemory(0); +S64Bytes LLImageGL::sGlobalTextureMemory(0); +S64Bytes LLImageGL::sBoundTextureMemory(0); +S64Bytes LLImageGL::sCurBoundTextureMemory(0); S32 LLImageGL::sCount = 0; BOOL LLImageGL::sGlobalUseAnisotropic = FALSE; @@ -78,9 +78,9 @@ S32 LLImageGL::sCurTexPickSize = -1 ; LLPointer LLImageGL::sHighlightTexturep = NULL; S32 LLImageGL::sMaxCategories = 1 ; -std::vector LLImageGL::sTextureMemByCategory; -std::vector LLImageGL::sTextureMemByCategoryBound ; -std::vector LLImageGL::sTextureCurMemByCategoryBound ; +std::vector LLImageGL::sTextureMemByCategory; +std::vector LLImageGL::sTextureMemByCategoryBound ; +std::vector LLImageGL::sTextureCurMemByCategoryBound ; //------------------------ // **************************************************************************************************** //End for texture auditing use only @@ -293,7 +293,7 @@ void LLImageGL::updateStats(F32 current_time) LL_RECORD_BLOCK_TIME(FTM_IMAGE_UPDATE_STATS); sLastFrameTime = current_time; sBoundTextureMemory = sCurBoundTextureMemory; - sCurBoundTextureMemory = S32Bytes(0); + sCurBoundTextureMemory = S64Bytes(0); if(gAuditTexture) { @@ -305,7 +305,7 @@ void LLImageGL::updateStats(F32 current_time) for(U32 i = 0 ; i < sTextureCurMemByCategoryBound.size() ; i++) { sTextureMemByCategoryBound[i] = sTextureCurMemByCategoryBound[i] ; - sTextureCurMemByCategoryBound[i] = (S32Bytes)0 ; + sTextureCurMemByCategoryBound[i] = (S64Bytes)0 ; } } } diff --git a/indra/llrender/llimagegl.h b/indra/llrender/llimagegl.h index 8508646c3..f2d32c087 100644 --- a/indra/llrender/llimagegl.h +++ b/indra/llrender/llimagegl.h @@ -233,9 +233,9 @@ public: static F32 sLastFrameTime; // Global memory statistics - static S32Bytes sGlobalTextureMemory; // Tracks main memory texmem - static S32Bytes sBoundTextureMemory; // Tracks bound texmem for last completed frame - static S32Bytes sCurBoundTextureMemory; // Tracks bound texmem for current frame + static S64Bytes sGlobalTextureMemory; // Tracks main memory texmem + static S64Bytes sBoundTextureMemory; // Tracks bound texmem for last completed frame + static S64Bytes sCurBoundTextureMemory; // Tracks bound texmem for current frame static U32 sBindCount; // Tracks number of texture binds for current frame static U32 sUniqueCount; // Tracks number of unique texture binds for current frame static BOOL sGlobalUseAnisotropic; @@ -288,9 +288,9 @@ public: //for debug use: show texture category distribution //---------------------------------------- - static std::vector sTextureMemByCategory; - static std::vector sTextureMemByCategoryBound ; - static std::vector sTextureCurMemByCategoryBound ; + static std::vector sTextureMemByCategory; + static std::vector sTextureMemByCategoryBound ; + static std::vector sTextureCurMemByCategoryBound ; //---------------------------------------- // **************************************************************************************************** //End of definitions for texture auditing use only diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp index f32c6f695..19d74fcba 100644 --- a/indra/newview/lltextureview.cpp +++ b/indra/newview/lltextureview.cpp @@ -583,11 +583,11 @@ void LLGLTexMemBar::draw() std::string text = ""; - S32 global_raw_memory; + S64 global_raw_memory; { - global_raw_memory = *AIAccess(LLImageRaw::sGlobalRawMemory); + global_raw_memory = *AIAccess(LLImageRaw::sGlobalRawMemory); } - text = llformat("GL Tot: %d/%d MB Bound: %d/%d MB FBO: %d MB Raw Tot: %d MB Bias: %.2f Cache: %.1f/%.1f MB Net Tot Tex: %.1f MB Tot Obj: %.1f MB Tot Htp: %d", + text = llformat("GL Tot: %d/%d MB Bound: %d/%d MB FBO: %d MB Raw Tot: %lld MB Bias: %.2f Cache: %.1f/%.1f MB Net Tot Tex: %.1f MB Tot Obj: %.1f MB Tot Htp: %d", total_mem.value(), max_total_mem.value(), bound_mem.value(), diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index ea6e98d23..af6c56891 100644 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -444,9 +444,9 @@ void reset_statistics() void output_statistics(void*) { - S32 global_raw_memory; + S64 global_raw_memory; { - global_raw_memory = *AIAccess(LLImageRaw::sGlobalRawMemory); + global_raw_memory = *AIAccess(LLImageRaw::sGlobalRawMemory); } LL_INFOS() << "Number of orphans: " << gObjectList.getOrphanCount() << LL_ENDL; LL_INFOS() << "Number of dead objects: " << gObjectList.mNumDeadObjects << LL_ENDL; diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 1f27df1bf..57d5af19e 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -65,7 +65,7 @@ // extern const S32Megabytes gMinVideoRam(32); -const S32Megabytes gMaxVideoRam(1024); +const S32Megabytes gMaxVideoRam(2048); // statics @@ -88,11 +88,11 @@ S32 LLViewerTexture::sAuxCount = 0; LLFrameTimer LLViewerTexture::sEvaluationTimer; F32 LLViewerTexture::sDesiredDiscardBias = 0.f; F32 LLViewerTexture::sDesiredDiscardScale = 1.1f; -S32Bytes LLViewerTexture::sBoundTextureMemory; -S32Bytes LLViewerTexture::sTotalTextureMemory; +S64Bytes LLViewerTexture::sBoundTextureMemory; +S64Bytes LLViewerTexture::sTotalTextureMemory; S32Megabytes LLViewerTexture::sMaxBoundTextureMemory; S32Megabytes LLViewerTexture::sMaxTotalTextureMem; -S32Bytes LLViewerTexture::sMaxDesiredTextureMem; +S64Bytes LLViewerTexture::sMaxDesiredTextureMem; S8 LLViewerTexture::sCameraMovingDiscardBias = 0; F32 LLViewerTexture::sCameraMovingBias = 0.0f ; S32 LLViewerTexture::sMaxSculptRez = 128 ; //max sculpt image size diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index 1c2e8f9a0..b546673e6 100644 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -218,11 +218,11 @@ public: static LLFrameTimer sEvaluationTimer; static F32 sDesiredDiscardBias; static F32 sDesiredDiscardScale; - static S32Bytes sBoundTextureMemory; - static S32Bytes sTotalTextureMemory; + static S64Bytes sBoundTextureMemory; + static S64Bytes sTotalTextureMemory; static S32Megabytes sMaxBoundTextureMemory; static S32Megabytes sMaxTotalTextureMem; - static S32Bytes sMaxDesiredTextureMem ; + static S64Bytes sMaxDesiredTextureMem ; static S8 sCameraMovingDiscardBias; static F32 sCameraMovingBias; static S32 sMaxSculptRez ; diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 137c3f6c5..f3e57ec72 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -746,9 +746,9 @@ void LLViewerTextureList::updateImages(F32 max_time) } cleared = FALSE; - S32 global_raw_memory; + S64 global_raw_memory; { - global_raw_memory = *AIAccess(LLImageRaw::sGlobalRawMemory); + global_raw_memory = *AIAccess(LLImageRaw::sGlobalRawMemory); } LLViewerStats::getInstance()->mNumImagesStat.addValue(sNumImages); LLViewerStats::getInstance()->mNumRawImagesStat.addValue(LLImageRaw::sRawImageCount);