From b3e9c46c94dad0c81a5adcb9152521b5368c66a7 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 29 Aug 2012 22:50:56 -0700 Subject: SH-3275 WIP Run viewer metrics for object update messages further cleanup of LLStat removed llfloaterlagmeter --- indra/newview/llviewertexturelist.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'indra/newview/llviewertexturelist.cpp') diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 80cca9963e..c0b196918d 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -67,12 +67,12 @@ void (*LLViewerTextureList::sUUIDCallback)(void **, const LLUUID&) = NULL; U32 LLViewerTextureList::sTextureBits = 0; U32 LLViewerTextureList::sTexturePackets = 0; S32 LLViewerTextureList::sNumImages = 0; -LLStat LLViewerTextureList::sNumImagesStat("Num Images", 32, TRUE); -LLStat LLViewerTextureList::sNumRawImagesStat("Num Raw Images", 32, TRUE); -LLStat LLViewerTextureList::sGLTexMemStat("GL Texture Mem", 32, TRUE); -LLStat LLViewerTextureList::sGLBoundMemStat("GL Bound Mem", 32, TRUE); -LLStat LLViewerTextureList::sRawMemStat("Raw Image Mem", 32, TRUE); -LLStat LLViewerTextureList::sFormattedMemStat("Formatted Image Mem", 32, TRUE); +LLStat LLViewerTextureList::sNumImagesStat("Num Images", TRUE); +LLStat LLViewerTextureList::sNumRawImagesStat("Num Raw Images", TRUE); +LLStat LLViewerTextureList::sGLTexMemStat("GL Texture Mem", TRUE); +LLStat LLViewerTextureList::sGLBoundMemStat("GL Bound Mem", TRUE); +LLStat LLViewerTextureList::sRawMemStat("Raw Image Mem", TRUE); +LLStat LLViewerTextureList::sFormattedMemStat("Formatted Image Mem", TRUE); LLViewerTextureList gTextureList; static LLFastTimer::DeclareTimer FTM_PROCESS_IMAGES("Process Images"); -- cgit v1.2.3 From b1baf982b1bd41a150233d0a28d3601226924c65 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Sun, 30 Sep 2012 10:41:29 -0700 Subject: SH-3275 WIP Run viewer metrics for object update messages factored out lltrace::sampler into separate file added rudimentary lltrace support to llstatgraph made llstatgraph use param blocks more effectively moves initial set of stats over to lltrace removed windows.h #defines for min and max --- indra/newview/llviewertexturelist.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/newview/llviewertexturelist.cpp') diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 17d8e5e4fa..034f8edf24 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -622,7 +622,9 @@ void LLViewerTextureList::updateImages(F32 max_time) } cleared = FALSE; - LLAppViewer::getTextureFetch()->setTextureBandwidth(LLViewerStats::getInstance()->mTextureKBitStat.getMeanPerSec()); + LLTrace::Sampler* sampler = LLThread::getTraceData()->getPrimarySampler(); + + LLAppViewer::getTextureFetch()->setTextureBandwidth(sampler->getMean(STAT_TEXTURE_KBIT) / sampler->getSampleTime()); LLViewerStats::getInstance()->mNumImagesStat.addValue(sNumImages); LLViewerStats::getInstance()->mNumRawImagesStat.addValue(LLImageRaw::sRawImageCount); -- cgit v1.2.3 From 14b1b0b2bb6bac5bc688cc4d14c33f1b680dd3b4 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 1 Oct 2012 19:39:04 -0700 Subject: SH-3275 WIP Run viewer metrics for object update messages cleaned up API samplers are now value types with copy-on-write buffers under the hood removed coupling with LLThread --- indra/newview/llviewertexturelist.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llviewertexturelist.cpp') diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 034f8edf24..21a83b1676 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -622,7 +622,7 @@ void LLViewerTextureList::updateImages(F32 max_time) } cleared = FALSE; - LLTrace::Sampler* sampler = LLThread::getTraceData()->getPrimarySampler(); + LLTrace::Sampler* sampler = LLTrace::getThreadTrace()->getPrimarySampler(); LLAppViewer::getTextureFetch()->setTextureBandwidth(sampler->getMean(STAT_TEXTURE_KBIT) / sampler->getSampleTime()); -- cgit v1.2.3 From dbe9742703cf14db85ec3d16c540efc68dce95a6 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 2 Oct 2012 15:37:16 -0700 Subject: SH-3404 create sampler class renamed LLTrace::ThreadTrace to LLTrace::ThreadRecorder renamed LLTrace::Sampler to LLTrace::Recording --- indra/newview/llviewertexturelist.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewertexturelist.cpp') diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 21a83b1676..4e62cbd714 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -622,9 +622,9 @@ void LLViewerTextureList::updateImages(F32 max_time) } cleared = FALSE; - LLTrace::Sampler* sampler = LLTrace::getThreadTrace()->getPrimarySampler(); + LLTrace::Recording* recording = LLTrace::get_thread_recorder()->getPrimaryRecording(); - LLAppViewer::getTextureFetch()->setTextureBandwidth(sampler->getMean(STAT_TEXTURE_KBIT) / sampler->getSampleTime()); + LLAppViewer::getTextureFetch()->setTextureBandwidth(recording->getPerSec(STAT_TEXTURE_KBIT)); LLViewerStats::getInstance()->mNumImagesStat.addValue(sNumImages); LLViewerStats::getInstance()->mNumRawImagesStat.addValue(LLImageRaw::sRawImageCount); -- cgit v1.2.3 From 8f5e83789254d19a1a31737b0d7515cd7e967b26 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 3 Oct 2012 19:32:59 -0700 Subject: SH-3405 WIP convert existing stats to lltrace system SH-3403 FIX implement unit conversion LLUnit implements unit tracking and conversion added support for LLUnit to LLTrace duplicated most llstats into LLTrace equivalents --- indra/newview/llviewertexturelist.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llviewertexturelist.cpp') diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 4e62cbd714..de3dd3c1c6 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -624,7 +624,7 @@ void LLViewerTextureList::updateImages(F32 max_time) LLTrace::Recording* recording = LLTrace::get_thread_recorder()->getPrimaryRecording(); - LLAppViewer::getTextureFetch()->setTextureBandwidth(recording->getPerSec(STAT_TEXTURE_KBIT)); + LLAppViewer::getTextureFetch()->setTextureBandwidth(recording->getPerSec(LLStatViewer::TEXTURE_KBIT)); LLViewerStats::getInstance()->mNumImagesStat.addValue(sNumImages); LLViewerStats::getInstance()->mNumRawImagesStat.addValue(LLImageRaw::sRawImageCount); -- cgit v1.2.3 From 74ac0182ec8f7a0f6d0ea89f5814f0998ab90b62 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 10 Oct 2012 19:25:56 -0700 Subject: SH-3405 WIP convert existing stats to lltrace system fixed units conversion so that trace getters return convertable units removed circular dependencies from lltrace* converted more stats to lltrace --- indra/newview/llviewertexturelist.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'indra/newview/llviewertexturelist.cpp') diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index de3dd3c1c6..b22c0c797e 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -58,14 +58,13 @@ #include "pipeline.h" #include "llappviewer.h" #include "llxuiparser.h" +#include "lltracethreadrecorder.h" #include "llviewerdisplay.h" //////////////////////////////////////////////////////////////////////////// void (*LLViewerTextureList::sUUIDCallback)(void **, const LLUUID&) = NULL; -U32 LLViewerTextureList::sTextureBits = 0; -U32 LLViewerTextureList::sTexturePackets = 0; S32 LLViewerTextureList::sNumImages = 0; LLStat LLViewerTextureList::sNumImagesStat("Num Images", TRUE); LLStat LLViewerTextureList::sNumRawImagesStat("Num Raw Images", TRUE); @@ -624,7 +623,7 @@ void LLViewerTextureList::updateImages(F32 max_time) LLTrace::Recording* recording = LLTrace::get_thread_recorder()->getPrimaryRecording(); - LLAppViewer::getTextureFetch()->setTextureBandwidth(recording->getPerSec(LLStatViewer::TEXTURE_KBIT)); + LLAppViewer::getTextureFetch()->setTextureBandwidth(recording->getPerSec(LLStatViewer::TEXTURE_KBIT).get()); LLViewerStats::getInstance()->mNumImagesStat.addValue(sNumImages); LLViewerStats::getInstance()->mNumRawImagesStat.addValue(LLImageRaw::sRawImageCount); @@ -1326,8 +1325,8 @@ void LLViewerTextureList::receiveImageHeader(LLMessageSystem *msg, void **user_d { received_size = msg->getReceiveSize() ; } - gTextureList.sTextureBits += received_size * 8; - gTextureList.sTexturePackets++; + LLStatViewer::TEXTURE_KBIT.add >(received_size); + LLStatViewer::TEXTURE_PACKETS.add(1); U8 codec; U16 packets; @@ -1399,8 +1398,9 @@ void LLViewerTextureList::receiveImagePacket(LLMessageSystem *msg, void **user_d { received_size = msg->getReceiveSize() ; } - gTextureList.sTextureBits += received_size * 8; - gTextureList.sTexturePackets++; + + LLStatViewer::TEXTURE_KBIT.add >(received_size); + LLStatViewer::TEXTURE_PACKETS.add(1); //llprintline("Start decode, image header..."); msg->getUUIDFast(_PREHASH_ImageID, _PREHASH_ID, id); -- cgit v1.2.3 From 0f58ca02cdec62711eadb82ba28fcff08faef2ee Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 12 Oct 2012 00:20:19 -0700 Subject: SH-3275 WIP Update viewer metrics system to be more flexible cleaned up accumulator merging logic introduced frame recording to LLTrace directly instead of going through LLViewerStats moved consumer code over to frame recording instead of whatever the current active recording was --- indra/newview/llviewertexturelist.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llviewertexturelist.cpp') diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 81c45cfb84..af28ea36eb 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -58,7 +58,7 @@ #include "pipeline.h" #include "llappviewer.h" #include "llxuiparser.h" -#include "lltracethreadrecorder.h" +#include "lltracerecording.h" #include "llviewerdisplay.h" //////////////////////////////////////////////////////////////////////////// @@ -621,9 +621,9 @@ void LLViewerTextureList::updateImages(F32 max_time) } cleared = FALSE; - LLTrace::Recording* recording = LLTrace::get_thread_recorder()->getPrimaryRecording(); + LLTrace::Recording& recording = LLTrace::get_frame_recording().getTotalRecording(); - LLAppViewer::getTextureFetch()->setTextureBandwidth(recording->getPerSec(LLStatViewer::TEXTURE_KBIT).value()); + LLAppViewer::getTextureFetch()->setTextureBandwidth(recording.getPerSec(LLStatViewer::TEXTURE_KBIT).value()); LLViewerStats::getInstance()->mNumImagesStat.addValue(sNumImages); LLViewerStats::getInstance()->mNumRawImagesStat.addValue(LLImageRaw::sRawImageCount); -- cgit v1.2.3 From 041dfccd1ea5b59c1b3c4e37e9a5495cad342c8f Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 12 Oct 2012 20:17:52 -0700 Subject: SH-3405 WIP convert existing stats to lltrace system default to double precision now fixed unit conversion logic for LLUnit renamed LLTrace::Rate to LLTrace::Count and got rid of the old count as it was confusing some const correctness changes --- indra/newview/llviewertexturelist.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewertexturelist.cpp') diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index af28ea36eb..ccfedd8881 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -1325,7 +1325,7 @@ void LLViewerTextureList::receiveImageHeader(LLMessageSystem *msg, void **user_d { received_size = msg->getReceiveSize() ; } - LLStatViewer::TEXTURE_KBIT.add >(received_size); + LLStatViewer::TEXTURE_KBIT.add(received_size); LLStatViewer::TEXTURE_PACKETS.add(1); U8 codec; @@ -1399,7 +1399,7 @@ void LLViewerTextureList::receiveImagePacket(LLMessageSystem *msg, void **user_d received_size = msg->getReceiveSize() ; } - LLStatViewer::TEXTURE_KBIT.add >(received_size); + LLStatViewer::TEXTURE_KBIT.add(received_size); LLStatViewer::TEXTURE_PACKETS.add(1); //llprintline("Start decode, image header..."); -- cgit v1.2.3 From 8d2f7a526545a10cd3669bf837a0b6f02cf5fe71 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 15 Oct 2012 19:43:35 -0700 Subject: SH-3405 WIP convert existing stats to lltrace system converted all remaining LLViewerStats to lltrace --- indra/newview/llviewertexturelist.cpp | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'indra/newview/llviewertexturelist.cpp') diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index ccfedd8881..56ccf3b1f0 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -66,12 +66,6 @@ void (*LLViewerTextureList::sUUIDCallback)(void **, const LLUUID&) = NULL; S32 LLViewerTextureList::sNumImages = 0; -LLStat LLViewerTextureList::sNumImagesStat("Num Images", TRUE); -LLStat LLViewerTextureList::sNumRawImagesStat("Num Raw Images", TRUE); -LLStat LLViewerTextureList::sGLTexMemStat("GL Texture Mem", TRUE); -LLStat LLViewerTextureList::sGLBoundMemStat("GL Bound Mem", TRUE); -LLStat LLViewerTextureList::sRawMemStat("Raw Image Mem", TRUE); -LLStat LLViewerTextureList::sFormattedMemStat("Formatted Image Mem", TRUE); LLViewerTextureList gTextureList; static LLFastTimer::DeclareTimer FTM_PROCESS_IMAGES("Process Images"); @@ -625,12 +619,15 @@ void LLViewerTextureList::updateImages(F32 max_time) LLAppViewer::getTextureFetch()->setTextureBandwidth(recording.getPerSec(LLStatViewer::TEXTURE_KBIT).value()); - LLViewerStats::getInstance()->mNumImagesStat.addValue(sNumImages); - LLViewerStats::getInstance()->mNumRawImagesStat.addValue(LLImageRaw::sRawImageCount); - LLViewerStats::getInstance()->mGLTexMemStat.addValue((F32)BYTES_TO_MEGA_BYTES(LLImageGL::sGlobalTextureMemoryInBytes)); - LLViewerStats::getInstance()->mGLBoundMemStat.addValue((F32)BYTES_TO_MEGA_BYTES(LLImageGL::sBoundTextureMemoryInBytes)); - LLViewerStats::getInstance()->mRawMemStat.addValue((F32)BYTES_TO_MEGA_BYTES(LLImageRaw::sGlobalRawMemory)); - LLViewerStats::getInstance()->mFormattedMemStat.addValue((F32)BYTES_TO_MEGA_BYTES(LLImageFormatted::sGlobalFormattedMemory)); + { + using namespace LLStatViewer; + NUM_IMAGES.sample(sNumImages); + NUM_RAW_IMAGES.sample(LLImageRaw::sRawImageCount); + GL_TEX_MEM.sample(LLImageGL::sGlobalTextureMemoryInBytes); + GL_BOUND_MEM.sample(LLImageGL::sBoundTextureMemoryInBytes); + RAW_MEM.sample(LLImageRaw::sGlobalRawMemory); + FORMATTED_MEM.sample(LLImageFormatted::sGlobalFormattedMemory); + } { //loading from fast cache -- cgit v1.2.3 From e6ca5471a2a816a24888ae1b38332531b22b7254 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 17 Oct 2012 00:06:22 -0700 Subject: SH-3275 Update viewer metrics system to be more flexible put template parameter back in LLUnit units added free function operators for mathematical manipulation of unit values converted texture memory tracking to units --- indra/newview/llviewertexturelist.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'indra/newview/llviewertexturelist.cpp') diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 56ccf3b1f0..d355432e8a 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -606,8 +606,8 @@ void LLViewerTextureList::updateImages(F32 max_time) if(gTeleportDisplay) { if(!cleared) - { - clearFetchingRequests(); + { + clearFetchingRequests(); gPipeline.clearRebuildGroups(); cleared = TRUE; } @@ -623,10 +623,10 @@ void LLViewerTextureList::updateImages(F32 max_time) using namespace LLStatViewer; NUM_IMAGES.sample(sNumImages); NUM_RAW_IMAGES.sample(LLImageRaw::sRawImageCount); - GL_TEX_MEM.sample(LLImageGL::sGlobalTextureMemoryInBytes); - GL_BOUND_MEM.sample(LLImageGL::sBoundTextureMemoryInBytes); - RAW_MEM.sample(LLImageRaw::sGlobalRawMemory); - FORMATTED_MEM.sample(LLImageFormatted::sGlobalFormattedMemory); + GL_TEX_MEM.sample(LLImageGL::sGlobalTextureMemory); + GL_BOUND_MEM.sample(LLImageGL::sBoundTextureMemory); + RAW_MEM.sample(LLImageRaw::sGlobalRawMemory); + FORMATTED_MEM.sample(LLImageFormatted::sGlobalFormattedMemory); } { @@ -1184,7 +1184,7 @@ S32 LLViewerTextureList::getMinVideoRamSetting() { S32 system_ram = (S32)BYTES_TO_MEGA_BYTES(gSysMemory.getPhysicalMemoryClamped()); //min texture mem sets to 64M if total physical mem is more than 1.5GB - return (system_ram > 1500) ? 64 : MIN_VIDEO_RAM_IN_MEGA_BYTES ; + return (system_ram > 1500) ? 64 : gMinVideoRam.value() ; } //static @@ -1234,7 +1234,7 @@ S32 LLViewerTextureList::getMaxVideoRamSetting(bool get_recommended) else max_texmem = llmin(max_texmem, (S32)(system_ram)); - max_texmem = llclamp(max_texmem, getMinVideoRamSetting(), MAX_VIDEO_RAM_IN_MEGA_BYTES); + max_texmem = llclamp(max_texmem, getMinVideoRamSetting(), gMaxVideoRam.value()); return max_texmem; } @@ -1322,7 +1322,7 @@ void LLViewerTextureList::receiveImageHeader(LLMessageSystem *msg, void **user_d { received_size = msg->getReceiveSize() ; } - LLStatViewer::TEXTURE_KBIT.add(received_size); + LLStatViewer::TEXTURE_KBIT.add(received_size); LLStatViewer::TEXTURE_PACKETS.add(1); U8 codec; @@ -1396,7 +1396,7 @@ void LLViewerTextureList::receiveImagePacket(LLMessageSystem *msg, void **user_d received_size = msg->getReceiveSize() ; } - LLStatViewer::TEXTURE_KBIT.add(received_size); + LLStatViewer::TEXTURE_KBIT.add(received_size); LLStatViewer::TEXTURE_PACKETS.add(1); //llprintline("Start decode, image header..."); -- cgit v1.2.3 From a52d203a4f1d2988e8ffba16258f3f132f22f56d Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 17 Oct 2012 20:00:07 -0700 Subject: SH-3405 WIP convert existing stats to lltrace system started conversion of llviewerassetstats removed old, dead LLViewerStats code made units tracing require units declaration clean up of units handling --- indra/newview/llviewertexturelist.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llviewertexturelist.cpp') diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index d355432e8a..b9d5751412 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -709,7 +709,7 @@ void LLViewerTextureList::updateImagesDecodePriorities() // Update the decode priority for N images each frame { static const S32 MAX_PRIO_UPDATES = gSavedSettings.getS32("TextureFetchUpdatePriorities"); // default: 32 - const size_t max_update_count = llmin((S32) (MAX_PRIO_UPDATES*MAX_PRIO_UPDATES*gFrameIntervalSeconds) + 1, MAX_PRIO_UPDATES); + const size_t max_update_count = llmin((S32) (MAX_PRIO_UPDATES*MAX_PRIO_UPDATES*gFrameIntervalSeconds.value()) + 1, MAX_PRIO_UPDATES); S32 update_counter = llmin(max_update_count, mUUIDMap.size()); uuid_map_t::iterator iter = mUUIDMap.upper_bound(mLastUpdateUUID); while ((update_counter-- > 0) && !mUUIDMap.empty()) @@ -943,11 +943,11 @@ F32 LLViewerTextureList::updateImagesFetchTextures(F32 max_time) static const F32 MIN_PRIORITY_THRESHOLD = gSavedSettings.getF32("TextureFetchUpdatePriorityThreshold"); // default: 0.0 static const bool SKIP_LOW_PRIO = gSavedSettings.getBOOL("TextureFetchUpdateSkipLowPriority"); // default: false - size_t max_priority_count = llmin((S32) (MAX_HIGH_PRIO_COUNT*MAX_HIGH_PRIO_COUNT*gFrameIntervalSeconds)+1, MAX_HIGH_PRIO_COUNT); + size_t max_priority_count = llmin((S32) (MAX_HIGH_PRIO_COUNT*MAX_HIGH_PRIO_COUNT*gFrameIntervalSeconds.value())+1, MAX_HIGH_PRIO_COUNT); max_priority_count = llmin(max_priority_count, mImageList.size()); size_t total_update_count = mUUIDMap.size(); - size_t max_update_count = llmin((S32) (MAX_UPDATE_COUNT*MAX_UPDATE_COUNT*gFrameIntervalSeconds)+1, MAX_UPDATE_COUNT); + size_t max_update_count = llmin((S32) (MAX_UPDATE_COUNT*MAX_UPDATE_COUNT*gFrameIntervalSeconds.value())+1, MAX_UPDATE_COUNT); max_update_count = llmin(max_update_count, total_update_count); // MAX_HIGH_PRIO_COUNT high priority entries -- cgit v1.2.3 From f19254e633095f4eccbca40c87c38feb0fa5d083 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Sat, 9 Feb 2013 01:04:35 -0800 Subject: SH-3275 FIX interesting Update viewer metrics system to be more flexible moved image timings under "Update Images" fast timer --- indra/newview/llviewertexturelist.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llviewertexturelist.cpp') diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 3106a351e0..6f8b439049 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -599,9 +599,11 @@ static LLFastTimer::DeclareTimer FTM_IMAGE_FETCH("Fetch"); static LLFastTimer::DeclareTimer FTM_FAST_CACHE_IMAGE_FETCH("Fast Cache Fetch"); static LLFastTimer::DeclareTimer FTM_IMAGE_CREATE("Create"); static LLFastTimer::DeclareTimer FTM_IMAGE_STATS("Stats"); +static LLFastTimer::DeclareTimer FTM_UPDATE_IMAGES("Update Images"); void LLViewerTextureList::updateImages(F32 max_time) { + LLFastTimer _(FTM_UPDATE_IMAGES); static BOOL cleared = FALSE; if(gTeleportDisplay) { -- cgit v1.2.3 From f07b9c2c69f1f6882dcf249aacf33cdfacf878ab Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 6 Mar 2013 11:08:25 -0800 Subject: renamed LLTrace stat gathering classes/methods to make the structure of LLTrace clearer Count becomes CountStatHandle Count.sum becomes sum(Count, value), etc. --- indra/newview/llviewertexturelist.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'indra/newview/llviewertexturelist.cpp') diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 6f8b439049..899ef985ff 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -623,12 +623,12 @@ void LLViewerTextureList::updateImages(F32 max_time) { using namespace LLStatViewer; - NUM_IMAGES.sample(sNumImages); - NUM_RAW_IMAGES.sample(LLImageRaw::sRawImageCount); - GL_TEX_MEM.sample(LLImageGL::sGlobalTextureMemory); - GL_BOUND_MEM.sample(LLImageGL::sBoundTextureMemory); - RAW_MEM.sample(LLImageRaw::sGlobalRawMemory); - FORMATTED_MEM.sample(LLImageFormatted::sGlobalFormattedMemory); + sample(NUM_IMAGES, sNumImages); + sample(NUM_RAW_IMAGES, LLImageRaw::sRawImageCount); + sample(GL_TEX_MEM, LLImageGL::sGlobalTextureMemory); + sample(GL_BOUND_MEM, LLImageGL::sBoundTextureMemory); + sample(RAW_MEM, LLTrace::Bytes(LLImageRaw::sGlobalRawMemory)); + sample(FORMATTED_MEM, LLTrace::Bytes(LLImageFormatted::sGlobalFormattedMemory)); } { @@ -1324,8 +1324,8 @@ void LLViewerTextureList::receiveImageHeader(LLMessageSystem *msg, void **user_d { received_size = msg->getReceiveSize() ; } - LLStatViewer::TEXTURE_KBIT.add(received_size); - LLStatViewer::TEXTURE_PACKETS.add(1); + add(LLStatViewer::TEXTURE_KBIT, LLTrace::Bytes(received_size)); + add(LLStatViewer::TEXTURE_PACKETS, 1); U8 codec; U16 packets; @@ -1398,8 +1398,8 @@ void LLViewerTextureList::receiveImagePacket(LLMessageSystem *msg, void **user_d received_size = msg->getReceiveSize() ; } - LLStatViewer::TEXTURE_KBIT.add(received_size); - LLStatViewer::TEXTURE_PACKETS.add(1); + add(LLStatViewer::TEXTURE_KBIT, LLTrace::Bytes(received_size)); + add(LLStatViewer::TEXTURE_PACKETS, 1); //llprintline("Start decode, image header..."); msg->getUUIDFast(_PREHASH_ImageID, _PREHASH_ID, id); -- cgit v1.2.3 From 07ca6fce7c9cffe1b8f215f25bb826fedf57a5b7 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 10 Apr 2013 21:51:56 -0700 Subject: SH-3931 WIP Interesting: Add graphs to visualize scene load metrics removed PeriodicRecording::getTotalRecording as it was showing up at the top on the profiler renamed getPrevRecordingPeriod, etc. to getPrevRecording --- indra/newview/llviewertexturelist.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'indra/newview/llviewertexturelist.cpp') diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 0066c09720..1bb4041bbd 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -617,9 +617,7 @@ void LLViewerTextureList::updateImages(F32 max_time) } cleared = FALSE; - LLTrace::Recording& recording = LLTrace::get_frame_recording().getTotalRecording(); - - LLAppViewer::getTextureFetch()->setTextureBandwidth(recording.getPerSec(LLStatViewer::TEXTURE_KBIT).value()); + LLAppViewer::getTextureFetch()->setTextureBandwidth(LLTrace::get_frame_recording().getPeriodMeanPerSec(LLStatViewer::TEXTURE_KBIT).value()); { using namespace LLStatViewer; -- cgit v1.2.3 From 49933aadb1b7044e947575bc377b34826e94fe99 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 11 Apr 2013 06:38:03 -0700 Subject: SH-3931 WIP Interesting: Add graphs to visualize scene load metrics removed MeanValueType --- indra/newview/llviewertexturelist.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llviewertexturelist.cpp') diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 1bb4041bbd..ae677f541b 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -617,7 +617,7 @@ void LLViewerTextureList::updateImages(F32 max_time) } cleared = FALSE; - LLAppViewer::getTextureFetch()->setTextureBandwidth(LLTrace::get_frame_recording().getPeriodMeanPerSec(LLStatViewer::TEXTURE_KBIT).value()); + LLAppViewer::getTextureFetch()->setTextureBandwidth(LLTrace::get_frame_recording().getPeriodMeanPerSec(LLStatViewer::TEXTURE_KBIT)); { using namespace LLStatViewer; -- cgit v1.2.3 From 1a820f8df90a21a8614b79f3dc973bb7dc903def Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Thu, 11 Apr 2013 15:25:04 -0600 Subject: delay removing pre-fetched textures in case the login process is very long. --- indra/newview/llviewertexturelist.cpp | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) (limited to 'indra/newview/llviewertexturelist.cpp') diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 0066c09720..0a81c9deb0 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -60,7 +60,7 @@ #include "llxuiparser.h" #include "lltracerecording.h" #include "llviewerdisplay.h" - +#include "llstartup.h" //////////////////////////////////////////////////////////////////////////// void (*LLViewerTextureList::sUUIDCallback)(void **, const LLUUID&) = NULL; @@ -710,7 +710,17 @@ void LLViewerTextureList::updateImagesDecodePriorities() { // Update the decode priority for N images each frame { - static const S32 MAX_PRIO_UPDATES = gSavedSettings.getS32("TextureFetchUpdatePriorities"); // default: 32 + F32 lazy_flush_timeout = 30.f; // stop decoding + F32 max_inactive_time = 20.f; // actually delete + S32 min_refs = 3; // 1 for mImageList, 1 for mUUIDMap, 1 for local reference + if(LLStartUp::getStartupState() < STATE_STARTED) + { + //do not remove pre-fetched images if viewer does not finish logging in. + lazy_flush_timeout = 30000.f; + max_inactive_time = 20000.f; + } + + static const S32 MAX_PRIO_UPDATES = gSavedSettings.getS32("TextureFetchUpdatePriorities"); // default: 32 const size_t max_update_count = llmin((S32) (MAX_PRIO_UPDATES*MAX_PRIO_UPDATES*gFrameIntervalSeconds.value()) + 1, MAX_PRIO_UPDATES); S32 update_counter = llmin(max_update_count, mUUIDMap.size()); uuid_map_t::iterator iter = mUUIDMap.upper_bound(mLastUpdateUUID); @@ -732,15 +742,11 @@ void LLViewerTextureList::updateImagesDecodePriorities() // // Flush formatted images using a lazy flush - // - const F32 LAZY_FLUSH_TIMEOUT = 30.f; // stop decoding - const F32 MAX_INACTIVE_TIME = 20.f; // actually delete - S32 min_refs = 3; // 1 for mImageList, 1 for mUUIDMap, 1 for local reference - + // S32 num_refs = imagep->getNumRefs(); if (num_refs == min_refs) { - if (imagep->getLastReferencedTimer()->getElapsedTimeF32() > LAZY_FLUSH_TIMEOUT) + if (imagep->getLastReferencedTimer()->getElapsedTimeF32() > lazy_flush_timeout) { // Remove the unused image from the image list deleteImage(imagep); @@ -752,7 +758,7 @@ void LLViewerTextureList::updateImagesDecodePriorities() { if(imagep->hasSavedRawImage()) { - if(imagep->getElapsedLastReferencedSavedRawImageTime() > MAX_INACTIVE_TIME) + if(imagep->getElapsedLastReferencedSavedRawImageTime() > max_inactive_time) { imagep->destroySavedRawImage() ; } @@ -769,7 +775,7 @@ void LLViewerTextureList::updateImagesDecodePriorities() } else if(imagep->isInactive()) { - if (imagep->getLastReferencedTimer()->getElapsedTimeF32() > MAX_INACTIVE_TIME) + if (imagep->getLastReferencedTimer()->getElapsedTimeF32() > max_inactive_time) { imagep->setDeletionCandidate() ; } -- cgit v1.2.3 From fe3cfb30d504155850ddf3752d2f55e6311990d6 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Sat, 22 Jun 2013 00:34:25 -0700 Subject: SH-3931 WIP Interesting: Add graphs to visualize scene load metrics removed LLTrace unit typedefs --- indra/newview/llviewertexturelist.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview/llviewertexturelist.cpp') diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 5003ec7e7b..431a3b330c 100755 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -671,8 +671,8 @@ void LLViewerTextureList::updateImages(F32 max_time) sample(NUM_RAW_IMAGES, LLImageRaw::sRawImageCount); sample(GL_TEX_MEM, LLImageGL::sGlobalTextureMemory); sample(GL_BOUND_MEM, LLImageGL::sBoundTextureMemory); - sample(RAW_MEM, LLTrace::Bytes(LLImageRaw::sGlobalRawMemory)); - sample(FORMATTED_MEM, LLTrace::Bytes(LLImageFormatted::sGlobalFormattedMemory)); + sample(RAW_MEM, LLUnit(LLImageRaw::sGlobalRawMemory)); + sample(FORMATTED_MEM, LLUnit(LLImageFormatted::sGlobalFormattedMemory)); } { @@ -1374,7 +1374,7 @@ void LLViewerTextureList::receiveImageHeader(LLMessageSystem *msg, void **user_d { received_size = msg->getReceiveSize() ; } - add(LLStatViewer::TEXTURE_KBIT, LLTrace::Bytes(received_size)); + add(LLStatViewer::TEXTURE_KBIT, LLUnit(received_size)); add(LLStatViewer::TEXTURE_PACKETS, 1); U8 codec; @@ -1448,7 +1448,7 @@ void LLViewerTextureList::receiveImagePacket(LLMessageSystem *msg, void **user_d received_size = msg->getReceiveSize() ; } - add(LLStatViewer::TEXTURE_KBIT, LLTrace::Bytes(received_size)); + add(LLStatViewer::TEXTURE_KBIT, LLUnit(received_size)); add(LLStatViewer::TEXTURE_PACKETS, 1); //llprintline("Start decode, image header..."); -- cgit v1.2.3 From 11e14cd3b0f58225a96b9b7a9839a7f030fe4045 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 15 Jul 2013 11:05:57 -0700 Subject: SH-4299Interesting: High fps shown temporarily off scale in statistics console various fixes to lltrace start() on started recording no longer resets fixed various instances of unit forgetfullness in lltrace recording split now has gapless timing scene monitor now guarantees min sample time renamed a bunch of stats added names to debug thread view on windows --- indra/newview/llviewertexturelist.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llviewertexturelist.cpp') diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 431a3b330c..dfd7ac983d 100755 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -663,7 +663,7 @@ void LLViewerTextureList::updateImages(F32 max_time) } cleared = FALSE; - LLAppViewer::getTextureFetch()->setTextureBandwidth(LLTrace::get_frame_recording().getPeriodMeanPerSec(LLStatViewer::TEXTURE_KBIT)); + LLAppViewer::getTextureFetch()->setTextureBandwidth(LLTrace::get_frame_recording().getPeriodMeanPerSec(LLStatViewer::TEXTURE_NETWORK_DATA_RECEIVED)); { using namespace LLStatViewer; @@ -1374,7 +1374,7 @@ void LLViewerTextureList::receiveImageHeader(LLMessageSystem *msg, void **user_d { received_size = msg->getReceiveSize() ; } - add(LLStatViewer::TEXTURE_KBIT, LLUnit(received_size)); + add(LLStatViewer::TEXTURE_NETWORK_DATA_RECEIVED, LLUnit(received_size)); add(LLStatViewer::TEXTURE_PACKETS, 1); U8 codec; @@ -1448,7 +1448,7 @@ void LLViewerTextureList::receiveImagePacket(LLMessageSystem *msg, void **user_d received_size = msg->getReceiveSize() ; } - add(LLStatViewer::TEXTURE_KBIT, LLUnit(received_size)); + add(LLStatViewer::TEXTURE_NETWORK_DATA_RECEIVED, LLUnit(received_size)); add(LLStatViewer::TEXTURE_PACKETS, 1); //llprintline("Start decode, image header..."); -- cgit v1.2.3 From a2e22732f195dc075a733c79f15156752f522a43 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 30 Jul 2013 19:13:45 -0700 Subject: Summer cleaning - removed a lot of llcommon dependencies to speed up build times consolidated most indra-specific constants in llcommon under indra_constants.h fixed issues with operations on mixed unit types (implicit and explicit) made LL_INFOS() style macros variadic in order to subsume other logging methods such as ll_infos added optional tag output to error recorders --- indra/newview/llviewertexturelist.cpp | 81 +++++++++++++++++------------------ 1 file changed, 40 insertions(+), 41 deletions(-) (limited to 'indra/newview/llviewertexturelist.cpp') diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index dfd7ac983d..9b89ee2ec9 100755 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -30,7 +30,6 @@ #include "llviewertexturelist.h" -#include "imageids.h" #include "llgl.h" // fot gathering stats from GL #include "llimagegl.h" #include "llimagebmp.h" @@ -285,18 +284,18 @@ void LLViewerTextureList::shutdown() void LLViewerTextureList::dump() { - llinfos << "LLViewerTextureList::dump()" << llendl; + LL_INFOS() << "LLViewerTextureList::dump()" << LL_ENDL; for (image_priority_list_t::iterator it = mImageList.begin(); it != mImageList.end(); ++it) { LLViewerFetchedTexture* image = *it; - llinfos << "priority " << image->getDecodePriority() + LL_INFOS() << "priority " << image->getDecodePriority() << " boost " << image->getBoostLevel() << " size " << image->getWidth() << "x" << image->getHeight() << " discard " << image->getDiscardLevel() << " desired " << image->getDesiredDiscardLevel() << " http://asset.siva.lindenlab.com/" << image->getID() << ".texture" - << llendl; + << LL_ENDL; } } @@ -337,7 +336,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromFile(const std::string& std::string full_path = gDirUtilp->findSkinnedFilename("textures", filename); if (full_path.empty()) { - llwarns << "Failed to find local image file: " << filename << llendl; + llwarns << "Failed to find local image file: " << filename << LL_ENDL; return LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI); } @@ -378,7 +377,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromUrl(const std::string& LLViewerFetchedTexture *texture = imagep.get(); if (texture->getUrl().empty()) { - llwarns << "Requested texture " << new_id << " already exists but does not have a URL" << llendl; + llwarns << "Requested texture " << new_id << " already exists but does not have a URL" << LL_ENDL; } else if (texture->getUrl() != url) { @@ -386,7 +385,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromUrl(const std::string& // e.g. could be two avatars wearing the same outfit. LL_DEBUGS("Avatar") << "Requested texture " << new_id << " already exists with a different url, requested: " << url - << " current: " << texture->getUrl() << llendl; + << " current: " << texture->getUrl() << LL_ENDL; } } @@ -401,7 +400,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromUrl(const std::string& imagep = new LLViewerLODTexture(url, f_type, new_id, usemipmaps); break ; default: - llerrs << "Invalid texture type " << texture_type << llendl ; + LL_ERRS() << "Invalid texture type " << texture_type << LL_ENDL ; } if (internal_format && primary_format) @@ -458,18 +457,18 @@ LLViewerFetchedTexture* LLViewerTextureList::getImage(const LLUUID &image_id, if (request_from_host.isOk() && !texture->getTargetHost().isOk()) { - llwarns << "Requested texture " << image_id << " already exists but does not have a host" << llendl; + llwarns << "Requested texture " << image_id << " already exists but does not have a host" << LL_ENDL; } else if (request_from_host.isOk() && texture->getTargetHost().isOk() && request_from_host != texture->getTargetHost()) { llwarns << "Requested texture " << image_id << " already exists with a different target host, requested: " - << request_from_host << " current: " << texture->getTargetHost() << llendl; + << request_from_host << " current: " << texture->getTargetHost() << LL_ENDL; } if (f_type != FTT_DEFAULT && imagep->getFTType() != f_type) { - llwarns << "FTType mismatch: requested " << f_type << " image has " << imagep->getFTType() << llendl; + llwarns << "FTType mismatch: requested " << f_type << " image has " << imagep->getFTType() << LL_ENDL; } } @@ -505,7 +504,7 @@ LLViewerFetchedTexture* LLViewerTextureList::createImage(const LLUUID &image_id, imagep = new LLViewerLODTexture(image_id, f_type, request_from_host, usemipmaps); break ; default: - llerrs << "Invalid texture type " << texture_type << llendl ; + LL_ERRS() << "Invalid texture type " << texture_type << LL_ENDL ; } if (internal_format && primary_format) @@ -555,11 +554,11 @@ void LLViewerTextureList::addImageToList(LLViewerFetchedTexture *image) llassert(image); if (image->isInImageList()) { - llerrs << "LLViewerTextureList::addImageToList - Image already in list" << llendl; + LL_ERRS() << "LLViewerTextureList::addImageToList - Image already in list" << LL_ENDL; } if((mImageList.insert(image)).second != true) { - llerrs << "Error happens when insert image to mImageList!" << llendl ; + LL_ERRS() << "Error happens when insert image to mImageList!" << LL_ENDL ; } image->setInImageList(TRUE) ; @@ -572,20 +571,20 @@ void LLViewerTextureList::removeImageFromList(LLViewerFetchedTexture *image) llassert(image); if (!image->isInImageList()) { - llinfos << "RefCount: " << image->getNumRefs() << llendl ; + LL_INFOS() << "RefCount: " << image->getNumRefs() << LL_ENDL ; uuid_map_t::iterator iter = mUUIDMap.find(image->getID()); if(iter == mUUIDMap.end() || iter->second != image) { - llinfos << "Image is not in mUUIDMap!" << llendl ; + LL_INFOS() << "Image is not in mUUIDMap!" << LL_ENDL ; } - llerrs << "LLViewerTextureList::removeImageFromList - Image not in list" << llendl; + LL_ERRS() << "LLViewerTextureList::removeImageFromList - Image not in list" << LL_ENDL; } S32 count = mImageList.erase(image) ; if(count != 1) { - llinfos << image->getID() << llendl ; - llerrs << "Error happens when remove image from mImageList: " << count << llendl ; + LL_INFOS() << image->getID() << LL_ENDL ; + LL_ERRS() << "Error happens when remove image from mImageList: " << count << LL_ENDL ; } image->setInImageList(FALSE) ; @@ -595,7 +594,7 @@ void LLViewerTextureList::addImage(LLViewerFetchedTexture *new_image) { if (!new_image) { - llwarning("No image to add to image list", 0); + LL_WARNS() << "No image to add to image list" << LL_ENDL; return; } LLUUID image_id = new_image->getID(); @@ -603,7 +602,7 @@ void LLViewerTextureList::addImage(LLViewerFetchedTexture *new_image) LLViewerFetchedTexture *image = findImage(image_id); if (image) { - llwarns << "Image with ID " << image_id << " already in list" << llendl; + LL_WARNS() << "Image with ID " << image_id << " already in list" << LL_ENDL; } sNumImages++; @@ -901,7 +900,7 @@ void LLViewerTextureList::setDebugFetching(LLViewerFetchedTexture* tex, S32 debu << " host " << target_host << " boost " << imagep->getBoostLevel() << " imageid " << imagep->getID() - << llendl; + << LL_ENDL; imagep->dump(); } return type_from_host; @@ -1175,13 +1174,13 @@ BOOL LLViewerTextureList::createUploadFile(const std::string& filename, if (compressedImage.isNull()) { image->setLastError("Couldn't convert the image to jpeg2000."); - llinfos << "Couldn't convert to j2c, file : " << filename << llendl; + LL_INFOS() << "Couldn't convert to j2c, file : " << filename << LL_ENDL; return FALSE; } if (!compressedImage->save(out_filename)) { image->setLastError("Couldn't create the jpeg2000 image for upload."); - llinfos << "Couldn't create output file : " << out_filename << llendl; + LL_INFOS() << "Couldn't create output file : " << out_filename << LL_ENDL; return FALSE; } // Test to see if the encode and save worked @@ -1189,7 +1188,7 @@ BOOL LLViewerTextureList::createUploadFile(const std::string& filename, if (!integrity_test->loadAndValidate( out_filename )) { image->setLastError("The created jpeg2000 image is corrupt."); - llinfos << "Image file : " << out_filename << " is corrupt" << llendl; + LL_INFOS() << "Image file : " << out_filename << " is corrupt" << LL_ENDL; return FALSE; } return TRUE; @@ -1214,13 +1213,13 @@ LLPointer LLViewerTextureList::convertToUploadFile(LLPointergetSizeFast() is probably trying to tell us there // was an error. - llerrs << "image header chunk size was negative: " - << data_size << llendl; + LL_ERRS() << "image header chunk size was negative: " + << data_size << LL_ENDL; return; } @@ -1464,13 +1463,13 @@ void LLViewerTextureList::receiveImagePacket(LLMessageSystem *msg, void **user_d { // msg->getSizeFast() is probably trying to tell us there // was an error. - llerrs << "image data chunk size was negative: " - << data_size << llendl; + LL_ERRS() << "image data chunk size was negative: " + << data_size << LL_ENDL; return; } if (data_size > MTUBYTES) { - llerrs << "image data chunk too large: " << data_size << " bytes" << llendl; + LL_ERRS() << "image data chunk too large: " << data_size << " bytes" << LL_ENDL; return; } U8 *data = new U8[data_size]; @@ -1507,7 +1506,7 @@ void LLViewerTextureList::processImageNotInDatabase(LLMessageSystem *msg,void ** LLViewerFetchedTexture* image = gTextureList.findImage( image_id ); if( image ) { - llwarns << "not in db" << llendl; + llwarns << "not in db" << LL_ENDL; image->setIsMissingAsset(); } } @@ -1634,7 +1633,7 @@ LLUIImagePtr LLUIImageList::preloadUIImage(const std::string& name, const std::s if (found_it != mUIImages.end()) { // image already loaded! - llerrs << "UI Image " << name << " already loaded." << llendl; + LL_ERRS() << "UI Image " << name << " already loaded." << LL_ENDL; } return loadUIImageByName(name, filename, use_mips, scale_rect, clip_rect); @@ -1737,7 +1736,7 @@ bool LLUIImageList::initFromFile() std::vector::const_iterator pi(textures_paths.begin()), pend(textures_paths.end()); if (pi == pend) { - llwarns << "No textures.xml found in skins directories" << llendl; + llwarns << "No textures.xml found in skins directories" << LL_ENDL; return false; } @@ -1745,12 +1744,12 @@ bool LLUIImageList::initFromFile() LLXMLNodePtr root; if (!LLXMLNode::parseFile(*pi, root, NULL)) { - llwarns << "Unable to parse UI image list file " << *pi << llendl; + llwarns << "Unable to parse UI image list file " << *pi << LL_ENDL; return false; } if (!root->hasAttribute("version")) { - llwarns << "No valid version number in UI image list file " << *pi << llendl; + llwarns << "No valid version number in UI image list file " << *pi << LL_ENDL; return false; } -- cgit v1.2.3 From e340009fc59d59e59b2e8d903a884acb76b178eb Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 9 Aug 2013 17:11:19 -0700 Subject: second phase summer cleaning replace llinfos, lldebugs, etc with new LL_INFOS(), LL_DEBUGS(), etc. --- indra/newview/llviewertexturelist.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'indra/newview/llviewertexturelist.cpp') diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 9b89ee2ec9..63debe0464 100755 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -336,7 +336,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromFile(const std::string& std::string full_path = gDirUtilp->findSkinnedFilename("textures", filename); if (full_path.empty()) { - llwarns << "Failed to find local image file: " << filename << LL_ENDL; + LL_WARNS() << "Failed to find local image file: " << filename << LL_ENDL; return LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI); } @@ -377,7 +377,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromUrl(const std::string& LLViewerFetchedTexture *texture = imagep.get(); if (texture->getUrl().empty()) { - llwarns << "Requested texture " << new_id << " already exists but does not have a URL" << LL_ENDL; + LL_WARNS() << "Requested texture " << new_id << " already exists but does not have a URL" << LL_ENDL; } else if (texture->getUrl() != url) { @@ -457,18 +457,18 @@ LLViewerFetchedTexture* LLViewerTextureList::getImage(const LLUUID &image_id, if (request_from_host.isOk() && !texture->getTargetHost().isOk()) { - llwarns << "Requested texture " << image_id << " already exists but does not have a host" << LL_ENDL; + LL_WARNS() << "Requested texture " << image_id << " already exists but does not have a host" << LL_ENDL; } else if (request_from_host.isOk() && texture->getTargetHost().isOk() && request_from_host != texture->getTargetHost()) { - llwarns << "Requested texture " << image_id << " already exists with a different target host, requested: " + LL_WARNS() << "Requested texture " << image_id << " already exists with a different target host, requested: " << request_from_host << " current: " << texture->getTargetHost() << LL_ENDL; } if (f_type != FTT_DEFAULT && imagep->getFTType() != f_type) { - llwarns << "FTType mismatch: requested " << f_type << " image has " << imagep->getFTType() << LL_ENDL; + LL_WARNS() << "FTType mismatch: requested " << f_type << " image has " << imagep->getFTType() << LL_ENDL; } } @@ -896,7 +896,7 @@ void LLViewerTextureList::setDebugFetching(LLViewerFetchedTexture* tex, S32 debu if (type_from_host == LLImageBase::TYPE_NORMAL && type_from_boost == LLImageBase::TYPE_AVATAR_BAKE) { - llwarns << "TAT: get_image_type() type_from_host doesn't match type_from_boost" + LL_WARNS() << "TAT: get_image_type() type_from_host doesn't match type_from_boost" << " host " << target_host << " boost " << imagep->getBoostLevel() << " imageid " << imagep->getID() @@ -1275,7 +1275,7 @@ S32 LLViewerTextureList::getMaxVideoRamSetting(bool get_recommended) max_texmem = 128; } - llwarns << "VRAM amount not detected, defaulting to " << max_texmem << " MB" << LL_ENDL; + LL_WARNS() << "VRAM amount not detected, defaulting to " << max_texmem << " MB" << LL_ENDL; } S32 system_ram = (S32)BYTES_TO_MEGA_BYTES(gSysMemory.getPhysicalMemoryClamped()); // In MB @@ -1506,7 +1506,7 @@ void LLViewerTextureList::processImageNotInDatabase(LLMessageSystem *msg,void ** LLViewerFetchedTexture* image = gTextureList.findImage( image_id ); if( image ) { - llwarns << "not in db" << LL_ENDL; + LL_WARNS() << "not in db" << LL_ENDL; image->setIsMissingAsset(); } } @@ -1736,7 +1736,7 @@ bool LLUIImageList::initFromFile() std::vector::const_iterator pi(textures_paths.begin()), pend(textures_paths.end()); if (pi == pend) { - llwarns << "No textures.xml found in skins directories" << LL_ENDL; + LL_WARNS() << "No textures.xml found in skins directories" << LL_ENDL; return false; } @@ -1744,12 +1744,12 @@ bool LLUIImageList::initFromFile() LLXMLNodePtr root; if (!LLXMLNode::parseFile(*pi, root, NULL)) { - llwarns << "Unable to parse UI image list file " << *pi << LL_ENDL; + LL_WARNS() << "Unable to parse UI image list file " << *pi << LL_ENDL; return false; } if (!root->hasAttribute("version")) { - llwarns << "No valid version number in UI image list file " << *pi << LL_ENDL; + LL_WARNS() << "No valid version number in UI image list file " << *pi << LL_ENDL; return false; } -- cgit v1.2.3 From 26581404e426b00cd0a07c38b5cb858d5d5faa28 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 14 Aug 2013 11:51:49 -0700 Subject: BUILDFIX: added header for numeric_limits support on gcc added convenience types for units F32Seconds, etc. --- indra/newview/llviewertexturelist.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llviewertexturelist.cpp') diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 63debe0464..2030b490e4 100755 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -1327,7 +1327,7 @@ void LLViewerTextureList::updateMaxResidentTexMem(S32 mem) mMaxTotalTextureMemInMegaBytes = mMaxResidentTexMemInMegaBytes * 2; if (mMaxResidentTexMemInMegaBytes > 640) { - mMaxTotalTextureMemInMegaBytes -= (mMaxResidentTexMemInMegaBytes >> 2); + mMaxTotalTextureMemInMegaBytes -= (mMaxResidentTexMemInMegaBytes / 4); } //system mem -- cgit v1.2.3 From 9f7bfa1c3710856cd2b0a0a8a429d6c45b0fcd09 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 15 Aug 2013 00:02:23 -0700 Subject: moved unit types out of LLUnits namespace, since they are prefixed --- indra/newview/llviewertexturelist.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview/llviewertexturelist.cpp') diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 2030b490e4..888174a6cf 100755 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -670,8 +670,8 @@ void LLViewerTextureList::updateImages(F32 max_time) sample(NUM_RAW_IMAGES, LLImageRaw::sRawImageCount); sample(GL_TEX_MEM, LLImageGL::sGlobalTextureMemory); sample(GL_BOUND_MEM, LLImageGL::sBoundTextureMemory); - sample(RAW_MEM, LLUnit(LLImageRaw::sGlobalRawMemory)); - sample(FORMATTED_MEM, LLUnit(LLImageFormatted::sGlobalFormattedMemory)); + sample(RAW_MEM, F64Bytes(LLImageRaw::sGlobalRawMemory)); + sample(FORMATTED_MEM, F64Bytes(LLImageFormatted::sGlobalFormattedMemory)); } { @@ -1373,7 +1373,7 @@ void LLViewerTextureList::receiveImageHeader(LLMessageSystem *msg, void **user_d { received_size = msg->getReceiveSize() ; } - add(LLStatViewer::TEXTURE_NETWORK_DATA_RECEIVED, LLUnit(received_size)); + add(LLStatViewer::TEXTURE_NETWORK_DATA_RECEIVED, F64Bytes(received_size)); add(LLStatViewer::TEXTURE_PACKETS, 1); U8 codec; @@ -1447,7 +1447,7 @@ void LLViewerTextureList::receiveImagePacket(LLMessageSystem *msg, void **user_d received_size = msg->getReceiveSize() ; } - add(LLStatViewer::TEXTURE_NETWORK_DATA_RECEIVED, LLUnit(received_size)); + add(LLStatViewer::TEXTURE_NETWORK_DATA_RECEIVED, F64Bytes(received_size)); add(LLStatViewer::TEXTURE_PACKETS, 1); //llprintline("Start decode, image header..."); -- cgit v1.2.3 From 25937040de9a787c221aae7f178f43827c799028 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 16 Aug 2013 12:38:12 -0700 Subject: SH-4433 WIP: Interesting: Statistics > Ping Sim is always 0 ms converted many values over to units system in effort to track down source of 0 ping --- indra/newview/llviewertexturelist.cpp | 63 ++++++++++++++++++----------------- 1 file changed, 32 insertions(+), 31 deletions(-) (limited to 'indra/newview/llviewertexturelist.cpp') diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 888174a6cf..f4dc04bd51 100755 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -89,7 +89,7 @@ void LLViewerTextureList::init() mMaxTotalTextureMemInMegaBytes = 0 ; // Update how much texture RAM we're allowed to use. - updateMaxResidentTexMem(0); // 0 = use current + updateMaxResidentTexMem(S32Mibibytes(0)); // 0 = use current doPreloadImages(); } @@ -1231,28 +1231,28 @@ const S32 MIN_VIDEO_RAM = 32; const S32 MAX_VIDEO_RAM = 512; // 512MB max for performance reasons. // Returns min setting for TextureMemory (in MB) -S32 LLViewerTextureList::getMinVideoRamSetting() +S32Mibibytes LLViewerTextureList::getMinVideoRamSetting() { - S32 system_ram = (S32)BYTES_TO_MEGA_BYTES(gSysMemory.getPhysicalMemoryClamped()); + S32Mibibytes system_ram = gSysMemory.getPhysicalMemoryClamped(); //min texture mem sets to 64M if total physical mem is more than 1.5GB - return (system_ram > 1500) ? 64 : gMinVideoRam.value() ; + return (system_ram > S32Mibibytes(1500)) ? S32Mibibytes(64) : gMinVideoRam ; } //static // Returns max setting for TextureMemory (in MB) -S32 LLViewerTextureList::getMaxVideoRamSetting(bool get_recommended) +S32Mibibytes LLViewerTextureList::getMaxVideoRamSetting(bool get_recommended) { - S32 max_texmem; + S32Mibibytes max_texmem; if (gGLManager.mVRAM != 0) { // Treat any card with < 32 MB (shudder) as having 32 MB // - it's going to be swapping constantly regardless - S32 max_vram = gGLManager.mVRAM; + S32Mibibytes max_vram(gGLManager.mVRAM); if(gGLManager.mIsATI) { //shrink the availabe vram for ATI cards because some of them do not handel texture swapping well. - max_vram = (S32)(max_vram * 0.75f); + max_vram = max_vram * 0.75f; } max_vram = llmax(max_vram, getMinVideoRamSetting()); @@ -1278,26 +1278,26 @@ S32 LLViewerTextureList::getMaxVideoRamSetting(bool get_recommended) LL_WARNS() << "VRAM amount not detected, defaulting to " << max_texmem << " MB" << LL_ENDL; } - S32 system_ram = (S32)BYTES_TO_MEGA_BYTES(gSysMemory.getPhysicalMemoryClamped()); // In MB + S32Mibibytes 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, (S32)(system_ram/2)); + max_texmem = llmin(max_texmem, system_ram/2); else - max_texmem = llmin(max_texmem, (S32)(system_ram)); + max_texmem = llmin(max_texmem, system_ram); - max_texmem = llclamp(max_texmem, getMinVideoRamSetting(), gMaxVideoRam.value()); + max_texmem = llclamp(max_texmem, getMinVideoRamSetting(), gMaxVideoRam); return max_texmem; } -const S32 VIDEO_CARD_FRAMEBUFFER_MEM = 12; // MB -const S32 MIN_MEM_FOR_NON_TEXTURE = 512 ; //MB -void LLViewerTextureList::updateMaxResidentTexMem(S32 mem) +const S32Mibibytes VIDEO_CARD_FRAMEBUFFER_MEM(12); +const S32Mibibytes MIN_MEM_FOR_NON_TEXTURE(512); +void LLViewerTextureList::updateMaxResidentTexMem(S32Mibibytes mem) { // Initialize the image pipeline VRAM settings - S32 cur_mem = gSavedSettings.getS32("TextureMemory"); + S32Mibibytes cur_mem(gSavedSettings.getS32("TextureMemory")); F32 mem_multiplier = gSavedSettings.getF32("RenderTextureMemoryMultiple"); - S32 default_mem = getMaxVideoRamSetting(true); // recommended default + S32Mibibytes default_mem(getMaxVideoRamSetting(true)); // recommended default if (mem == 0) { mem = cur_mem > 0 ? cur_mem : default_mem; @@ -1308,20 +1308,20 @@ void LLViewerTextureList::updateMaxResidentTexMem(S32 mem) } // limit the texture memory to a multiple of the default if we've found some cards to behave poorly otherwise - mem = llmin(mem, (S32) (mem_multiplier * (F32) default_mem)); + mem = llmin(mem, S32Mibibytes(mem_multiplier * (F32Mibibytes)default_mem)); mem = llclamp(mem, getMinVideoRamSetting(), getMaxVideoRamSetting()); if (mem != cur_mem) { - gSavedSettings.setS32("TextureMemory", mem); + gSavedSettings.setS32("TextureMemory", mem.value()); return; //listener will re-enter this function } // TODO: set available resident texture mem based on use by other subsystems // currently max(12MB, VRAM/4) assumed... - S32 vb_mem = mem; - S32 fb_mem = llmax(VIDEO_CARD_FRAMEBUFFER_MEM, vb_mem/4); + S32Mibibytes vb_mem = mem; + S32Mibibytes fb_mem = llmax(VIDEO_CARD_FRAMEBUFFER_MEM, vb_mem/4); mMaxResidentTexMemInMegaBytes = (vb_mem - fb_mem) ; //in MB mMaxTotalTextureMemInMegaBytes = mMaxResidentTexMemInMegaBytes * 2; @@ -1331,12 +1331,12 @@ void LLViewerTextureList::updateMaxResidentTexMem(S32 mem) } //system mem - S32 system_ram = (S32)BYTES_TO_MEGA_BYTES(gSysMemory.getPhysicalMemoryClamped()); // In MB + S32Mibibytes system_ram = gSysMemory.getPhysicalMemoryClamped(); //minimum memory reserved for non-texture use. //if system_raw >= 1GB, reserve at least 512MB for non-texture use; //otherwise reserve half of the system_ram for non-texture use. - S32 min_non_texture_mem = llmin(system_ram / 2, MIN_MEM_FOR_NON_TEXTURE) ; + S32Mibibytes min_non_texture_mem = llmin(system_ram / 2, MIN_MEM_FOR_NON_TEXTURE) ; if (mMaxTotalTextureMemInMegaBytes > system_ram - min_non_texture_mem) { @@ -1514,18 +1514,19 @@ void LLViewerTextureList::processImageNotInDatabase(LLMessageSystem *msg,void ** /////////////////////////////////////////////////////////////////////////////// //static -const U32 SIXTEEN_MEG = 0x1000000; -S32 LLViewerTextureList::calcMaxTextureRAM() +const LLUnitImplicit SIXTEEN_MEG(16); +S32Bytes LLViewerTextureList::calcMaxTextureRAM() { // Decide the maximum amount of RAM we should allow the user to allocate to texture cache LLMemoryInfo memory_info; - U32 available_memory = memory_info.getPhysicalMemoryClamped(); + LLUnitImplicit available_memory = memory_info.getPhysicalMemoryClamped(); - clamp_rescale((F32)available_memory, - (F32)(SIXTEEN_MEG * 16), - (F32)U32_MAX, - (F32)(SIXTEEN_MEG * 4), - (F32)(U32_MAX >> 1)); + // as originally written, this code was a no-op. Not sure of the side effect of making it actually work + /*clamp_rescale(available_memory.value(), + (SIXTEEN_MEG * 16), + (F32Mibibytes)U32_MAX, + (SIXTEEN_MEG * 4), + (F32Mibibytes)(U32_MAX >> 1));*/ return available_memory; } -- cgit v1.2.3 From 28151dd8367d558fa2622832eb3819624e19705d Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Fri, 16 Aug 2013 17:58:41 -0600 Subject: fix for SH-4297: interesting: viewer-interesting starts loading cached scene late --- indra/newview/llviewertexturelist.cpp | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'indra/newview/llviewertexturelist.cpp') diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 63debe0464..209334fb46 100755 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -59,7 +59,8 @@ #include "llxuiparser.h" #include "lltracerecording.h" #include "llviewerdisplay.h" -#include "llstartup.h" +#include "llviewerwindow.h" +#include "llprogressview.h" //////////////////////////////////////////////////////////////////////////// void (*LLViewerTextureList::sUUIDCallback)(void **, const LLUUID&) = NULL; @@ -756,12 +757,9 @@ void LLViewerTextureList::updateImagesDecodePriorities() F32 lazy_flush_timeout = 30.f; // stop decoding F32 max_inactive_time = 20.f; // actually delete S32 min_refs = 3; // 1 for mImageList, 1 for mUUIDMap, 1 for local reference - if(LLStartUp::getStartupState() < STATE_STARTED) - { - //do not remove pre-fetched images if viewer does not finish logging in. - lazy_flush_timeout = 30000.f; - max_inactive_time = 20000.f; - } + + //reset imagep->getLastReferencedTimer() when screen is showing the progress view to avoid removing pre-fetched textures too soon. + bool reset_timer = gViewerWindow->getProgressView()->getVisible(); static const S32 MAX_PRIO_UPDATES = gSavedSettings.getS32("TextureFetchUpdatePriorities"); // default: 32 const size_t max_update_count = llmin((S32) (MAX_PRIO_UPDATES*MAX_PRIO_UPDATES*gFrameIntervalSeconds.value()) + 1, MAX_PRIO_UPDATES); @@ -789,7 +787,11 @@ void LLViewerTextureList::updateImagesDecodePriorities() S32 num_refs = imagep->getNumRefs(); if (num_refs == min_refs) { - if (imagep->getLastReferencedTimer()->getElapsedTimeF32() > lazy_flush_timeout) + if(reset_timer) + { + imagep->getLastReferencedTimer()->reset(); + } + else if (imagep->getLastReferencedTimer()->getElapsedTimeF32() > lazy_flush_timeout) { // Remove the unused image from the image list deleteImage(imagep); @@ -818,7 +820,11 @@ void LLViewerTextureList::updateImagesDecodePriorities() } else if(imagep->isInactive()) { - if (imagep->getLastReferencedTimer()->getElapsedTimeF32() > max_inactive_time) + if(reset_timer) + { + imagep->getLastReferencedTimer()->reset(); + } + else if (imagep->getLastReferencedTimer()->getElapsedTimeF32() > max_inactive_time) { imagep->setDeletionCandidate() ; } -- cgit v1.2.3 From 612892b45a3413b16e40c49d3bfde77a4ca927fd Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Sun, 18 Aug 2013 22:30:27 -0700 Subject: 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 --- indra/newview/llviewertexturelist.cpp | 88 ++++++++++++++--------------------- 1 file changed, 35 insertions(+), 53 deletions(-) (limited to 'indra/newview/llviewertexturelist.cpp') diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index f4dc04bd51..21da915f97 100755 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -85,11 +85,11 @@ void LLViewerTextureList::init() mInitialized = TRUE ; sNumImages = 0; mUpdateStats = TRUE; - mMaxResidentTexMemInMegaBytes = 0; - mMaxTotalTextureMemInMegaBytes = 0 ; + mMaxResidentTexMemInMegaBytes = (U32Bytes)0; + mMaxTotalTextureMemInMegaBytes = (U32Bytes)0; // Update how much texture RAM we're allowed to use. - updateMaxResidentTexMem(S32Mibibytes(0)); // 0 = use current + updateMaxResidentTexMem(S32Megabytes(0)); // 0 = use current doPreloadImages(); } @@ -662,7 +662,7 @@ void LLViewerTextureList::updateImages(F32 max_time) } cleared = FALSE; - LLAppViewer::getTextureFetch()->setTextureBandwidth(LLTrace::get_frame_recording().getPeriodMeanPerSec(LLStatViewer::TEXTURE_NETWORK_DATA_RECEIVED)); + LLAppViewer::getTextureFetch()->setTextureBandwidth(LLTrace::get_frame_recording().getPeriodMeanPerSec(LLStatViewer::TEXTURE_NETWORK_DATA_RECEIVED).value()); { using namespace LLStatViewer; @@ -1231,23 +1231,23 @@ const S32 MIN_VIDEO_RAM = 32; const S32 MAX_VIDEO_RAM = 512; // 512MB max for performance reasons. // Returns min setting for TextureMemory (in MB) -S32Mibibytes LLViewerTextureList::getMinVideoRamSetting() +S32Megabytes LLViewerTextureList::getMinVideoRamSetting() { - S32Mibibytes system_ram = gSysMemory.getPhysicalMemoryClamped(); + S32Megabytes system_ram = gSysMemory.getPhysicalMemoryClamped(); //min texture mem sets to 64M if total physical mem is more than 1.5GB - return (system_ram > S32Mibibytes(1500)) ? S32Mibibytes(64) : gMinVideoRam ; + return (system_ram > S32Megabytes(1500)) ? S32Megabytes(64) : gMinVideoRam ; } //static // Returns max setting for TextureMemory (in MB) -S32Mibibytes LLViewerTextureList::getMaxVideoRamSetting(bool get_recommended) +S32Megabytes LLViewerTextureList::getMaxVideoRamSetting(bool get_recommended) { - S32Mibibytes max_texmem; + S32Megabytes max_texmem; if (gGLManager.mVRAM != 0) { // Treat any card with < 32 MB (shudder) as having 32 MB // - it's going to be swapping constantly regardless - S32Mibibytes max_vram(gGLManager.mVRAM); + S32Megabytes max_vram(gGLManager.mVRAM); if(gGLManager.mIsATI) { @@ -1264,21 +1264,21 @@ S32Mibibytes LLViewerTextureList::getMaxVideoRamSetting(bool get_recommended) { if (!get_recommended) { - max_texmem = 512; + max_texmem = (S32Megabytes)512; } else if (gSavedSettings.getBOOL("NoHardwareProbe")) //did not do hardware detection at startup { - max_texmem = 512; + max_texmem = (S32Megabytes)512; } else { - max_texmem = 128; + max_texmem = (S32Megabytes)128; } LL_WARNS() << "VRAM amount not detected, defaulting to " << max_texmem << " MB" << LL_ENDL; } - S32Mibibytes system_ram = gSysMemory.getPhysicalMemoryClamped(); // 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); @@ -1290,25 +1290,25 @@ S32Mibibytes LLViewerTextureList::getMaxVideoRamSetting(bool get_recommended) return max_texmem; } -const S32Mibibytes VIDEO_CARD_FRAMEBUFFER_MEM(12); -const S32Mibibytes MIN_MEM_FOR_NON_TEXTURE(512); -void LLViewerTextureList::updateMaxResidentTexMem(S32Mibibytes mem) +const S32Megabytes VIDEO_CARD_FRAMEBUFFER_MEM(12); +const S32Megabytes MIN_MEM_FOR_NON_TEXTURE(512); +void LLViewerTextureList::updateMaxResidentTexMem(S32Megabytes mem) { // Initialize the image pipeline VRAM settings - S32Mibibytes cur_mem(gSavedSettings.getS32("TextureMemory")); + S32Megabytes cur_mem(gSavedSettings.getS32("TextureMemory")); F32 mem_multiplier = gSavedSettings.getF32("RenderTextureMemoryMultiple"); - S32Mibibytes default_mem(getMaxVideoRamSetting(true)); // recommended default - if (mem == 0) + S32Megabytes default_mem(getMaxVideoRamSetting(true)); // recommended default + if (mem == (S32Bytes)0) { - mem = cur_mem > 0 ? cur_mem : default_mem; + mem = cur_mem > (S32Bytes)0 ? cur_mem : default_mem; } - else if (mem < 0) + else if (mem < (S32Bytes)0) { mem = default_mem; } // limit the texture memory to a multiple of the default if we've found some cards to behave poorly otherwise - mem = llmin(mem, S32Mibibytes(mem_multiplier * (F32Mibibytes)default_mem)); + mem = llmin(mem, S32Megabytes(mem_multiplier * (F32Megabytes)default_mem)); mem = llclamp(mem, getMinVideoRamSetting(), getMaxVideoRamSetting()); if (mem != cur_mem) @@ -1320,23 +1320,23 @@ void LLViewerTextureList::updateMaxResidentTexMem(S32Mibibytes mem) // TODO: set available resident texture mem based on use by other subsystems // currently max(12MB, VRAM/4) assumed... - S32Mibibytes vb_mem = mem; - S32Mibibytes fb_mem = llmax(VIDEO_CARD_FRAMEBUFFER_MEM, vb_mem/4); + S32Megabytes vb_mem = mem; + S32Megabytes fb_mem = llmax(VIDEO_CARD_FRAMEBUFFER_MEM, vb_mem/4); mMaxResidentTexMemInMegaBytes = (vb_mem - fb_mem) ; //in MB mMaxTotalTextureMemInMegaBytes = mMaxResidentTexMemInMegaBytes * 2; - if (mMaxResidentTexMemInMegaBytes > 640) + if (mMaxResidentTexMemInMegaBytes > (S32Megabytes)640) { mMaxTotalTextureMemInMegaBytes -= (mMaxResidentTexMemInMegaBytes / 4); } //system mem - S32Mibibytes system_ram = gSysMemory.getPhysicalMemoryClamped(); + S32Megabytes system_ram = gSysMemory.getPhysicalMemoryClamped(); //minimum memory reserved for non-texture use. //if system_raw >= 1GB, reserve at least 512MB for non-texture use; //otherwise reserve half of the system_ram for non-texture use. - S32Mibibytes min_non_texture_mem = llmin(system_ram / 2, MIN_MEM_FOR_NON_TEXTURE) ; + S32Megabytes min_non_texture_mem = llmin(system_ram / 2, MIN_MEM_FOR_NON_TEXTURE) ; if (mMaxTotalTextureMemInMegaBytes > system_ram - min_non_texture_mem) { @@ -1364,16 +1364,16 @@ void LLViewerTextureList::receiveImageHeader(LLMessageSystem *msg, void **user_d char ip_string[256]; u32_to_ip_string(msg->getSenderIP(),ip_string); - U32 received_size ; + U32Bytes received_size ; if (msg->getReceiveCompressedSize()) { - received_size = msg->getReceiveCompressedSize() ; + received_size = (U32Bytes)msg->getReceiveCompressedSize() ; } else { - received_size = msg->getReceiveSize() ; + received_size = (U32Bytes)msg->getReceiveSize() ; } - add(LLStatViewer::TEXTURE_NETWORK_DATA_RECEIVED, F64Bytes(received_size)); + add(LLStatViewer::TEXTURE_NETWORK_DATA_RECEIVED, received_size); add(LLStatViewer::TEXTURE_PACKETS, 1); U8 codec; @@ -1437,14 +1437,14 @@ void LLViewerTextureList::receiveImagePacket(LLMessageSystem *msg, void **user_d char ip_string[256]; u32_to_ip_string(msg->getSenderIP(),ip_string); - U32 received_size ; + U32Bytes received_size ; if (msg->getReceiveCompressedSize()) { - received_size = msg->getReceiveCompressedSize() ; + received_size = (U32Bytes)msg->getReceiveCompressedSize() ; } else { - received_size = msg->getReceiveSize() ; + received_size = (U32Bytes)msg->getReceiveSize() ; } add(LLStatViewer::TEXTURE_NETWORK_DATA_RECEIVED, F64Bytes(received_size)); @@ -1511,24 +1511,6 @@ void LLViewerTextureList::processImageNotInDatabase(LLMessageSystem *msg,void ** } } -/////////////////////////////////////////////////////////////////////////////// - -//static -const LLUnitImplicit SIXTEEN_MEG(16); -S32Bytes LLViewerTextureList::calcMaxTextureRAM() -{ - // Decide the maximum amount of RAM we should allow the user to allocate to texture cache - LLMemoryInfo memory_info; - LLUnitImplicit available_memory = memory_info.getPhysicalMemoryClamped(); - - // as originally written, this code was a no-op. Not sure of the side effect of making it actually work - /*clamp_rescale(available_memory.value(), - (SIXTEEN_MEG * 16), - (F32Mibibytes)U32_MAX, - (SIXTEEN_MEG * 4), - (F32Mibibytes)(U32_MAX >> 1));*/ - return available_memory; -} /////////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3 From cbe397ad13665c7bc993e10d8fe1e4a876253378 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 5 Sep 2013 14:04:13 -0700 Subject: changed fast timer over to using macro another attempt to move mem stat into base class --- indra/newview/llviewertexturelist.cpp | 40 +++++++++++++++++------------------ 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'indra/newview/llviewertexturelist.cpp') diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index cb7ea1f637..4958c38c4e 100755 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -68,7 +68,7 @@ void (*LLViewerTextureList::sUUIDCallback)(void **, const LLUUID&) = NULL; S32 LLViewerTextureList::sNumImages = 0; LLViewerTextureList gTextureList; -static LLFastTimer::DeclareTimer FTM_PROCESS_IMAGES("Process Images"); +static LLTrace::TimeBlock FTM_PROCESS_IMAGES("Process Images"); /////////////////////////////////////////////////////////////////////////////// @@ -638,18 +638,18 @@ void LLViewerTextureList::dirtyImage(LLViewerFetchedTexture *image) } //////////////////////////////////////////////////////////////////////////// -static LLFastTimer::DeclareTimer FTM_IMAGE_MARK_DIRTY("Dirty Images"); -static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE_PRIORITIES("Prioritize"); -static LLFastTimer::DeclareTimer FTM_IMAGE_CALLBACKS("Callbacks"); -static LLFastTimer::DeclareTimer FTM_IMAGE_FETCH("Fetch"); -static LLFastTimer::DeclareTimer FTM_FAST_CACHE_IMAGE_FETCH("Fast Cache Fetch"); -static LLFastTimer::DeclareTimer FTM_IMAGE_CREATE("Create"); -static LLFastTimer::DeclareTimer FTM_IMAGE_STATS("Stats"); -static LLFastTimer::DeclareTimer FTM_UPDATE_IMAGES("Update Images"); +static LLTrace::TimeBlock FTM_IMAGE_MARK_DIRTY("Dirty Images"); +static LLTrace::TimeBlock FTM_IMAGE_UPDATE_PRIORITIES("Prioritize"); +static LLTrace::TimeBlock FTM_IMAGE_CALLBACKS("Callbacks"); +static LLTrace::TimeBlock FTM_IMAGE_FETCH("Fetch"); +static LLTrace::TimeBlock FTM_FAST_CACHE_IMAGE_FETCH("Fast Cache Fetch"); +static LLTrace::TimeBlock FTM_IMAGE_CREATE("Create"); +static LLTrace::TimeBlock FTM_IMAGE_STATS("Stats"); +static LLTrace::TimeBlock FTM_UPDATE_IMAGES("Update Images"); void LLViewerTextureList::updateImages(F32 max_time) { - LLFastTimer _(FTM_UPDATE_IMAGES); + LL_RECORD_BLOCK_TIME(FTM_UPDATE_IMAGES); static BOOL cleared = FALSE; if(gTeleportDisplay) { @@ -677,37 +677,37 @@ void LLViewerTextureList::updateImages(F32 max_time) { //loading from fast cache - LLFastTimer t(FTM_FAST_CACHE_IMAGE_FETCH); + LL_RECORD_BLOCK_TIME(FTM_FAST_CACHE_IMAGE_FETCH); max_time -= updateImagesLoadingFastCache(max_time); } { - LLFastTimer t(FTM_IMAGE_UPDATE_PRIORITIES); + LL_RECORD_BLOCK_TIME(FTM_IMAGE_UPDATE_PRIORITIES); updateImagesDecodePriorities(); } F32 total_max_time = max_time; { - LLFastTimer t(FTM_IMAGE_FETCH); + LL_RECORD_BLOCK_TIME(FTM_IMAGE_FETCH); max_time -= updateImagesFetchTextures(max_time); } { - LLFastTimer t(FTM_IMAGE_CREATE); + LL_RECORD_BLOCK_TIME(FTM_IMAGE_CREATE); max_time = llmax(max_time, total_max_time*.50f); // at least 50% of max_time max_time -= updateImagesCreateTextures(max_time); } if (!mDirtyTextureList.empty()) { - LLFastTimer t(FTM_IMAGE_MARK_DIRTY); + LL_RECORD_BLOCK_TIME(FTM_IMAGE_MARK_DIRTY); gPipeline.dirtyPoolObjectTextures(mDirtyTextureList); mDirtyTextureList.clear(); } { - LLFastTimer t(FTM_IMAGE_CALLBACKS); + LL_RECORD_BLOCK_TIME(FTM_IMAGE_CALLBACKS); bool didone = false; for (image_list_t::iterator iter = mCallbackList.begin(); iter != mCallbackList.end(); ) @@ -728,7 +728,7 @@ void LLViewerTextureList::updateImages(F32 max_time) } { - LLFastTimer t(FTM_IMAGE_STATS); + LL_RECORD_BLOCK_TIME(FTM_IMAGE_STATS); updateImagesUpdateStats(); } } @@ -1360,7 +1360,7 @@ void LLViewerTextureList::receiveImageHeader(LLMessageSystem *msg, void **user_d { static LLCachedControl log_texture_traffic(gSavedSettings,"LogTextureNetworkTraffic") ; - LLFastTimer t(FTM_PROCESS_IMAGES); + LL_RECORD_BLOCK_TIME(FTM_PROCESS_IMAGES); // Receive image header, copy into image object and decompresses // if this is a one-packet image. @@ -1432,7 +1432,7 @@ void LLViewerTextureList::receiveImagePacket(LLMessageSystem *msg, void **user_d { static LLCachedControl log_texture_traffic(gSavedSettings,"LogTextureNetworkTraffic") ; - LLFastTimer t(FTM_PROCESS_IMAGES); + LL_RECORD_BLOCK_TIME(FTM_PROCESS_IMAGES); // Receives image packet, copy into image object, // checks if all packets received, decompresses if so. @@ -1505,7 +1505,7 @@ void LLViewerTextureList::receiveImagePacket(LLMessageSystem *msg, void **user_d // static void LLViewerTextureList::processImageNotInDatabase(LLMessageSystem *msg,void **user_data) { - LLFastTimer t(FTM_PROCESS_IMAGES); + LL_RECORD_BLOCK_TIME(FTM_PROCESS_IMAGES); LLUUID image_id; msg->getUUIDFast(_PREHASH_ImageID, _PREHASH_ID, image_id); -- cgit v1.2.3 From 697d2e720ba75e142a4d56ae8794bab8d7698dad Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 15 Oct 2013 20:24:42 -0700 Subject: renamed TimeBlock to BlockTimerStatHandle --- indra/newview/llviewertexturelist.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'indra/newview/llviewertexturelist.cpp') diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index cfcbe655b8..2f887d7185 100755 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -68,7 +68,7 @@ void (*LLViewerTextureList::sUUIDCallback)(void **, const LLUUID&) = NULL; S32 LLViewerTextureList::sNumImages = 0; LLViewerTextureList gTextureList; -static LLTrace::TimeBlock FTM_PROCESS_IMAGES("Process Images"); +static LLTrace::BlockTimerStatHandle FTM_PROCESS_IMAGES("Process Images"); /////////////////////////////////////////////////////////////////////////////// @@ -662,14 +662,14 @@ void LLViewerTextureList::dirtyImage(LLViewerFetchedTexture *image) } //////////////////////////////////////////////////////////////////////////// -static LLTrace::TimeBlock FTM_IMAGE_MARK_DIRTY("Dirty Images"); -static LLTrace::TimeBlock FTM_IMAGE_UPDATE_PRIORITIES("Prioritize"); -static LLTrace::TimeBlock FTM_IMAGE_CALLBACKS("Callbacks"); -static LLTrace::TimeBlock FTM_IMAGE_FETCH("Fetch"); -static LLTrace::TimeBlock FTM_FAST_CACHE_IMAGE_FETCH("Fast Cache Fetch"); -static LLTrace::TimeBlock FTM_IMAGE_CREATE("Create"); -static LLTrace::TimeBlock FTM_IMAGE_STATS("Stats"); -static LLTrace::TimeBlock FTM_UPDATE_IMAGES("Update Images"); +static LLTrace::BlockTimerStatHandle FTM_IMAGE_MARK_DIRTY("Dirty Images"); +static LLTrace::BlockTimerStatHandle FTM_IMAGE_UPDATE_PRIORITIES("Prioritize"); +static LLTrace::BlockTimerStatHandle FTM_IMAGE_CALLBACKS("Callbacks"); +static LLTrace::BlockTimerStatHandle FTM_IMAGE_FETCH("Fetch"); +static LLTrace::BlockTimerStatHandle FTM_FAST_CACHE_IMAGE_FETCH("Fast Cache Fetch"); +static LLTrace::BlockTimerStatHandle FTM_IMAGE_CREATE("Create"); +static LLTrace::BlockTimerStatHandle FTM_IMAGE_STATS("Stats"); +static LLTrace::BlockTimerStatHandle FTM_UPDATE_IMAGES("Update Images"); void LLViewerTextureList::updateImages(F32 max_time) { -- cgit v1.2.3 From c35801ef1c56b6c84063f47b490a8d2220b77ca7 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 5 Nov 2013 19:26:23 -0800 Subject: fixed focus issue on inventory --- indra/newview/llviewertexturelist.cpp | 51 ++++++++++++++++++++++++----------- 1 file changed, 36 insertions(+), 15 deletions(-) (limited to 'indra/newview/llviewertexturelist.cpp') diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 2f887d7185..dae76272ec 100755 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -70,6 +70,7 @@ S32 LLViewerTextureList::sNumImages = 0; LLViewerTextureList gTextureList; static LLTrace::BlockTimerStatHandle FTM_PROCESS_IMAGES("Process Images"); + /////////////////////////////////////////////////////////////////////////////// LLViewerTextureList::LLViewerTextureList() @@ -1587,28 +1588,31 @@ LLUIImagePtr LLUIImageList::getUIImage(const std::string& image_name, S32 priori } LLUIImagePtr LLUIImageList::loadUIImageByName(const std::string& name, const std::string& filename, - BOOL use_mips, const LLRect& scale_rect, const LLRect& clip_rect, LLViewerTexture::EBoostLevel boost_priority ) + BOOL use_mips, const LLRect& scale_rect, const LLRect& clip_rect, LLViewerTexture::EBoostLevel boost_priority, + LLUIImage::EScaleStyle scale_style) { if (boost_priority == LLGLTexture::BOOST_NONE) { boost_priority = LLGLTexture::BOOST_UI; } LLViewerFetchedTexture* imagep = LLViewerTextureManager::getFetchedTextureFromFile(filename, FTT_LOCAL_FILE, MIPMAP_NO, boost_priority); - return loadUIImage(imagep, name, use_mips, scale_rect, clip_rect); + return loadUIImage(imagep, name, use_mips, scale_rect, clip_rect, scale_style); } LLUIImagePtr LLUIImageList::loadUIImageByID(const LLUUID& id, - BOOL use_mips, const LLRect& scale_rect, const LLRect& clip_rect, LLViewerTexture::EBoostLevel boost_priority) + BOOL use_mips, const LLRect& scale_rect, const LLRect& clip_rect, LLViewerTexture::EBoostLevel boost_priority, + LLUIImage::EScaleStyle scale_style) { if (boost_priority == LLGLTexture::BOOST_NONE) { boost_priority = LLGLTexture::BOOST_UI; } LLViewerFetchedTexture* imagep = LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, MIPMAP_NO, boost_priority); - return loadUIImage(imagep, id.asString(), use_mips, scale_rect, clip_rect); + return loadUIImage(imagep, id.asString(), use_mips, scale_rect, clip_rect, scale_style); } -LLUIImagePtr LLUIImageList::loadUIImage(LLViewerFetchedTexture* imagep, const std::string& name, BOOL use_mips, const LLRect& scale_rect, const LLRect& clip_rect) +LLUIImagePtr LLUIImageList::loadUIImage(LLViewerFetchedTexture* imagep, const std::string& name, BOOL use_mips, const LLRect& scale_rect, const LLRect& clip_rect, + LLUIImage::EScaleStyle scale_style) { if (!imagep) return NULL; @@ -1621,6 +1625,8 @@ LLUIImagePtr LLUIImageList::loadUIImage(LLViewerFetchedTexture* imagep, const st imagep->setNoDelete(); LLUIImagePtr new_imagep = new LLUIImage(name, imagep); + new_imagep->setScaleStyle(scale_style); + mUIImages.insert(std::make_pair(name, new_imagep)); mUITextureList.push_back(imagep); @@ -1639,7 +1645,7 @@ LLUIImagePtr LLUIImageList::loadUIImage(LLViewerFetchedTexture* imagep, const st return new_imagep; } -LLUIImagePtr LLUIImageList::preloadUIImage(const std::string& name, const std::string& filename, BOOL use_mips, const LLRect& scale_rect, const LLRect& clip_rect) +LLUIImagePtr LLUIImageList::preloadUIImage(const std::string& name, const std::string& filename, BOOL use_mips, const LLRect& scale_rect, const LLRect& clip_rect, LLUIImage::EScaleStyle scale_style) { // look for existing image uuid_ui_image_map_t::iterator found_it = mUIImages.find(name); @@ -1649,7 +1655,7 @@ LLUIImagePtr LLUIImageList::preloadUIImage(const std::string& name, const std::s LL_ERRS() << "UI Image " << name << " already loaded." << LL_ENDL; } - return loadUIImageByName(name, filename, use_mips, scale_rect, clip_rect); + return loadUIImageByName(name, filename, use_mips, scale_rect, clip_rect, LLGLTexture::BOOST_UI, scale_style); } //static @@ -1709,14 +1715,28 @@ void LLUIImageList::onUIImageLoaded( BOOL success, LLViewerFetchedTexture *src_v } } +namespace LLInitParam +{ + template<> + struct TypeValues : public TypeValuesHelper + { + static void declareValues() + { + declare("scale_inner", LLUIImage::SCALE_INNER); + declare("scale_outer", LLUIImage::SCALE_OUTER); + } + }; +} + struct UIImageDeclaration : public LLInitParam::Block { - Mandatory name; - Optional file_name; - Optional preload; - Optional scale; - Optional clip; - Optional use_mips; + Mandatory name; + Optional file_name; + Optional preload; + Optional scale; + Optional clip; + Optional use_mips; + Optional scale_type; UIImageDeclaration() : name("name"), @@ -1724,7 +1744,8 @@ struct UIImageDeclaration : public LLInitParam::Block preload("preload", false), scale("scale"), clip("clip"), - use_mips("use_mips", false) + use_mips("use_mips", false), + scale_type("scale_type", LLUIImage::SCALE_INNER) {} }; @@ -1812,7 +1833,7 @@ bool LLUIImageList::initFromFile() { continue; } - preloadUIImage(image.name, file_name, image.use_mips, image.scale, image.clip); + preloadUIImage(image.name, file_name, image.use_mips, image.scale, image.clip, image.scale_type); } if (cur_pass == PASS_DECODE_NOW && !gSavedSettings.getBOOL("NoPreload")) -- cgit v1.2.3 From 391ac367d6922f30bf3a186bc15e1fc38366eecf Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 19 Nov 2013 17:40:44 -0800 Subject: SH-4634 FIX Interesting: Viewer crashes when receiving teleport offer renamed fast timers to have unique names, changes instance tracker to never allow duplicates --- indra/newview/llviewertexturelist.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewertexturelist.cpp') diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 99903bfdf3..b98726900f 100755 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -670,11 +670,11 @@ static LLTrace::BlockTimerStatHandle FTM_IMAGE_FETCH("Fetch"); static LLTrace::BlockTimerStatHandle FTM_FAST_CACHE_IMAGE_FETCH("Fast Cache Fetch"); static LLTrace::BlockTimerStatHandle FTM_IMAGE_CREATE("Create"); static LLTrace::BlockTimerStatHandle FTM_IMAGE_STATS("Stats"); -static LLTrace::BlockTimerStatHandle FTM_UPDATE_IMAGES("Update Images"); +static LLTrace::BlockTimerStatHandle FTM_UPDATE_TEXTURES("Update Textures"); void LLViewerTextureList::updateImages(F32 max_time) { - LL_RECORD_BLOCK_TIME(FTM_UPDATE_IMAGES); + LL_RECORD_BLOCK_TIME(FTM_UPDATE_TEXTURES); static BOOL cleared = FALSE; if(gTeleportDisplay) { -- cgit v1.2.3