summaryrefslogtreecommitdiff
path: root/indra/newview/lltextureview.cpp
diff options
context:
space:
mode:
authorAndreyL ProductEngine <alihatskiy@productengine.com>2019-04-02 22:21:35 +0300
committerAndreyL ProductEngine <alihatskiy@productengine.com>2019-04-02 22:21:35 +0300
commit62bec6aa36abdbfea6c804c8c5f3381ae76b920b (patch)
treeef576c05bd6174665118638aa2a202b0049b7c7b /indra/newview/lltextureview.cpp
parent71e4e26ebe96a03b63e1dae99bd13ec9c3bd2dbb (diff)
parent5cf18cb867be567bf921f0b94a78fd822e4112ad (diff)
Merged in lindenlab/viewer-release
Diffstat (limited to 'indra/newview/lltextureview.cpp')
-rw-r--r--indra/newview/lltextureview.cpp42
1 files changed, 38 insertions, 4 deletions
diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp
index d7b95db94f..0d2edc0268 100644
--- a/indra/newview/lltextureview.cpp
+++ b/indra/newview/lltextureview.cpp
@@ -240,9 +240,9 @@ void LLTextureBar::draw()
{ "REQ", LLColor4::yellow },// SEND_HTTP_REQ
{ "HTP", LLColor4::green }, // WAIT_HTTP_REQ
{ "DEC", LLColor4::yellow },// DECODE_IMAGE
- { "DEC", LLColor4::green }, // DECODE_IMAGE_UPDATE
+ { "DEU", LLColor4::green }, // DECODE_IMAGE_UPDATE
{ "WRT", LLColor4::purple },// WRITE_TO_CACHE
- { "WRT", LLColor4::orange },// WAIT_ON_WRITE
+ { "WWT", LLColor4::orange },// WAIT_ON_WRITE
{ "END", LLColor4::red }, // DONE
#define LAST_STATE 14
{ "CRE", LLColor4::magenta }, // LAST_STATE+1
@@ -530,6 +530,25 @@ void LLGLTexMemBar::draw()
LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, v_offset + line_height*6,
text_color, LLFontGL::LEFT, LLFontGL::TOP);
+ LLTrace::Recording& recording = LLViewerStats::instance().getRecording();
+
+ F64 cacheHits = recording.getSampleCount(LLTextureFetch::sCacheHit);
+ F64 cacheAttempts = recording.getSampleCount(LLTextureFetch::sCacheAttempt);
+
+ F32 cacheHitRate = (cacheAttempts > 0.0) ? F32((cacheHits / cacheAttempts) * 100.0f) : 0.0f;
+
+ U32 cacheReadLatMin = U32(recording.getMin(LLTextureFetch::sCacheReadLatency).value() * 1000.0f);
+ U32 cacheReadLatMed = U32(recording.getMean(LLTextureFetch::sCacheReadLatency).value() * 1000.0f);
+ U32 cacheReadLatMax = U32(recording.getMax(LLTextureFetch::sCacheReadLatency).value() * 1000.0f);
+
+ U32 texDecodeLatMin = U32(recording.getMin(LLTextureFetch::sTexDecodeLatency).value() * 1000.0f);
+ U32 texDecodeLatMed = U32(recording.getMean(LLTextureFetch::sTexDecodeLatency).value() * 1000.0f);
+ U32 texDecodeLatMax = U32(recording.getMax(LLTextureFetch::sTexDecodeLatency).value() * 1000.0f);
+
+ U32 texFetchLatMin = U32(recording.getMin(LLTextureFetch::sTexFetchLatency).value() * 1000.0f);
+ U32 texFetchLatMed = U32(recording.getMean(LLTextureFetch::sTexFetchLatency).value() * 1000.0f);
+ U32 texFetchLatMax = U32(recording.getMax(LLTextureFetch::sTexFetchLatency).value() * 1000.0f);
+
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.value(),
max_total_mem.value(),
@@ -542,7 +561,7 @@ void LLGLTexMemBar::draw()
cache_max_usage);
//, cache_entries, cache_max_entries
- LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, v_offset + line_height*5,
+ LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, v_offset + line_height*6,
text_color, LLFontGL::LEFT, LLFontGL::TOP);
U32 cache_read(0U), cache_write(0U), res_wait(0U);
@@ -558,6 +577,21 @@ void LLGLTexMemBar::draw()
cache_write,
res_wait);
+ LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, v_offset + line_height*5,
+ text_color, LLFontGL::LEFT, LLFontGL::TOP);
+
+ text = llformat("CacheHitRate: %3.2f Read: %d/%d/%d Decode: %d/%d/%d Fetch: %d/%d/%d",
+ cacheHitRate,
+ cacheReadLatMin,
+ cacheReadLatMed,
+ cacheReadLatMax,
+ texDecodeLatMin,
+ texDecodeLatMed,
+ texDecodeLatMax,
+ texFetchLatMin,
+ texFetchLatMed,
+ texFetchLatMax);
+
LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, v_offset + line_height*4,
text_color, LLFontGL::LEFT, LLFontGL::TOP);
@@ -640,7 +674,7 @@ BOOL LLGLTexMemBar::handleMouseDown(S32 x, S32 y, MASK mask)
LLRect LLGLTexMemBar::getRequiredRect()
{
LLRect rect;
- rect.mTop = 68; //LLFontGL::getFontMonospace()->getLineHeight() * 6;
+ rect.mTop = 78; //LLFontGL::getFontMonospace()->getLineHeight() * 6;
return rect;
}