summaryrefslogtreecommitdiff
path: root/indra/newview/pipeline.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r--indra/newview/pipeline.cpp31
1 files changed, 18 insertions, 13 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 36daca174b..cc65b34a61 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -284,6 +284,7 @@ BOOL LLPipeline::sRenderFrameTest = FALSE;
BOOL LLPipeline::sRenderAttachedLights = TRUE;
BOOL LLPipeline::sRenderAttachedParticles = TRUE;
BOOL LLPipeline::sRenderDeferred = FALSE;
+BOOL LLPipeline::sAllowRebuildPriorityGroup = FALSE ;
S32 LLPipeline::sVisibleLightCount = 0;
F32 LLPipeline::sMinRenderSize = 0.f;
@@ -1780,6 +1781,12 @@ void LLPipeline::updateGL()
void LLPipeline::rebuildPriorityGroups()
{
+ if(!sAllowRebuildPriorityGroup)
+ {
+ return ;
+ }
+ sAllowRebuildPriorityGroup = FALSE ;
+
LLTimer update_timer;
LLMemType mt(LLMemType::MTYPE_PIPELINE);
@@ -1799,7 +1806,6 @@ void LLPipeline::rebuildPriorityGroups()
void LLPipeline::rebuildGroups()
{
- llpushcallstacks ;
// Iterate through some drawables on the non-priority build queue
S32 size = (S32) mGroupQ2.size();
S32 min_count = llclamp((S32) ((F32) (size * size)/4096*0.25f), 1, size);
@@ -2201,7 +2207,7 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result)
//LLVertexBuffer::unbind();
grabReferences(result);
-
+ llpushcallstacks ;
for (LLCullResult::sg_list_t::iterator iter = sCull->beginDrawableGroups(); iter != sCull->endDrawableGroups(); ++iter)
{
LLSpatialGroup* group = *iter;
@@ -2219,7 +2225,7 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result)
}
}
}
-
+ llpushcallstacks ;
for (LLCullResult::sg_list_t::iterator iter = sCull->beginVisibleGroups(); iter != sCull->endVisibleGroups(); ++iter)
{
LLSpatialGroup* group = *iter;
@@ -2235,7 +2241,7 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result)
}
}
-
+ llpushcallstacks ;
if (LLViewerCamera::sCurCameraID == LLViewerCamera::CAMERA_WORLD)
{
for (LLCullResult::bridge_list_t::iterator i = sCull->beginVisibleBridge(); i != sCull->endVisibleBridge(); ++i)
@@ -2249,7 +2255,7 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result)
}
}
}
-
+ llpushcallstacks ;
{
LLFastTimer ftm(FTM_STATESORT_DRAWABLE);
for (LLCullResult::drawable_list_t::iterator iter = sCull->beginVisibleList();
@@ -2269,6 +2275,7 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result)
}
postSort(camera);
+ llpushcallstacks ;
}
void LLPipeline::stateSort(LLSpatialGroup* group, LLCamera& camera)
@@ -2963,7 +2970,6 @@ U32 LLPipeline::sCurRenderPoolType = 0 ;
void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)
{
- llpushcallstacks ;
LLMemType mt(LLMemType::MTYPE_PIPELINE_RENDER_GEOM);
LLFastTimer t(FTM_RENDER_GEOMETRY);
@@ -7102,8 +7108,7 @@ inline float sgn(float a)
}
void LLPipeline::generateWaterReflection(LLCamera& camera_in)
-{
- llpushcallstacks ;
+{
if (LLPipeline::sWaterReflections && assertInitialized() && LLDrawPoolWater::sNeedsReflectionUpdate)
{
BOOL skip_avatar_update = FALSE;
@@ -7112,6 +7117,7 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
skip_avatar_update = TRUE;
}
+ llpushcallstacks ;
if (!skip_avatar_update)
{
gAgentAvatarp->updateAttachmentVisibility(CAMERA_MODE_THIRD_PERSON);
@@ -7199,7 +7205,6 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
glCullFace(GL_FRONT);
-
static LLCullResult ref_result;
U32 ref_mask = 0;
if (LLDrawPoolWater::sNeedsDistortionUpdate)
@@ -7211,6 +7216,7 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
(1 << LLPipeline::RENDER_TYPE_WL_SKY));
static LLCullResult result;
updateCull(camera, result);
+ llpushcallstacks ;
stateSort(camera, result);
mRenderTypeMask = tmp & ((1 << LLPipeline::RENDER_TYPE_SKY) |
(1 << LLPipeline::RENDER_TYPE_CLOUDS) |
@@ -7245,13 +7251,13 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
LLGLUserClipPlane clip_plane(plane, mat, projection);
LLGLDisable cull(GL_CULL_FACE);
updateCull(camera, ref_result, 1);
+ llpushcallstacks ;
stateSort(camera, ref_result);
}
ref_mask = mRenderTypeMask;
mRenderTypeMask = mask;
}
-
if (LLDrawPoolWater::sNeedsDistortionUpdate)
{
mRenderTypeMask = ref_mask;
@@ -7269,7 +7275,6 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
}
camera.setOrigin(camera_in.getOrigin());
-
//render distortion map
static BOOL last_update = TRUE;
if (last_update)
@@ -7303,6 +7308,7 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
LLGLUserClipPlane clip_plane(LLPlane(-pnorm, -(pd+pad)), mat, projection);
static LLCullResult result;
updateCull(camera, result, water_clip);
+ llpushcallstacks ;
stateSort(camera, result);
gGL.setColorMask(true, true);
@@ -7326,7 +7332,6 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
glClear(GL_DEPTH_BUFFER_BIT);
}
glClearColor(0.f, 0.f, 0.f, 0.f);
-
gViewerWindow->setup3DViewport();
mRenderTypeMask = type_mask;
LLDrawPoolWater::sNeedsReflectionUpdate = FALSE;
@@ -7342,6 +7347,7 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
{
gAgentAvatarp->updateAttachmentVisibility(gAgentCamera.getCameraMode());
}
+ llpushcallstacks ;
}
}
@@ -7839,7 +7845,6 @@ void LLPipeline::renderHighlight(const LLViewerObject* obj, F32 fade)
void LLPipeline::generateHighlight(LLCamera& camera)
{
//render highlighted object as white into offscreen render target
- llpushcallstacks ;
if (mHighlightObject.notNull())
{
mHighlightSet.insert(HighlightItem(mHighlightObject));