summaryrefslogtreecommitdiff
path: root/indra/newview/llvieweroctree.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2013-09-07 21:16:39 -0700
committerRichard Linden <none@none>2013-09-07 21:16:39 -0700
commit3fd68662f267a3fd96d101834b3a9563bde3f61e (patch)
tree6379668ed488847d4404430932e928ea37015d42 /indra/newview/llvieweroctree.cpp
parent736efc7b574635d5c86a97a33b456dd79a035777 (diff)
added memory usage and occlusion events to traces
renamed "current" to "primary" when referring to accumulators
Diffstat (limited to 'indra/newview/llvieweroctree.cpp')
-rw-r--r--indra/newview/llvieweroctree.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/indra/newview/llvieweroctree.cpp b/indra/newview/llvieweroctree.cpp
index 481befdb44..b6389fac33 100644
--- a/indra/newview/llvieweroctree.cpp
+++ b/indra/newview/llvieweroctree.cpp
@@ -39,6 +39,11 @@
U32 LLViewerOctreeEntryData::sCurVisible = 0;
BOOL LLViewerOctreeDebug::sInDebug = FALSE;
+static LLTrace::CountStatHandle<S32> sOcclusionQueries("occlusion_queries", "Number of occlusion queries executed"),
+ sNumObjectsOccluded("occluded_objects", "Count of objects being occluded by a query"),
+ sNumObjectsUnoccluded("unoccluded_objects", "Count of objects being unoccluded by a query");
+static LLTrace::SampleStatHandle<S32> sOcclusionQueriesInFlight("occlusion_queries_in_flight", "Number of occlusion queries waiting for results");
+
//-----------------------------------------------------------------------------------
//some global functions definitions
//-----------------------------------------------------------------------------------
@@ -921,6 +926,10 @@ void LLOcclusionCullingGroup::setOcclusionState(U32 state, S32 mode)
}
else
{
+ if (state & OCCLUDED)
+ {
+ add(sNumObjectsOccluded, 1);
+ }
mOcclusionState[LLViewerCamera::sCurCameraID] |= state;
if ((state & DISCARD_QUERY) && mOcclusionQuery[LLViewerCamera::sCurCameraID])
{
@@ -979,6 +988,10 @@ void LLOcclusionCullingGroup::clearOcclusionState(U32 state, S32 mode)
}
else
{
+ if (state & OCCLUDED)
+ {
+ add(sNumObjectsUnoccluded, 1);
+ }
mOcclusionState[LLViewerCamera::sCurCameraID] &= ~state;
}
}
@@ -1082,6 +1095,7 @@ void LLOcclusionCullingGroup::checkOcclusion()
#if LL_TRACK_PENDING_OCCLUSION_QUERIES
sPendingQueries.erase(mOcclusionQuery[LLViewerCamera::sCurCameraID]);
#endif
+ add(sOcclusionQueriesInFlight, -1);
}
else if (mOcclusionQuery[LLViewerCamera::sCurCameraID])
{ //delete the query to avoid holding onto hundreds of pending queries
@@ -1187,6 +1201,8 @@ void LLOcclusionCullingGroup::doOcclusion(LLCamera* camera, const LLVector3* reg
#if LL_TRACK_PENDING_OCCLUSION_QUERIES
sPendingQueries.insert(mOcclusionQuery[LLViewerCamera::sCurCameraID]);
#endif
+ add(sOcclusionQueries, 1);
+ add(sOcclusionQueriesInFlight, 1);
{
LLFastTimer t(FTM_PUSH_OCCLUSION_VERTS);