Make sure we're updating the VisualComplexity whenever we should be (sync w/ upstream)
This commit is contained in:
@@ -1099,12 +1099,12 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
|
|||||||
mNeedsSkin(FALSE),
|
mNeedsSkin(FALSE),
|
||||||
mLastSkinTime(0.f),
|
mLastSkinTime(0.f),
|
||||||
mUpdatePeriod(1),
|
mUpdatePeriod(1),
|
||||||
|
mVisualComplexityStale(true),
|
||||||
mFirstFullyVisible(TRUE),
|
mFirstFullyVisible(TRUE),
|
||||||
mFullyLoaded(FALSE),
|
mFullyLoaded(FALSE),
|
||||||
mPreviousFullyLoaded(FALSE),
|
mPreviousFullyLoaded(FALSE),
|
||||||
mFullyLoadedInitialized(FALSE),
|
mFullyLoadedInitialized(FALSE),
|
||||||
mVisualComplexity(0),
|
mVisualComplexity(0),
|
||||||
mVisualComplexityStale(TRUE),
|
|
||||||
mSupportsAlphaLayers(FALSE),
|
mSupportsAlphaLayers(FALSE),
|
||||||
mLoadedCallbacksPaused(FALSE),
|
mLoadedCallbacksPaused(FALSE),
|
||||||
mLastRezzedStatus(-1),
|
mLastRezzedStatus(-1),
|
||||||
@@ -7253,7 +7253,7 @@ const LLViewerJointAttachment *LLVOAvatar::attachObject(LLViewerObject *viewer_o
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
mVisualComplexityStale = TRUE;
|
mVisualComplexityStale = true;
|
||||||
|
|
||||||
if (viewer_object->isSelected())
|
if (viewer_object->isSelected())
|
||||||
{
|
{
|
||||||
@@ -7416,7 +7416,7 @@ BOOL LLVOAvatar::detachObject(LLViewerObject *viewer_object)
|
|||||||
|
|
||||||
if (attachment->isObjectAttached(viewer_object))
|
if (attachment->isObjectAttached(viewer_object))
|
||||||
{
|
{
|
||||||
mVisualComplexityStale = TRUE;
|
mVisualComplexityStale = true;
|
||||||
vector_replace_with_last(mAttachedObjectsVector,std::make_pair(viewer_object,attachment));
|
vector_replace_with_last(mAttachedObjectsVector,std::make_pair(viewer_object,attachment));
|
||||||
|
|
||||||
cleanupAttachedMesh( viewer_object );
|
cleanupAttachedMesh( viewer_object );
|
||||||
@@ -7836,9 +7836,10 @@ void LLVOAvatar::updateRezzedStatusTimers()
|
|||||||
selfStopPhase("update_appearance_from_cof");
|
selfStopPhase("update_appearance_from_cof");
|
||||||
selfStopPhase("wear_inventory_category", false);
|
selfStopPhase("wear_inventory_category", false);
|
||||||
selfStopPhase("process_initial_wearables_update", false);
|
selfStopPhase("process_initial_wearables_update", false);
|
||||||
|
|
||||||
|
mVisualComplexityStale = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mLastRezzedStatus = rez_status;
|
mLastRezzedStatus = rez_status;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -8970,7 +8971,10 @@ void LLVOAvatar::applyParsedAppearanceMessage(LLAppearanceMessageContents& conte
|
|||||||
S32 num_params = contents.mParamWeights.size();
|
S32 num_params = contents.mParamWeights.size();
|
||||||
ESex old_sex = getSex();
|
ESex old_sex = getSex();
|
||||||
|
|
||||||
applyParsedTEMessage(contents.mTEContents);
|
if (applyParsedTEMessage(contents.mTEContents) > 0 && isChanged(TEXTURE))
|
||||||
|
{
|
||||||
|
mVisualComplexityStale = true;
|
||||||
|
}
|
||||||
|
|
||||||
// prevent the overwriting of valid baked textures with invalid baked textures
|
// prevent the overwriting of valid baked textures with invalid baked textures
|
||||||
for (U8 baked_index = 0; baked_index < mBakedTextureDatas.size(); baked_index++)
|
for (U8 baked_index = 0; baked_index < mBakedTextureDatas.size(); baked_index++)
|
||||||
@@ -9872,10 +9876,6 @@ void LLVOAvatar::idleUpdateRenderCost()
|
|||||||
setDebugText(llformat("%.1f KB, %.2f m^2", mAttachmentGeometryBytes/1024.f, mAttachmentSurfaceArea));
|
setDebugText(llformat("%.1f KB, %.2f m^2", mAttachmentGeometryBytes/1024.f, mAttachmentSurfaceArea));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_SHAME))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
calculateUpdateRenderCost(); // Update mVisualComplexity if needed
|
calculateUpdateRenderCost(); // Update mVisualComplexity if needed
|
||||||
|
|
||||||
@@ -9928,7 +9928,6 @@ void LLVOAvatar::calculateUpdateRenderCost()
|
|||||||
|
|
||||||
if (mVisualComplexityStale)
|
if (mVisualComplexityStale)
|
||||||
{
|
{
|
||||||
mVisualComplexityStale = FALSE;
|
|
||||||
U32 cost = 0;
|
U32 cost = 0;
|
||||||
LLVOVolume::texture_cost_t textures;
|
LLVOVolume::texture_cost_t textures;
|
||||||
|
|
||||||
@@ -10036,6 +10035,7 @@ void LLVOAvatar::calculateUpdateRenderCost()
|
|||||||
}
|
}
|
||||||
|
|
||||||
mVisualComplexity = cost;
|
mVisualComplexity = cost;
|
||||||
|
mVisualComplexityStale = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user