From c0ba626c8009b22310b3923e8170e5db2a021253 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Mon, 15 Oct 2012 21:34:29 -0600 Subject: For SH-3333: Design and implement a new object cache system on viewer side --- indra/newview/lltextureview.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'indra/newview/lltextureview.cpp') diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp index c60b4155a0..a5ccf97d1e 100755 --- a/indra/newview/lltextureview.cpp +++ b/indra/newview/lltextureview.cpp @@ -49,6 +49,8 @@ #include "llviewertexturelist.h" #include "llvovolume.h" #include "llviewerstats.h" +#include "llworld.h" +#include "llviewerobjectlist.h" // For avatar texture view #include "llvoavatarself.h" @@ -515,6 +517,9 @@ void LLGLTexMemBar::draw() F32 total_texture_downloaded = (F32)gTotalTextureBytes / (1024 * 1024); F32 total_object_downloaded = (F32)gTotalObjectBytes / (1024 * 1024); U32 total_http_requests = LLAppViewer::getTextureFetch()->getCurlRequest().getTotalIssuedRequests() ; + U32 total_active_cached_objects = LLWorld::getInstance()->getNumOfActiveCachedObjects(); + U32 total_objects = gObjectList.getNumObjects(); + //---------------------------------------------------------------------------- LLGLSUIDefault gls_ui; LLColor4 text_color(1.f, 1.f, 1.f, 0.75f); @@ -536,8 +541,8 @@ void LLGLTexMemBar::draw() LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, v_offset + line_height*4, text_color, LLFontGL::LEFT, LLFontGL::TOP); - text = llformat("Net Tot Tex: %.1f MB Tot Obj: %.1f MB Tot Htp: %d", - total_texture_downloaded, total_object_downloaded, total_http_requests); + text = llformat("Net Tot Tex: %.1f MB Tot Obj: %.1f MB #Objs/#cached: %d/%d Tot Htp: %d", + total_texture_downloaded, total_object_downloaded, total_objects, total_active_cached_objects, total_http_requests); //, cache_entries, cache_max_entries LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, v_offset + line_height*3, text_color, LLFontGL::LEFT, LLFontGL::TOP); -- 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/lltextureview.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'indra/newview/lltextureview.cpp') diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp index c60b4155a0..a88233e120 100755 --- a/indra/newview/lltextureview.cpp +++ b/indra/newview/lltextureview.cpp @@ -503,13 +503,13 @@ private: void LLGLTexMemBar::draw() { - S32 bound_mem = BYTES_TO_MEGA_BYTES(LLViewerTexture::sBoundTextureMemoryInBytes); - S32 max_bound_mem = LLViewerTexture::sMaxBoundTextureMemInMegaBytes; - S32 total_mem = BYTES_TO_MEGA_BYTES(LLViewerTexture::sTotalTextureMemoryInBytes); - S32 max_total_mem = LLViewerTexture::sMaxTotalTextureMemInMegaBytes; + LLUnit::Megabytes bound_mem = LLViewerTexture::sBoundTextureMemory; + LLUnit::Megabytes max_bound_mem = LLViewerTexture::sMaxBoundTextureMem; + LLUnit::Megabytes total_mem = LLViewerTexture::sTotalTextureMemory; + LLUnit::Megabytes max_total_mem = LLViewerTexture::sMaxTotalTextureMem; F32 discard_bias = LLViewerTexture::sDesiredDiscardBias; - F32 cache_usage = (F32)BYTES_TO_MEGA_BYTES(LLAppViewer::getTextureCache()->getUsage()) ; - F32 cache_max_usage = (F32)BYTES_TO_MEGA_BYTES(LLAppViewer::getTextureCache()->getMaxUsage()) ; + F32 cache_usage = (F32)LLTrace::Megabytes(LLAppViewer::getTextureCache()->getUsage()).value() ; + F32 cache_max_usage = (F32)LLTrace::Megabytes(LLAppViewer::getTextureCache()->getMaxUsage()).value() ; S32 line_height = LLFontGL::getFontMonospace()->getLineHeight(); S32 v_offset = 0;//(S32)((texture_bar_height + 2.2f) * mTextureView->mNumTextureBars + 2.0f); F32 total_texture_downloaded = (F32)gTotalTextureBytes / (1024 * 1024); @@ -526,10 +526,10 @@ void LLGLTexMemBar::draw() text_color, LLFontGL::LEFT, LLFontGL::TOP); text = llformat("GL Tot: %d/%d MB Bound: %d/%d MB FBO: %d MB Raw Tot: %d MB Bias: %.2f Cache: %.1f/%.1f MB", - total_mem, - max_total_mem, - bound_mem, - max_bound_mem, + total_mem.value(), + max_total_mem.value(), + bound_mem.value(), + max_bound_mem.value(), LLRenderTarget::sBytesAllocated/(1024*1024), LLImageRaw::sGlobalRawMemory >> 20, discard_bias, cache_usage, cache_max_usage); -- 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/lltextureview.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/lltextureview.cpp') diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp index a88233e120..d734620f10 100755 --- a/indra/newview/lltextureview.cpp +++ b/indra/newview/lltextureview.cpp @@ -512,8 +512,8 @@ void LLGLTexMemBar::draw() F32 cache_max_usage = (F32)LLTrace::Megabytes(LLAppViewer::getTextureCache()->getMaxUsage()).value() ; S32 line_height = LLFontGL::getFontMonospace()->getLineHeight(); S32 v_offset = 0;//(S32)((texture_bar_height + 2.2f) * mTextureView->mNumTextureBars + 2.0f); - F32 total_texture_downloaded = (F32)gTotalTextureBytes / (1024 * 1024); - F32 total_object_downloaded = (F32)gTotalObjectBytes / (1024 * 1024); + LLUnit::Megabytes total_texture_downloaded = gTotalTextureData; + LLUnit::Megabytes total_object_downloaded = gTotalObjectData; U32 total_http_requests = LLAppViewer::getTextureFetch()->getCurlRequest().getTotalIssuedRequests() ; //---------------------------------------------------------------------------- LLGLSUIDefault gls_ui; @@ -537,7 +537,7 @@ void LLGLTexMemBar::draw() text_color, LLFontGL::LEFT, LLFontGL::TOP); text = llformat("Net Tot Tex: %.1f MB Tot Obj: %.1f MB Tot Htp: %d", - total_texture_downloaded, total_object_downloaded, total_http_requests); + total_texture_downloaded.value(), total_object_downloaded.value(), total_http_requests); //, cache_entries, cache_max_entries LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, v_offset + line_height*3, text_color, LLFontGL::LEFT, LLFontGL::TOP); -- cgit v1.2.3 From 0bb0bd514b235948c1a21c81ab0e8ab6223b1990 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 8 Nov 2012 23:42:18 -0800 Subject: SH-3499 WIP Ensure asset stats output is correct Finished making LLUnit implicitly convertible to/from scalar integer values cleaned up test code --- indra/newview/lltextureview.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'indra/newview/lltextureview.cpp') diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp index d734620f10..288c1233e5 100755 --- a/indra/newview/lltextureview.cpp +++ b/indra/newview/lltextureview.cpp @@ -503,17 +503,17 @@ private: void LLGLTexMemBar::draw() { - LLUnit::Megabytes bound_mem = LLViewerTexture::sBoundTextureMemory; - LLUnit::Megabytes max_bound_mem = LLViewerTexture::sMaxBoundTextureMem; - LLUnit::Megabytes total_mem = LLViewerTexture::sTotalTextureMemory; - LLUnit::Megabytes max_total_mem = LLViewerTexture::sMaxTotalTextureMem; + LLUnit bound_mem = LLViewerTexture::sBoundTextureMemory; + LLUnit max_bound_mem = LLViewerTexture::sMaxBoundTextureMem; + LLUnit total_mem = LLViewerTexture::sTotalTextureMemory; + LLUnit max_total_mem = LLViewerTexture::sMaxTotalTextureMem; F32 discard_bias = LLViewerTexture::sDesiredDiscardBias; F32 cache_usage = (F32)LLTrace::Megabytes(LLAppViewer::getTextureCache()->getUsage()).value() ; F32 cache_max_usage = (F32)LLTrace::Megabytes(LLAppViewer::getTextureCache()->getMaxUsage()).value() ; S32 line_height = LLFontGL::getFontMonospace()->getLineHeight(); S32 v_offset = 0;//(S32)((texture_bar_height + 2.2f) * mTextureView->mNumTextureBars + 2.0f); - LLUnit::Megabytes total_texture_downloaded = gTotalTextureData; - LLUnit::Megabytes total_object_downloaded = gTotalObjectData; + LLUnit total_texture_downloaded = gTotalTextureData; + LLUnit total_object_downloaded = gTotalObjectData; U32 total_http_requests = LLAppViewer::getTextureFetch()->getCurlRequest().getTotalIssuedRequests() ; //---------------------------------------------------------------------------- LLGLSUIDefault gls_ui; @@ -661,7 +661,7 @@ void LLGLTexSizeBar::draw() if(LLImageGL::sCurTexSizeBar == mIndex) { - F32 text_color[] = {1.f, 1.f, 1.f, 0.75f}; + LLColor4 text_color(1.f, 1.f, 1.f, 0.75f); std::string text; text = llformat("%d", mTopLoaded) ; @@ -673,8 +673,8 @@ void LLGLTexSizeBar::draw() text_color, LLFontGL::LEFT, LLFontGL::TOP); } - F32 loaded_color[] = {1.0f, 0.0f, 0.0f, 0.75f}; - F32 bound_color[] = {1.0f, 1.0f, 0.0f, 0.75f}; + LLColor4 loaded_color(1.0f, 0.0f, 0.0f, 0.75f); + LLColor4 bound_color(1.0f, 1.0f, 0.0f, 0.75f); gl_rect_2d(mLeft, mBottom + (S32)(mTopLoaded * mScale), (mLeft + mRight) / 2, mBottom, loaded_color) ; gl_rect_2d((mLeft + mRight) / 2, mBottom + (S32)(mTopBound * mScale), mRight, mBottom, bound_color) ; } -- cgit v1.2.3 From 5d51175cd79b15cf036cd7e6bd646a1a0777eb7f Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 20 Nov 2012 15:55:04 -0800 Subject: SH-3406 WIP convert fast timers to lltrace system fixes to merge --- indra/newview/lltextureview.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/lltextureview.cpp') diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp index 5331bb03cb..1d54e50bb9 100755 --- a/indra/newview/lltextureview.cpp +++ b/indra/newview/lltextureview.cpp @@ -514,8 +514,8 @@ void LLGLTexMemBar::draw() F32 cache_max_usage = (F32)LLTrace::Megabytes(LLAppViewer::getTextureCache()->getMaxUsage()).value() ; S32 line_height = LLFontGL::getFontMonospace()->getLineHeight(); S32 v_offset = 0;//(S32)((texture_bar_height + 2.2f) * mTextureView->mNumTextureBars + 2.0f); - F32 total_texture_downloaded = (F32)gTotalTextureBytes / (1024 * 1024); - F32 total_object_downloaded = (F32)gTotalObjectBytes / (1024 * 1024); + LLUnit total_texture_downloaded = gTotalTextureData; + LLUnit total_object_downloaded = gTotalObjectData; U32 total_http_requests = LLAppViewer::getTextureFetch()->getTotalNumHTTPRequests() ; //---------------------------------------------------------------------------- LLGLSUIDefault gls_ui; -- cgit v1.2.3 From a74b5dfa923f8eeccc9b786143f0f832de3ad450 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 4 Jun 2013 19:45:33 -0700 Subject: SH-3931 WIP Interesting: Add graphs to visualize scene load metrics fixed mem stat tracking...now properly tracks memory footprint with floating point precision cleaned up macros for unit declaration renamed units to SI standard for 1024 multiples (kibibytes, etc) fixed units output for scene monitor dump --- indra/newview/lltextureview.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'indra/newview/lltextureview.cpp') diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp index 7a6351c880..0df7b46b52 100644 --- a/indra/newview/lltextureview.cpp +++ b/indra/newview/lltextureview.cpp @@ -507,13 +507,13 @@ private: void LLGLTexMemBar::draw() { - LLUnit bound_mem = LLViewerTexture::sBoundTextureMemory; - LLUnit max_bound_mem = LLViewerTexture::sMaxBoundTextureMem; - LLUnit total_mem = LLViewerTexture::sTotalTextureMemory; - LLUnit max_total_mem = LLViewerTexture::sMaxTotalTextureMem; + LLUnit bound_mem = LLViewerTexture::sBoundTextureMemory; + LLUnit max_bound_mem = LLViewerTexture::sMaxBoundTextureMem; + LLUnit total_mem = LLViewerTexture::sTotalTextureMemory; + LLUnit max_total_mem = LLViewerTexture::sMaxTotalTextureMem; F32 discard_bias = LLViewerTexture::sDesiredDiscardBias; - F32 cache_usage = (F32)LLTrace::Megabytes(LLAppViewer::getTextureCache()->getUsage()).value() ; - F32 cache_max_usage = (F32)LLTrace::Megabytes(LLAppViewer::getTextureCache()->getMaxUsage()).value() ; + F32 cache_usage = (F32)LLTrace::Mibibytes(LLAppViewer::getTextureCache()->getUsage()).value() ; + F32 cache_max_usage = (F32)LLTrace::Mibibytes(LLAppViewer::getTextureCache()->getMaxUsage()).value() ; S32 line_height = LLFontGL::getFontMonospace()->getLineHeight(); S32 v_offset = 0;//(S32)((texture_bar_height + 2.2f) * mTextureView->mNumTextureBars + 2.0f); LLUnit total_texture_downloaded = gTotalTextureData; -- cgit v1.2.3 From 9fd3af3c389ed491b515cbb5136b344b069913e4 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 13 Jun 2013 15:29:15 -0700 Subject: SH-3931 WIP Interesting: Add graphs to visualize scene load metrics changed Units macros and argument order to make it more clear optimized units for integer types fixed merging of periodicrecordings...should eliminate duplicate entries in sceneloadmonitor history --- indra/newview/lltextureview.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'indra/newview/lltextureview.cpp') diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp index c9ec5d9bf6..766b66efa0 100755 --- a/indra/newview/lltextureview.cpp +++ b/indra/newview/lltextureview.cpp @@ -507,17 +507,17 @@ private: void LLGLTexMemBar::draw() { - LLUnit bound_mem = LLViewerTexture::sBoundTextureMemory; - LLUnit max_bound_mem = LLViewerTexture::sMaxBoundTextureMem; - LLUnit total_mem = LLViewerTexture::sTotalTextureMemory; - LLUnit max_total_mem = LLViewerTexture::sMaxTotalTextureMem; + LLUnit bound_mem = LLViewerTexture::sBoundTextureMemory; + LLUnit max_bound_mem = LLViewerTexture::sMaxBoundTextureMem; + LLUnit total_mem = LLViewerTexture::sTotalTextureMemory; + LLUnit max_total_mem = LLViewerTexture::sMaxTotalTextureMem; F32 discard_bias = LLViewerTexture::sDesiredDiscardBias; F32 cache_usage = (F32)LLTrace::Mibibytes(LLAppViewer::getTextureCache()->getUsage()).value() ; F32 cache_max_usage = (F32)LLTrace::Mibibytes(LLAppViewer::getTextureCache()->getMaxUsage()).value() ; S32 line_height = LLFontGL::getFontMonospace()->getLineHeight(); S32 v_offset = 0;//(S32)((texture_bar_height + 2.2f) * mTextureView->mNumTextureBars + 2.0f); - LLUnit total_texture_downloaded = gTotalTextureData; - LLUnit total_object_downloaded = gTotalObjectData; + LLUnit total_texture_downloaded = gTotalTextureData; + LLUnit total_object_downloaded = gTotalObjectData; U32 total_http_requests = LLAppViewer::getTextureFetch()->getTotalNumHTTPRequests() ; U32 total_active_cached_objects = LLWorld::getInstance()->getNumOfActiveCachedObjects(); U32 total_objects = gObjectList.getNumObjects(); -- 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/lltextureview.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/lltextureview.cpp') diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp index 18df9a7b54..72ed3d4485 100755 --- a/indra/newview/lltextureview.cpp +++ b/indra/newview/lltextureview.cpp @@ -512,8 +512,8 @@ void LLGLTexMemBar::draw() LLUnit total_mem = LLViewerTexture::sTotalTextureMemory; LLUnit max_total_mem = LLViewerTexture::sMaxTotalTextureMem; F32 discard_bias = LLViewerTexture::sDesiredDiscardBias; - F32 cache_usage = (F32)LLTrace::Mibibytes(LLAppViewer::getTextureCache()->getUsage()).value() ; - F32 cache_max_usage = (F32)LLTrace::Mibibytes(LLAppViewer::getTextureCache()->getMaxUsage()).value() ; + F32 cache_usage = (F32)LLUnit(LLAppViewer::getTextureCache()->getUsage()).value() ; + F32 cache_max_usage = (F32)LLUnit(LLAppViewer::getTextureCache()->getMaxUsage()).value() ; S32 line_height = LLFontGL::getFontMonospace()->getLineHeight(); S32 v_offset = 0;//(S32)((texture_bar_height + 2.2f) * mTextureView->mNumTextureBars + 2.0f); LLUnit total_texture_downloaded = gTotalTextureData; -- 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/lltextureview.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/lltextureview.cpp') diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp index 72ed3d4485..20e8a522cd 100755 --- a/indra/newview/lltextureview.cpp +++ b/indra/newview/lltextureview.cpp @@ -586,8 +586,8 @@ void LLGLTexMemBar::draw() left = 550; - F32 bandwidth = LLAppViewer::getTextureFetch()->getTextureBandwidth(); - F32 max_bandwidth = gSavedSettings.getF32("ThrottleBandwidthKBPS"); + LLUnit bandwidth = LLAppViewer::getTextureFetch()->getTextureBandwidth(); + LLUnit max_bandwidth = gSavedSettings.getF32("ThrottleBandwidthKBPS"); color = bandwidth > max_bandwidth ? LLColor4::red : bandwidth > max_bandwidth*.75f ? LLColor4::yellow : text_color; color[VALPHA] = text_color[VALPHA]; text = llformat("BW:%.0f/%.0f",bandwidth, max_bandwidth); -- cgit v1.2.3 From 551ec2a56607bc6f9182f4e6410ef7f921bcac10 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 15 Jul 2013 14:11:05 -0700 Subject: BUILDFIX: improper type passed to llformat --- indra/newview/lltextureview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/lltextureview.cpp') diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp index 20e8a522cd..c1b5309f82 100755 --- a/indra/newview/lltextureview.cpp +++ b/indra/newview/lltextureview.cpp @@ -590,7 +590,7 @@ void LLGLTexMemBar::draw() LLUnit max_bandwidth = gSavedSettings.getF32("ThrottleBandwidthKBPS"); color = bandwidth > max_bandwidth ? LLColor4::red : bandwidth > max_bandwidth*.75f ? LLColor4::yellow : text_color; color[VALPHA] = text_color[VALPHA]; - text = llformat("BW:%.0f/%.0f",bandwidth, max_bandwidth); + text = llformat("BW:%.0f/%.0f",bandwidth.value(), max_bandwidth.value()); LLFontGL::getFontMonospace()->renderUTF8(text, 0, left, v_offset + line_height*2, color, LLFontGL::LEFT, LLFontGL::TOP); -- 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/lltextureview.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/lltextureview.cpp') diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp index c1b5309f82..501914a52f 100755 --- a/indra/newview/lltextureview.cpp +++ b/indra/newview/lltextureview.cpp @@ -776,7 +776,7 @@ void LLTextureView::draw() if (mPrintList) { - llinfos << "ID\tMEM\tBOOST\tPRI\tWIDTH\tHEIGHT\tDISCARD" << llendl; + LL_INFOS() << "ID\tMEM\tBOOST\tPRI\tWIDTH\tHEIGHT\tDISCARD" << LL_ENDL; } for (LLViewerTextureList::image_priority_list_t::iterator iter = gTextureList.mImageList.begin(); @@ -794,14 +794,14 @@ void LLTextureView::draw() if (mPrintList) { S32 tex_mem = imagep->hasGLTexture() ? imagep->getTextureMemory() : 0 ; - llinfos << imagep->getID() + LL_INFOS() << imagep->getID() << "\t" << tex_mem << "\t" << imagep->getBoostLevel() << "\t" << imagep->getDecodePriority() << "\t" << imagep->getWidth() << "\t" << imagep->getHeight() << "\t" << cur_discard - << llendl; + << LL_ENDL; } if (imagep->getID() == LLAppViewer::getTextureFetch()->mDebugID) -- 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/lltextureview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/lltextureview.cpp') diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp index 501914a52f..c94064df5f 100755 --- a/indra/newview/lltextureview.cpp +++ b/indra/newview/lltextureview.cpp @@ -587,7 +587,7 @@ void LLGLTexMemBar::draw() left = 550; LLUnit bandwidth = LLAppViewer::getTextureFetch()->getTextureBandwidth(); - LLUnit max_bandwidth = gSavedSettings.getF32("ThrottleBandwidthKBPS"); + LLUnit max_bandwidth(gSavedSettings.getF32("ThrottleBandwidthKBPS")); color = bandwidth > max_bandwidth ? LLColor4::red : bandwidth > max_bandwidth*.75f ? LLColor4::yellow : text_color; color[VALPHA] = text_color[VALPHA]; text = llformat("BW:%.0f/%.0f",bandwidth.value(), max_bandwidth.value()); -- 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/lltextureview.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'indra/newview/lltextureview.cpp') diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp index c94064df5f..f39d41c2b8 100755 --- a/indra/newview/lltextureview.cpp +++ b/indra/newview/lltextureview.cpp @@ -507,17 +507,17 @@ private: void LLGLTexMemBar::draw() { - LLUnit bound_mem = LLViewerTexture::sBoundTextureMemory; - LLUnit max_bound_mem = LLViewerTexture::sMaxBoundTextureMem; - LLUnit total_mem = LLViewerTexture::sTotalTextureMemory; - LLUnit max_total_mem = LLViewerTexture::sMaxTotalTextureMem; + S32Mibibytes bound_mem = LLViewerTexture::sBoundTextureMemory; + S32Mibibytes max_bound_mem = LLViewerTexture::sMaxBoundTextureMem; + S32Mibibytes total_mem = LLViewerTexture::sTotalTextureMemory; + S32Mibibytes max_total_mem = LLViewerTexture::sMaxTotalTextureMem; F32 discard_bias = LLViewerTexture::sDesiredDiscardBias; - F32 cache_usage = (F32)LLUnit(LLAppViewer::getTextureCache()->getUsage()).value() ; - F32 cache_max_usage = (F32)LLUnit(LLAppViewer::getTextureCache()->getMaxUsage()).value() ; + F32 cache_usage = (F32)F32Mibibytes(LLAppViewer::getTextureCache()->getUsage()).value() ; + F32 cache_max_usage = (F32)F32Mibibytes(LLAppViewer::getTextureCache()->getMaxUsage()).value() ; S32 line_height = LLFontGL::getFontMonospace()->getLineHeight(); S32 v_offset = 0;//(S32)((texture_bar_height + 2.2f) * mTextureView->mNumTextureBars + 2.0f); - LLUnit total_texture_downloaded = gTotalTextureData; - LLUnit total_object_downloaded = gTotalObjectData; + F32Bytes total_texture_downloaded = gTotalTextureData; + F32Bytes total_object_downloaded = gTotalObjectData; U32 total_http_requests = LLAppViewer::getTextureFetch()->getTotalNumHTTPRequests(); U32 total_active_cached_objects = LLWorld::getInstance()->getNumOfActiveCachedObjects(); U32 total_objects = gObjectList.getNumObjects(); @@ -586,8 +586,8 @@ void LLGLTexMemBar::draw() left = 550; - LLUnit bandwidth = LLAppViewer::getTextureFetch()->getTextureBandwidth(); - LLUnit max_bandwidth(gSavedSettings.getF32("ThrottleBandwidthKBPS")); + F32Kibibits bandwidth = LLAppViewer::getTextureFetch()->getTextureBandwidth(); + F32Kibibits max_bandwidth(gSavedSettings.getF32("ThrottleBandwidthKBPS")); color = bandwidth > max_bandwidth ? LLColor4::red : bandwidth > max_bandwidth*.75f ? LLColor4::yellow : text_color; color[VALPHA] = text_color[VALPHA]; text = llformat("BW:%.0f/%.0f",bandwidth.value(), max_bandwidth.value()); -- 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/lltextureview.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'indra/newview/lltextureview.cpp') diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp index f39d41c2b8..3974668d09 100755 --- a/indra/newview/lltextureview.cpp +++ b/indra/newview/lltextureview.cpp @@ -350,7 +350,7 @@ void LLTextureBar::draw() // draw the image size at the end { std::string num_str = llformat("%3dx%3d (%2d) %7d", mImagep->getWidth(), mImagep->getHeight(), - mImagep->getDiscardLevel(), mImagep->hasGLTexture() ? mImagep->getTextureMemory() : 0); + mImagep->getDiscardLevel(), mImagep->hasGLTexture() ? mImagep->getTextureMemory().value() : 0); LLFontGL::getFontMonospace()->renderUTF8(num_str, 0, title_x4, getRect().getHeight(), color, LLFontGL::LEFT, LLFontGL::TOP); } @@ -507,13 +507,13 @@ private: void LLGLTexMemBar::draw() { - S32Mibibytes bound_mem = LLViewerTexture::sBoundTextureMemory; - S32Mibibytes max_bound_mem = LLViewerTexture::sMaxBoundTextureMem; - S32Mibibytes total_mem = LLViewerTexture::sTotalTextureMemory; - S32Mibibytes max_total_mem = LLViewerTexture::sMaxTotalTextureMem; + S32Megabytes bound_mem = LLViewerTexture::sBoundTextureMemory; + S32Megabytes max_bound_mem = LLViewerTexture::sMaxBoundTextureMem; + S32Megabytes total_mem = LLViewerTexture::sTotalTextureMemory; + S32Megabytes max_total_mem = LLViewerTexture::sMaxTotalTextureMem; F32 discard_bias = LLViewerTexture::sDesiredDiscardBias; - F32 cache_usage = (F32)F32Mibibytes(LLAppViewer::getTextureCache()->getUsage()).value() ; - F32 cache_max_usage = (F32)F32Mibibytes(LLAppViewer::getTextureCache()->getMaxUsage()).value() ; + F32 cache_usage = (F32)F32Megabytes(LLAppViewer::getTextureCache()->getUsage()).value() ; + F32 cache_max_usage = (F32)F32Megabytes(LLAppViewer::getTextureCache()->getMaxUsage()).value() ; S32 line_height = LLFontGL::getFontMonospace()->getLineHeight(); S32 v_offset = 0;//(S32)((texture_bar_height + 2.2f) * mTextureView->mNumTextureBars + 2.0f); F32Bytes total_texture_downloaded = gTotalTextureData; @@ -586,8 +586,8 @@ void LLGLTexMemBar::draw() left = 550; - F32Kibibits bandwidth = LLAppViewer::getTextureFetch()->getTextureBandwidth(); - F32Kibibits max_bandwidth(gSavedSettings.getF32("ThrottleBandwidthKBPS")); + F32Kilobits bandwidth(LLAppViewer::getTextureFetch()->getTextureBandwidth()); + F32Kilobits max_bandwidth(gSavedSettings.getF32("ThrottleBandwidthKBPS")); color = bandwidth > max_bandwidth ? LLColor4::red : bandwidth > max_bandwidth*.75f ? LLColor4::yellow : text_color; color[VALPHA] = text_color[VALPHA]; text = llformat("BW:%.0f/%.0f",bandwidth.value(), max_bandwidth.value()); @@ -793,7 +793,7 @@ void LLTextureView::draw() if (mPrintList) { - S32 tex_mem = imagep->hasGLTexture() ? imagep->getTextureMemory() : 0 ; + S32 tex_mem = imagep->hasGLTexture() ? imagep->getTextureMemory().value() : 0 ; LL_INFOS() << imagep->getID() << "\t" << tex_mem << "\t" << imagep->getBoostLevel() -- cgit v1.2.3 From 053d97db1b283ca2548dc1f64756ddfc5166158f Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 25 Sep 2013 19:12:35 -0700 Subject: better memory usage for LLTrace (tighter packing of recording arrays) removed complicated and unnecessary fast timer gapless handoff logic (it should be gapless anyway) improved MemTrackable API, better separation of shadow and footprint added memory usage stats to floater_stats.xml --- indra/newview/lltextureview.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview/lltextureview.cpp') diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp index 3974668d09..17aebebd92 100755 --- a/indra/newview/lltextureview.cpp +++ b/indra/newview/lltextureview.cpp @@ -512,8 +512,8 @@ void LLGLTexMemBar::draw() S32Megabytes total_mem = LLViewerTexture::sTotalTextureMemory; S32Megabytes max_total_mem = LLViewerTexture::sMaxTotalTextureMem; F32 discard_bias = LLViewerTexture::sDesiredDiscardBias; - F32 cache_usage = (F32)F32Megabytes(LLAppViewer::getTextureCache()->getUsage()).value() ; - F32 cache_max_usage = (F32)F32Megabytes(LLAppViewer::getTextureCache()->getMaxUsage()).value() ; + F32 cache_usage = F32Megabytes(LLAppViewer::getTextureCache()->getUsage()).value(); + F32 cache_max_usage = F32Megabytes(LLAppViewer::getTextureCache()->getMaxUsage()).value(); S32 line_height = LLFontGL::getFontMonospace()->getLineHeight(); S32 v_offset = 0;//(S32)((texture_bar_height + 2.2f) * mTextureView->mNumTextureBars + 2.0f); F32Bytes total_texture_downloaded = gTotalTextureData; @@ -555,8 +555,8 @@ void LLGLTexMemBar::draw() LLAppViewer::getTextureFetch()->getStateStats(&cache_read, &cache_write, &res_wait); text = llformat("Net Tot Tex: %.1f MB Tot Obj: %.1f MB #Objs/#Cached: %d/%d Tot Htp: %d Cread: %u Cwrite: %u Rwait: %u", - total_texture_downloaded.value(), - total_object_downloaded.value(), + total_texture_downloaded.valueInUnits(), + total_object_downloaded.valueInUnits(), total_objects, total_active_cached_objects, total_http_requests, -- cgit v1.2.3