Clear object rebuild queues upon teleport.
This commit is contained in:
@@ -623,11 +623,19 @@ static LLFastTimer::DeclareTimer FTM_IMAGE_MEDIA("Media");
|
||||
|
||||
void LLViewerTextureList::updateImages(F32 max_time)
|
||||
{
|
||||
static BOOL cleared = FALSE;
|
||||
if(gAgent.getTeleportState() != LLAgent::TELEPORT_NONE)
|
||||
{
|
||||
clearFetchingRequests();
|
||||
if(!cleared)
|
||||
{
|
||||
clearFetchingRequests();
|
||||
gPipeline.clearRebuildGroups();
|
||||
cleared = TRUE;
|
||||
}
|
||||
return;
|
||||
}
|
||||
cleared = FALSE;
|
||||
|
||||
LLAppViewer::getTextureFetch()->setTextureBandwidth(LLViewerStats::getInstance()->mTextureKBitStat.getMeanPerSec());
|
||||
|
||||
S32 global_raw_memory;
|
||||
|
||||
@@ -2351,6 +2351,32 @@ void LLPipeline::updateGL()
|
||||
}*/
|
||||
}
|
||||
|
||||
static LLFastTimer::DeclareTimer FTM_REBUILD_PRIORITY_GROUPS("Rebuild Priority Groups");
|
||||
|
||||
void LLPipeline::clearRebuildGroups()
|
||||
{
|
||||
mGroupQ1Locked = true;
|
||||
// Iterate through all drawables on the priority build queue,
|
||||
for (LLSpatialGroup::sg_vector_t::iterator iter = mGroupQ1.begin();
|
||||
iter != mGroupQ1.end(); ++iter)
|
||||
{
|
||||
LLSpatialGroup* group = *iter;
|
||||
group->clearState(LLSpatialGroup::IN_BUILD_Q1);
|
||||
}
|
||||
mGroupQ1.clear();
|
||||
mGroupQ1Locked = false;
|
||||
|
||||
mGroupQ2Locked = true;
|
||||
for (LLSpatialGroup::sg_vector_t::iterator iter = mGroupQ2.begin();
|
||||
iter != mGroupQ2.end(); ++iter)
|
||||
{
|
||||
LLSpatialGroup* group = *iter;
|
||||
group->clearState(LLSpatialGroup::IN_BUILD_Q2);
|
||||
}
|
||||
|
||||
mGroupQ2.clear();
|
||||
mGroupQ2Locked = false;
|
||||
}
|
||||
void LLPipeline::rebuildPriorityGroups()
|
||||
{
|
||||
LLTimer update_timer;
|
||||
|
||||
@@ -229,6 +229,7 @@ public:
|
||||
void updateGL();
|
||||
void rebuildPriorityGroups();
|
||||
void rebuildGroups();
|
||||
void clearRebuildGroups();
|
||||
|
||||
//calculate pixel area of given box from vantage point of given camera
|
||||
static F32 calcPixelArea(LLVector3 center, LLVector3 size, LLCamera& camera);
|
||||
|
||||
Reference in New Issue
Block a user