From 2987303acd5e24ffa320566571c8987c1cf3f96f Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 22 Jan 2016 19:50:33 +0200 Subject: MAINT-6070 detailed logging for computing of Avatar Rendering Complexity --- indra/newview/llvoavatar.cpp | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'indra/newview/llvoavatar.cpp') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 2e8d8602f9..f14af04c0d 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -8355,6 +8355,7 @@ void LLVOAvatar::calculateUpdateRenderComplexity() } } } + LL_DEBUGS("ARCdetail") << "Avatar body parts complexity: " << cost << LL_ENDL; for (attachment_map_t::const_iterator attachment_point = mAttachmentPoints.begin(); @@ -8376,7 +8377,12 @@ void LLVOAvatar::calculateUpdateRenderComplexity() const LLVOVolume* volume = drawable->getVOVolume(); if (volume) { - cost += volume->getRenderCost(textures); + U32 attachment_total_cost = 0; + U32 attachment_volume_cost = 0; + U32 attachment_texture_cost = 0; + U32 attachment_children_cost = 0; + + attachment_volume_cost += volume->getRenderCost(textures); const_child_list_t children = volume->getChildren(); for (const_child_list_t::const_iterator child_iter = children.begin(); @@ -8387,7 +8393,7 @@ void LLVOAvatar::calculateUpdateRenderComplexity() LLVOVolume *child = dynamic_cast( child_obj ); if (child) { - cost += child->getRenderCost(textures); + attachment_children_cost += child->getRenderCost(textures); } } @@ -8396,8 +8402,17 @@ void LLVOAvatar::calculateUpdateRenderComplexity() ++volume_texture) { // add the cost of each individual texture in the linkset - cost += volume_texture->second; + attachment_texture_cost += volume_texture->second; } + + attachment_total_cost = attachment_volume_cost + attachment_texture_cost + attachment_children_cost; + LL_DEBUGS("ARCdetail") << "Attachment " << attached_object->getAttachmentItemID() + << " has total cost: " << attachment_total_cost + << " volume cost: " << attachment_volume_cost + << " texture cost: " << attachment_texture_cost + << " and includes " << volume->numChildren() + << " children with " << attachment_children_cost << " cost" << LL_ENDL; + cost += attachment_total_cost; } } } -- cgit v1.2.3