summaryrefslogtreecommitdiff
path: root/indra/newview/pipeline.cpp
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2013-08-07 22:53:27 -0600
committerXiaohong Bao <bao@lindenlab.com>2013-08-07 22:53:27 -0600
commita2c7b0485576c6bb92f6d0eddc762f5e37d5caac (patch)
tree400b50815c54740834a2a2d0810a5f72e712af70 /indra/newview/pipeline.cpp
parentf6a342438c59548276f0ee9f3033b47229d5d6d3 (diff)
more fix for SH-4397: Object cache occlusion culling results are not always correct
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rwxr-xr-xindra/newview/pipeline.cpp7
1 files changed, 6 insertions, 1 deletions
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<bool> 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);
}
}