diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-06-03 19:55:36 +0100 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-06-03 19:55:36 +0100 |
commit | 4d586d48ff3f6f10a159758af6dedccaf2e8543b (patch) | |
tree | 80863a30bed7aaeac49b9d996e462e05d95068ee /indra/newview/llvoavatar.cpp | |
parent | 3d439157dda9600c95e0321e829b3eda9004755b (diff) | |
parent | d213f8635b96f7da2b1efc193d48dc8d681e4f3e (diff) |
merge from viewer-public
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rw-r--r-- | indra/newview/llvoavatar.cpp | 45 |
1 files changed, 41 insertions, 4 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index e8f273a5d7..55814f86f8 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -6341,16 +6341,13 @@ LLColor4 LLVOAvatar::getDummyColor() void LLVOAvatar::dumpAvatarTEs( const std::string& context ) const { - /* const char* te_name[] = { - "TEX_HEAD_BODYPAINT ", - "TEX_UPPER_SHIRT ", */ llinfos << (isSelf() ? "Self: " : "Other: ") << context << llendl; for (LLVOAvatarDictionary::Textures::const_iterator iter = LLVOAvatarDictionary::getInstance()->getTextures().begin(); iter != LLVOAvatarDictionary::getInstance()->getTextures().end(); ++iter) { const LLVOAvatarDictionary::TextureEntry *texture_dict = iter->second; - // TODO: handle multiple textures for self + // TODO: MULTI-WEARABLE: handle multiple textures for self const LLViewerTexture* te_image = getImage(iter->first,0); if( !te_image ) { @@ -7755,6 +7752,8 @@ void LLVOAvatar::idleUpdateRenderCost() static const U32 ARC_BODY_PART_COST = 20; static const U32 ARC_LIMIT = 2048; + static std::set<LLUUID> all_textures; + if (!gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_SHAME)) { return; @@ -7800,7 +7799,45 @@ void LLVOAvatar::idleUpdateRenderCost() } } } + // 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()) + { + // print any attachment textures we didn't already know about. + for (std::set<LLUUID>::iterator it = textures.begin(); it != textures.end(); ++it) + { + LLUUID image_id = *it; + if( image_id.isNull() || image_id == IMG_DEFAULT || image_id == IMG_DEFAULT_AVATAR) + continue; + if (all_textures.find(image_id) == all_textures.end()) + { + // attachment texture not previously seen. + llinfos << "attachment_texture: " << image_id.asString() << llendl; + all_textures.insert(image_id); + } + } + // print any avatar textures we didn't already know about + for (LLVOAvatarDictionary::Textures::const_iterator iter = LLVOAvatarDictionary::getInstance()->getTextures().begin(); + iter != LLVOAvatarDictionary::getInstance()->getTextures().end(); + ++iter) + { + const LLVOAvatarDictionary::TextureEntry *texture_dict = iter->second; + // TODO: MULTI-WEARABLE: handle multiple textures for self + const LLViewerTexture* te_image = getImage(iter->first,0); + if (!te_image) + continue; + LLUUID image_id = te_image->getID(); + if( image_id.isNull() || image_id == IMG_DEFAULT || image_id == IMG_DEFAULT_AVATAR) + continue; + if (all_textures.find(image_id) == all_textures.end()) + { + llinfos << "local_texture: " << texture_dict->mName << ": " << image_id << llendl; + all_textures.insert(image_id); + } + } + } cost += textures.size() * LLVOVolume::ARC_TEXTURE_COST; setDebugText(llformat("%d", cost)); |