diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2021-07-15 11:20:15 +0300 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2021-07-15 11:21:21 +0300 |
commit | 881b12910fe44f479fca50cdee965f602bce3162 (patch) | |
tree | 272e8d3ca83c8fe33a55bb9b01a97efe8630ec27 /indra/newview/llvoavatar.cpp | |
parent | 77aac9579170369a11f0884e16bd730f8cbb8bdb (diff) | |
parent | be6066eae218856f7fd74b98968a75e5062fa830 (diff) |
Merge branch 'master' into DRTVWR-539
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rw-r--r-- | indra/newview/llvoavatar.cpp | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index ab7e5f7f8a..86322e8421 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -10585,7 +10585,8 @@ void LLVOAvatar::accountRenderComplexityForObject( LL_DEBUGS("ARCdetail") << "Attachment costs " << attached_object->getAttachmentItemID() << " total: " << attachment_total_cost << ", volume: " << attachment_volume_cost - << ", textures: " << attachment_texture_cost + << ", " << textures.size() + << " textures: " << attachment_texture_cost << ", " << volume->numChildren() << " children: " << attachment_children_cost << LL_ENDL; @@ -10695,10 +10696,23 @@ void LLVOAvatar::calculateUpdateRenderComplexity() ETextureIndex tex_index = baked_dict->mTextureIndex; if ((tex_index != TEX_SKIRT_BAKED) || (isWearingWearableType(LLWearableType::WT_SKIRT))) { - if (isTextureVisible(tex_index)) - { - cost +=COMPLEXITY_BODY_PART_COST; - } + // Same as isTextureVisible(), but doesn't account for isSelf to ensure identical numbers for all avatars + if (isIndexLocalTexture(tex_index)) + { + if (isTextureDefined(tex_index, 0)) + { + cost += COMPLEXITY_BODY_PART_COST; + } + } + else + { + // baked textures can use TE images directly + if (isTextureDefined(tex_index) + && (getTEImage(tex_index)->getID() != IMG_INVISIBLE || LLDrawPoolAlpha::sShowDebugAlpha)) + { + cost += COMPLEXITY_BODY_PART_COST; + } + } } } LL_DEBUGS("ARCdetail") << "Avatar body parts complexity: " << cost << LL_ENDL; @@ -10739,8 +10753,7 @@ void LLVOAvatar::calculateUpdateRenderComplexity() // Diagnostic output to identify all avatar-related textures. // Does not affect rendering cost calculation. - // Could be wrapped in a debug option if output becomes problematic. - if (isSelf()) + if (isSelf() && debugLoggingEnabled("ARCdetail")) { // print any attachment textures we didn't already know about. for (LLVOVolume::texture_cost_t::iterator it = textures.begin(); it != textures.end(); ++it) |