From c78bd2aa1eb1df7c4337a1e9f9cec13c4852c6fd Mon Sep 17 00:00:00 2001 From: Ansariel Date: Wed, 6 May 2015 09:22:26 +0200 Subject: [PATCH] Backout 4cf3dd03650a for the time being as we currently do not need it --- indra/llrender/llimagegl.cpp | 16 ++++------------ indra/llrender/llimagegl.h | 16 ++++------------ indra/newview/llviewertexture.cpp | 18 ++++-------------- indra/newview/llviewertexture.h | 13 +++---------- 4 files changed, 15 insertions(+), 48 deletions(-) diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index 5f8260c512..b58b6a5570 100755 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -51,14 +51,9 @@ U32 wpo2(U32 i); U32 LLImageGL::sUniqueCount = 0; U32 LLImageGL::sBindCount = 0; -// Texture memory management -//S32Bytes LLImageGL::sGlobalTextureMemory(0); -//S32Bytes LLImageGL::sBoundTextureMemory(0); -//S32Bytes LLImageGL::sCurBoundTextureMemory(0); -S64Bytes LLImageGL::sGlobalTextureMemory(0); -S64Bytes LLImageGL::sBoundTextureMemory(0); -S64Bytes LLImageGL::sCurBoundTextureMemory(0); -// +S32Bytes LLImageGL::sGlobalTextureMemory(0); +S32Bytes LLImageGL::sBoundTextureMemory(0); +S32Bytes LLImageGL::sCurBoundTextureMemory(0); S32 LLImageGL::sCount = 0; BOOL LLImageGL::sGlobalUseAnisotropic = FALSE; @@ -256,10 +251,7 @@ void LLImageGL::updateStats(F32 current_time) } //static -// Texture memory management -//S32 LLImageGL::updateBoundTexMem(const S32Bytes mem, const S32 ncomponents, S32 category) -S64 LLImageGL::updateBoundTexMem(const S32Bytes mem, const S32 ncomponents, S32 category) -// +S32 LLImageGL::updateBoundTexMem(const S32Bytes mem, const S32 ncomponents, S32 category) { LLImageGL::sCurBoundTextureMemory += mem ; return LLImageGL::sCurBoundTextureMemory.value(); diff --git a/indra/llrender/llimagegl.h b/indra/llrender/llimagegl.h index 50d879a903..21982eab1d 100755 --- a/indra/llrender/llimagegl.h +++ b/indra/llrender/llimagegl.h @@ -69,10 +69,7 @@ public: static void dirtyTexOptions(); // Sometimes called externally for textures not using LLImageGL (should go away...) - // Texture memory management - //static S32 updateBoundTexMem(const S32Bytes mem, const S32 ncomponents, S32 category) ; - static S64 updateBoundTexMem(const S32Bytes mem, const S32 ncomponents, S32 category) ; - // + static S32 updateBoundTexMem(const S32Bytes mem, const S32 ncomponents, S32 category) ; static bool checkSize(S32 width, S32 height); @@ -245,14 +242,9 @@ public: static F32 sLastFrameTime; // Global memory statistics - // Texture memory management - //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 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 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; diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index a475b815c2..52ad9c88c3 100755 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -93,18 +93,11 @@ S32 LLViewerTexture::sAuxCount = 0; LLFrameTimer LLViewerTexture::sEvaluationTimer; F32 LLViewerTexture::sDesiredDiscardBias = 0.f; F32 LLViewerTexture::sDesiredDiscardScale = 1.1f; -// Texture memory management -//S32Bytes LLViewerTexture::sBoundTextureMemory; -//S32Bytes LLViewerTexture::sTotalTextureMemory; -S64Bytes LLViewerTexture::sBoundTextureMemory; -S64Bytes LLViewerTexture::sTotalTextureMemory; -// +S32Bytes LLViewerTexture::sBoundTextureMemory; +S32Bytes LLViewerTexture::sTotalTextureMemory; S32Megabytes LLViewerTexture::sMaxBoundTextureMemory; S32Megabytes LLViewerTexture::sMaxTotalTextureMem; -// Texture memory management -//S32Bytes LLViewerTexture::sMaxDesiredTextureMem; -S64Bytes LLViewerTexture::sMaxDesiredTextureMem; -// +S32Bytes LLViewerTexture::sMaxDesiredTextureMem; S8 LLViewerTexture::sCameraMovingDiscardBias = 0; F32 LLViewerTexture::sCameraMovingBias = 0.0f; S32 LLViewerTexture::sMaxSculptRez = 128; //max sculpt image size @@ -567,10 +560,7 @@ void LLViewerTexture::updateClass(const F32 velocity, const F32 angular_velocity sTotalTextureMemory >= sMaxTotalTextureMem) { //when texture memory overflows, lower down the threshold to release the textures more aggressively. - // Texture memory management - //sMaxDesiredTextureMem = llmin(sMaxDesiredTextureMem * 0.75f, F32Bytes(gMaxVideoRam)); - sMaxDesiredTextureMem = llmin(sMaxDesiredTextureMem * 0.75, F64Bytes(gMaxVideoRam)); - // + sMaxDesiredTextureMem = llmin(sMaxDesiredTextureMem * 0.75f, F32Bytes(gMaxVideoRam)); // If we are using more texture memory than we should, // scale up the desired discard level diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index bc2b2a060b..31e3e79193 100755 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -212,18 +212,11 @@ public: static LLFrameTimer sEvaluationTimer; static F32 sDesiredDiscardBias; static F32 sDesiredDiscardScale; - // Texture memory management - //static S32Bytes sBoundTextureMemory; - //static S32Bytes sTotalTextureMemory; - static S64Bytes sBoundTextureMemory; - static S64Bytes sTotalTextureMemory; - // + static S32Bytes sBoundTextureMemory; + static S32Bytes sTotalTextureMemory; static S32Megabytes sMaxBoundTextureMemory; static S32Megabytes sMaxTotalTextureMem; - // Texture memory management - //static S32Bytes sMaxDesiredTextureMem ; - static S64Bytes sMaxDesiredTextureMem ; - // + static S32Bytes sMaxDesiredTextureMem ; static S8 sCameraMovingDiscardBias; static F32 sCameraMovingBias; static S32 sMaxSculptRez ;