diff options
Diffstat (limited to 'indra/newview/llspatialpartition.cpp')
-rw-r--r-- | indra/newview/llspatialpartition.cpp | 43 |
1 files changed, 13 insertions, 30 deletions
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index fb984a7c62..317b597a11 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -1508,7 +1508,6 @@ void LLSpatialGroup::checkOcclusion() { if (LLPipeline::sUseOcclusion > 1) { - LLFastTimer t(FTM_OCCLUSION_READBACK); LLSpatialGroup* parent = getParent(); if (parent && parent->isOcclusionState(LLSpatialGroup::OCCLUDED)) { //if the parent has been marked as occluded, the child is implicitly occluded @@ -1516,6 +1515,7 @@ void LLSpatialGroup::checkOcclusion() } else if (isOcclusionState(QUERY_PENDING)) { //otherwise, if a query is pending, read it back + LLFastTimer t(FTM_OCCLUSION_READBACK); GLuint res = 1; if (!isOcclusionState(DISCARD_QUERY) && mOcclusionQuery[LLViewerCamera::sCurCameraID]) { @@ -1919,8 +1919,11 @@ public: return; } - if ((mRes && group->isState(LLSpatialGroup::SKIP_FRUSTUM_CHECK)) || - mRes == 2) + if (mRes == 2) + { + //fully in, don't traverse further (won't effect extents + } + else if (mRes && group->isState(LLSpatialGroup::SKIP_FRUSTUM_CHECK)) { //don't need to do frustum check LLSpatialGroup::OctreeTraveler::traverse(n); } @@ -3415,23 +3418,11 @@ LLCullResult::LLCullResult() void LLCullResult::clear() { mVisibleGroupsSize = 0; - mVisibleGroupsEnd = mVisibleGroups.begin(); - mAlphaGroupsSize = 0; - mAlphaGroupsEnd = mAlphaGroups.begin(); - mOcclusionGroupsSize = 0; - mOcclusionGroupsEnd = mOcclusionGroups.begin(); - mDrawableGroupsSize = 0; - mDrawableGroupsEnd = mDrawableGroups.begin(); - mVisibleListSize = 0; - mVisibleListEnd = mVisibleList.begin(); - mVisibleBridgeSize = 0; - mVisibleBridgeEnd = mVisibleBridge.begin(); - for (U32 i = 0; i < LLRenderPass::NUM_RENDER_TYPES; i++) { @@ -3440,7 +3431,6 @@ void LLCullResult::clear() mRenderMap[i][j] = 0; } mRenderMapSize[i] = 0; - mRenderMapEnd[i] = mRenderMap[i].begin(); } } @@ -3451,7 +3441,7 @@ LLCullResult::sg_list_t::iterator LLCullResult::beginVisibleGroups() LLCullResult::sg_list_t::iterator LLCullResult::endVisibleGroups() { - return mVisibleGroupsEnd; + return mVisibleGroups.begin() + mVisibleGroupsSize; } LLCullResult::sg_list_t::iterator LLCullResult::beginAlphaGroups() @@ -3461,7 +3451,7 @@ LLCullResult::sg_list_t::iterator LLCullResult::beginAlphaGroups() LLCullResult::sg_list_t::iterator LLCullResult::endAlphaGroups() { - return mAlphaGroupsEnd; + return mAlphaGroups.begin() + mAlphaGroupsSize; } LLCullResult::sg_list_t::iterator LLCullResult::beginOcclusionGroups() @@ -3471,7 +3461,7 @@ LLCullResult::sg_list_t::iterator LLCullResult::beginOcclusionGroups() LLCullResult::sg_list_t::iterator LLCullResult::endOcclusionGroups() { - return mOcclusionGroupsEnd; + return mOcclusionGroups.begin() + mOcclusionGroupsSize; } LLCullResult::sg_list_t::iterator LLCullResult::beginDrawableGroups() @@ -3481,7 +3471,7 @@ LLCullResult::sg_list_t::iterator LLCullResult::beginDrawableGroups() LLCullResult::sg_list_t::iterator LLCullResult::endDrawableGroups() { - return mDrawableGroupsEnd; + return mDrawableGroups.begin() + mDrawableGroupsSize; } LLCullResult::drawable_list_t::iterator LLCullResult::beginVisibleList() @@ -3491,7 +3481,7 @@ LLCullResult::drawable_list_t::iterator LLCullResult::beginVisibleList() LLCullResult::drawable_list_t::iterator LLCullResult::endVisibleList() { - return mVisibleListEnd; + return mVisibleList.begin() + mVisibleListSize; } LLCullResult::bridge_list_t::iterator LLCullResult::beginVisibleBridge() @@ -3501,7 +3491,7 @@ LLCullResult::bridge_list_t::iterator LLCullResult::beginVisibleBridge() LLCullResult::bridge_list_t::iterator LLCullResult::endVisibleBridge() { - return mVisibleBridgeEnd; + return mVisibleBridge.begin() + mVisibleBridgeSize; } LLCullResult::drawinfo_list_t::iterator LLCullResult::beginRenderMap(U32 type) @@ -3511,7 +3501,7 @@ LLCullResult::drawinfo_list_t::iterator LLCullResult::beginRenderMap(U32 type) LLCullResult::drawinfo_list_t::iterator LLCullResult::endRenderMap(U32 type) { - return mRenderMapEnd[type]; + return mRenderMap[type].begin() + mRenderMapSize[type]; } void LLCullResult::pushVisibleGroup(LLSpatialGroup* group) @@ -3525,7 +3515,6 @@ void LLCullResult::pushVisibleGroup(LLSpatialGroup* group) mVisibleGroups.push_back(group); } ++mVisibleGroupsSize; - mVisibleGroupsEnd = mVisibleGroups.begin()+mVisibleGroupsSize; } void LLCullResult::pushAlphaGroup(LLSpatialGroup* group) @@ -3539,7 +3528,6 @@ void LLCullResult::pushAlphaGroup(LLSpatialGroup* group) mAlphaGroups.push_back(group); } ++mAlphaGroupsSize; - mAlphaGroupsEnd = mAlphaGroups.begin()+mAlphaGroupsSize; } void LLCullResult::pushOcclusionGroup(LLSpatialGroup* group) @@ -3553,7 +3541,6 @@ void LLCullResult::pushOcclusionGroup(LLSpatialGroup* group) mOcclusionGroups.push_back(group); } ++mOcclusionGroupsSize; - mOcclusionGroupsEnd = mOcclusionGroups.begin()+mOcclusionGroupsSize; } void LLCullResult::pushDrawableGroup(LLSpatialGroup* group) @@ -3567,7 +3554,6 @@ void LLCullResult::pushDrawableGroup(LLSpatialGroup* group) mDrawableGroups.push_back(group); } ++mDrawableGroupsSize; - mDrawableGroupsEnd = mDrawableGroups.begin()+mDrawableGroupsSize; } void LLCullResult::pushDrawable(LLDrawable* drawable) @@ -3581,7 +3567,6 @@ void LLCullResult::pushDrawable(LLDrawable* drawable) mVisibleList.push_back(drawable); } ++mVisibleListSize; - mVisibleListEnd = mVisibleList.begin()+mVisibleListSize; } void LLCullResult::pushBridge(LLSpatialBridge* bridge) @@ -3595,7 +3580,6 @@ void LLCullResult::pushBridge(LLSpatialBridge* bridge) mVisibleBridge.push_back(bridge); } ++mVisibleBridgeSize; - mVisibleBridgeEnd = mVisibleBridge.begin()+mVisibleBridgeSize; } void LLCullResult::pushDrawInfo(U32 type, LLDrawInfo* draw_info) @@ -3609,7 +3593,6 @@ void LLCullResult::pushDrawInfo(U32 type, LLDrawInfo* draw_info) mRenderMap[type].push_back(draw_info); } ++mRenderMapSize[type]; - mRenderMapEnd[type] = mRenderMap[type].begin() + mRenderMapSize[type]; } |