From cbe397ad13665c7bc993e10d8fe1e4a876253378 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 5 Sep 2013 14:04:13 -0700 Subject: changed fast timer over to using macro another attempt to move mem stat into base class --- indra/newview/llflexibleobject.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'indra/newview/llflexibleobject.cpp') diff --git a/indra/newview/llflexibleobject.cpp b/indra/newview/llflexibleobject.cpp index caad0afec0..817a853190 100755 --- a/indra/newview/llflexibleobject.cpp +++ b/indra/newview/llflexibleobject.cpp @@ -47,8 +47,8 @@ std::vector LLVolumeImplFlexible::sInstanceList; std::vector LLVolumeImplFlexible::sUpdateDelay; -static LLFastTimer::DeclareTimer FTM_FLEXIBLE_REBUILD("Rebuild"); -static LLFastTimer::DeclareTimer FTM_DO_FLEXIBLE_UPDATE("Flexible Update"); +static LLTrace::TimeBlock FTM_FLEXIBLE_REBUILD("Rebuild"); +static LLTrace::TimeBlock FTM_DO_FLEXIBLE_UPDATE("Flexible Update"); // LLFlexibleObjectData::pack/unpack now in llprimitive.cpp @@ -331,14 +331,14 @@ void LLVolumeImplFlexible::updateRenderRes() // updated every time step. In the future, perhaps there could be an // optimization similar to what Havok does for objects that are stationary. //--------------------------------------------------------------------------------- -static LLFastTimer::DeclareTimer FTM_FLEXIBLE_UPDATE("Update Flexies"); +static LLTrace::TimeBlock FTM_FLEXIBLE_UPDATE("Update Flexies"); void LLVolumeImplFlexible::doIdleUpdate() { LLDrawable* drawablep = mVO->mDrawable; if (drawablep) { - //LLFastTimer ftm(FTM_FLEXIBLE_UPDATE); + //LL_RECORD_BLOCK_TIME(FTM_FLEXIBLE_UPDATE); //ensure drawable is active drawablep->makeActive(); @@ -421,7 +421,7 @@ inline S32 log2(S32 x) void LLVolumeImplFlexible::doFlexibleUpdate() { - LLFastTimer ftm(FTM_DO_FLEXIBLE_UPDATE); + LL_RECORD_BLOCK_TIME(FTM_DO_FLEXIBLE_UPDATE); LLVolume* volume = mVO->getVolume(); LLPath *path = &volume->getPath(); if ((mSimulateRes == 0 || !mInitialized) && mVO->mDrawable->isVisible()) @@ -771,7 +771,7 @@ BOOL LLVolumeImplFlexible::doUpdateGeometry(LLDrawable *drawable) if (mRenderRes > -1) { - LLFastTimer t(FTM_DO_FLEXIBLE_UPDATE); + LL_RECORD_BLOCK_TIME(FTM_DO_FLEXIBLE_UPDATE); doFlexibleUpdate(); } @@ -791,7 +791,7 @@ BOOL LLVolumeImplFlexible::doUpdateGeometry(LLDrawable *drawable) volume->mDrawable->setState(LLDrawable::REBUILD_VOLUME); volume->dirtySpatialGroup(); { - LLFastTimer t(FTM_FLEXIBLE_REBUILD); + LL_RECORD_BLOCK_TIME(FTM_FLEXIBLE_REBUILD); doFlexibleRebuild(); } volume->genBBoxes(isVolumeGlobal()); -- cgit v1.2.3 From 697d2e720ba75e142a4d56ae8794bab8d7698dad Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 15 Oct 2013 20:24:42 -0700 Subject: renamed TimeBlock to BlockTimerStatHandle --- indra/newview/llflexibleobject.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview/llflexibleobject.cpp') diff --git a/indra/newview/llflexibleobject.cpp b/indra/newview/llflexibleobject.cpp index 7c7b59445c..c589bea674 100755 --- a/indra/newview/llflexibleobject.cpp +++ b/indra/newview/llflexibleobject.cpp @@ -47,8 +47,8 @@ std::vector LLVolumeImplFlexible::sInstanceList; std::vector LLVolumeImplFlexible::sUpdateDelay; -static LLTrace::TimeBlock FTM_FLEXIBLE_REBUILD("Rebuild"); -static LLTrace::TimeBlock FTM_DO_FLEXIBLE_UPDATE("Flexible Update"); +static LLTrace::BlockTimerStatHandle FTM_FLEXIBLE_REBUILD("Rebuild"); +static LLTrace::BlockTimerStatHandle FTM_DO_FLEXIBLE_UPDATE("Flexible Update"); // LLFlexibleObjectData::pack/unpack now in llprimitive.cpp @@ -334,7 +334,7 @@ void LLVolumeImplFlexible::updateRenderRes() // updated every time step. In the future, perhaps there could be an // optimization similar to what Havok does for objects that are stationary. //--------------------------------------------------------------------------------- -static LLTrace::TimeBlock FTM_FLEXIBLE_UPDATE("Update Flexies"); +static LLTrace::BlockTimerStatHandle FTM_FLEXIBLE_UPDATE("Update Flexies"); void LLVolumeImplFlexible::doIdleUpdate() { LLDrawable* drawablep = mVO->mDrawable; @@ -715,7 +715,7 @@ void LLVolumeImplFlexible::doFlexibleUpdate() mLastSegmentRotation = parentSegmentRotation; } -static LLFastTimer::DeclareTimer FTM_FLEXI_PREBUILD("Flexi Prebuild"); +static LLTrace::BlockTimerStatHandle FTM_FLEXI_PREBUILD("Flexi Prebuild"); void LLVolumeImplFlexible::preRebuild() { -- cgit v1.2.3 From 555cf227ffed470184b55bc5a87b125da66f0a16 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Fri, 25 Oct 2013 10:29:45 -0600 Subject: trivial: fix several weird compiling errors. --- indra/newview/llflexibleobject.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llflexibleobject.cpp') diff --git a/indra/newview/llflexibleobject.cpp b/indra/newview/llflexibleobject.cpp index c589bea674..3cd4367891 100755 --- a/indra/newview/llflexibleobject.cpp +++ b/indra/newview/llflexibleobject.cpp @@ -660,7 +660,7 @@ void LLVolumeImplFlexible::doFlexibleUpdate() mSection[i].mdPosition = (mSection[i].mPosition - mSection[i-1].mPosition) * inv_section_length; // Create points - llassert(mRenderRes > -1) + llassert(mRenderRes > -1); S32 num_render_sections = 1<getPathLength() != num_render_sections+1) { -- cgit v1.2.3 From a847caade4e112906f86cfbd8511d3414d9546db Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Wed, 5 Feb 2014 16:16:30 -0700 Subject: more fix for a non-finite number assertion in llvolume --- indra/newview/llflexibleobject.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'indra/newview/llflexibleobject.cpp') diff --git a/indra/newview/llflexibleobject.cpp b/indra/newview/llflexibleobject.cpp index 3cd4367891..b64034b945 100755 --- a/indra/newview/llflexibleobject.cpp +++ b/indra/newview/llflexibleobject.cpp @@ -722,13 +722,17 @@ void LLVolumeImplFlexible::preRebuild() if (!mUpdated) { LL_RECORD_BLOCK_TIME(FTM_FLEXI_PREBUILD); - doFlexibleRebuild(); + doFlexibleRebuild(false); } } -void LLVolumeImplFlexible::doFlexibleRebuild() +void LLVolumeImplFlexible::doFlexibleRebuild(bool rebuild_volume) { LLVolume* volume = mVO->getVolume(); + if(rebuild_volume) + { + volume->setDirty(); + } volume->regen(); mUpdated = TRUE; @@ -801,7 +805,7 @@ BOOL LLVolumeImplFlexible::doUpdateGeometry(LLDrawable *drawable) volume->dirtySpatialGroup(); { LL_RECORD_BLOCK_TIME(FTM_FLEXIBLE_REBUILD); - doFlexibleRebuild(); + doFlexibleRebuild(volume->mVolumeChanged); } volume->genBBoxes(isVolumeGlobal()); } -- cgit v1.2.3