diff options
Diffstat (limited to 'indra/newview/llviewertexturelist.cpp')
| -rw-r--r-- | indra/newview/llviewertexturelist.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 0a3012ffef..7f4b2a56f9 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -61,6 +61,8 @@ #include "llviewerdisplay.h" #include "llviewerwindow.h" #include "llprogressview.h" + +#include "llvoavatarself.h" //////////////////////////////////////////////////////////////////////////// void (*LLViewerTextureList::sUUIDCallback)(void **, const LLUUID&) = NULL; @@ -503,12 +505,15 @@ LLViewerFetchedTexture* LLViewerTextureList::getImage(const LLUUID &image_id, // If the image is not found, creates new image and // enqueues a request for transmission + LLPointer<LLViewerFetchedTexture> imagep = NULL; + if (image_id.isNull()) { return (LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI)); } - LLPointer<LLViewerFetchedTexture> imagep = findImage(image_id, get_element_type(boost_priority)); + imagep = imagep.isNull() ? findImage(image_id, get_element_type(boost_priority)) : imagep; + if (!imagep.isNull()) { LLViewerFetchedTexture *texture = imagep.get(); @@ -1341,9 +1346,9 @@ LLPointer<LLImageJ2C> LLViewerTextureList::convertToUploadFile(LLPointer<LLImage // Returns min setting for TextureMemory (in MB) S32Megabytes LLViewerTextureList::getMinVideoRamSetting() { - U32Megabytes system_ram = gSysMemory.getPhysicalMemoryKB(); + S32Megabytes system_ram = gSysMemory.getPhysicalMemoryClamped(); //min texture mem sets to 64M if total physical mem is more than 1.5GB - return (system_ram > U32Megabytes(1500)) ? S32Megabytes(64) : gMinVideoRam ; + return (system_ram > S32Megabytes(1500)) ? S32Megabytes(64) : gMinVideoRam ; } //static @@ -1386,7 +1391,7 @@ S32Megabytes LLViewerTextureList::getMaxVideoRamSetting(bool get_recommended, fl LL_WARNS() << "VRAM amount not detected, defaulting to " << max_texmem << " MB" << LL_ENDL; } - S32Megabytes system_ram = gSysMemory.getPhysicalMemoryKB(); // In MB + S32Megabytes system_ram = gSysMemory.getPhysicalMemoryClamped(); // In MB //LL_INFOS() << "*** DETECTED " << system_ram << " MB of system memory." << LL_ENDL; if (get_recommended) max_texmem = llmin(max_texmem, system_ram/2); |
