diff options
author | Richard Linden <none@none> | 2013-05-13 11:04:10 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2013-05-13 11:04:10 -0700 |
commit | 405aa5b1ba7b786da05136fc9cc1f0a664111ce8 (patch) | |
tree | 5e9481c93ed5b0a911e8f16c26faaec703b33c42 | |
parent | edf731c180a61dc49255ebb25342b6256e8d6065 (diff) |
SH-3931 WIP Interesting: Add graphs to visualize scene load metrics
added log output for scene monitoring
-rw-r--r-- | indra/newview/llscenemonitor.cpp | 14 | ||||
-rw-r--r-- | indra/newview/llscenemonitor.h | 2 |
2 files changed, 5 insertions, 11 deletions
diff --git a/indra/newview/llscenemonitor.cpp b/indra/newview/llscenemonitor.cpp index 2e819c8efe..9546c786d1 100644 --- a/indra/newview/llscenemonitor.cpp +++ b/indra/newview/llscenemonitor.cpp @@ -50,7 +50,7 @@ LLSceneMonitorView* gSceneMonitorView = NULL; //2, (?) disable all sky and water; //3, capture frames periodically, by calling "capture()"; //4, compute pixel differences between two latest captured frames, by calling "compare()", results are stored at mDiff; -//5, compute the number of pixels in mDiff above some tolerance threshold in GPU, by calling "queryDiff() -> calcDiffAggregate()"; +//5, compute the number of pixels in mDiff above some tolerance threshold in GPU, by calling "calcDiffAggregate()"; //6, use gl occlusion query to fetch the result from GPU, by calling "fetchQueryResult()"; //END. // @@ -402,17 +402,10 @@ void LLSceneMonitor::compare() mHasNewDiff = true; - queryDiff(); -} - -void LLSceneMonitor::queryDiff() -{ - if(mDebugViewerVisible) + if (!mDebugViewerVisible) { - return; + calcDiffAggregate(); } - - calcDiffAggregate(); } //calculate Diff aggregate information in GPU, and enable gl occlusion query to capture it. @@ -492,6 +485,7 @@ void LLSceneMonitor::fetchQueryResult() mDiffResult = count * 0.5f / (mDiff->getWidth() * mDiff->getHeight() * mDiffPixelRatio * mDiffPixelRatio); //0.5 -> (front face + back face) + LL_DEBUGS("SceneMonitor") << "Frame difference: " << mDiffResult << LL_ENDL; sample(sFramePixelDiff, mDiffResult); const F32 diff_threshold = 0.001f; diff --git a/indra/newview/llscenemonitor.h b/indra/newview/llscenemonitor.h index 08d2335a90..6dccbbe335 100644 --- a/indra/newview/llscenemonitor.h +++ b/indra/newview/llscenemonitor.h @@ -39,6 +39,7 @@ class LLViewerTexture; class LLSceneMonitor : public LLSingleton<LLSceneMonitor> { + LOG_CLASS(LLSceneMonitor); public: LLSceneMonitor(); ~LLSceneMonitor(); @@ -50,7 +51,6 @@ public: void capture(); //capture the main frame buffer void compare(); //compare the stored two buffers. - void queryDiff(); void fetchQueryResult(); void calcDiffAggregate(); void setDiffTolerance(F32 tol) {mDiffTolerance = tol;} |