summaryrefslogtreecommitdiff
path: root/indra/llrender
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llrender')
-rw-r--r--indra/llrender/llimagegl.cpp17
-rw-r--r--indra/llrender/llimagegl.h5
2 files changed, 4 insertions, 18 deletions
diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp
index ae10142e7a..7ba0cc2fde 100644
--- a/indra/llrender/llimagegl.cpp
+++ b/indra/llrender/llimagegl.cpp
@@ -54,7 +54,6 @@ const F32 MIN_TEXTURE_LIFETIME = 10.f;
U32 wpo2(U32 i);
-#if LL_DARWIN
// texture memory accounting (for OS X)
static LLMutex sTexMemMutex;
static std::unordered_map<U32, U32> sTextureAllocs;
@@ -119,22 +118,6 @@ U64 LLImageGL::getTextureBytesAllocated()
return sTextureBytes;
}
-#else
-
-#define alloc_tex_image(width, height, pixformat) (void) width; (void) height; (void) pixformat;
-#define free_tex_image(texName) (void) texName;
-#define free_tex_images(count, texNames) (void) count; (void) texNames;
-#define free_cur_tex_image()
-
-// static
-U64 LLImageGL::getTextureBytesAllocated()
-{
- // UNIMPLEMENTED OUTSIDE OF OS X, DO NOT CALL
- llassert(false);
- return 0;
-}
-#endif
-
//statics
U32 LLImageGL::sUniqueCount = 0;
diff --git a/indra/llrender/llimagegl.h b/indra/llrender/llimagegl.h
index 619421e68a..1bcdd040e0 100644
--- a/indra/llrender/llimagegl.h
+++ b/indra/llrender/llimagegl.h
@@ -53,7 +53,10 @@ class LLImageGL : public LLRefCount
friend class LLTexUnit;
public:
- // For OS X use only -- get an estimate of how many bytes have been allocated in vram for textures
+ // Get an estimate of how many bytes have been allocated in vram for textures.
+ // Does not include mipmaps.
+ // NOTE: multiplying this number by two gives a good estimate for total
+ // video memory usage based on testing in lagland against an NVIDIA GPU.
static U64 getTextureBytesAllocated();
// These 2 functions replace glGenTextures() and glDeleteTextures()