diff options
author | Richard Linden <none@none> | 2013-08-18 22:30:27 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2013-08-18 22:30:27 -0700 |
commit | 612892b45a3413b16e40c49d3bfde77a4ca927fd (patch) | |
tree | 2272a24c7f0a8354791f74c7485a376abb377f67 /indra/llrender | |
parent | f8e3a34348ab98ecd56d53360b8f2b6512ad6bba (diff) |
SH-4433 WIP: Interesting: Statistics > Ping Sim is always 0 ms
continued conversion to units system
made units perform type promotion correctly and preserve type in arithmetic
e.g. can now do LLVector3 in units
added typedefs for remaining common unit types, including implicits
Diffstat (limited to 'indra/llrender')
-rw-r--r-- | indra/llrender/llgltexture.cpp | 2 | ||||
-rw-r--r-- | indra/llrender/llgltexture.h | 2 | ||||
-rw-r--r-- | indra/llrender/llimagegl.cpp | 12 | ||||
-rwxr-xr-x | indra/llrender/llimagegl.h | 6 |
4 files changed, 11 insertions, 11 deletions
diff --git a/indra/llrender/llgltexture.cpp b/indra/llrender/llgltexture.cpp index d06ed5e57b..56e263c5f1 100644 --- a/indra/llrender/llgltexture.cpp +++ b/indra/llrender/llgltexture.cpp @@ -294,7 +294,7 @@ LLTexUnit::eTextureAddressMode LLGLTexture::getAddressMode(void) const return mGLTexturep->getAddressMode() ; } -S32 LLGLTexture::getTextureMemory() const +S32Bytes LLGLTexture::getTextureMemory() const { llassert(mGLTexturep.notNull()) ; diff --git a/indra/llrender/llgltexture.h b/indra/llrender/llgltexture.h index 6b85f81aee..45592ee077 100644 --- a/indra/llrender/llgltexture.h +++ b/indra/llrender/llgltexture.h @@ -138,7 +138,7 @@ public: S32 getDiscardLevel() const; S8 getComponents() const; BOOL getBoundRecently() const; - S32 getTextureMemory() const ; + S32Bytes getTextureMemory() const ; LLGLenum getPrimaryFormat() const; BOOL getIsAlphaMask() const ; LLTexUnit::eTextureType getTarget(void) const ; diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index b63ee7f9f9..5d46fb290c 100644 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -253,7 +253,7 @@ void LLImageGL::updateStats(F32 current_time) } //static -S32 LLImageGL::updateBoundTexMem(const S32 mem, const S32 ncomponents, S32 category) +S32 LLImageGL::updateBoundTexMem(const S32Bytes mem, const S32 ncomponents, S32 category) { LLImageGL::sCurBoundTextureMemory += mem ; return LLImageGL::sCurBoundTextureMemory.value(); @@ -398,7 +398,7 @@ void LLImageGL::init(BOOL usemipmaps) // so that it is obvious by visual inspection if we forgot to // init a field. - mTextureMemory = 0; + mTextureMemory = (S32Bytes)0; mLastBindTime = 0.f; mPickMask = NULL; @@ -563,7 +563,7 @@ void LLImageGL::forceUpdateBindStats(void) const mLastBindTime = sLastFrameTime; } -BOOL LLImageGL::updateBindStats(S32 tex_mem) const +BOOL LLImageGL::updateBindStats(S32Bytes tex_mem) const { if (mTexName != 0) { @@ -1460,7 +1460,7 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const U8* data_in, BOOL data_ stop_glerror(); } - mTextureMemory = getMipBytes(discard_level); + mTextureMemory = (S32Bytes)getMipBytes(discard_level); sGlobalTextureMemory += mTextureMemory; mTexelsInGLTexture = getWidth() * getHeight() ; @@ -1618,10 +1618,10 @@ void LLImageGL::destroyGLTexture() { if (mTexName != 0) { - if(mTextureMemory) + if(mTextureMemory != S32Bytes(0)) { sGlobalTextureMemory -= mTextureMemory; - mTextureMemory = 0; + mTextureMemory = (S32Bytes)0; } LLImageGL::deleteTextures(mBindTarget, mFormatInternal, mMipLevels, 1, &mTexName); diff --git a/indra/llrender/llimagegl.h b/indra/llrender/llimagegl.h index 035d42c3ad..5e027851f3 100755 --- a/indra/llrender/llimagegl.h +++ b/indra/llrender/llimagegl.h @@ -63,7 +63,7 @@ public: static S32 dataFormatBytes(S32 dataformat, S32 width, S32 height); static S32 dataFormatComponents(S32 dataformat); - BOOL updateBindStats(S32 tex_mem) const ; + BOOL updateBindStats(S32Bytes tex_mem) const ; F32 getTimePassedSinceLastBound(); void forceUpdateBindStats(void) const; @@ -76,7 +76,7 @@ public: static void dirtyTexOptions(); // Sometimes called externally for textures not using LLImageGL (should go away...) - static S32 updateBoundTexMem(const S32 mem, const S32 ncomponents, S32 category) ; + static S32 updateBoundTexMem(const S32Bytes mem, const S32 ncomponents, S32 category) ; static bool checkSize(S32 width, S32 height); @@ -189,7 +189,7 @@ public: public: // Various GL/Rendering options - S32 mTextureMemory; + S32Bytes mTextureMemory; mutable F32 mLastBindTime; // last time this was bound, by discard level private: |