From 74ac0182ec8f7a0f6d0ea89f5814f0998ab90b62 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 10 Oct 2012 19:25:56 -0700 Subject: SH-3405 WIP convert existing stats to lltrace system fixed units conversion so that trace getters return convertable units removed circular dependencies from lltrace* converted more stats to lltrace --- indra/newview/pipeline.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 86791a37fb..4582de805f 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -488,7 +488,7 @@ void LLPipeline::init() getPool(LLDrawPool::POOL_BUMP); getPool(LLDrawPool::POOL_GLOW); - LLViewerStats::getInstance()->mTrianglesDrawnStat.reset(); + //LLViewerStats::getInstance()->mTrianglesDrawnStat.reset(); resetFrameStats(); for (U32 i = 0; i < NUM_RENDER_TYPES; ++i) @@ -1768,7 +1768,8 @@ void LLPipeline::resetFrameStats() { assertInitialized(); - LLViewerStats::getInstance()->mTrianglesDrawnStat.addValue(mTrianglesDrawn/1000.f); + LLStatViewer::TRIANGLES_DRAWN.add(mTrianglesDrawn); + //LLViewerStats::getInstance()->mTrianglesDrawnStat.addValue(mTrianglesDrawn/1000.f); if (mBatchCount > 0) { -- cgit v1.2.3 From c0ba626c8009b22310b3923e8170e5db2a021253 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Mon, 15 Oct 2012 21:34:29 -0600 Subject: For SH-3333: Design and implement a new object cache system on viewer side --- indra/newview/pipeline.cpp | 50 ++++++++++++++++++++++++++++------------------ 1 file changed, 31 insertions(+), 19 deletions(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 4582de805f..e06577c512 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -1378,18 +1378,18 @@ S32 LLPipeline::setLightingDetail(S32 level) return mLightingDetail; } -class LLOctreeDirtyTexture : public LLOctreeTraveler +class LLOctreeDirtyTexture : public OctreeTraveler { public: const std::set& mTextures; LLOctreeDirtyTexture(const std::set& textures) : mTextures(textures) { } - virtual void visit(const LLOctreeNode* node) + virtual void visit(const OctreeNode* node) { LLSpatialGroup* group = (LLSpatialGroup*) node->getListener(0); - if (!group->isState(LLSpatialGroup::GEOM_DIRTY) && !group->isEmpty()) + if (!group->hasState(LLSpatialGroup::GEOM_DIRTY) && !group->isEmpty()) { for (LLSpatialGroup::draw_map_t::iterator i = group->mDrawMap.begin(); i != group->mDrawMap.end(); ++i) { @@ -1578,11 +1578,9 @@ void LLPipeline::addPool(LLDrawPool *new_poolp) void LLPipeline::allocDrawable(LLViewerObject *vobj) { - LLDrawable *drawable = new LLDrawable(); + LLDrawable *drawable = new LLDrawable(vobj); vobj->mDrawable = drawable; - drawable->mVObjp = vobj; - //encompass completely sheared objects by taking //the most extreme point possible (<1,1,0.5>) drawable->setRadius(LLVector3(1,1,0.5f).scaleVec(vobj->getScale()).length()); @@ -2006,7 +2004,7 @@ void check_references(LLSpatialGroup* group, LLDrawable* drawable) { for (LLSpatialGroup::element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i) { - if (drawable == *i) + if (drawable == (LLDrawable*)(*i)->getDrawable()) { llerrs << "LLDrawable deleted while actively reference by LLPipeline." << llendl; } @@ -2028,8 +2026,11 @@ void check_references(LLSpatialGroup* group, LLFace* face) { for (LLSpatialGroup::element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i) { - LLDrawable* drawable = *i; - check_references(drawable, face); + LLDrawable* drawable = (LLDrawable*)(*i)->getDrawable(); + if(drawable) + { + check_references(drawable, face); + } } } @@ -2351,6 +2352,10 @@ void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_cl { part->cull(camera); } + else if(part->mPartitionType == LLViewerRegion::PARTITION_VO_CACHE) + { + part->cull(camera); + } } } } @@ -2420,15 +2425,20 @@ void LLPipeline::markNotCulled(LLSpatialGroup* group, LLCamera& camera) return; } + const LLVector4a* bounds = group->getBounds(); if (sMinRenderSize > 0.f && - llmax(llmax(group->mBounds[1][0], group->mBounds[1][1]), group->mBounds[1][2]) < sMinRenderSize) + llmax(llmax(bounds[1][0], bounds[1][1]), bounds[1][2]) < sMinRenderSize) { return; } assertInitialized(); - if (!group->mSpatialPartition->mRenderByGroup) + if(group->mSpatialPartition->mPartitionType == LLViewerRegion::PARTITION_VO_CACHE) + { + group->mSpatialPartition->mRegionp->addVisibleGroup(group); + } + else if (!group->mSpatialPartition->mRenderByGroup) { //render by drawable sCull->pushDrawableGroup(group); } @@ -2980,14 +2990,14 @@ void LLPipeline::markRebuild(LLSpatialGroup* group, BOOL priority) if (priority) { - if (!group->isState(LLSpatialGroup::IN_BUILD_Q1)) + if (!group->hasState(LLSpatialGroup::IN_BUILD_Q1)) { llassert_always(!mGroupQ1Locked); mGroupQ1.push_back(group); group->setState(LLSpatialGroup::IN_BUILD_Q1); - if (group->isState(LLSpatialGroup::IN_BUILD_Q2)) + if (group->hasState(LLSpatialGroup::IN_BUILD_Q2)) { LLSpatialGroup::sg_vector_t::iterator iter = std::find(mGroupQ2.begin(), mGroupQ2.end(), group); if (iter != mGroupQ2.end()) @@ -2998,7 +3008,7 @@ void LLPipeline::markRebuild(LLSpatialGroup* group, BOOL priority) } } } - else if (!group->isState(LLSpatialGroup::IN_BUILD_Q2 | LLSpatialGroup::IN_BUILD_Q1)) + else if (!group->hasState(LLSpatialGroup::IN_BUILD_Q2 | LLSpatialGroup::IN_BUILD_Q1)) { llassert_always(!mGroupQ2Locked); mGroupQ2.push_back(group); @@ -3073,7 +3083,7 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result) group->setVisible(); for (LLSpatialGroup::element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i) { - markVisible(*i, camera); + markVisible((LLDrawable*)(*i)->getDrawable(), camera); } if (!sDelayVBUpdate) @@ -3160,8 +3170,7 @@ void LLPipeline::stateSort(LLSpatialGroup* group, LLCamera& camera) { for (LLSpatialGroup::element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i) { - LLDrawable* drawablep = *i; - stateSort(drawablep, camera); + stateSort((LLDrawable*)(*i)->getDrawable(), camera); } if (LLViewerCamera::sCurCameraID == LLViewerCamera::CAMERA_WORLD) @@ -3280,7 +3289,10 @@ void forAllDrawables(LLCullResult::sg_iterator begin, { for (LLSpatialGroup::element_iter j = (*i)->getDataBegin(); j != (*i)->getDataEnd(); ++j) { - func(*j); + if((*j)->hasDrawable()) + { + func((LLDrawable*)(*j)->getDrawable()); + } } } } @@ -3508,7 +3520,7 @@ void LLPipeline::postSort(LLCamera& camera) continue; } - if (group->isState(LLSpatialGroup::NEW_DRAWINFO) && group->isState(LLSpatialGroup::GEOM_DIRTY)) + if (group->hasState(LLSpatialGroup::NEW_DRAWINFO) && group->hasState(LLSpatialGroup::GEOM_DIRTY)) { //no way this group is going to be drawable without a rebuild group->rebuildGeom(); } -- cgit v1.2.3 From a52d203a4f1d2988e8ffba16258f3f132f22f56d Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 17 Oct 2012 20:00:07 -0700 Subject: SH-3405 WIP convert existing stats to lltrace system started conversion of llviewerassetstats removed old, dead LLViewerStats code made units tracing require units declaration clean up of units handling --- indra/newview/pipeline.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 4582de805f..75af605ad7 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -4892,7 +4892,7 @@ void LLPipeline::renderDebug() { DebugBlip& blip = *iter; - blip.mAge += gFrameIntervalSeconds; + blip.mAge += gFrameIntervalSeconds.value(); if (blip.mAge > 2.f) { mDebugBlips.erase(iter++); @@ -4902,7 +4902,7 @@ void LLPipeline::renderDebug() iter++; } - blip.mPosition.mV[2] += gFrameIntervalSeconds*2.f; + blip.mPosition.mV[2] += gFrameIntervalSeconds.value()*2.f; gGL.color4fv(blip.mColor.mV); gGL.vertex3fv(blip.mPosition.mV); @@ -5713,7 +5713,7 @@ void LLPipeline::calcNearbyLights(LLCamera& camera) { if (farthest_light->fade >= 0.f) { - farthest_light->fade = -gFrameIntervalSeconds; + farthest_light->fade = -(gFrameIntervalSeconds.value()); } } else @@ -5809,12 +5809,12 @@ void LLPipeline::setupHWLights(LLDrawPool* pool) if (fade >= 0.f) { fade = fade / LIGHT_FADE_TIME; - ((Light*) (&(*iter)))->fade += gFrameIntervalSeconds; + ((Light*) (&(*iter)))->fade += gFrameIntervalSeconds.value(); } else { fade = 1.f + fade / LIGHT_FADE_TIME; - ((Light*) (&(*iter)))->fade -= gFrameIntervalSeconds; + ((Light*) (&(*iter)))->fade -= gFrameIntervalSeconds.value(); } fade = llclamp(fade,0.f,1.f); light_color *= fade; @@ -7129,7 +7129,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield) } else if (transition_time < 1.f) { //currently in a transition, continue interpolating - transition_time += 1.f/CameraFocusTransitionTime*gFrameIntervalSeconds; + transition_time += 1.f/CameraFocusTransitionTime*gFrameIntervalSeconds.value(); transition_time = llmin(transition_time, 1.f); F32 t = cosf(transition_time*F_PI+F_PI)*0.5f+0.5f; @@ -9121,7 +9121,7 @@ void LLPipeline::generateHighlight(LLCamera& camera) if (!mHighlightSet.empty()) { - F32 transition = gFrameIntervalSeconds/RenderHighlightFadeTime; + F32 transition = gFrameIntervalSeconds.value()/RenderHighlightFadeTime; LLGLDisable test(GL_ALPHA_TEST); LLGLDepthTest depth(GL_FALSE); @@ -9756,7 +9756,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera) if (gen_shadow) { - F32 fade_amt = gFrameIntervalSeconds * llmax(LLViewerCamera::getInstance()->getVelocityStat()->getCurrentPerSec(), 1.f); + F32 fade_amt = gFrameIntervalSeconds.value() * llmax(LLViewerCamera::getInstance()->getVelocityStat()->getCurrentPerSec(), 1.f); //update shadow targets for (U32 i = 0; i < 2; i++) -- cgit v1.2.3 From 5ae116f89b8459963ccb6ae9125d94ffaa79025e Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Wed, 31 Oct 2012 17:05:53 -0600 Subject: for SH-3471: create a simplified version of octree for object cache entries. --- indra/newview/pipeline.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index e06577c512..850714f676 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -86,6 +86,7 @@ #include "llviewerregion.h" // for audio debugging. #include "llviewerwindow.h" // For getSpinAxis #include "llvoavatarself.h" +#include "llvocache.h" #include "llvoground.h" #include "llvosky.h" #include "llvotree.h" @@ -2352,12 +2353,15 @@ void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_cl { part->cull(camera); } - else if(part->mPartitionType == LLViewerRegion::PARTITION_VO_CACHE) - { - part->cull(camera); - } } } + + //scan the VO Cache tree + LLVOCachePartition* vo_part = region->getVOCachePartition(); + if(vo_part) + { + vo_part->cull(camera); + } } if (bound_shader) @@ -2433,12 +2437,8 @@ void LLPipeline::markNotCulled(LLSpatialGroup* group, LLCamera& camera) } assertInitialized(); - - if(group->mSpatialPartition->mPartitionType == LLViewerRegion::PARTITION_VO_CACHE) - { - group->mSpatialPartition->mRegionp->addVisibleGroup(group); - } - else if (!group->mSpatialPartition->mRenderByGroup) + + if (!group->mSpatialPartition->mRenderByGroup) { //render by drawable sCull->pushDrawableGroup(group); } -- cgit v1.2.3 From 819adb5eb4d7f982121f3dbd82750e05d26864d9 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 1 Nov 2012 00:26:44 -0700 Subject: SH-3405 FIX convert existing stats to lltrace system final removal of remaining LLStat code --- indra/newview/pipeline.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 75af605ad7..1e050d2588 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -488,7 +488,6 @@ void LLPipeline::init() getPool(LLDrawPool::POOL_BUMP); getPool(LLDrawPool::POOL_GLOW); - //LLViewerStats::getInstance()->mTrianglesDrawnStat.reset(); resetFrameStats(); for (U32 i = 0; i < NUM_RENDER_TYPES; ++i) @@ -1769,7 +1768,6 @@ void LLPipeline::resetFrameStats() assertInitialized(); LLStatViewer::TRIANGLES_DRAWN.add(mTrianglesDrawn); - //LLViewerStats::getInstance()->mTrianglesDrawnStat.addValue(mTrianglesDrawn/1000.f); if (mBatchCount > 0) { @@ -9756,7 +9754,9 @@ void LLPipeline::generateSunShadow(LLCamera& camera) if (gen_shadow) { - F32 fade_amt = gFrameIntervalSeconds.value() * llmax(LLViewerCamera::getInstance()->getVelocityStat()->getCurrentPerSec(), 1.f); + LLTrace::Measurement<>* velocity_stat = LLViewerCamera::getVelocityStat(); + F32 fade_amt = gFrameIntervalSeconds.value() + * llmax(LLTrace::get_frame_recording().getLastRecordingPeriod().getLastValue(*velocity_stat), 1.0); //update shadow targets for (U32 i = 0; i < 2; i++) -- cgit v1.2.3 From 74fe126590fba03752d1d8d88dd3bb59c6900026 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 1 Nov 2012 17:52:11 -0700 Subject: SH-3405 FIX convert existing stats to lltrace system output of floater_stats is now identical to pre-lltrace system (with some tweaks) --- indra/newview/pipeline.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 1e050d2588..bf353cd1e0 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -9754,9 +9754,9 @@ void LLPipeline::generateSunShadow(LLCamera& camera) if (gen_shadow) { - LLTrace::Measurement<>* velocity_stat = LLViewerCamera::getVelocityStat(); + LLTrace::Count<>* velocity_stat = LLViewerCamera::getVelocityStat(); F32 fade_amt = gFrameIntervalSeconds.value() - * llmax(LLTrace::get_frame_recording().getLastRecordingPeriod().getLastValue(*velocity_stat), 1.0); + * llmax(LLTrace::get_frame_recording().getLastRecordingPeriod().getSum(*velocity_stat) / LLTrace::get_frame_recording().getLastRecordingPeriod().getDuration().value(), 1.0); //update shadow targets for (U32 i = 0; i < 2; i++) -- cgit v1.2.3 From a3e3e8b4ccd96e98da73acf1c584bbfa5a8b2b56 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 12 Nov 2012 19:08:14 -0800 Subject: SH-3406 WIP convert fast timers to lltrace system simplified llfasttimer code down to 2 classes llunit unit conversion now done in floating point or 64 bit integer precision, depending on source type --- indra/newview/pipeline.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index bf353cd1e0..5ac5ae892a 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -2715,7 +2715,7 @@ void LLPipeline::updateGeom(F32 max_dtime) S32 count = 0; - max_dtime = llmax(update_timer.getElapsedTimeF32()+0.001f, max_dtime); + max_dtime = llmax(update_timer.getElapsedTimeF32()+0.001f, LLUnit(max_dtime)); LLSpatialGroup* last_group = NULL; LLSpatialBridge* last_bridge = NULL; -- cgit v1.2.3 From 6db6cb39f41e921e75970d1570a74cf35d353a35 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 16 Nov 2012 23:02:53 -0800 Subject: SH-3406 WIP convert fast timers to lltrace system got new fast timer code to compile and run --- indra/newview/pipeline.cpp | 35 ++++------------------------------- 1 file changed, 4 insertions(+), 31 deletions(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 5ac5ae892a..acf3a4e74c 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -1886,6 +1886,8 @@ void LLPipeline::updateMovedList(LLDrawable::drawable_vector_t& moved_list) static LLFastTimer::DeclareTimer FTM_OCTREE_BALANCE("Balance Octree"); static LLFastTimer::DeclareTimer FTM_UPDATE_MOVE("Update Move"); +static LLFastTimer::DeclareTimer FTM_RETEXTURE("Retexture"); +static LLFastTimer::DeclareTimer FTM_MOVED_LIST("Moved List"); void LLPipeline::updateMove() { @@ -1899,8 +1901,7 @@ void LLPipeline::updateMove() assertInitialized(); { - static LLFastTimer::DeclareTimer ftm("Retexture"); - LLFastTimer t(ftm); + LLFastTimer t(FTM_RETEXTURE); for (LLDrawable::drawable_set_t::iterator iter = mRetexturedList.begin(); iter != mRetexturedList.end(); ++iter) @@ -1915,8 +1916,7 @@ void LLPipeline::updateMove() } { - static LLFastTimer::DeclareTimer ftm("Moved List"); - LLFastTimer t(ftm); + LLFastTimer t(FTM_MOVED_LIST); updateMovedList(mMovedList); } @@ -3688,33 +3688,6 @@ void LLPipeline::postSort(LLCamera& camera) } } - /*static LLFastTimer::DeclareTimer FTM_TRANSFORM_WAIT("Transform Fence"); - static LLFastTimer::DeclareTimer FTM_TRANSFORM_DO_WORK("Transform Work"); - if (use_transform_feedback) - { //using transform feedback, wait for transform feedback to complete - LLFastTimer t(FTM_TRANSFORM_WAIT); - - S32 done = 0; - //glGetQueryivARB(GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN, GL_CURRENT_QUERY, &count); - - glGetQueryObjectivARB(mMeshDirtyQueryObject, GL_QUERY_RESULT_AVAILABLE, &done); - - while (!done) - { - { - LLFastTimer t(FTM_TRANSFORM_DO_WORK); - F32 max_time = llmin(gFrameIntervalSeconds*10.f, 1.f); - //do some useful work while we wait - LLAppViewer::getTextureCache()->update(max_time); // unpauses the texture cache thread - LLAppViewer::getImageDecodeThread()->update(max_time); // unpauses the image thread - LLAppViewer::getTextureFetch()->update(max_time); // unpauses the texture fetch thread - } - glGetQueryObjectivARB(mMeshDirtyQueryObject, GL_QUERY_RESULT_AVAILABLE, &done); - } - - mTransformFeedbackPrimitives = 0; - }*/ - //LLSpatialGroup::sNoDelete = FALSE; llpushcallstacks ; } -- cgit v1.2.3 From 21409a3aaaef71102195d65fc35cebdb5d941a26 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Fri, 30 Nov 2012 22:50:06 -0700 Subject: for SH-3350 and SH-3353: Report frame-to-frame visual deltas as an LLStat --- indra/newview/pipeline.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 850714f676..d8af7a5cfb 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -112,6 +112,7 @@ #include "llfloaterpathfindingconsole.h" #include "llfloaterpathfindingcharacters.h" #include "llpathfindingpathtool.h" +#include "llscenemonitor.h" #ifdef _DEBUG // Debug indices is disabled for now for debug performance - djs 4/24/02 @@ -3161,7 +3162,9 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result) } } - postSort(camera); + postSort(camera); + + LLSceneMonitor::getInstance()->fetchQueryResult(); } void LLPipeline::stateSort(LLSpatialGroup* group, LLCamera& camera) -- cgit v1.2.3 From c99886d94389babc78e92bbfa5084fdd785915af Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 7 Dec 2012 15:20:12 -0800 Subject: SH-3406 WIP convert fast timers to lltrace system improved unit tests for LLUnit renamed LLUnit to LLUnitImplicit with LLUnit being reserved for explicit units --- indra/newview/pipeline.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 813fc7db6a..3be19c3920 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -2747,7 +2747,7 @@ void LLPipeline::updateGeom(F32 max_dtime) S32 count = 0; - max_dtime = llmax(update_timer.getElapsedTimeF32()+0.001f, LLUnit(max_dtime)); + max_dtime = llmax(update_timer.getElapsedTimeF32()+0.001f, LLUnitImplicit(max_dtime)); LLSpatialGroup* last_group = NULL; LLSpatialBridge* last_bridge = NULL; -- cgit v1.2.3 From f07b9c2c69f1f6882dcf249aacf33cdfacf878ab Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 6 Mar 2013 11:08:25 -0800 Subject: renamed LLTrace stat gathering classes/methods to make the structure of LLTrace clearer Count becomes CountStatHandle Count.sum becomes sum(Count, value), etc. --- indra/newview/pipeline.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 8d3075d1e1..355fa1350b 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -1800,7 +1800,7 @@ void LLPipeline::resetFrameStats() { assertInitialized(); - LLStatViewer::TRIANGLES_DRAWN.add(mTrianglesDrawn); + add(LLStatViewer::TRIANGLES_DRAWN, mTrianglesDrawn); if (mBatchCount > 0) { @@ -9805,7 +9805,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera) if (gen_shadow) { - LLTrace::Count<>* velocity_stat = LLViewerCamera::getVelocityStat(); + LLTrace::CountStatHandle<>* velocity_stat = LLViewerCamera::getVelocityStat(); F32 fade_amt = gFrameIntervalSeconds.value() * llmax(LLTrace::get_frame_recording().getLastRecordingPeriod().getSum(*velocity_stat) / LLTrace::get_frame_recording().getLastRecordingPeriod().getDuration().value(), 1.0); -- cgit v1.2.3 From 07ca6fce7c9cffe1b8f215f25bb826fedf57a5b7 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 10 Apr 2013 21:51:56 -0700 Subject: SH-3931 WIP Interesting: Add graphs to visualize scene load metrics removed PeriodicRecording::getTotalRecording as it was showing up at the top on the profiler renamed getPrevRecordingPeriod, etc. to getPrevRecording --- indra/newview/pipeline.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 26ceaf512a..1b5148e560 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -9816,7 +9816,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera) { LLTrace::CountStatHandle<>* velocity_stat = LLViewerCamera::getVelocityStat(); F32 fade_amt = gFrameIntervalSeconds.value() - * llmax(LLTrace::get_frame_recording().getLastRecordingPeriod().getSum(*velocity_stat) / LLTrace::get_frame_recording().getLastRecordingPeriod().getDuration().value(), 1.0); + * llmax(LLTrace::get_frame_recording().getLastRecording().getSum(*velocity_stat) / LLTrace::get_frame_recording().getLastRecording().getDuration().value(), 1.0); //update shadow targets for (U32 i = 0; i < 2; i++) -- cgit v1.2.3 From 34403a6138922da2d97c24b8413e3693ab1d788f Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 2 May 2013 13:02:16 -0700 Subject: SH-4080 WIP interesting: random crash on Mac changed sCurCameraID to enum in attempt to pinpoint memory stompage --- indra/newview/pipeline.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 1b5148e560..acf3e7aa07 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -2252,7 +2252,7 @@ BOOL LLPipeline::getVisibleExtents(LLCamera& camera, LLVector3& min, LLVector3& min = LLVector3(X,X,X); max = LLVector3(-X,-X,-X); - U32 saved_camera_id = LLViewerCamera::sCurCameraID; + LLViewerCamera::eCameraID saved_camera_id = LLViewerCamera::sCurCameraID; LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_WORLD; BOOL res = TRUE; @@ -9437,7 +9437,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera) mShadowFrustPoints[j].clear(); } - LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_SHADOW0+j; + LLViewerCamera::sCurCameraID = (LLViewerCamera::eCameraID)(LLViewerCamera::CAMERA_SHADOW0+j); //restore render matrices glh_set_current_modelview(saved_view); @@ -9821,7 +9821,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera) //update shadow targets for (U32 i = 0; i < 2; i++) { //for each current shadow - LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_SHADOW4+i; + LLViewerCamera::sCurCameraID = (LLViewerCamera::eCameraID)(LLViewerCamera::CAMERA_SHADOW4+i); if (mShadowSpotLight[i].notNull() && (mShadowSpotLight[i] == mTargetShadowSpotLight[0] || @@ -9940,7 +9940,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera) static LLCullResult result[2]; - LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_SHADOW0+i+4; + LLViewerCamera::sCurCameraID = (LLViewerCamera::eCameraID)(LLViewerCamera::CAMERA_SHADOW0 + i + 4); renderShadow(view[i+4], proj[i+4], shadow_cam, result[i], FALSE, FALSE, target_width); -- cgit v1.2.3 From f850ae03b399a5cc7aa32f82b8ed996518a86a2a Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 20 May 2013 00:01:57 -0700 Subject: SH-3931 WIP Interesting: Add graphs to visualize scene load metrics fixed copy construction of Recorders, eliminated most zero-length frames fixed reset behavior of periodic recordings and extendable recordings to clear entire history removed busy-loop recording of stats from worker threads...stats reported only when work is done --- indra/newview/pipeline.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index acf3e7aa07..3f6269e768 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -3233,8 +3233,6 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result) } postSort(camera); - - LLSceneMonitor::getInstance()->fetchQueryResult(); } void LLPipeline::stateSort(LLSpatialGroup* group, LLCamera& camera) -- cgit v1.2.3 From 16616ae48d86da75b3809fa6be6c846a9d420603 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Thu, 23 May 2013 18:25:21 -0600 Subject: for SH-4145: Interesting: Implement occlusion culling for object cache --- indra/newview/pipeline.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 1b5148e560..a8156b46ed 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -1663,7 +1663,7 @@ void LLPipeline::unlinkDrawable(LLDrawable *drawable) if (drawablep->getSpatialGroup()) { LLFastTimer t(FTM_REMOVE_FROM_SPATIAL_PARTITION); - if (!drawablep->getSpatialGroup()->mSpatialPartition->remove(drawablep, drawablep->getSpatialGroup())) + if (!drawablep->getSpatialGroup()->getSpatialPartition()->remove(drawablep, drawablep->getSpatialGroup())) { #ifdef LL_RELEASE_FOR_DOWNLOAD llwarns << "Couldn't remove object from spatial group!" << llendl; @@ -2480,7 +2480,7 @@ void LLPipeline::markNotCulled(LLSpatialGroup* group, LLCamera& camera) assertInitialized(); - if (!group->mSpatialPartition->mRenderByGroup) + if (!group->getSpatialPartition()->mRenderByGroup) { //render by drawable sCull->pushDrawableGroup(group); } @@ -2729,7 +2729,7 @@ void LLPipeline::rebuildGroups() { group->rebuildGeom(); - if (group->mSpatialPartition->mRenderByGroup) + if (group->getSpatialPartition()->mRenderByGroup) { count++; } @@ -3052,9 +3052,9 @@ void LLPipeline::markMeshDirty(LLSpatialGroup* group) void LLPipeline::markRebuild(LLSpatialGroup* group, BOOL priority) { - if (group && !group->isDead() && group->mSpatialPartition) + if (group && !group->isDead() && group->getSpatialPartition()) { - if (group->mSpatialPartition->mPartitionType == LLViewerRegion::PARTITION_HUD) + if (group->getSpatialPartition()->mPartitionType == LLViewerRegion::PARTITION_HUD) { priority = TRUE; } @@ -3631,7 +3631,7 @@ void LLPipeline::postSort(LLCamera& camera) if (alpha != group->mDrawMap.end()) { //store alpha groups for sorting - LLSpatialBridge* bridge = group->mSpatialPartition->asBridge(); + LLSpatialBridge* bridge = group->getSpatialPartition()->asBridge(); if (LLViewerCamera::sCurCameraID == LLViewerCamera::CAMERA_WORLD) { if (bridge) @@ -5202,7 +5202,7 @@ void LLPipeline::renderDebug() continue; } - LLSpatialBridge* bridge = group->mSpatialPartition->asBridge(); + LLSpatialBridge* bridge = group->getSpatialPartition()->asBridge(); if (bridge && (!bridge->mDrawable || bridge->mDrawable->isDead())) { @@ -9990,7 +9990,7 @@ void LLPipeline::renderGroups(LLRenderPass* pass, U32 type, U32 mask, BOOL textu LLSpatialGroup* group = *i; if (!group->isDead() && (!sUseOcclusion || !group->isOcclusionState(LLSpatialGroup::OCCLUDED)) && - gPipeline.hasRenderType(group->mSpatialPartition->mDrawableType) && + gPipeline.hasRenderType(group->getSpatialPartition()->mDrawableType) && group->mDrawMap.find(type) != group->mDrawMap.end()) { pass->renderGroup(group,type,mask,texture); -- cgit v1.2.3 From 9ae76d12157641033431381959ef4f798a119b8d Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 29 May 2013 17:00:50 -0700 Subject: SH-3931 WIP Interesting: Add graphs to visualize scene load metrics fixed copy construction behavior of Recordings to not zero out data split measurement into event and sample, with sample representing a continuous function --- indra/newview/pipeline.cpp | 28 +++------------------------- 1 file changed, 3 insertions(+), 25 deletions(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 3f6269e768..6a0ef13894 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -198,6 +198,7 @@ BOOL LLPipeline::CameraOffset; F32 LLPipeline::CameraMaxCoF; F32 LLPipeline::CameraDoFResScale; F32 LLPipeline::RenderAutoHideSurfaceAreaLimit; +LLTrace::EventStatHandle LLPipeline::sStatBatchSize("renderbatchsize"); const F32 BACKLIGHT_DAY_MAGNITUDE_AVATAR = 0.2f; const F32 BACKLIGHT_NIGHT_MAGNITUDE_AVATAR = 0.1f; @@ -403,17 +404,9 @@ bool addDeferredAttachments(LLRenderTarget& target) LLPipeline::LLPipeline() : mBackfaceCull(FALSE), - mBatchCount(0), mMatrixOpCount(0), mTextureMatrixOps(0), - mMaxBatchSize(0), - mMinBatchSize(0), - mMeanBatchSize(0), - mTrianglesDrawn(0), mNumVisibleNodes(0), - mVerticesRelit(0), - mLightingChanges(0), - mGeometryChanges(0), mNumVisibleFaces(0), mInitialized(FALSE), @@ -1809,17 +1802,7 @@ void LLPipeline::resetFrameStats() { assertInitialized(); - add(LLStatViewer::TRIANGLES_DRAWN, mTrianglesDrawn); - - if (mBatchCount > 0) - { - mMeanBatchSize = gPipeline.mTrianglesDrawn/gPipeline.mBatchCount; - } - mTrianglesDrawn = 0; sCompiles = 0; - mVerticesRelit = 0; - mLightingChanges = 0; - mGeometryChanges = 0; mNumVisibleFaces = 0; if (mOldRenderDebugMask != mRenderDebugMask) @@ -1827,7 +1810,6 @@ void LLPipeline::resetFrameStats() gObjectList.clearDebugText(); mOldRenderDebugMask = mRenderDebugMask; } - } //external functions for asynchronous updating @@ -2585,7 +2567,6 @@ BOOL LLPipeline::updateDrawableGeom(LLDrawable* drawablep, BOOL priority) if (update_complete && assertInitialized()) { drawablep->setState(LLDrawable::BUILT); - mGeometryChanges++; } return update_complete; } @@ -3347,7 +3328,6 @@ void LLPipeline::stateSort(LLDrawable* drawablep, LLCamera& camera) } } - mNumVisibleFaces += drawablep->getNumFaces(); } @@ -4516,10 +4496,8 @@ void LLPipeline::addTrianglesDrawn(S32 index_count, U32 render_type) count = index_count/3; } - mTrianglesDrawn += count; - mBatchCount++; - mMaxBatchSize = llmax(mMaxBatchSize, count); - mMinBatchSize = llmin(mMinBatchSize, count); + record(sStatBatchSize, count); + add(LLStatViewer::TRIANGLES_DRAWN, count); if (LLPipeline::sRenderFrameTest) { -- cgit v1.2.3 From 9fd3af3c389ed491b515cbb5136b344b069913e4 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 13 Jun 2013 15:29:15 -0700 Subject: SH-3931 WIP Interesting: Add graphs to visualize scene load metrics changed Units macros and argument order to make it more clear optimized units for integer types fixed merging of periodicrecordings...should eliminate duplicate entries in sceneloadmonitor history --- indra/newview/pipeline.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index dd5c153d55..7cf30e1661 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -2792,7 +2792,7 @@ void LLPipeline::updateGeom(F32 max_dtime) S32 count = 0; - max_dtime = llmax(update_timer.getElapsedTimeF32()+0.001f, LLUnitImplicit(max_dtime)); + max_dtime = llmax(update_timer.getElapsedTimeF32()+0.001f, LLUnitImplicit(max_dtime)); LLSpatialGroup* last_group = NULL; LLSpatialBridge* last_bridge = NULL; -- cgit v1.2.3 From d122318bef2ff0eced7641dc24f411f792bd2935 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 8 Jul 2013 00:55:17 -0700 Subject: SH-4299 WIP: Interesting: High fps shown temporarily off scale in statistics console added percentage/ratio units added auto-range and auto tick calculation to stat bar to automate display stats --- indra/newview/pipeline.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index c2f5b9b861..76ecd84e11 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -4686,7 +4686,7 @@ void LLPipeline::addTrianglesDrawn(S32 index_count, U32 render_type) } record(sStatBatchSize, count); - add(LLStatViewer::TRIANGLES_DRAWN, count); + add(LLStatViewer::TRIANGLES_DRAWN, LLUnits::Triangles::fromValue(count)); if (LLPipeline::sRenderFrameTest) { -- cgit v1.2.3 From 1e8f9fd80d0ac4e0eab656ed8e8e32f91ab8b533 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 24 Jul 2013 19:36:43 -0700 Subject: SH-4376 FIX: Interesting: in Statistics, replace the text "0" with "n/a" when there are no samples during the time period. added hasValue to SampleAccumulator so we don't print a value when we don't have a single sample yet added some disabled log output for scene load timing --- indra/newview/pipeline.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 34d7e0ab64..870ee6a103 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -3757,7 +3757,7 @@ void LLPipeline::postSort(LLCamera& camera) assertInitialized(); - llpushcallstacks ; + LL_PUSH_CALLSTACKS(); //rebuild drawable geometry for (LLCullResult::sg_iterator i = sCull->beginDrawableGroups(); i != sCull->endDrawableGroups(); ++i) { @@ -3768,12 +3768,12 @@ void LLPipeline::postSort(LLCamera& camera) group->rebuildGeom(); } } - llpushcallstacks ; + LL_PUSH_CALLSTACKS(); //rebuild groups sCull->assertDrawMapsEmpty(); rebuildPriorityGroups(); - llpushcallstacks ; + LL_PUSH_CALLSTACKS(); //build render map @@ -3884,7 +3884,7 @@ void LLPipeline::postSort(LLCamera& camera) std::sort(sCull->beginAlphaGroups(), sCull->endAlphaGroups(), LLSpatialGroup::CompareDepthGreater()); } - llpushcallstacks ; + LL_PUSH_CALLSTACKS(); // only render if the flag is set. The flag is only set if we are in edit mode or the toggle is set in the menus if (LLFloaterReg::instanceVisible("beacons") && !sShadowRender) { @@ -3937,7 +3937,7 @@ void LLPipeline::postSort(LLCamera& camera) forAllVisibleDrawables(renderSoundHighlights); } } - llpushcallstacks ; + LL_PUSH_CALLSTACKS(); // If managing your telehub, draw beacons at telehub and currently selected spawnpoint. if (LLFloaterTelehub::renderBeacons()) { @@ -3973,7 +3973,7 @@ void LLPipeline::postSort(LLCamera& camera) } //LLSpatialGroup::sNoDelete = FALSE; - llpushcallstacks ; + LL_PUSH_CALLSTACKS(); } -- cgit v1.2.3 From a2e22732f195dc075a733c79f15156752f522a43 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 30 Jul 2013 19:13:45 -0700 Subject: Summer cleaning - removed a lot of llcommon dependencies to speed up build times consolidated most indra-specific constants in llcommon under indra_constants.h fixed issues with operations on mixed unit types (implicit and explicit) made LL_INFOS() style macros variadic in order to subsume other logging methods such as ll_infos added optional tag output to error recorders --- indra/newview/pipeline.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 870ee6a103..1d9137c161 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -30,7 +30,6 @@ // library includes #include "llaudioengine.h" // For debugging. -#include "imageids.h" #include "llerror.h" #include "llviewercontrol.h" #include "llfasttimer.h" @@ -40,7 +39,6 @@ #include "llprimitive.h" #include "llvolume.h" #include "material_codes.h" -#include "timing.h" #include "v3color.h" #include "llui.h" #include "llglheaders.h" -- cgit v1.2.3 From 576b9339977f50edb11a799d7a274610263f9fdc Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Mon, 5 Aug 2013 14:48:26 -0600 Subject: fix for SH-4397: Object cache occlusion culling results are not always correct --- indra/newview/pipeline.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 1d9137c161..1696f1962c 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -2719,7 +2719,7 @@ void LLPipeline::doOcclusion(LLCamera& camera, LLRenderTarget& source, LLRenderT void LLPipeline::doOcclusion(LLCamera& camera) { - if (LLPipeline::sUseOcclusion > 1 && sCull->hasOcclusionGroups()) + if (LLPipeline::sUseOcclusion > 1) { LLVertexBuffer::unbind(); @@ -2765,6 +2765,17 @@ void LLPipeline::doOcclusion(LLCamera& camera) group->clearOcclusionState(LLSpatialGroup::ACTIVE_OCCLUSION); } + //apply occlusion culling to object cache tree + for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin(); + iter != LLWorld::getInstance()->getRegionList().end(); ++iter) + { + LLVOCachePartition* vo_part = (*iter)->getVOCachePartition(); + if(vo_part) + { + vo_part->processOccluders(&camera); + } + } + if (bind_shader) { if (LLPipeline::sShadowRender) -- cgit v1.2.3 From a2c7b0485576c6bb92f6d0eddc762f5e37d5caac Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Wed, 7 Aug 2013 22:53:27 -0600 Subject: more fix for SH-4397: Object cache occlusion culling results are not always correct --- indra/newview/pipeline.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 1696f1962c..1abaaa49ac 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -2408,6 +2408,11 @@ static LLFastTimer::DeclareTimer FTM_CULL("Object Culling"); void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_clip, LLPlane* planep) { + static LLCachedControl use_occlusion(gSavedSettings,"UseOcclusion"); + static bool can_use_occlusion = LLGLSLShader::sNoFixedFunction + && LLFeatureManager::getInstance()->isFeatureAvailable("UseOcclusion") + && gGLManager.mHasOcclusionQuery; + LLFastTimer t(FTM_CULL); grabReferences(result); @@ -2530,7 +2535,7 @@ void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_cl LLVOCachePartition* vo_part = region->getVOCachePartition(); if(vo_part) { - vo_part->cull(camera); + vo_part->cull(camera, can_use_occlusion && use_occlusion && !gUseWireframe); } } -- cgit v1.2.3 From a6711a894c3c32ad24b47e36b2a52225713fd3ed Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Thu, 8 Aug 2013 16:45:55 -0600 Subject: fix for SH-4402: interesting: lower FPS with lots of objects in view --- indra/newview/pipeline.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 1abaaa49ac..87c3bf7bdf 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -2724,7 +2724,7 @@ void LLPipeline::doOcclusion(LLCamera& camera, LLRenderTarget& source, LLRenderT void LLPipeline::doOcclusion(LLCamera& camera) { - if (LLPipeline::sUseOcclusion > 1) + if (LLPipeline::sUseOcclusion > 1 && (sCull->hasOcclusionGroups() || LLVOCachePartition::sNeedsOcclusionCheck)) { LLVertexBuffer::unbind(); -- cgit v1.2.3 From c2601ec9c574ac3bd7a7f4001bc08572483028a6 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Fri, 9 Aug 2013 14:57:18 -0600 Subject: fix for SH-4394: Interesting: viewer culls lights behind the camera, changing the scene lighting --- indra/newview/pipeline.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 87c3bf7bdf..f6e1f8342a 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -6135,6 +6135,13 @@ void LLPipeline::calcNearbyLights(LLCamera& camera) } } + //mark nearby lights not-removable. + for (light_set_t::iterator iter = mNearbyLights.begin(); + iter != mNearbyLights.end(); iter++) + { + const Light* light = &(*iter); + ((LLViewerOctreeEntryData*) light->drawable)->setVisible(); + } } } -- cgit v1.2.3 From e340009fc59d59e59b2e8d903a884acb76b178eb Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 9 Aug 2013 17:11:19 -0700 Subject: second phase summer cleaning replace llinfos, lldebugs, etc with new LL_INFOS(), LL_DEBUGS(), etc. --- indra/newview/pipeline.cpp | 126 ++++++++++++++++++++++----------------------- 1 file changed, 63 insertions(+), 63 deletions(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 1d9137c161..21cb19b8ec 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -459,7 +459,7 @@ void LLPipeline::connectRefreshCachedSettingsSafe(const std::string name) LLPointer cntrl_ptr = gSavedSettings.getControl(name); if ( cntrl_ptr.isNull() ) { - llwarns << "Global setting name not found:" << name << llendl; + LL_WARNS() << "Global setting name not found:" << name << LL_ENDL; } else { @@ -681,11 +681,11 @@ void LLPipeline::cleanup() if (!mTerrainPools.empty()) { - llwarns << "Terrain Pools not cleaned up" << llendl; + LL_WARNS() << "Terrain Pools not cleaned up" << LL_ENDL; } if (!mTreePools.empty()) { - llwarns << "Tree Pools not cleaned up" << llendl; + LL_WARNS() << "Tree Pools not cleaned up" << LL_ENDL; } delete mAlphaPool; @@ -886,7 +886,7 @@ LLPipeline::eFBOStatus LLPipeline::doAllocateScreenBuffer(U32 resX, U32 resY) releaseScreenBuffers(); } - llwarns << "Unable to allocate screen buffer at any resolution!" << llendl; + LL_WARNS() << "Unable to allocate screen buffer at any resolution!" << LL_ENDL; } return ret; @@ -1476,7 +1476,7 @@ void LLPipeline::unloadShaders() void LLPipeline::assertInitializedDoError() { - llerrs << "LLPipeline used when uninitialized." << llendl; + LL_ERRS() << "LLPipeline used when uninitialized." << LL_ENDL; } //============================================================================ @@ -1661,7 +1661,7 @@ LLDrawPool *LLPipeline::findPool(const U32 type, LLViewerTexture *tex0) default: llassert(0); - llerrs << "Invalid Pool Type in LLPipeline::findPool() type=" << type << llendl; + LL_ERRS() << "Invalid Pool Type in LLPipeline::findPool() type=" << type << LL_ENDL; break; } @@ -1798,9 +1798,9 @@ void LLPipeline::unlinkDrawable(LLDrawable *drawable) if (!drawablep->getSpatialGroup()->getSpatialPartition()->remove(drawablep, drawablep->getSpatialGroup())) { #ifdef LL_RELEASE_FOR_DOWNLOAD - llwarns << "Couldn't remove object from spatial group!" << llendl; + LL_WARNS() << "Couldn't remove object from spatial group!" << LL_ENDL; #else - llerrs << "Couldn't remove object from spatial group!" << llendl; + LL_ERRS() << "Couldn't remove object from spatial group!" << LL_ENDL; #endif } } @@ -1910,7 +1910,7 @@ void LLPipeline::createObject(LLViewerObject* vobj) } else { - llerrs << "Redundant drawable creation!" << llendl; + LL_ERRS() << "Redundant drawable creation!" << LL_ENDL; } llassert(drawablep); @@ -1960,7 +1960,7 @@ void LLPipeline::updateMoveDampedAsync(LLDrawable* drawablep) } if (!drawablep) { - llerrs << "updateMove called with NULL drawablep" << llendl; + LL_ERRS() << "updateMove called with NULL drawablep" << LL_ENDL; return; } if (drawablep->isState(LLDrawable::EARLY_MOVE)) @@ -1990,7 +1990,7 @@ void LLPipeline::updateMoveNormalAsync(LLDrawable* drawablep) } if (!drawablep) { - llerrs << "updateMove called with NULL drawablep" << llendl; + LL_ERRS() << "updateMove called with NULL drawablep" << LL_ENDL; return; } if (drawablep->isState(LLDrawable::EARLY_MOVE)) @@ -2170,7 +2170,7 @@ void check_references(LLSpatialGroup* group, LLDrawable* drawable) { if (drawable == (LLDrawable*)(*i)->getDrawable()) { - llerrs << "LLDrawable deleted while actively reference by LLPipeline." << llendl; + LL_ERRS() << "LLDrawable deleted while actively reference by LLPipeline." << LL_ENDL; } } } @@ -2181,7 +2181,7 @@ void check_references(LLDrawable* drawable, LLFace* face) { if (drawable->getFace(i) == face) { - llerrs << "LLFace deleted while actively referenced by LLPipeline." << llendl; + LL_ERRS() << "LLFace deleted while actively referenced by LLPipeline." << LL_ENDL; } } } @@ -2257,7 +2257,7 @@ void LLPipeline::checkReferences(LLDrawable* drawable) { if (drawable == *iter) { - llerrs << "LLDrawable deleted while actively referenced by LLPipeline." << llendl; + LL_ERRS() << "LLDrawable deleted while actively referenced by LLPipeline." << LL_ENDL; } } } @@ -2274,7 +2274,7 @@ void check_references(LLSpatialGroup* group, LLDrawInfo* draw_info) LLDrawInfo* params = *j; if (params == draw_info) { - llerrs << "LLDrawInfo deleted while actively referenced by LLPipeline." << llendl; + LL_ERRS() << "LLDrawInfo deleted while actively referenced by LLPipeline." << LL_ENDL; } } } @@ -2316,7 +2316,7 @@ void LLPipeline::checkReferences(LLSpatialGroup* group) { if (group == *iter) { - llerrs << "LLSpatialGroup deleted while actively referenced by LLPipeline." << llendl; + LL_ERRS() << "LLSpatialGroup deleted while actively referenced by LLPipeline." << LL_ENDL; } } @@ -2324,7 +2324,7 @@ void LLPipeline::checkReferences(LLSpatialGroup* group) { if (group == *iter) { - llerrs << "LLSpatialGroup deleted while actively referenced by LLPipeline." << llendl; + LL_ERRS() << "LLSpatialGroup deleted while actively referenced by LLPipeline." << LL_ENDL; } } @@ -2332,7 +2332,7 @@ void LLPipeline::checkReferences(LLSpatialGroup* group) { if (group == *iter) { - llerrs << "LLSpatialGroup deleted while actively referenced by LLPipeline." << llendl; + LL_ERRS() << "LLSpatialGroup deleted while actively referenced by LLPipeline." << LL_ENDL; } } } @@ -3083,13 +3083,13 @@ void LLPipeline::markMoved(LLDrawable *drawablep, BOOL damped_motion) { if (!drawablep) { - //llerrs << "Sending null drawable to moved list!" << llendl; + //LL_ERRS() << "Sending null drawable to moved list!" << LL_ENDL; return; } if (drawablep->isDead()) { - llwarns << "Marking NULL or dead drawable moved!" << llendl; + LL_WARNS() << "Marking NULL or dead drawable moved!" << LL_ENDL; return; } @@ -4159,7 +4159,7 @@ void LLPipeline::renderHighlights() LLFace *facep = mSelectedFaces[i]; if (!facep || facep->getDrawable()->isDead()) { - llerrs << "Bad face on selection" << llendl; + LL_ERRS() << "Bad face on selection" << LL_ENDL; return; } @@ -4207,7 +4207,7 @@ void LLPipeline::renderHighlights() LLFace *facep = mSelectedFaces[i]; if (!facep || facep->getDrawable()->isDead()) { - llerrs << "Bad face on selection" << llendl; + LL_ERRS() << "Bad face on selection" << LL_ENDL; return; } @@ -4237,7 +4237,7 @@ void LLPipeline::renderHighlights() LLFace *facep = mSelectedFaces[i]; if (!facep || facep->getDrawable()->isDead()) { - llerrs << "Bad face on selection" << llendl; + LL_ERRS() << "Bad face on selection" << LL_ENDL; return; } @@ -4291,7 +4291,7 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate) { if (!verify()) { - llerrs << "Pipeline verification failed!" << llendl; + LL_ERRS() << "Pipeline verification failed!" << LL_ENDL; } } @@ -5567,7 +5567,7 @@ void LLPipeline::addToQuickLookup( LLDrawPool* new_poolp ) if (mSimplePool) { llassert(0); - llwarns << "Ignoring duplicate simple pool." << llendl; + LL_WARNS() << "Ignoring duplicate simple pool." << LL_ENDL; } else { @@ -5579,7 +5579,7 @@ void LLPipeline::addToQuickLookup( LLDrawPool* new_poolp ) if (mAlphaMaskPool) { llassert(0); - llwarns << "Ignoring duplicate alpha mask pool." << llendl; + LL_WARNS() << "Ignoring duplicate alpha mask pool." << LL_ENDL; break; } else @@ -5592,7 +5592,7 @@ void LLPipeline::addToQuickLookup( LLDrawPool* new_poolp ) if (mFullbrightAlphaMaskPool) { llassert(0); - llwarns << "Ignoring duplicate alpha mask pool." << llendl; + LL_WARNS() << "Ignoring duplicate alpha mask pool." << LL_ENDL; break; } else @@ -5605,7 +5605,7 @@ void LLPipeline::addToQuickLookup( LLDrawPool* new_poolp ) if (mGrassPool) { llassert(0); - llwarns << "Ignoring duplicate grass pool." << llendl; + LL_WARNS() << "Ignoring duplicate grass pool." << LL_ENDL; } else { @@ -5617,7 +5617,7 @@ void LLPipeline::addToQuickLookup( LLDrawPool* new_poolp ) if (mFullbrightPool) { llassert(0); - llwarns << "Ignoring duplicate simple pool." << llendl; + LL_WARNS() << "Ignoring duplicate simple pool." << LL_ENDL; } else { @@ -5629,7 +5629,7 @@ void LLPipeline::addToQuickLookup( LLDrawPool* new_poolp ) if (mInvisiblePool) { llassert(0); - llwarns << "Ignoring duplicate simple pool." << llendl; + LL_WARNS() << "Ignoring duplicate simple pool." << LL_ENDL; } else { @@ -5641,7 +5641,7 @@ void LLPipeline::addToQuickLookup( LLDrawPool* new_poolp ) if (mGlowPool) { llassert(0); - llwarns << "Ignoring duplicate glow pool." << llendl; + LL_WARNS() << "Ignoring duplicate glow pool." << LL_ENDL; } else { @@ -5661,7 +5661,7 @@ void LLPipeline::addToQuickLookup( LLDrawPool* new_poolp ) if (mBumpPool) { llassert(0); - llwarns << "Ignoring duplicate bump pool." << llendl; + LL_WARNS() << "Ignoring duplicate bump pool." << LL_ENDL; } else { @@ -5672,7 +5672,7 @@ void LLPipeline::addToQuickLookup( LLDrawPool* new_poolp ) if (mMaterialsPool) { llassert(0); - llwarns << "Ignorning duplicate materials pool." << llendl; + LL_WARNS() << "Ignorning duplicate materials pool." << LL_ENDL; } else { @@ -5683,7 +5683,7 @@ void LLPipeline::addToQuickLookup( LLDrawPool* new_poolp ) if( mAlphaPool ) { llassert(0); - llwarns << "LLPipeline::addPool(): Ignoring duplicate Alpha pool" << llendl; + LL_WARNS() << "LLPipeline::addPool(): Ignoring duplicate Alpha pool" << LL_ENDL; } else { @@ -5698,7 +5698,7 @@ void LLPipeline::addToQuickLookup( LLDrawPool* new_poolp ) if( mSkyPool ) { llassert(0); - llwarns << "LLPipeline::addPool(): Ignoring duplicate Sky pool" << llendl; + LL_WARNS() << "LLPipeline::addPool(): Ignoring duplicate Sky pool" << LL_ENDL; } else { @@ -5710,7 +5710,7 @@ void LLPipeline::addToQuickLookup( LLDrawPool* new_poolp ) if( mWaterPool ) { llassert(0); - llwarns << "LLPipeline::addPool(): Ignoring duplicate Water pool" << llendl; + LL_WARNS() << "LLPipeline::addPool(): Ignoring duplicate Water pool" << LL_ENDL; } else { @@ -5722,7 +5722,7 @@ void LLPipeline::addToQuickLookup( LLDrawPool* new_poolp ) if( mGroundPool ) { llassert(0); - llwarns << "LLPipeline::addPool(): Ignoring duplicate Ground Pool" << llendl; + LL_WARNS() << "LLPipeline::addPool(): Ignoring duplicate Ground Pool" << LL_ENDL; } else { @@ -5734,7 +5734,7 @@ void LLPipeline::addToQuickLookup( LLDrawPool* new_poolp ) if( mWLSkyPool ) { llassert(0); - llwarns << "LLPipeline::addPool(): Ignoring duplicate WLSky Pool" << llendl; + LL_WARNS() << "LLPipeline::addPool(): Ignoring duplicate WLSky Pool" << LL_ENDL; } else { @@ -5744,7 +5744,7 @@ void LLPipeline::addToQuickLookup( LLDrawPool* new_poolp ) default: llassert(0); - llwarns << "Invalid Pool Type in LLPipeline::addPool()" << llendl; + LL_WARNS() << "Invalid Pool Type in LLPipeline::addPool()" << LL_ENDL; break; } } @@ -5859,7 +5859,7 @@ void LLPipeline::removeFromQuickLookup( LLDrawPool* poolp ) default: llassert(0); - llwarns << "Invalid Pool Type in LLPipeline::removeFromQuickLookup() type=" << poolp->getType() << llendl; + LL_WARNS() << "Invalid Pool Type in LLPipeline::removeFromQuickLookup() type=" << poolp->getType() << LL_ENDL; break; } } @@ -6537,28 +6537,28 @@ void LLPipeline::findReferences(LLDrawable *drawablep) assertInitialized(); if (mLights.find(drawablep) != mLights.end()) { - llinfos << "In mLights" << llendl; + LL_INFOS() << "In mLights" << LL_ENDL; } if (std::find(mMovedList.begin(), mMovedList.end(), drawablep) != mMovedList.end()) { - llinfos << "In mMovedList" << llendl; + LL_INFOS() << "In mMovedList" << LL_ENDL; } if (std::find(mShiftList.begin(), mShiftList.end(), drawablep) != mShiftList.end()) { - llinfos << "In mShiftList" << llendl; + LL_INFOS() << "In mShiftList" << LL_ENDL; } if (mRetexturedList.find(drawablep) != mRetexturedList.end()) { - llinfos << "In mRetexturedList" << llendl; + LL_INFOS() << "In mRetexturedList" << LL_ENDL; } if (std::find(mBuildQ1.begin(), mBuildQ1.end(), drawablep) != mBuildQ1.end()) { - llinfos << "In mBuildQ1" << llendl; + LL_INFOS() << "In mBuildQ1" << LL_ENDL; } if (std::find(mBuildQ2.begin(), mBuildQ2.end(), drawablep) != mBuildQ2.end()) { - llinfos << "In mBuildQ2" << llendl; + LL_INFOS() << "In mBuildQ2" << LL_ENDL; } S32 count; @@ -6566,7 +6566,7 @@ void LLPipeline::findReferences(LLDrawable *drawablep) count = gObjectList.findReferences(drawablep); if (count) { - llinfos << "In other drawables: " << count << " references" << llendl; + LL_INFOS() << "In other drawables: " << count << " references" << LL_ENDL; } } @@ -6587,7 +6587,7 @@ BOOL LLPipeline::verify() if (!ok) { - llwarns << "Pipeline verify failed!" << llendl; + LL_WARNS() << "Pipeline verify failed!" << LL_ENDL; } return ok; } @@ -6725,11 +6725,11 @@ void LLPipeline::toggleRenderTypeControl(void* data) U32 bit = (1< 0) { - llwarns << "VBO wipe failed -- " << LLVertexBuffer::sGLCount << " buffers remaining." << llendl; + LL_WARNS() << "VBO wipe failed -- " << LLVertexBuffer::sGLCount << " buffers remaining." << LL_ENDL; } LLVertexBuffer::unbind(); @@ -7325,18 +7325,18 @@ void validate_framebuffer_object() break; case GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: // frame buffer not OK: probably means unsupported depth buffer format - llerrs << "Framebuffer Incomplete Missing Attachment." << llendl; + LL_ERRS() << "Framebuffer Incomplete Missing Attachment." << LL_ENDL; break; case GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT: // frame buffer not OK: probably means unsupported depth buffer format - llerrs << "Framebuffer Incomplete Attachment." << llendl; + LL_ERRS() << "Framebuffer Incomplete Attachment." << LL_ENDL; break; case GL_FRAMEBUFFER_UNSUPPORTED: /* choose different formats */ - llerrs << "Framebuffer unsupported." << llendl; + LL_ERRS() << "Framebuffer unsupported." << LL_ENDL; break; default: - llerrs << "Unknown framebuffer status." << llendl; + LL_ERRS() << "Unknown framebuffer status." << LL_ENDL; break; } } @@ -10864,7 +10864,7 @@ void LLPipeline::setRenderTypeMask(U32 type, ...) if (type > END_RENDER_TYPES) { - llerrs << "Invalid render type." << llendl; + LL_ERRS() << "Invalid render type." << LL_ENDL; } } @@ -10885,7 +10885,7 @@ BOOL LLPipeline::hasAnyRenderType(U32 type, ...) const if (type > END_RENDER_TYPES) { - llerrs << "Invalid render type." << llendl; + LL_ERRS() << "Invalid render type." << LL_ENDL; } return FALSE; @@ -10902,7 +10902,7 @@ void LLPipeline::popRenderTypeMask() { if (mRenderTypeEnableStack.empty()) { - llerrs << "Depleted render type stack." << llendl; + LL_ERRS() << "Depleted render type stack." << LL_ENDL; } memcpy(mRenderTypeEnabled, mRenderTypeEnableStack.top().data(), sizeof(mRenderTypeEnabled)); @@ -10933,7 +10933,7 @@ void LLPipeline::andRenderTypeMask(U32 type, ...) if (type > END_RENDER_TYPES) { - llerrs << "Invalid render type." << llendl; + LL_ERRS() << "Invalid render type." << LL_ENDL; } for (U32 i = 0; i < LLPipeline::NUM_RENDER_TYPES; ++i) @@ -10958,7 +10958,7 @@ void LLPipeline::clearRenderTypeMask(U32 type, ...) if (type > END_RENDER_TYPES) { - llerrs << "Invalid render type." << llendl; + LL_ERRS() << "Invalid render type." << LL_ENDL; } } -- cgit v1.2.3 From 28151dd8367d558fa2622832eb3819624e19705d Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Fri, 16 Aug 2013 17:58:41 -0600 Subject: fix for SH-4297: interesting: viewer-interesting starts loading cached scene late --- indra/newview/pipeline.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 6754918149..8d70629206 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -112,6 +112,7 @@ #include "llfloaterpathfindingcharacters.h" #include "llpathfindingpathtool.h" #include "llscenemonitor.h" +#include "llprogressview.h" #ifdef _DEBUG // Debug indices is disabled for now for debug performance - djs 4/24/02 @@ -2535,7 +2536,8 @@ void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_cl LLVOCachePartition* vo_part = region->getVOCachePartition(); if(vo_part) { - vo_part->cull(camera, can_use_occlusion && use_occlusion && !gUseWireframe); + bool do_occlusion_cull = can_use_occlusion && use_occlusion && !gUseWireframe && !gViewerWindow->getProgressView()->getVisible(); + vo_part->cull(camera, do_occlusion_cull); } } -- cgit v1.2.3 From 612892b45a3413b16e40c49d3bfde77a4ca927fd Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Sun, 18 Aug 2013 22:30:27 -0700 Subject: SH-4433 WIP: Interesting: Statistics > Ping Sim is always 0 ms continued conversion to units system made units perform type promotion correctly and preserve type in arithmetic e.g. can now do LLVector3 in units added typedefs for remaining common unit types, including implicits --- indra/newview/pipeline.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 6754918149..a64747742f 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -3015,7 +3015,7 @@ void LLPipeline::updateGeom(F32 max_dtime) S32 count = 0; - max_dtime = llmax(update_timer.getElapsedTimeF32()+0.001f, LLUnitImplicit(max_dtime)); + max_dtime = llmax(update_timer.getElapsedTimeF32()+0.001f, F32SecondsImplicit(max_dtime)); LLSpatialGroup* last_group = NULL; LLSpatialBridge* last_bridge = NULL; -- cgit v1.2.3 From 4e2e3f3f959f4671b16d049a578911a06834fa84 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 29 Aug 2013 22:50:45 -0700 Subject: SH-4292 FIX: Interesting: My avatar declouds slower in Interesting viewer than in Release viewer moved occlusion culling earlier in login process --- indra/newview/pipeline.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index e77d85849d..af44acc64c 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -2539,7 +2539,7 @@ void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_cl LLVOCachePartition* vo_part = region->getVOCachePartition(); if(vo_part) { - bool do_occlusion_cull = can_use_occlusion && use_occlusion && !gUseWireframe && !gViewerWindow->getProgressView()->getVisible(); + bool do_occlusion_cull = can_use_occlusion && use_occlusion && !gUseWireframe/* && !gViewerWindow->getProgressView()->getVisible()*/; vo_part->cull(camera, do_occlusion_cull); } } -- cgit v1.2.3 From f713fe492f8b86a0743e0a553d62f06ff62500bb Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Fri, 30 Aug 2013 11:02:15 -0600 Subject: fix for SH-4295: Interesting: Teleporting to previous location leave some objects invisible. --- indra/newview/pipeline.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index e77d85849d..e71355466a 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -7314,6 +7314,7 @@ void LLPipeline::doResetVertexBuffers() } } } + LLSpatialPartition::sTeleportRequested = FALSE; resetDrawOrders(); -- cgit v1.2.3 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/pipeline.cpp | 276 ++++++++++++++++++++++----------------------- 1 file changed, 138 insertions(+), 138 deletions(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index af44acc64c..bc691d50d2 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -222,40 +222,40 @@ BOOL gDebugPipeline = FALSE; LLPipeline gPipeline; const LLMatrix4* gGLLastMatrix = NULL; -LLFastTimer::DeclareTimer FTM_RENDER_GEOMETRY("Render Geometry"); -LLFastTimer::DeclareTimer FTM_RENDER_GRASS("Grass"); -LLFastTimer::DeclareTimer FTM_RENDER_INVISIBLE("Invisible"); -LLFastTimer::DeclareTimer FTM_RENDER_OCCLUSION("Occlusion"); -LLFastTimer::DeclareTimer FTM_RENDER_SHINY("Shiny"); -LLFastTimer::DeclareTimer FTM_RENDER_SIMPLE("Simple"); -LLFastTimer::DeclareTimer FTM_RENDER_TERRAIN("Terrain"); -LLFastTimer::DeclareTimer FTM_RENDER_TREES("Trees"); -LLFastTimer::DeclareTimer FTM_RENDER_UI("UI"); -LLFastTimer::DeclareTimer FTM_RENDER_WATER("Water"); -LLFastTimer::DeclareTimer FTM_RENDER_WL_SKY("Windlight Sky"); -LLFastTimer::DeclareTimer FTM_RENDER_ALPHA("Alpha Objects"); -LLFastTimer::DeclareTimer FTM_RENDER_CHARACTERS("Avatars"); -LLFastTimer::DeclareTimer FTM_RENDER_BUMP("Bump"); -LLFastTimer::DeclareTimer FTM_RENDER_MATERIALS("Materials"); -LLFastTimer::DeclareTimer FTM_RENDER_FULLBRIGHT("Fullbright"); -LLFastTimer::DeclareTimer FTM_RENDER_GLOW("Glow"); -LLFastTimer::DeclareTimer FTM_GEO_UPDATE("Geo Update"); -LLFastTimer::DeclareTimer FTM_PIPELINE_CREATE("Pipeline Create"); -LLFastTimer::DeclareTimer FTM_POOLRENDER("RenderPool"); -LLFastTimer::DeclareTimer FTM_POOLS("Pools"); -LLFastTimer::DeclareTimer FTM_DEFERRED_POOLRENDER("RenderPool (Deferred)"); -LLFastTimer::DeclareTimer FTM_DEFERRED_POOLS("Pools (Deferred)"); -LLFastTimer::DeclareTimer FTM_POST_DEFERRED_POOLRENDER("RenderPool (Post)"); -LLFastTimer::DeclareTimer FTM_POST_DEFERRED_POOLS("Pools (Post)"); -LLFastTimer::DeclareTimer FTM_RENDER_BLOOM_FBO("First FBO"); -LLFastTimer::DeclareTimer FTM_STATESORT("Sort Draw State"); -LLFastTimer::DeclareTimer FTM_PIPELINE("Pipeline"); -LLFastTimer::DeclareTimer FTM_CLIENT_COPY("Client Copy"); -LLFastTimer::DeclareTimer FTM_RENDER_DEFERRED("Deferred Shading"); - - -static LLFastTimer::DeclareTimer FTM_STATESORT_DRAWABLE("Sort Drawables"); -static LLFastTimer::DeclareTimer FTM_STATESORT_POSTSORT("Post Sort"); +LLTrace::TimeBlock FTM_RENDER_GEOMETRY("Render Geometry"); +LLTrace::TimeBlock FTM_RENDER_GRASS("Grass"); +LLTrace::TimeBlock FTM_RENDER_INVISIBLE("Invisible"); +LLTrace::TimeBlock FTM_RENDER_OCCLUSION("Occlusion"); +LLTrace::TimeBlock FTM_RENDER_SHINY("Shiny"); +LLTrace::TimeBlock FTM_RENDER_SIMPLE("Simple"); +LLTrace::TimeBlock FTM_RENDER_TERRAIN("Terrain"); +LLTrace::TimeBlock FTM_RENDER_TREES("Trees"); +LLTrace::TimeBlock FTM_RENDER_UI("UI"); +LLTrace::TimeBlock FTM_RENDER_WATER("Water"); +LLTrace::TimeBlock FTM_RENDER_WL_SKY("Windlight Sky"); +LLTrace::TimeBlock FTM_RENDER_ALPHA("Alpha Objects"); +LLTrace::TimeBlock FTM_RENDER_CHARACTERS("Avatars"); +LLTrace::TimeBlock FTM_RENDER_BUMP("Bump"); +LLTrace::TimeBlock FTM_RENDER_MATERIALS("Materials"); +LLTrace::TimeBlock FTM_RENDER_FULLBRIGHT("Fullbright"); +LLTrace::TimeBlock FTM_RENDER_GLOW("Glow"); +LLTrace::TimeBlock FTM_GEO_UPDATE("Geo Update"); +LLTrace::TimeBlock FTM_PIPELINE_CREATE("Pipeline Create"); +LLTrace::TimeBlock FTM_POOLRENDER("RenderPool"); +LLTrace::TimeBlock FTM_POOLS("Pools"); +LLTrace::TimeBlock FTM_DEFERRED_POOLRENDER("RenderPool (Deferred)"); +LLTrace::TimeBlock FTM_DEFERRED_POOLS("Pools (Deferred)"); +LLTrace::TimeBlock FTM_POST_DEFERRED_POOLRENDER("RenderPool (Post)"); +LLTrace::TimeBlock FTM_POST_DEFERRED_POOLS("Pools (Post)"); +LLTrace::TimeBlock FTM_RENDER_BLOOM_FBO("First FBO"); +LLTrace::TimeBlock FTM_STATESORT("Sort Draw State"); +LLTrace::TimeBlock FTM_PIPELINE("Pipeline"); +LLTrace::TimeBlock FTM_CLIENT_COPY("Client Copy"); +LLTrace::TimeBlock FTM_RENDER_DEFERRED("Deferred Shading"); + + +static LLTrace::TimeBlock FTM_STATESORT_DRAWABLE("Sort Drawables"); +static LLTrace::TimeBlock FTM_STATESORT_POSTSORT("Post Sort"); //---------------------------------------- std::string gPoolNames[] = @@ -754,7 +754,7 @@ void LLPipeline::destroyGL() } } -static LLFastTimer::DeclareTimer FTM_RESIZE_SCREEN_TEXTURE("Resize Screen Texture"); +static LLTrace::TimeBlock FTM_RESIZE_SCREEN_TEXTURE("Resize Screen Texture"); //static void LLPipeline::throttleNewMemoryAllocation(BOOL disable) @@ -776,7 +776,7 @@ void LLPipeline::throttleNewMemoryAllocation(BOOL disable) void LLPipeline::resizeScreenTexture() { - LLFastTimer ft(FTM_RESIZE_SCREEN_TEXTURE); + LL_RECORD_BLOCK_TIME(FTM_RESIZE_SCREEN_TEXTURE); if (gPipeline.canUseVertexShaders() && assertInitialized()) { GLuint resX = gViewerWindow->getWorldViewWidthRaw(); @@ -1771,15 +1771,15 @@ void LLPipeline::allocDrawable(LLViewerObject *vobj) } -static LLFastTimer::DeclareTimer FTM_UNLINK("Unlink"); -static LLFastTimer::DeclareTimer FTM_REMOVE_FROM_MOVE_LIST("Movelist"); -static LLFastTimer::DeclareTimer FTM_REMOVE_FROM_SPATIAL_PARTITION("Spatial Partition"); -static LLFastTimer::DeclareTimer FTM_REMOVE_FROM_LIGHT_SET("Light Set"); -static LLFastTimer::DeclareTimer FTM_REMOVE_FROM_HIGHLIGHT_SET("Highlight Set"); +static LLTrace::TimeBlock FTM_UNLINK("Unlink"); +static LLTrace::TimeBlock FTM_REMOVE_FROM_MOVE_LIST("Movelist"); +static LLTrace::TimeBlock FTM_REMOVE_FROM_SPATIAL_PARTITION("Spatial Partition"); +static LLTrace::TimeBlock FTM_REMOVE_FROM_LIGHT_SET("Light Set"); +static LLTrace::TimeBlock FTM_REMOVE_FROM_HIGHLIGHT_SET("Highlight Set"); void LLPipeline::unlinkDrawable(LLDrawable *drawable) { - LLFastTimer t(FTM_UNLINK); + LL_RECORD_BLOCK_TIME(FTM_UNLINK); assertInitialized(); @@ -1788,7 +1788,7 @@ void LLPipeline::unlinkDrawable(LLDrawable *drawable) // Based on flags, remove the drawable from the queues that it's on. if (drawablep->isState(LLDrawable::ON_MOVE_LIST)) { - LLFastTimer t(FTM_REMOVE_FROM_MOVE_LIST); + LL_RECORD_BLOCK_TIME(FTM_REMOVE_FROM_MOVE_LIST); LLDrawable::drawable_vector_t::iterator iter = std::find(mMovedList.begin(), mMovedList.end(), drawablep); if (iter != mMovedList.end()) { @@ -1798,7 +1798,7 @@ void LLPipeline::unlinkDrawable(LLDrawable *drawable) if (drawablep->getSpatialGroup()) { - LLFastTimer t(FTM_REMOVE_FROM_SPATIAL_PARTITION); + LL_RECORD_BLOCK_TIME(FTM_REMOVE_FROM_SPATIAL_PARTITION); if (!drawablep->getSpatialGroup()->getSpatialPartition()->remove(drawablep, drawablep->getSpatialGroup())) { #ifdef LL_RELEASE_FOR_DOWNLOAD @@ -1810,7 +1810,7 @@ void LLPipeline::unlinkDrawable(LLDrawable *drawable) } { - LLFastTimer t(FTM_REMOVE_FROM_LIGHT_SET); + LL_RECORD_BLOCK_TIME(FTM_REMOVE_FROM_LIGHT_SET); mLights.erase(drawablep); for (light_set_t::iterator iter = mNearbyLights.begin(); @@ -1825,7 +1825,7 @@ void LLPipeline::unlinkDrawable(LLDrawable *drawable) } { - LLFastTimer t(FTM_REMOVE_FROM_HIGHLIGHT_SET); + LL_RECORD_BLOCK_TIME(FTM_REMOVE_FROM_HIGHLIGHT_SET); HighlightItem item(drawablep); mHighlightSet.erase(item); @@ -1854,7 +1854,7 @@ void LLPipeline::unlinkDrawable(LLDrawable *drawable) //static void LLPipeline::removeMutedAVsLights(LLVOAvatar* muted_avatar) { - LLFastTimer t(FTM_REMOVE_FROM_LIGHT_SET); + LL_RECORD_BLOCK_TIME(FTM_REMOVE_FROM_LIGHT_SET); for (light_set_t::iterator iter = gPipeline.mNearbyLights.begin(); iter != gPipeline.mNearbyLights.end(); iter++) { @@ -1882,7 +1882,7 @@ U32 LLPipeline::addObject(LLViewerObject *vobj) void LLPipeline::createObjects(F32 max_dtime) { - LLFastTimer ftm(FTM_PIPELINE_CREATE); + LL_RECORD_BLOCK_TIME(FTM_PIPELINE_CREATE); LLTimer update_timer; @@ -2051,14 +2051,14 @@ void LLPipeline::updateMovedList(LLDrawable::drawable_vector_t& moved_list) } } -static LLFastTimer::DeclareTimer FTM_OCTREE_BALANCE("Balance Octree"); -static LLFastTimer::DeclareTimer FTM_UPDATE_MOVE("Update Move"); -static LLFastTimer::DeclareTimer FTM_RETEXTURE("Retexture"); -static LLFastTimer::DeclareTimer FTM_MOVED_LIST("Moved List"); +static LLTrace::TimeBlock FTM_OCTREE_BALANCE("Balance Octree"); +static LLTrace::TimeBlock FTM_UPDATE_MOVE("Update Move"); +static LLTrace::TimeBlock FTM_RETEXTURE("Retexture"); +static LLTrace::TimeBlock FTM_MOVED_LIST("Moved List"); void LLPipeline::updateMove() { - LLFastTimer t(FTM_UPDATE_MOVE); + LL_RECORD_BLOCK_TIME(FTM_UPDATE_MOVE); if (FreezeTime) { @@ -2068,7 +2068,7 @@ void LLPipeline::updateMove() assertInitialized(); { - LLFastTimer t(FTM_RETEXTURE); + LL_RECORD_BLOCK_TIME(FTM_RETEXTURE); for (LLDrawable::drawable_set_t::iterator iter = mRetexturedList.begin(); iter != mRetexturedList.end(); ++iter) @@ -2083,13 +2083,13 @@ void LLPipeline::updateMove() } { - LLFastTimer t(FTM_MOVED_LIST); + LL_RECORD_BLOCK_TIME(FTM_MOVED_LIST); updateMovedList(mMovedList); } //balance octrees { - LLFastTimer ot(FTM_OCTREE_BALANCE); + LL_RECORD_BLOCK_TIME(FTM_OCTREE_BALANCE); for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin(); iter != LLWorld::getInstance()->getRegionList().end(); ++iter) @@ -2408,7 +2408,7 @@ BOOL LLPipeline::getVisibleExtents(LLCamera& camera, LLVector3& min, LLVector3& return res; } -static LLFastTimer::DeclareTimer FTM_CULL("Object Culling"); +static LLTrace::TimeBlock FTM_CULL("Object Culling"); void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_clip, LLPlane* planep) { @@ -2417,7 +2417,7 @@ void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_cl && LLFeatureManager::getInstance()->isFeatureAvailable("UseOcclusion") && gGLManager.mHasOcclusionQuery; - LLFastTimer t(FTM_CULL); + LL_RECORD_BLOCK_TIME(FTM_CULL); grabReferences(result); @@ -2812,14 +2812,14 @@ BOOL LLPipeline::updateDrawableGeom(LLDrawable* drawablep, BOOL priority) return update_complete; } -static LLFastTimer::DeclareTimer FTM_SEED_VBO_POOLS("Seed VBO Pool"); +static LLTrace::TimeBlock FTM_SEED_VBO_POOLS("Seed VBO Pool"); -static LLFastTimer::DeclareTimer FTM_UPDATE_GL("Update GL"); +static LLTrace::TimeBlock FTM_UPDATE_GL("Update GL"); void LLPipeline::updateGL() { { - LLFastTimer t(FTM_UPDATE_GL); + LL_RECORD_BLOCK_TIME(FTM_UPDATE_GL); while (!LLGLUpdate::sGLQ.empty()) { LLGLUpdate* glu = LLGLUpdate::sGLQ.front(); @@ -2830,12 +2830,12 @@ void LLPipeline::updateGL() } { //seed VBO Pools - LLFastTimer t(FTM_SEED_VBO_POOLS); + LL_RECORD_BLOCK_TIME(FTM_SEED_VBO_POOLS); LLVertexBuffer::seedPools(); } } -static LLFastTimer::DeclareTimer FTM_REBUILD_PRIORITY_GROUPS("Rebuild Priority Groups"); +static LLTrace::TimeBlock FTM_REBUILD_PRIORITY_GROUPS("Rebuild Priority Groups"); void LLPipeline::clearRebuildGroups() { @@ -2897,7 +2897,7 @@ void LLPipeline::clearRebuildGroups() void LLPipeline::rebuildPriorityGroups() { - LLFastTimer t(FTM_REBUILD_PRIORITY_GROUPS); + LL_RECORD_BLOCK_TIME(FTM_REBUILD_PRIORITY_GROUPS); LLTimer update_timer; assertInitialized(); @@ -2919,7 +2919,7 @@ void LLPipeline::rebuildPriorityGroups() } -static LLFastTimer::DeclareTimer FTM_REBUILD_GROUPS("Rebuild Groups"); +static LLTrace::TimeBlock FTM_REBUILD_GROUPS("Rebuild Groups"); void LLPipeline::rebuildGroups() { @@ -2928,7 +2928,7 @@ void LLPipeline::rebuildGroups() return; } - LLFastTimer t(FTM_REBUILD_GROUPS); + LL_RECORD_BLOCK_TIME(FTM_REBUILD_GROUPS); mGroupQ2Locked = true; // Iterate through some drawables on the non-priority build queue S32 size = (S32) mGroupQ2.size(); @@ -2972,7 +2972,7 @@ void LLPipeline::updateGeom(F32 max_dtime) LLTimer update_timer; LLPointer drawablep; - LLFastTimer t(FTM_GEO_UPDATE); + LL_RECORD_BLOCK_TIME(FTM_GEO_UPDATE); assertInitialized(); @@ -3165,9 +3165,9 @@ void LLPipeline::markShift(LLDrawable *drawablep) } } -static LLFastTimer::DeclareTimer FTM_SHIFT_DRAWABLE("Shift Drawable"); -static LLFastTimer::DeclareTimer FTM_SHIFT_OCTREE("Shift Octree"); -static LLFastTimer::DeclareTimer FTM_SHIFT_HUD("Shift HUD"); +static LLTrace::TimeBlock FTM_SHIFT_DRAWABLE("Shift Drawable"); +static LLTrace::TimeBlock FTM_SHIFT_OCTREE("Shift Octree"); +static LLTrace::TimeBlock FTM_SHIFT_HUD("Shift HUD"); void LLPipeline::shiftObjects(const LLVector3 &offset) { @@ -3180,7 +3180,7 @@ void LLPipeline::shiftObjects(const LLVector3 &offset) offseta.load3(offset.mV); { - LLFastTimer t(FTM_SHIFT_DRAWABLE); + LL_RECORD_BLOCK_TIME(FTM_SHIFT_DRAWABLE); for (LLDrawable::drawable_vector_t::iterator iter = mShiftList.begin(); iter != mShiftList.end(); iter++) @@ -3198,7 +3198,7 @@ void LLPipeline::shiftObjects(const LLVector3 &offset) { - LLFastTimer t(FTM_SHIFT_OCTREE); + LL_RECORD_BLOCK_TIME(FTM_SHIFT_OCTREE); for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin(); iter != LLWorld::getInstance()->getRegionList().end(); ++iter) { @@ -3215,7 +3215,7 @@ void LLPipeline::shiftObjects(const LLVector3 &offset) } { - LLFastTimer t(FTM_SHIFT_HUD); + LL_RECORD_BLOCK_TIME(FTM_SHIFT_HUD); LLHUDText::shiftAll(offset); LLHUDNameTag::shiftAll(offset); } @@ -3249,10 +3249,10 @@ void LLPipeline::markPartitionMove(LLDrawable* drawable) } } -static LLFastTimer::DeclareTimer FTM_PROCESS_PARTITIONQ("PartitionQ"); +static LLTrace::TimeBlock FTM_PROCESS_PARTITIONQ("PartitionQ"); void LLPipeline::processPartitionQ() { - LLFastTimer t(FTM_PROCESS_PARTITIONQ); + LL_RECORD_BLOCK_TIME(FTM_PROCESS_PARTITIONQ); for (LLDrawable::drawable_list_t::iterator iter = mPartitionQ.begin(); iter != mPartitionQ.end(); ++iter) { LLDrawable* drawable = *iter; @@ -3340,7 +3340,7 @@ void LLPipeline::markRebuild(LLDrawable *drawablep, LLDrawable::EDrawableFlags f } } -static LLFastTimer::DeclareTimer FTM_RESET_DRAWORDER("Reset Draw Order"); +static LLTrace::TimeBlock FTM_RESET_DRAWORDER("Reset Draw Order"); void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result) { @@ -3354,11 +3354,11 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result) LLPipeline::END_RENDER_TYPES)) { //clear faces from face pools - LLFastTimer t(FTM_RESET_DRAWORDER); + LL_RECORD_BLOCK_TIME(FTM_RESET_DRAWORDER); gPipeline.resetDrawOrders(); } - LLFastTimer ftm(FTM_STATESORT); + LL_RECORD_BLOCK_TIME(FTM_STATESORT); //LLVertexBuffer::unbind(); @@ -3442,7 +3442,7 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result) } { - LLFastTimer ftm(FTM_STATESORT_DRAWABLE); + LL_RECORD_BLOCK_TIME(FTM_STATESORT_DRAWABLE); for (LLCullResult::drawable_iterator iter = sCull->beginVisibleList(); iter != sCull->endVisibleList(); ++iter) { @@ -3772,7 +3772,7 @@ void renderSoundHighlights(LLDrawable* drawablep) void LLPipeline::postSort(LLCamera& camera) { - LLFastTimer ftm(FTM_STATESORT_POSTSORT); + LL_RECORD_BLOCK_TIME(FTM_STATESORT_POSTSORT); assertInitialized(); @@ -3998,7 +3998,7 @@ void LLPipeline::postSort(LLCamera& camera) void render_hud_elements() { - LLFastTimer t(FTM_RENDER_UI); + LL_RECORD_BLOCK_TIME(FTM_RENDER_UI); gPipeline.disableLights(); LLGLDisable fog(GL_FOG); @@ -4277,7 +4277,7 @@ U32 LLPipeline::sCurRenderPoolType = 0 ; void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate) { - LLFastTimer t(FTM_RENDER_GEOMETRY); + LL_RECORD_BLOCK_TIME(FTM_RENDER_GEOMETRY); assertInitialized(); @@ -4364,7 +4364,7 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate) } { - LLFastTimer t(FTM_POOLS); + LL_RECORD_BLOCK_TIME(FTM_POOLS); // HACK: don't calculate local lights if we're rendering the HUD! // Removing this check will cause bad flickering when there are @@ -4400,7 +4400,7 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate) pool_set_t::iterator iter2 = iter1; if (hasRenderType(poolp->getType()) && poolp->getNumPasses() > 0) { - LLFastTimer t(FTM_POOLRENDER); + LL_RECORD_BLOCK_TIME(FTM_POOLRENDER); gGLLastMatrix = NULL; gGL.loadMatrix(gGLModelView); @@ -4529,9 +4529,9 @@ void LLPipeline::renderGeomDeferred(LLCamera& camera) { LLAppViewer::instance()->pingMainloopTimeout("Pipeline:RenderGeomDeferred"); - LLFastTimer t(FTM_RENDER_GEOMETRY); + LL_RECORD_BLOCK_TIME(FTM_RENDER_GEOMETRY); - LLFastTimer t2(FTM_DEFERRED_POOLS); + LL_RECORD_BLOCK_TIME(FTM_DEFERRED_POOLS); LLGLEnable cull(GL_CULL_FACE); @@ -4573,7 +4573,7 @@ void LLPipeline::renderGeomDeferred(LLCamera& camera) pool_set_t::iterator iter2 = iter1; if (hasRenderType(poolp->getType()) && poolp->getNumDeferredPasses() > 0) { - LLFastTimer t(FTM_DEFERRED_POOLRENDER); + LL_RECORD_BLOCK_TIME(FTM_DEFERRED_POOLRENDER); gGLLastMatrix = NULL; gGL.loadMatrix(gGLModelView); @@ -4625,7 +4625,7 @@ void LLPipeline::renderGeomDeferred(LLCamera& camera) void LLPipeline::renderGeomPostDeferred(LLCamera& camera, bool do_occlusion) { - LLFastTimer t(FTM_POST_DEFERRED_POOLS); + LL_RECORD_BLOCK_TIME(FTM_POST_DEFERRED_POOLS); U32 cur_type = 0; LLGLEnable cull(GL_CULL_FACE); @@ -4659,7 +4659,7 @@ void LLPipeline::renderGeomPostDeferred(LLCamera& camera, bool do_occlusion) pool_set_t::iterator iter2 = iter1; if (hasRenderType(poolp->getType()) && poolp->getNumPostDeferredPasses() > 0) { - LLFastTimer t(FTM_POST_DEFERRED_POOLRENDER); + LL_RECORD_BLOCK_TIME(FTM_POST_DEFERRED_POOLRENDER); gGLLastMatrix = NULL; gGL.loadMatrix(gGLModelView); @@ -5565,11 +5565,11 @@ void LLPipeline::renderDebug() } } -static LLFastTimer::DeclareTimer FTM_REBUILD_POOLS("Rebuild Pools"); +static LLTrace::TimeBlock FTM_REBUILD_POOLS("Rebuild Pools"); void LLPipeline::rebuildPools() { - LLFastTimer t(FTM_REBUILD_POOLS); + LL_RECORD_BLOCK_TIME(FTM_REBUILD_POOLS); assertInitialized(); @@ -7287,7 +7287,7 @@ void LLPipeline::resetVertexBuffers() mResetVertexBuffers = true; } -static LLFastTimer::DeclareTimer FTM_RESET_VB("Reset VB"); +static LLTrace::TimeBlock FTM_RESET_VB("Reset VB"); void LLPipeline::doResetVertexBuffers() { @@ -7296,7 +7296,7 @@ void LLPipeline::doResetVertexBuffers() return; } - LLFastTimer t(FTM_RESET_VB); + LL_RECORD_BLOCK_TIME(FTM_RESET_VB); mResetVertexBuffers = false; mCubeVB = NULL; @@ -7440,7 +7440,7 @@ void LLPipeline::bindScreenToTexture() } -static LLFastTimer::DeclareTimer FTM_RENDER_BLOOM("Bloom"); +static LLTrace::TimeBlock FTM_RENDER_BLOOM("Bloom"); void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield) { @@ -7465,7 +7465,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield) LLVector2 tc2((F32) mScreen.getWidth()*2, (F32) mScreen.getHeight()*2); - LLFastTimer ftm(FTM_RENDER_BLOOM); + LL_RECORD_BLOCK_TIME(FTM_RENDER_BLOOM); gGL.color4f(1,1,1,1); LLGLDepthTest depth(GL_FALSE); LLGLDisable blend(GL_BLEND); @@ -7487,7 +7487,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield) { { - LLFastTimer ftm(FTM_RENDER_BLOOM_FBO); + LL_RECORD_BLOCK_TIME(FTM_RENDER_BLOOM_FBO); mGlow[2].bindTarget(); mGlow[2].clear(); } @@ -7555,7 +7555,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield) for (S32 i = 0; i < kernel; i++) { { - LLFastTimer ftm(FTM_RENDER_BLOOM_FBO); + LL_RECORD_BLOCK_TIME(FTM_RENDER_BLOOM_FBO); mGlow[i%2].bindTarget(); mGlow[i%2].clear(); } @@ -7597,7 +7597,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield) /*if (LLRenderTarget::sUseFBO) { - LLFastTimer ftm(FTM_RENDER_BLOOM_FBO); + LL_RECORD_BLOCK_TIME(FTM_RENDER_BLOOM_FBO); glBindFramebuffer(GL_FRAMEBUFFER, 0); }*/ @@ -8093,11 +8093,11 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield) } -static LLFastTimer::DeclareTimer FTM_BIND_DEFERRED("Bind Deferred"); +static LLTrace::TimeBlock FTM_BIND_DEFERRED("Bind Deferred"); void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, U32 noise_map) { - LLFastTimer t(FTM_BIND_DEFERRED); + LL_RECORD_BLOCK_TIME(FTM_BIND_DEFERRED); if (noise_map == 0xFFFFFFFF) { @@ -8318,16 +8318,16 @@ LLVector4 pow4fsrgb(LLVector4 v, F32 f) return v; } -static LLFastTimer::DeclareTimer FTM_GI_TRACE("Trace"); -static LLFastTimer::DeclareTimer FTM_GI_GATHER("Gather"); -static LLFastTimer::DeclareTimer FTM_SUN_SHADOW("Shadow Map"); -static LLFastTimer::DeclareTimer FTM_SOFTEN_SHADOW("Shadow Soften"); -static LLFastTimer::DeclareTimer FTM_EDGE_DETECTION("Find Edges"); -static LLFastTimer::DeclareTimer FTM_LOCAL_LIGHTS("Local Lights"); -static LLFastTimer::DeclareTimer FTM_ATMOSPHERICS("Atmospherics"); -static LLFastTimer::DeclareTimer FTM_FULLSCREEN_LIGHTS("Fullscreen Lights"); -static LLFastTimer::DeclareTimer FTM_PROJECTORS("Projectors"); -static LLFastTimer::DeclareTimer FTM_POST("Post"); +static LLTrace::TimeBlock FTM_GI_TRACE("Trace"); +static LLTrace::TimeBlock FTM_GI_GATHER("Gather"); +static LLTrace::TimeBlock FTM_SUN_SHADOW("Shadow Map"); +static LLTrace::TimeBlock FTM_SOFTEN_SHADOW("Shadow Soften"); +static LLTrace::TimeBlock FTM_EDGE_DETECTION("Find Edges"); +static LLTrace::TimeBlock FTM_LOCAL_LIGHTS("Local Lights"); +static LLTrace::TimeBlock FTM_ATMOSPHERICS("Atmospherics"); +static LLTrace::TimeBlock FTM_FULLSCREEN_LIGHTS("Fullscreen Lights"); +static LLTrace::TimeBlock FTM_PROJECTORS("Projectors"); +static LLTrace::TimeBlock FTM_POST("Post"); void LLPipeline::renderDeferredLighting() @@ -8338,7 +8338,7 @@ void LLPipeline::renderDeferredLighting() } { - LLFastTimer ftm(FTM_RENDER_DEFERRED); + LL_RECORD_BLOCK_TIME(FTM_RENDER_DEFERRED); LLViewerCamera* camera = LLViewerCamera::getInstance(); { @@ -8394,7 +8394,7 @@ void LLPipeline::renderDeferredLighting() { mDeferredLight.bindTarget(); { //paint shadow/SSAO light map (direct lighting lightmap) - LLFastTimer ftm(FTM_SUN_SHADOW); + LL_RECORD_BLOCK_TIME(FTM_SUN_SHADOW); bindDeferredShader(gDeferredSunProgram, 0); mDeferredVB->setBuffer(LLVertexBuffer::MAP_VERTEX); glClearColor(1,1,1,1); @@ -8438,7 +8438,7 @@ void LLPipeline::renderDeferredLighting() if (RenderDeferredSSAO) { //soften direct lighting lightmap - LLFastTimer ftm(FTM_SOFTEN_SHADOW); + LL_RECORD_BLOCK_TIME(FTM_SOFTEN_SHADOW); //blur lightmap mScreen.bindTarget(); glClearColor(1,1,1,1); @@ -8513,7 +8513,7 @@ void LLPipeline::renderDeferredLighting() if (RenderDeferredAtmospheric) { //apply sunlight contribution - LLFastTimer ftm(FTM_ATMOSPHERICS); + LL_RECORD_BLOCK_TIME(FTM_ATMOSPHERICS); bindDeferredShader(gDeferredSoftenProgram); { LLGLDepthTest depth(GL_FALSE); @@ -8650,7 +8650,7 @@ void LLPipeline::renderDeferredLighting() col.mV[1] = powf(col.mV[1], 2.2f); col.mV[2] = powf(col.mV[2], 2.2f);*/ - LLFastTimer ftm(FTM_LOCAL_LIGHTS); + LL_RECORD_BLOCK_TIME(FTM_LOCAL_LIGHTS); gDeferredLightProgram.uniform3fv(LLShaderMgr::LIGHT_CENTER, 1, c); gDeferredLightProgram.uniform1f(LLShaderMgr::LIGHT_SIZE, s); gDeferredLightProgram.uniform3fv(LLShaderMgr::DIFFUSE_COLOR, 1, col.mV); @@ -8691,7 +8691,7 @@ void LLPipeline::renderDeferredLighting() for (LLDrawable::drawable_list_t::iterator iter = spot_lights.begin(); iter != spot_lights.end(); ++iter) { - LLFastTimer ftm(FTM_PROJECTORS); + LL_RECORD_BLOCK_TIME(FTM_PROJECTORS); LLDrawable* drawablep = *iter; LLVOVolume* volume = drawablep->getVOVolume(); @@ -8752,7 +8752,7 @@ void LLPipeline::renderDeferredLighting() while (!fullscreen_lights.empty()) { - LLFastTimer ftm(FTM_FULLSCREEN_LIGHTS); + LL_RECORD_BLOCK_TIME(FTM_FULLSCREEN_LIGHTS); light[count] = fullscreen_lights.front(); fullscreen_lights.pop_front(); col[count] = light_colors.front(); @@ -8787,7 +8787,7 @@ void LLPipeline::renderDeferredLighting() for (LLDrawable::drawable_list_t::iterator iter = fullscreen_spot_lights.begin(); iter != fullscreen_spot_lights.end(); ++iter) { - LLFastTimer ftm(FTM_PROJECTORS); + LL_RECORD_BLOCK_TIME(FTM_PROJECTORS); LLDrawable* drawablep = *iter; LLVOVolume* volume = drawablep->getVOVolume(); @@ -9444,13 +9444,13 @@ glh::matrix4f scale_translate_to_fit(const LLVector3 min, const LLVector3 max) return ret; } -static LLFastTimer::DeclareTimer FTM_SHADOW_RENDER("Render Shadows"); -static LLFastTimer::DeclareTimer FTM_SHADOW_ALPHA("Alpha Shadow"); -static LLFastTimer::DeclareTimer FTM_SHADOW_SIMPLE("Simple Shadow"); +static LLTrace::TimeBlock FTM_SHADOW_RENDER("Render Shadows"); +static LLTrace::TimeBlock FTM_SHADOW_ALPHA("Alpha Shadow"); +static LLTrace::TimeBlock FTM_SHADOW_SIMPLE("Simple Shadow"); void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera& shadow_cam, LLCullResult &result, BOOL use_shader, BOOL use_occlusion, U32 target_width) { - LLFastTimer t(FTM_SHADOW_RENDER); + LL_RECORD_BLOCK_TIME(FTM_SHADOW_RENDER); //clip out geometry on the same side of water as the camera S32 occlude = LLPipeline::sUseOcclusion; @@ -9525,7 +9525,7 @@ void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera gGL.diffuseColor4f(1,1,1,1); gGL.setColorMask(false, false); - LLFastTimer ftm(FTM_SHADOW_SIMPLE); + LL_RECORD_BLOCK_TIME(FTM_SHADOW_SIMPLE); gGL.getTexUnit(0)->disable(); for (U32 i = 0; i < sizeof(types)/sizeof(U32); ++i) @@ -9551,7 +9551,7 @@ void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera } { - LLFastTimer ftm(FTM_SHADOW_ALPHA); + LL_RECORD_BLOCK_TIME(FTM_SHADOW_ALPHA); gDeferredShadowAlphaMaskProgram.bind(); gDeferredShadowAlphaMaskProgram.uniform1f(LLShaderMgr::DEFERRED_SHADOW_TARGET_WIDTH, (float)target_width); @@ -9604,10 +9604,10 @@ void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera LLPipeline::sShadowRender = FALSE; } -static LLFastTimer::DeclareTimer FTM_VISIBLE_CLOUD("Visible Cloud"); +static LLTrace::TimeBlock FTM_VISIBLE_CLOUD("Visible Cloud"); BOOL LLPipeline::getVisiblePointCloud(LLCamera& camera, LLVector3& min, LLVector3& max, std::vector& fp, LLVector3 light_dir) { - LLFastTimer t(FTM_VISIBLE_CLOUD); + LL_RECORD_BLOCK_TIME(FTM_VISIBLE_CLOUD); //get point cloud of intersection of frust and min, max if (getVisibleExtents(camera, min, max)) @@ -9854,7 +9854,7 @@ void LLPipeline::generateHighlight(LLCamera& camera) } -static LLFastTimer::DeclareTimer FTM_GEN_SUN_SHADOW("Gen Sun Shadow"); +static LLTrace::TimeBlock FTM_GEN_SUN_SHADOW("Gen Sun Shadow"); void LLPipeline::generateSunShadow(LLCamera& camera) { @@ -9863,7 +9863,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera) return; } - LLFastTimer t(FTM_GEN_SUN_SHADOW); + LL_RECORD_BLOCK_TIME(FTM_GEN_SUN_SHADOW); BOOL skip_avatar_update = FALSE; if (!isAgentAvatarValid() || gAgentCamera.getCameraAnimating() || gAgentCamera.getCameraMode() != CAMERA_MODE_MOUSELOOK || !LLVOAvatar::sVisibleInFirstPerson) @@ -10644,11 +10644,11 @@ void LLPipeline::renderGroups(LLRenderPass* pass, U32 type, U32 mask, BOOL textu } } -static LLFastTimer::DeclareTimer FTM_IMPOSTOR_MARK_VISIBLE("Impostor Mark Visible"); -static LLFastTimer::DeclareTimer FTM_IMPOSTOR_SETUP("Impostor Setup"); -static LLFastTimer::DeclareTimer FTM_IMPOSTOR_BACKGROUND("Impostor Background"); -static LLFastTimer::DeclareTimer FTM_IMPOSTOR_ALLOCATE("Impostor Allocate"); -static LLFastTimer::DeclareTimer FTM_IMPOSTOR_RESIZE("Impostor Resize"); +static LLTrace::TimeBlock FTM_IMPOSTOR_MARK_VISIBLE("Impostor Mark Visible"); +static LLTrace::TimeBlock FTM_IMPOSTOR_SETUP("Impostor Setup"); +static LLTrace::TimeBlock FTM_IMPOSTOR_BACKGROUND("Impostor Background"); +static LLTrace::TimeBlock FTM_IMPOSTOR_ALLOCATE("Impostor Allocate"); +static LLTrace::TimeBlock FTM_IMPOSTOR_RESIZE("Impostor Resize"); void LLPipeline::generateImpostor(LLVOAvatar* avatar) { @@ -10706,7 +10706,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar) LLViewerCamera* viewer_camera = LLViewerCamera::getInstance(); { - LLFastTimer t(FTM_IMPOSTOR_MARK_VISIBLE); + LL_RECORD_BLOCK_TIME(FTM_IMPOSTOR_MARK_VISIBLE); markVisible(avatar->mDrawable, *viewer_camera); LLVOAvatar::sUseImpostors = FALSE; @@ -10736,7 +10736,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar) U32 resX = 0; { - LLFastTimer t(FTM_IMPOSTOR_SETUP); + LL_RECORD_BLOCK_TIME(FTM_IMPOSTOR_SETUP); const LLVector4a* ext = avatar->mDrawable->getSpatialExtents(); LLVector3 pos(avatar->getRenderPosition()+avatar->getImpostorOffset()); @@ -10793,7 +10793,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar) if (!avatar->mImpostor.isComplete()) { - LLFastTimer t(FTM_IMPOSTOR_ALLOCATE); + LL_RECORD_BLOCK_TIME(FTM_IMPOSTOR_ALLOCATE); avatar->mImpostor.allocate(resX,resY,GL_RGBA,TRUE,FALSE); if (LLPipeline::sRenderDeferred) @@ -10808,7 +10808,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar) else if(resX != avatar->mImpostor.getWidth() || resY != avatar->mImpostor.getHeight()) { - LLFastTimer t(FTM_IMPOSTOR_RESIZE); + LL_RECORD_BLOCK_TIME(FTM_IMPOSTOR_RESIZE); avatar->mImpostor.resize(resX,resY,GL_RGBA); } @@ -10830,7 +10830,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar) } { //create alpha mask based on depth buffer (grey out if muted) - LLFastTimer t(FTM_IMPOSTOR_BACKGROUND); + LL_RECORD_BLOCK_TIME(FTM_IMPOSTOR_BACKGROUND); if (LLPipeline::sRenderDeferred) { GLuint buff = GL_COLOR_ATTACHMENT0; -- cgit v1.2.3 From 01098f5daba77e12fe739a3c8eaa722a95b83ea9 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Mon, 9 Sep 2013 11:29:25 -0600 Subject: eliminate some redundant geometry rebuilding operations during teleporting --- indra/newview/pipeline.cpp | 54 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 0ae9b08a4b..019b49b8fb 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -2895,6 +2895,52 @@ void LLPipeline::clearRebuildGroups() mGroupQ2Locked = false; } +void LLPipeline::clearRebuildDrawables() +{ + // Clear all drawables on the priority build queue, + for (LLDrawable::drawable_list_t::iterator iter = mBuildQ1.begin(); + iter != mBuildQ1.end(); ++iter) + { + LLDrawable* drawablep = *iter; + if (drawablep && !drawablep->isDead()) + { + drawablep->clearState(LLDrawable::IN_REBUILD_Q2); + drawablep->clearState(LLDrawable::IN_REBUILD_Q1); + } + } + mBuildQ1.clear(); + + // clear drawables on the non-priority build queue + for (LLDrawable::drawable_list_t::iterator iter = mBuildQ2.begin(); + iter != mBuildQ2.end(); ++iter) + { + LLDrawable* drawablep = *iter; + if (!drawablep->isDead()) + { + drawablep->clearState(LLDrawable::IN_REBUILD_Q2); + } + } + mBuildQ2.clear(); + + //clear all moving bridges + for (LLDrawable::drawable_vector_t::iterator iter = mMovedBridge.begin(); + iter != mMovedBridge.end(); ++iter) + { + LLDrawable *drawablep = *iter; + drawablep->clearState(LLDrawable::EARLY_MOVE | LLDrawable::MOVE_UNDAMPED | LLDrawable::ON_MOVE_LIST | LLDrawable::ANIMATED_CHILD); + } + mMovedBridge.clear(); + + //clear all moving drawables + for (LLDrawable::drawable_vector_t::iterator iter = mMovedList.begin(); + iter != mMovedList.end(); ++iter) + { + LLDrawable *drawablep = *iter; + drawablep->clearState(LLDrawable::EARLY_MOVE | LLDrawable::MOVE_UNDAMPED | LLDrawable::ON_MOVE_LIST | LLDrawable::ANIMATED_CHILD); + } + mMovedList.clear(); +} + void LLPipeline::rebuildPriorityGroups() { LLFastTimer t(FTM_REBUILD_PRIORITY_GROUPS); @@ -7314,7 +7360,13 @@ void LLPipeline::doResetVertexBuffers() } } } - LLSpatialPartition::sTeleportRequested = FALSE; + if(LLSpatialPartition::sTeleportRequested) + { + LLSpatialPartition::sTeleportRequested = FALSE; + + clearRebuildGroups(); + clearRebuildDrawables(); + } resetDrawOrders(); -- cgit v1.2.3 From 1f9e73bbdb9c20de26f42bc33ed9c19457d43df7 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Mon, 9 Sep 2013 11:30:52 -0600 Subject: rebalance the object cache octrees. --- indra/newview/pipeline.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 019b49b8fb..a12a54d022 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -2103,6 +2103,13 @@ void LLPipeline::updateMove() part->mOctree->balance(); } } + + //balance the VO Cache tree + LLVOCachePartition* vo_part = region->getVOCachePartition(); + if(vo_part) + { + vo_part->mOctree->balance(); + } } } } -- cgit v1.2.3 From 456ff3949a28542ecd89ec23b0287b55a166529f Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Wed, 25 Sep 2013 16:40:05 -0600 Subject: fix for SH-4295: Interesting: Teleporting to previous location leave some objects invisible. --- indra/newview/pipeline.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 38bef1f4f5..9d8aa849ba 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -7371,6 +7371,7 @@ void LLPipeline::doResetVertexBuffers() { LLSpatialPartition::sTeleportRequested = FALSE; + LLWorld::getInstance()->clearAllVisibleObjects(); clearRebuildGroups(); clearRebuildDrawables(); } -- cgit v1.2.3 From 9bae912308a75cc1ceaec49d28b50f7119ec02ba Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 1 Oct 2013 17:18:35 -0700 Subject: BUILDFIX: old style fast timer use, broken unit test --- indra/newview/pipeline.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 1804f6eb64..52e9585029 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -9046,7 +9046,7 @@ void LLPipeline::renderDeferredLightingToRT(LLRenderTarget* target) } { - LLFastTimer ftm(FTM_RENDER_DEFERRED); + LL_RECORD_BLOCK_TIME(FTM_RENDER_DEFERRED); LLViewerCamera* camera = LLViewerCamera::getInstance(); @@ -9103,7 +9103,7 @@ void LLPipeline::renderDeferredLightingToRT(LLRenderTarget* target) { mDeferredLight.bindTarget(); { //paint shadow/SSAO light map (direct lighting lightmap) - LLFastTimer ftm(FTM_SUN_SHADOW); + LL_RECORD_BLOCK_TIME(FTM_SUN_SHADOW); bindDeferredShader(gDeferredSunProgram); mDeferredVB->setBuffer(LLVertexBuffer::MAP_VERTEX); glClearColor(1,1,1,1); @@ -9161,7 +9161,7 @@ void LLPipeline::renderDeferredLightingToRT(LLRenderTarget* target) if (RenderDeferredAtmospheric) { //apply sunlight contribution - LLFastTimer ftm(FTM_ATMOSPHERICS); + LL_RECORD_BLOCK_TIME(FTM_ATMOSPHERICS); bindDeferredShader(gDeferredSoftenProgram); { LLGLDepthTest depth(GL_FALSE); @@ -9298,7 +9298,7 @@ void LLPipeline::renderDeferredLightingToRT(LLRenderTarget* target) col.mV[1] = powf(col.mV[1], 2.2f); col.mV[2] = powf(col.mV[2], 2.2f);*/ - LLFastTimer ftm(FTM_LOCAL_LIGHTS); + LL_RECORD_BLOCK_TIME(FTM_LOCAL_LIGHTS); gDeferredLightProgram.uniform3fv(LLShaderMgr::LIGHT_CENTER, 1, c); gDeferredLightProgram.uniform1f(LLShaderMgr::LIGHT_SIZE, s); gDeferredLightProgram.uniform3fv(LLShaderMgr::DIFFUSE_COLOR, 1, col.mV); @@ -9339,7 +9339,7 @@ void LLPipeline::renderDeferredLightingToRT(LLRenderTarget* target) for (LLDrawable::drawable_list_t::iterator iter = spot_lights.begin(); iter != spot_lights.end(); ++iter) { - LLFastTimer ftm(FTM_PROJECTORS); + LL_RECORD_BLOCK_TIME(FTM_PROJECTORS); LLDrawable* drawablep = *iter; LLVOVolume* volume = drawablep->getVOVolume(); @@ -9396,7 +9396,7 @@ void LLPipeline::renderDeferredLightingToRT(LLRenderTarget* target) while (!fullscreen_lights.empty()) { - LLFastTimer ftm(FTM_FULLSCREEN_LIGHTS); + LL_RECORD_BLOCK_TIME(FTM_FULLSCREEN_LIGHTS); light[count] = fullscreen_lights.front(); fullscreen_lights.pop_front(); col[count] = light_colors.front(); @@ -9434,7 +9434,7 @@ void LLPipeline::renderDeferredLightingToRT(LLRenderTarget* target) for (LLDrawable::drawable_list_t::iterator iter = fullscreen_spot_lights.begin(); iter != fullscreen_spot_lights.end(); ++iter) { - LLFastTimer ftm(FTM_PROJECTORS); + LL_RECORD_BLOCK_TIME(FTM_PROJECTORS); LLDrawable* drawablep = *iter; LLVOVolume* volume = drawablep->getVOVolume(); -- 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/pipeline.cpp | 156 ++++++++++++++++++++++----------------------- 1 file changed, 78 insertions(+), 78 deletions(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index aba26bf586..5983fee222 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -228,40 +228,40 @@ BOOL gDebugPipeline = FALSE; LLPipeline gPipeline; const LLMatrix4* gGLLastMatrix = NULL; -LLTrace::TimeBlock FTM_RENDER_GEOMETRY("Render Geometry"); -LLTrace::TimeBlock FTM_RENDER_GRASS("Grass"); -LLTrace::TimeBlock FTM_RENDER_INVISIBLE("Invisible"); -LLTrace::TimeBlock FTM_RENDER_OCCLUSION("Occlusion"); -LLTrace::TimeBlock FTM_RENDER_SHINY("Shiny"); -LLTrace::TimeBlock FTM_RENDER_SIMPLE("Simple"); -LLTrace::TimeBlock FTM_RENDER_TERRAIN("Terrain"); -LLTrace::TimeBlock FTM_RENDER_TREES("Trees"); -LLTrace::TimeBlock FTM_RENDER_UI("UI"); -LLTrace::TimeBlock FTM_RENDER_WATER("Water"); -LLTrace::TimeBlock FTM_RENDER_WL_SKY("Windlight Sky"); -LLTrace::TimeBlock FTM_RENDER_ALPHA("Alpha Objects"); -LLTrace::TimeBlock FTM_RENDER_CHARACTERS("Avatars"); -LLTrace::TimeBlock FTM_RENDER_BUMP("Bump"); -LLTrace::TimeBlock FTM_RENDER_MATERIALS("Materials"); -LLTrace::TimeBlock FTM_RENDER_FULLBRIGHT("Fullbright"); -LLTrace::TimeBlock FTM_RENDER_GLOW("Glow"); -LLTrace::TimeBlock FTM_GEO_UPDATE("Geo Update"); -LLTrace::TimeBlock FTM_PIPELINE_CREATE("Pipeline Create"); -LLTrace::TimeBlock FTM_POOLRENDER("RenderPool"); -LLTrace::TimeBlock FTM_POOLS("Pools"); -LLTrace::TimeBlock FTM_DEFERRED_POOLRENDER("RenderPool (Deferred)"); -LLTrace::TimeBlock FTM_DEFERRED_POOLS("Pools (Deferred)"); -LLTrace::TimeBlock FTM_POST_DEFERRED_POOLRENDER("RenderPool (Post)"); -LLTrace::TimeBlock FTM_POST_DEFERRED_POOLS("Pools (Post)"); -LLTrace::TimeBlock FTM_RENDER_BLOOM_FBO("First FBO"); -LLTrace::TimeBlock FTM_STATESORT("Sort Draw State"); -LLTrace::TimeBlock FTM_PIPELINE("Pipeline"); -LLTrace::TimeBlock FTM_CLIENT_COPY("Client Copy"); -LLTrace::TimeBlock FTM_RENDER_DEFERRED("Deferred Shading"); - - -static LLTrace::TimeBlock FTM_STATESORT_DRAWABLE("Sort Drawables"); -static LLTrace::TimeBlock FTM_STATESORT_POSTSORT("Post Sort"); +LLTrace::BlockTimerStatHandle FTM_RENDER_GEOMETRY("Render Geometry"); +LLTrace::BlockTimerStatHandle FTM_RENDER_GRASS("Grass"); +LLTrace::BlockTimerStatHandle FTM_RENDER_INVISIBLE("Invisible"); +LLTrace::BlockTimerStatHandle FTM_RENDER_OCCLUSION("Occlusion"); +LLTrace::BlockTimerStatHandle FTM_RENDER_SHINY("Shiny"); +LLTrace::BlockTimerStatHandle FTM_RENDER_SIMPLE("Simple"); +LLTrace::BlockTimerStatHandle FTM_RENDER_TERRAIN("Terrain"); +LLTrace::BlockTimerStatHandle FTM_RENDER_TREES("Trees"); +LLTrace::BlockTimerStatHandle FTM_RENDER_UI("UI"); +LLTrace::BlockTimerStatHandle FTM_RENDER_WATER("Water"); +LLTrace::BlockTimerStatHandle FTM_RENDER_WL_SKY("Windlight Sky"); +LLTrace::BlockTimerStatHandle FTM_RENDER_ALPHA("Alpha Objects"); +LLTrace::BlockTimerStatHandle FTM_RENDER_CHARACTERS("Avatars"); +LLTrace::BlockTimerStatHandle FTM_RENDER_BUMP("Bump"); +LLTrace::BlockTimerStatHandle FTM_RENDER_MATERIALS("Materials"); +LLTrace::BlockTimerStatHandle FTM_RENDER_FULLBRIGHT("Fullbright"); +LLTrace::BlockTimerStatHandle FTM_RENDER_GLOW("Glow"); +LLTrace::BlockTimerStatHandle FTM_GEO_UPDATE("Geo Update"); +LLTrace::BlockTimerStatHandle FTM_PIPELINE_CREATE("Pipeline Create"); +LLTrace::BlockTimerStatHandle FTM_POOLRENDER("RenderPool"); +LLTrace::BlockTimerStatHandle FTM_POOLS("Pools"); +LLTrace::BlockTimerStatHandle FTM_DEFERRED_POOLRENDER("RenderPool (Deferred)"); +LLTrace::BlockTimerStatHandle FTM_DEFERRED_POOLS("Pools (Deferred)"); +LLTrace::BlockTimerStatHandle FTM_POST_DEFERRED_POOLRENDER("RenderPool (Post)"); +LLTrace::BlockTimerStatHandle FTM_POST_DEFERRED_POOLS("Pools (Post)"); +LLTrace::BlockTimerStatHandle FTM_RENDER_BLOOM_FBO("First FBO"); +LLTrace::BlockTimerStatHandle FTM_STATESORT("Sort Draw State"); +LLTrace::BlockTimerStatHandle FTM_PIPELINE("Pipeline"); +LLTrace::BlockTimerStatHandle FTM_CLIENT_COPY("Client Copy"); +LLTrace::BlockTimerStatHandle FTM_RENDER_DEFERRED("Deferred Shading"); + + +static LLTrace::BlockTimerStatHandle FTM_STATESORT_DRAWABLE("Sort Drawables"); +static LLTrace::BlockTimerStatHandle FTM_STATESORT_POSTSORT("Post Sort"); static LLStaticHashedString sTint("tint"); static LLStaticHashedString sAmbiance("ambiance"); @@ -772,7 +772,7 @@ void LLPipeline::destroyGL() } } -static LLTrace::TimeBlock FTM_RESIZE_SCREEN_TEXTURE("Resize Screen Texture"); +static LLTrace::BlockTimerStatHandle FTM_RESIZE_SCREEN_TEXTURE("Resize Screen Texture"); //static void LLPipeline::throttleNewMemoryAllocation(BOOL disable) @@ -1821,11 +1821,11 @@ void LLPipeline::allocDrawable(LLViewerObject *vobj) } -static LLTrace::TimeBlock FTM_UNLINK("Unlink"); -static LLTrace::TimeBlock FTM_REMOVE_FROM_MOVE_LIST("Movelist"); -static LLTrace::TimeBlock FTM_REMOVE_FROM_SPATIAL_PARTITION("Spatial Partition"); -static LLTrace::TimeBlock FTM_REMOVE_FROM_LIGHT_SET("Light Set"); -static LLTrace::TimeBlock FTM_REMOVE_FROM_HIGHLIGHT_SET("Highlight Set"); +static LLTrace::BlockTimerStatHandle FTM_UNLINK("Unlink"); +static LLTrace::BlockTimerStatHandle FTM_REMOVE_FROM_MOVE_LIST("Movelist"); +static LLTrace::BlockTimerStatHandle FTM_REMOVE_FROM_SPATIAL_PARTITION("Spatial Partition"); +static LLTrace::BlockTimerStatHandle FTM_REMOVE_FROM_LIGHT_SET("Light Set"); +static LLTrace::BlockTimerStatHandle FTM_REMOVE_FROM_HIGHLIGHT_SET("Highlight Set"); void LLPipeline::unlinkDrawable(LLDrawable *drawable) { @@ -2101,10 +2101,10 @@ void LLPipeline::updateMovedList(LLDrawable::drawable_vector_t& moved_list) } } -static LLTrace::TimeBlock FTM_OCTREE_BALANCE("Balance Octree"); -static LLTrace::TimeBlock FTM_UPDATE_MOVE("Update Move"); -static LLTrace::TimeBlock FTM_RETEXTURE("Retexture"); -static LLTrace::TimeBlock FTM_MOVED_LIST("Moved List"); +static LLTrace::BlockTimerStatHandle FTM_OCTREE_BALANCE("Balance Octree"); +static LLTrace::BlockTimerStatHandle FTM_UPDATE_MOVE("Update Move"); +static LLTrace::BlockTimerStatHandle FTM_RETEXTURE("Retexture"); +static LLTrace::BlockTimerStatHandle FTM_MOVED_LIST("Moved List"); void LLPipeline::updateMove() { @@ -2465,7 +2465,7 @@ BOOL LLPipeline::getVisibleExtents(LLCamera& camera, LLVector3& min, LLVector3& return res; } -static LLTrace::TimeBlock FTM_CULL("Object Culling"); +static LLTrace::BlockTimerStatHandle FTM_CULL("Object Culling"); void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_clip, LLPlane* planep) { @@ -2869,9 +2869,9 @@ BOOL LLPipeline::updateDrawableGeom(LLDrawable* drawablep, BOOL priority) return update_complete; } -static LLTrace::TimeBlock FTM_SEED_VBO_POOLS("Seed VBO Pool"); +static LLTrace::BlockTimerStatHandle FTM_SEED_VBO_POOLS("Seed VBO Pool"); -static LLTrace::TimeBlock FTM_UPDATE_GL("Update GL"); +static LLTrace::BlockTimerStatHandle FTM_UPDATE_GL("Update GL"); void LLPipeline::updateGL() { @@ -2892,7 +2892,7 @@ void LLPipeline::updateGL() } } -static LLTrace::TimeBlock FTM_REBUILD_PRIORITY_GROUPS("Rebuild Priority Groups"); +static LLTrace::BlockTimerStatHandle FTM_REBUILD_PRIORITY_GROUPS("Rebuild Priority Groups"); void LLPipeline::clearRebuildGroups() { @@ -3022,7 +3022,7 @@ void LLPipeline::rebuildPriorityGroups() } -static LLTrace::TimeBlock FTM_REBUILD_GROUPS("Rebuild Groups"); +static LLTrace::BlockTimerStatHandle FTM_REBUILD_GROUPS("Rebuild Groups"); void LLPipeline::rebuildGroups() { @@ -3268,9 +3268,9 @@ void LLPipeline::markShift(LLDrawable *drawablep) } } -static LLTrace::TimeBlock FTM_SHIFT_DRAWABLE("Shift Drawable"); -static LLTrace::TimeBlock FTM_SHIFT_OCTREE("Shift Octree"); -static LLTrace::TimeBlock FTM_SHIFT_HUD("Shift HUD"); +static LLTrace::BlockTimerStatHandle FTM_SHIFT_DRAWABLE("Shift Drawable"); +static LLTrace::BlockTimerStatHandle FTM_SHIFT_OCTREE("Shift Octree"); +static LLTrace::BlockTimerStatHandle FTM_SHIFT_HUD("Shift HUD"); void LLPipeline::shiftObjects(const LLVector3 &offset) { @@ -3352,7 +3352,7 @@ void LLPipeline::markPartitionMove(LLDrawable* drawable) } } -static LLTrace::TimeBlock FTM_PROCESS_PARTITIONQ("PartitionQ"); +static LLTrace::BlockTimerStatHandle FTM_PROCESS_PARTITIONQ("PartitionQ"); void LLPipeline::processPartitionQ() { LL_RECORD_BLOCK_TIME(FTM_PROCESS_PARTITIONQ); @@ -3443,7 +3443,7 @@ void LLPipeline::markRebuild(LLDrawable *drawablep, LLDrawable::EDrawableFlags f } } -static LLTrace::TimeBlock FTM_RESET_DRAWORDER("Reset Draw Order"); +static LLTrace::BlockTimerStatHandle FTM_RESET_DRAWORDER("Reset Draw Order"); void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result) { @@ -5668,7 +5668,7 @@ void LLPipeline::renderDebug() } } -static LLTrace::TimeBlock FTM_REBUILD_POOLS("Rebuild Pools"); +static LLTrace::BlockTimerStatHandle FTM_REBUILD_POOLS("Rebuild Pools"); void LLPipeline::rebuildPools() { @@ -7383,7 +7383,7 @@ void LLPipeline::resetVertexBuffers() mResetVertexBuffers = true; } -static LLTrace::TimeBlock FTM_RESET_VB("Reset VB"); +static LLTrace::BlockTimerStatHandle FTM_RESET_VB("Reset VB"); void LLPipeline::doResetVertexBuffers() { @@ -7544,7 +7544,7 @@ void LLPipeline::bindScreenToTexture() } -static LLTrace::TimeBlock FTM_RENDER_BLOOM("Bloom"); +static LLTrace::BlockTimerStatHandle FTM_RENDER_BLOOM("Bloom"); void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield) { @@ -8201,7 +8201,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield) } -static LLTrace::TimeBlock FTM_BIND_DEFERRED("Bind Deferred"); +static LLTrace::BlockTimerStatHandle FTM_BIND_DEFERRED("Bind Deferred"); void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, U32 noise_map) { @@ -8426,16 +8426,16 @@ LLVector4 pow4fsrgb(LLVector4 v, F32 f) return v; } -static LLTrace::TimeBlock FTM_GI_TRACE("Trace"); -static LLTrace::TimeBlock FTM_GI_GATHER("Gather"); -static LLTrace::TimeBlock FTM_SUN_SHADOW("Shadow Map"); -static LLTrace::TimeBlock FTM_SOFTEN_SHADOW("Shadow Soften"); -static LLTrace::TimeBlock FTM_EDGE_DETECTION("Find Edges"); -static LLTrace::TimeBlock FTM_LOCAL_LIGHTS("Local Lights"); -static LLTrace::TimeBlock FTM_ATMOSPHERICS("Atmospherics"); -static LLTrace::TimeBlock FTM_FULLSCREEN_LIGHTS("Fullscreen Lights"); -static LLTrace::TimeBlock FTM_PROJECTORS("Projectors"); -static LLTrace::TimeBlock FTM_POST("Post"); +static LLTrace::BlockTimerStatHandle FTM_GI_TRACE("Trace"); +static LLTrace::BlockTimerStatHandle FTM_GI_GATHER("Gather"); +static LLTrace::BlockTimerStatHandle FTM_SUN_SHADOW("Shadow Map"); +static LLTrace::BlockTimerStatHandle FTM_SOFTEN_SHADOW("Shadow Soften"); +static LLTrace::BlockTimerStatHandle FTM_EDGE_DETECTION("Find Edges"); +static LLTrace::BlockTimerStatHandle FTM_LOCAL_LIGHTS("Local Lights"); +static LLTrace::BlockTimerStatHandle FTM_ATMOSPHERICS("Atmospherics"); +static LLTrace::BlockTimerStatHandle FTM_FULLSCREEN_LIGHTS("Fullscreen Lights"); +static LLTrace::BlockTimerStatHandle FTM_PROJECTORS("Projectors"); +static LLTrace::BlockTimerStatHandle FTM_POST("Post"); void LLPipeline::renderDeferredLighting() @@ -10143,9 +10143,9 @@ glh::matrix4f scale_translate_to_fit(const LLVector3 min, const LLVector3 max) return ret; } -static LLTrace::TimeBlock FTM_SHADOW_RENDER("Render Shadows"); -static LLTrace::TimeBlock FTM_SHADOW_ALPHA("Alpha Shadow"); -static LLTrace::TimeBlock FTM_SHADOW_SIMPLE("Simple Shadow"); +static LLTrace::BlockTimerStatHandle FTM_SHADOW_RENDER("Render Shadows"); +static LLTrace::BlockTimerStatHandle FTM_SHADOW_ALPHA("Alpha Shadow"); +static LLTrace::BlockTimerStatHandle FTM_SHADOW_SIMPLE("Simple Shadow"); void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera& shadow_cam, LLCullResult &result, BOOL use_shader, BOOL use_occlusion, U32 target_width) { @@ -10303,7 +10303,7 @@ void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera LLPipeline::sShadowRender = FALSE; } -static LLTrace::TimeBlock FTM_VISIBLE_CLOUD("Visible Cloud"); +static LLTrace::BlockTimerStatHandle FTM_VISIBLE_CLOUD("Visible Cloud"); BOOL LLPipeline::getVisiblePointCloud(LLCamera& camera, LLVector3& min, LLVector3& max, std::vector& fp, LLVector3 light_dir) { LL_RECORD_BLOCK_TIME(FTM_VISIBLE_CLOUD); @@ -10553,7 +10553,7 @@ void LLPipeline::generateHighlight(LLCamera& camera) } -static LLTrace::TimeBlock FTM_GEN_SUN_SHADOW("Gen Sun Shadow"); +static LLTrace::BlockTimerStatHandle FTM_GEN_SUN_SHADOW("Gen Sun Shadow"); void LLPipeline::generateSunShadow(LLCamera& camera) { @@ -11343,11 +11343,11 @@ void LLPipeline::renderGroups(LLRenderPass* pass, U32 type, U32 mask, BOOL textu } } -static LLTrace::TimeBlock FTM_IMPOSTOR_MARK_VISIBLE("Impostor Mark Visible"); -static LLTrace::TimeBlock FTM_IMPOSTOR_SETUP("Impostor Setup"); -static LLTrace::TimeBlock FTM_IMPOSTOR_BACKGROUND("Impostor Background"); -static LLTrace::TimeBlock FTM_IMPOSTOR_ALLOCATE("Impostor Allocate"); -static LLTrace::TimeBlock FTM_IMPOSTOR_RESIZE("Impostor Resize"); +static LLTrace::BlockTimerStatHandle FTM_IMPOSTOR_MARK_VISIBLE("Impostor Mark Visible"); +static LLTrace::BlockTimerStatHandle FTM_IMPOSTOR_SETUP("Impostor Setup"); +static LLTrace::BlockTimerStatHandle FTM_IMPOSTOR_BACKGROUND("Impostor Background"); +static LLTrace::BlockTimerStatHandle FTM_IMPOSTOR_ALLOCATE("Impostor Allocate"); +static LLTrace::BlockTimerStatHandle FTM_IMPOSTOR_RESIZE("Impostor Resize"); void LLPipeline::generateImpostor(LLVOAvatar* avatar) { -- cgit v1.2.3 From 806cd01a0da1c67aaccd0bdcb40c104d48ed9d25 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Wed, 23 Oct 2013 15:45:15 -0600 Subject: fix for SH-4551: Interesting: some attachments do not appear after teleport --- indra/newview/pipeline.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index efc3663ff3..2cf59d212b 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -7415,7 +7415,6 @@ void LLPipeline::doResetVertexBuffers() LLSpatialPartition::sTeleportRequested = FALSE; LLWorld::getInstance()->clearAllVisibleObjects(); - clearRebuildGroups(); clearRebuildDrawables(); } -- cgit v1.2.3 From ccb921b287b14129918c07072f57078c69ca7e65 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Thu, 31 Oct 2013 15:10:10 -0600 Subject: more fix for performance regression. --- indra/newview/pipeline.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 2cf59d212b..c5148690a5 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -2155,11 +2155,11 @@ void LLPipeline::updateMove() } //balance the VO Cache tree - LLVOCachePartition* vo_part = region->getVOCachePartition(); + /*LLVOCachePartition* vo_part = region->getVOCachePartition(); if(vo_part) { vo_part->mOctree->balance(); - } + }*/ } } } -- cgit v1.2.3 From 391ac367d6922f30bf3a186bc15e1fc38366eecf Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 19 Nov 2013 17:40:44 -0800 Subject: SH-4634 FIX Interesting: Viewer crashes when receiving teleport offer renamed fast timers to have unique names, changes instance tracker to never allow duplicates --- indra/newview/pipeline.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index c5148690a5..c2c981893a 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -242,7 +242,7 @@ LLTrace::BlockTimerStatHandle FTM_RENDER_WL_SKY("Windlight Sky"); LLTrace::BlockTimerStatHandle FTM_RENDER_ALPHA("Alpha Objects"); LLTrace::BlockTimerStatHandle FTM_RENDER_CHARACTERS("Avatars"); LLTrace::BlockTimerStatHandle FTM_RENDER_BUMP("Bump"); -LLTrace::BlockTimerStatHandle FTM_RENDER_MATERIALS("Materials"); +LLTrace::BlockTimerStatHandle FTM_RENDER_MATERIALS("Render Materials"); LLTrace::BlockTimerStatHandle FTM_RENDER_FULLBRIGHT("Fullbright"); LLTrace::BlockTimerStatHandle FTM_RENDER_GLOW("Glow"); LLTrace::BlockTimerStatHandle FTM_GEO_UPDATE("Geo Update"); -- cgit v1.2.3 From 0954d4f5d563740d0425fb9e8d118a95a34bd283 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Fri, 22 Nov 2013 15:46:50 -0700 Subject: fix for SH-4632: Water over land doesn't render when teleporting to the same place twice with location toolbar --- indra/newview/pipeline.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index c2c981893a..c4fa80f0a2 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -7385,12 +7385,26 @@ void LLPipeline::resetVertexBuffers() static LLTrace::BlockTimerStatHandle FTM_RESET_VB("Reset VB"); -void LLPipeline::doResetVertexBuffers() +void LLPipeline::doResetVertexBuffers(bool forced) { if (!mResetVertexBuffers) { return; } + if(!forced && LLSpatialPartition::sTeleportRequested) + { + if(gAgent.getTeleportState() != LLAgent::TELEPORT_NONE) + { + return; //wait for teleporting to finish + } + else + { + //teleporting aborted + LLSpatialPartition::sTeleportRequested = FALSE; + mResetVertexBuffers = false; + return; + } + } LL_RECORD_BLOCK_TIME(FTM_RESET_VB); mResetVertexBuffers = false; -- cgit v1.2.3 From 87f852ee67c75ac415ce716157bdd9ba94c60441 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Thu, 9 Jan 2014 21:17:49 -0700 Subject: fix for SH-4659:crash at LLOcclusionCullingGroup::doOcclusion line 1150 --- indra/newview/pipeline.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index c4fa80f0a2..da1048ac78 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -2786,7 +2786,8 @@ void LLPipeline::doOcclusion(LLCamera& camera, LLRenderTarget& source, LLRenderT void LLPipeline::doOcclusion(LLCamera& camera) { - if (LLPipeline::sUseOcclusion > 1 && (sCull->hasOcclusionGroups() || LLVOCachePartition::sNeedsOcclusionCheck)) + if (LLPipeline::sUseOcclusion > 1 && !LLSpatialPartition::sTeleportRequested && + (sCull->hasOcclusionGroups() || LLVOCachePartition::sNeedsOcclusionCheck)) { LLVertexBuffer::unbind(); -- cgit v1.2.3