diff options
author | Richard Linden <none@none> | 2013-09-05 14:04:13 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2013-09-05 14:04:13 -0700 |
commit | cbe397ad13665c7bc993e10d8fe1e4a876253378 (patch) | |
tree | 52cd665a1138a65bd8ebfc94478c665ea40b2e25 /indra/newview/llvieweroctree.cpp | |
parent | 12688c8b549d2baa33509dca60bbe14b039b17db (diff) |
changed fast timer over to using macro
another attempt to move mem stat into base class
Diffstat (limited to 'indra/newview/llvieweroctree.cpp')
-rw-r--r-- | indra/newview/llvieweroctree.cpp | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/indra/newview/llvieweroctree.cpp b/indra/newview/llvieweroctree.cpp index 481befdb44..1e01c0fdef 100644 --- a/indra/newview/llvieweroctree.cpp +++ b/indra/newview/llvieweroctree.cpp @@ -983,8 +983,8 @@ void LLOcclusionCullingGroup::clearOcclusionState(U32 state, S32 mode) } } -static LLFastTimer::DeclareTimer FTM_OCCLUSION_READBACK("Readback Occlusion"); -static LLFastTimer::DeclareTimer FTM_OCCLUSION_WAIT("Occlusion Wait"); +static LLTrace::TimeBlock FTM_OCCLUSION_READBACK("Readback Occlusion"); +static LLTrace::TimeBlock FTM_OCCLUSION_WAIT("Occlusion Wait"); BOOL LLOcclusionCullingGroup::earlyFail(LLCamera* camera, const LLVector4a* bounds) { @@ -1038,7 +1038,7 @@ void LLOcclusionCullingGroup::checkOcclusion() { if (LLPipeline::sUseOcclusion > 1) { - LLFastTimer t(FTM_OCCLUSION_READBACK); + LL_RECORD_BLOCK_TIME(FTM_OCCLUSION_READBACK); LLOcclusionCullingGroup* parent = (LLOcclusionCullingGroup*)getParent(); if (parent && parent->isOcclusionState(LLOcclusionCullingGroup::OCCLUDED)) { //if the parent has been marked as occluded, the child is implicitly occluded @@ -1057,7 +1057,7 @@ void LLOcclusionCullingGroup::checkOcclusion() if (wait_for_query && mOcclusionIssued[LLViewerCamera::sCurCameraID] < gFrameCount) { //query was issued last frame, wait until it's available S32 max_loop = 1024; - LLFastTimer t(FTM_OCCLUSION_WAIT); + LL_RECORD_BLOCK_TIME(FTM_OCCLUSION_WAIT); while (!available && max_loop-- > 0) { //do some usefu work while we wait @@ -1121,16 +1121,16 @@ void LLOcclusionCullingGroup::checkOcclusion() } } -static LLFastTimer::DeclareTimer FTM_PUSH_OCCLUSION_VERTS("Push Occlusion"); -static LLFastTimer::DeclareTimer FTM_SET_OCCLUSION_STATE("Occlusion State"); -static LLFastTimer::DeclareTimer FTM_OCCLUSION_EARLY_FAIL("Occlusion Early Fail"); -static LLFastTimer::DeclareTimer FTM_OCCLUSION_ALLOCATE("Allocate"); -static LLFastTimer::DeclareTimer FTM_OCCLUSION_BUILD("Build"); -static LLFastTimer::DeclareTimer FTM_OCCLUSION_BEGIN_QUERY("Begin Query"); -static LLFastTimer::DeclareTimer FTM_OCCLUSION_END_QUERY("End Query"); -static LLFastTimer::DeclareTimer FTM_OCCLUSION_SET_BUFFER("Set Buffer"); -static LLFastTimer::DeclareTimer FTM_OCCLUSION_DRAW_WATER("Draw Water"); -static LLFastTimer::DeclareTimer FTM_OCCLUSION_DRAW("Draw"); +static LLTrace::TimeBlock FTM_PUSH_OCCLUSION_VERTS("Push Occlusion"); +static LLTrace::TimeBlock FTM_SET_OCCLUSION_STATE("Occlusion State"); +static LLTrace::TimeBlock FTM_OCCLUSION_EARLY_FAIL("Occlusion Early Fail"); +static LLTrace::TimeBlock FTM_OCCLUSION_ALLOCATE("Allocate"); +static LLTrace::TimeBlock FTM_OCCLUSION_BUILD("Build"); +static LLTrace::TimeBlock FTM_OCCLUSION_BEGIN_QUERY("Begin Query"); +static LLTrace::TimeBlock FTM_OCCLUSION_END_QUERY("End Query"); +static LLTrace::TimeBlock FTM_OCCLUSION_SET_BUFFER("Set Buffer"); +static LLTrace::TimeBlock FTM_OCCLUSION_DRAW_WATER("Draw Water"); +static LLTrace::TimeBlock FTM_OCCLUSION_DRAW("Draw"); void LLOcclusionCullingGroup::doOcclusion(LLCamera* camera, const LLVector3* region_agent) { @@ -1150,7 +1150,7 @@ void LLOcclusionCullingGroup::doOcclusion(LLCamera* camera, const LLVector3* reg // Don't cull hole/edge water, unless we have the GL_ARB_depth_clamp extension if (earlyFail(camera, bounds)) { - LLFastTimer t(FTM_OCCLUSION_EARLY_FAIL); + LL_RECORD_BLOCK_TIME(FTM_OCCLUSION_EARLY_FAIL); setOcclusionState(LLOcclusionCullingGroup::DISCARD_QUERY); assert_states_valid(this); clearOcclusionState(LLOcclusionCullingGroup::OCCLUDED, LLOcclusionCullingGroup::STATE_MODE_DIFF); @@ -1161,11 +1161,11 @@ void LLOcclusionCullingGroup::doOcclusion(LLCamera* camera, const LLVector3* reg if (!isOcclusionState(QUERY_PENDING) || isOcclusionState(DISCARD_QUERY)) { { //no query pending, or previous query to be discarded - LLFastTimer t(FTM_RENDER_OCCLUSION); + LL_RECORD_BLOCK_TIME(FTM_RENDER_OCCLUSION); if (!mOcclusionQuery[LLViewerCamera::sCurCameraID]) { - LLFastTimer t(FTM_OCCLUSION_ALLOCATE); + LL_RECORD_BLOCK_TIME(FTM_OCCLUSION_ALLOCATE); mOcclusionQuery[LLViewerCamera::sCurCameraID] = getNewOcclusionQueryObjectName(); } @@ -1189,13 +1189,13 @@ void LLOcclusionCullingGroup::doOcclusion(LLCamera* camera, const LLVector3* reg #endif { - LLFastTimer t(FTM_PUSH_OCCLUSION_VERTS); + LL_RECORD_BLOCK_TIME(FTM_PUSH_OCCLUSION_VERTS); //store which frame this query was issued on mOcclusionIssued[LLViewerCamera::sCurCameraID] = gFrameCount; { - LLFastTimer t(FTM_OCCLUSION_BEGIN_QUERY); + LL_RECORD_BLOCK_TIME(FTM_OCCLUSION_BEGIN_QUERY); glBeginQueryARB(mode, mOcclusionQuery[LLViewerCamera::sCurCameraID]); } @@ -1209,7 +1209,7 @@ void LLOcclusionCullingGroup::doOcclusion(LLCamera* camera, const LLVector3* reg if (!use_depth_clamp && mSpatialPartition->mDrawableType == LLDrawPool::POOL_VOIDWATER) { - LLFastTimer t(FTM_OCCLUSION_DRAW_WATER); + LL_RECORD_BLOCK_TIME(FTM_OCCLUSION_DRAW_WATER); LLGLSquashToFarClip squash(glh_get_current_projection(), 1); if (camera->getOrigin().isExactlyZero()) @@ -1224,7 +1224,7 @@ void LLOcclusionCullingGroup::doOcclusion(LLCamera* camera, const LLVector3* reg } else { - LLFastTimer t(FTM_OCCLUSION_DRAW); + LL_RECORD_BLOCK_TIME(FTM_OCCLUSION_DRAW); if (camera->getOrigin().isExactlyZero()) { //origin is invalid, draw entire box gPipeline.mCubeVB->drawRange(LLRender::TRIANGLE_FAN, 0, 7, 8, 0); @@ -1238,14 +1238,14 @@ void LLOcclusionCullingGroup::doOcclusion(LLCamera* camera, const LLVector3* reg { - LLFastTimer t(FTM_OCCLUSION_END_QUERY); + LL_RECORD_BLOCK_TIME(FTM_OCCLUSION_END_QUERY); glEndQueryARB(mode); } } } { - LLFastTimer t(FTM_SET_OCCLUSION_STATE); + LL_RECORD_BLOCK_TIME(FTM_SET_OCCLUSION_STATE); setOcclusionState(LLOcclusionCullingGroup::QUERY_PENDING); clearOcclusionState(LLOcclusionCullingGroup::DISCARD_QUERY); } |