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.cpp77
1 files changed, 18 insertions, 59 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 7f1db9b61e..9960ce7bd0 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -283,7 +283,6 @@ bool LLPipeline::sRenderHighlight = true;
LLRender::eTexIndex LLPipeline::sRenderHighlightTextureChannel = LLRender::DIFFUSE_MAP;
bool LLPipeline::sForceOldBakedUpload = false;
S32 LLPipeline::sUseOcclusion = 0;
-bool LLPipeline::sDelayVBUpdate = true;
bool LLPipeline::sAutoMaskAlphaDeferred = true;
bool LLPipeline::sAutoMaskAlphaNonDeferred = false;
bool LLPipeline::sRenderTransparentWater = true;
@@ -474,7 +473,6 @@ void LLPipeline::init()
connectRefreshCachedSettingsSafe("RenderAutoMaskAlphaNonDeferred");
connectRefreshCachedSettingsSafe("RenderUseFarClip");
connectRefreshCachedSettingsSafe("RenderAvatarMaxNonImpostors");
- connectRefreshCachedSettingsSafe("RenderDelayVBUpdate");
connectRefreshCachedSettingsSafe("UseOcclusion");
// DEPRECATED -- connectRefreshCachedSettingsSafe("WindLightUseAtmosShaders");
// DEPRECATED -- connectRefreshCachedSettingsSafe("RenderDeferred");
@@ -953,7 +951,6 @@ void LLPipeline::refreshCachedSettings()
LLPipeline::sUseFarClip = gSavedSettings.getBOOL("RenderUseFarClip");
LLVOAvatar::sMaxNonImpostors = gSavedSettings.getU32("RenderAvatarMaxNonImpostors");
LLVOAvatar::updateImpostorRendering(LLVOAvatar::sMaxNonImpostors);
- LLPipeline::sDelayVBUpdate = gSavedSettings.getBOOL("RenderDelayVBUpdate");
LLPipeline::sUseOcclusion =
(!gUseWireframe
@@ -1759,7 +1756,7 @@ void LLPipeline::createObject(LLViewerObject* vobj)
vobj->setDrawableParent(NULL); // LLPipeline::addObject 2
}
- markRebuild(drawablep, LLDrawable::REBUILD_ALL, TRUE);
+ markRebuild(drawablep, LLDrawable::REBUILD_ALL);
if (drawablep->getVOVolume() && RenderAnimateRes)
{
@@ -1875,10 +1872,10 @@ void LLPipeline::updateMovedList(LLDrawable::drawable_vector_t& moved_list)
{ //will likely not receive any future world matrix updates
// -- this keeps attachments from getting stuck in space and falling off your avatar
drawablep->clearState(LLDrawable::ANIMATED_CHILD);
- markRebuild(drawablep, LLDrawable::REBUILD_VOLUME, TRUE);
+ markRebuild(drawablep, LLDrawable::REBUILD_VOLUME);
if (drawablep->getVObj())
{
- drawablep->getVObj()->dirtySpatialGroup(TRUE);
+ drawablep->getVObj()->dirtySpatialGroup();
}
}
iter = moved_list.erase(curiter);
@@ -2977,67 +2974,31 @@ void LLPipeline::markMeshDirty(LLSpatialGroup* group)
mMeshDirtyGroup.push_back(group);
}
-void LLPipeline::markRebuild(LLSpatialGroup* group, bool priority)
+void LLPipeline::markRebuild(LLSpatialGroup* group)
{
if (group && !group->isDead() && group->getSpatialPartition())
{
- if (group->getSpatialPartition()->mPartitionType == LLViewerRegion::PARTITION_HUD)
+ if (!group->hasState(LLSpatialGroup::IN_BUILD_Q1))
{
- priority = true;
- }
-
- if (priority)
- {
- if (!group->hasState(LLSpatialGroup::IN_BUILD_Q1))
- {
- llassert_always(!mGroupQ1Locked);
-
- mGroupQ1.push_back(group);
- group->setState(LLSpatialGroup::IN_BUILD_Q1);
-
- if (group->hasState(LLSpatialGroup::IN_BUILD_Q2))
- {
- LLSpatialGroup::sg_vector_t::iterator iter = std::find(mGroupQ2.begin(), mGroupQ2.end(), group);
- if (iter != mGroupQ2.end())
- {
- mGroupQ2.erase(iter);
- }
- group->clearState(LLSpatialGroup::IN_BUILD_Q2);
- }
- }
- }
- else if (!group->hasState(LLSpatialGroup::IN_BUILD_Q2 | LLSpatialGroup::IN_BUILD_Q1))
- {
- llassert_always(!mGroupQ2Locked);
- mGroupQ2.push_back(group);
- group->setState(LLSpatialGroup::IN_BUILD_Q2);
+ llassert_always(!mGroupQ1Locked);
+ mGroupQ1.push_back(group);
+ group->setState(LLSpatialGroup::IN_BUILD_Q1);
}
}
}
-void LLPipeline::markRebuild(LLDrawable *drawablep, LLDrawable::EDrawableFlags flag, bool priority)
+void LLPipeline::markRebuild(LLDrawable *drawablep, LLDrawable::EDrawableFlags flag)
{
if (drawablep && !drawablep->isDead() && assertInitialized())
{
- if (!drawablep->isState(LLDrawable::BUILT))
- {
- priority = true;
- }
- if (priority)
+ if (!drawablep->isState(LLDrawable::IN_REBUILD_Q1))
{
- if (!drawablep->isState(LLDrawable::IN_REBUILD_Q1))
- {
- mBuildQ1.push_back(drawablep);
- drawablep->setState(LLDrawable::IN_REBUILD_Q1); // mark drawable as being in priority queue
- }
+ mBuildQ1.push_back(drawablep);
+ drawablep->setState(LLDrawable::IN_REBUILD_Q1); // mark drawable as being in priority queue
}
- else if (!drawablep->isState(LLDrawable::IN_REBUILD_Q2))
- {
- mBuildQ2.push_back(drawablep);
- drawablep->setState(LLDrawable::IN_REBUILD_Q2); // need flag here because it is just a list
- }
- if (flag & (LLDrawable::REBUILD_VOLUME | LLDrawable::REBUILD_POSITION))
+
+ if (flag & (LLDrawable::REBUILD_VOLUME | LLDrawable::REBUILD_POSITION))
{
drawablep->getVObj()->setChanged(LLXform::SILHOUETTE);
}
@@ -3083,7 +3044,6 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result)
markVisible(drawablep, camera);
}
- if (!sDelayVBUpdate)
{ //rebuild mesh as soon as we know it's visible
group->rebuildMesh();
}
@@ -3139,7 +3099,6 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result)
group->setVisible();
stateSort(group, camera);
- if (!sDelayVBUpdate)
{ //rebuild mesh as soon as we know it's visible
group->rebuildMesh();
}
@@ -10759,7 +10718,7 @@ void LLPipeline::hideObject( const LLUUID& id )
void LLPipeline::hideDrawable( LLDrawable *pDrawable )
{
pDrawable->setState( LLDrawable::FORCE_INVISIBLE );
- markRebuild( pDrawable, LLDrawable::REBUILD_ALL, TRUE );
+ markRebuild( pDrawable, LLDrawable::REBUILD_ALL);
//hide the children
LLViewerObject::const_child_list_t& child_list = pDrawable->getVObj()->getChildren();
for ( LLViewerObject::child_list_t::const_iterator iter = child_list.begin();
@@ -10770,14 +10729,14 @@ void LLPipeline::hideDrawable( LLDrawable *pDrawable )
if ( drawable )
{
drawable->setState( LLDrawable::FORCE_INVISIBLE );
- markRebuild( drawable, LLDrawable::REBUILD_ALL, TRUE );
+ markRebuild( drawable, LLDrawable::REBUILD_ALL);
}
}
}
void LLPipeline::unhideDrawable( LLDrawable *pDrawable )
{
pDrawable->clearState( LLDrawable::FORCE_INVISIBLE );
- markRebuild( pDrawable, LLDrawable::REBUILD_ALL, TRUE );
+ markRebuild( pDrawable, LLDrawable::REBUILD_ALL);
//restore children
LLViewerObject::const_child_list_t& child_list = pDrawable->getVObj()->getChildren();
for ( LLViewerObject::child_list_t::const_iterator iter = child_list.begin();
@@ -10788,7 +10747,7 @@ void LLPipeline::unhideDrawable( LLDrawable *pDrawable )
if ( drawable )
{
drawable->clearState( LLDrawable::FORCE_INVISIBLE );
- markRebuild( drawable, LLDrawable::REBUILD_ALL, TRUE );
+ markRebuild( drawable, LLDrawable::REBUILD_ALL);
}
}
}