summaryrefslogtreecommitdiff
path: root/indra/newview/llvocache.cpp
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2013-10-04 17:54:24 -0600
committerXiaohong Bao <bao@lindenlab.com>2013-10-04 17:54:24 -0600
commitc430673b95823f688c45d0fbda4198595bb41073 (patch)
tree374e79414c777c3644d467a5122addc92e97d8d9 /indra/newview/llvocache.cpp
parent60e0b44f6b5add1274d1bed7b6a672dc0e051a21 (diff)
more fix for SH-4521: Interesting viewer crash in Pipeline:RenderDrawPools
Diffstat (limited to 'indra/newview/llvocache.cpp')
-rwxr-xr-xindra/newview/llvocache.cpp20
1 files changed, 16 insertions, 4 deletions
diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp
index 71d5a92df3..b8a6141e2c 100755
--- a/indra/newview/llvocache.cpp
+++ b/indra/newview/llvocache.cpp
@@ -481,9 +481,13 @@ void LLVOCacheEntry::updateParentBoundingInfo(const LLVOCacheEntry* child)
//-------------------------------------------------------------------
LLVOCacheGroup::~LLVOCacheGroup()
{
- if(mOcclusionState[0] & ACTIVE_OCCLUSION)
+ for(S32 i = 0; i < LLViewerCamera::NUM_CAMERAS; i++)
{
- ((LLVOCachePartition*)mSpatialPartition)->removeOccluder(this);
+ if(mOcclusionState[i] & ACTIVE_OCCLUSION)
+ {
+ ((LLVOCachePartition*)mSpatialPartition)->removeOccluder(this);
+ break;
+ }
}
}
@@ -726,6 +730,10 @@ S32 LLVOCachePartition::cull(LLCamera &camera, bool do_occlusion)
{
return 0;
}
+ if(mRegionp->isPaused())
+ {
+ return 0;
+ }
((LLviewerOctreeGroup*)mOctree->getListener(0))->rebound();
@@ -791,7 +799,7 @@ void LLVOCachePartition::addOccluders(LLviewerOctreeGroup* gp)
if(!group->isOcclusionState(LLOcclusionCullingGroup::ACTIVE_OCCLUSION))
{
- group->setOcclusionState(LLOcclusionCullingGroup::ACTIVE_OCCLUSION, LLOcclusionCullingGroup::STATE_MODE_ALL_CAMERAS);
+ group->setOcclusionState(LLOcclusionCullingGroup::ACTIVE_OCCLUSION);
mOccludedGroups.insert(group);
}
}
@@ -808,7 +816,11 @@ void LLVOCachePartition::processOccluders(LLCamera* camera)
for(std::set<LLVOCacheGroup*>::iterator iter = mOccludedGroups.begin(); iter != mOccludedGroups.end(); ++iter)
{
LLVOCacheGroup* group = *iter;
- group->doOcclusion(camera, &shift);
+ if(group->isOcclusionState(LLOcclusionCullingGroup::ACTIVE_OCCLUSION))
+ {
+ group->doOcclusion(camera, &shift);
+ group->clearOcclusionState(LLOcclusionCullingGroup::ACTIVE_OCCLUSION);
+ }
}
}