summaryrefslogtreecommitdiff
path: root/indra/newview/llscenemonitor.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2013-07-15 21:00:19 -0700
committerRichard Linden <none@none>2013-07-15 21:00:19 -0700
commitbd078122e3a87e958fb6b0ea9caeef885298d527 (patch)
tree144f9c964b85d0f7f2776fbf13a01ab006e4d932 /indra/newview/llscenemonitor.cpp
parent551ec2a56607bc6f9182f4e6410ef7f921bcac10 (diff)
SH-4299 FIX: Interesting: High fps shown temporarily off scale in statistics console
timing of scene load recording extension now guaranteed > requested time step removed double add of recorded data removed spam
Diffstat (limited to 'indra/newview/llscenemonitor.cpp')
-rw-r--r--indra/newview/llscenemonitor.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/indra/newview/llscenemonitor.cpp b/indra/newview/llscenemonitor.cpp
index eec4a703a1..2f48be12fb 100644
--- a/indra/newview/llscenemonitor.cpp
+++ b/indra/newview/llscenemonitor.cpp
@@ -290,7 +290,6 @@ void LLSceneMonitor::capture()
if((timer.getElapsedTimeF32() > scene_load_sample_time()
|| force_capture)
- && mDiffState == WAITING_FOR_NEXT_DIFF
&& mEnabled
&& LLGLSLShader::sNoFixedFunction
&& last_capture_frame != gFrameCount)
@@ -470,7 +469,8 @@ void LLSceneMonitor::fetchQueryResult()
static LLCachedControl<F32> scene_load_sample_time(gSavedSettings, "SceneLoadingMonitorSampleTime");
static LLFrameTimer timer;
- if(mDiffState == WAIT_ON_RESULT && timer.getElapsedTimeF32() > scene_load_sample_time)
+ F32 elapsed_time = timer.getElapsedTimeF32();
+ if(mDiffState == WAIT_ON_RESULT && elapsed_time > scene_load_sample_time)
{
mDiffState = WAITING_FOR_NEXT_DIFF;
@@ -481,21 +481,24 @@ void LLSceneMonitor::fetchQueryResult()
GLuint count = 0;
glGetQueryObjectuivARB(mQueryObject, GL_QUERY_RESULT_ARB, &count);
- mDiffResult = count * 0.5f / (mDiff->getWidth() * mDiff->getHeight() * mDiffPixelRatio * mDiffPixelRatio); //0.5 -> (front face + back face)
+ mDiffResult = sqrtf(count * 0.5f / (mDiff->getWidth() * mDiff->getHeight() * mDiffPixelRatio * mDiffPixelRatio)); //0.5 -> (front face + back face)
LL_DEBUGS("SceneMonitor") << "Frame difference: " << std::setprecision(4) << mDiffResult << LL_ENDL;
- record(sFramePixelDiff, sqrtf(mDiffResult));
+ record(sFramePixelDiff, mDiffResult);
static LLCachedControl<F32> diff_threshold(gSavedSettings,"SceneLoadingPixelDiffThreshold");
if(mDiffResult > diff_threshold())
{
mSceneLoadRecording.extend();
+ llassert(mSceneLoadRecording.getResults().getLastRecording().getDuration() > scene_load_sample_time);
}
else
{
mSceneLoadRecording.nextPeriod();
}
}
+
+ timer.reset();
}
}