diff options
author | Oz Linden <oz@lindenlab.com> | 2016-03-01 16:01:21 -0500 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2016-03-01 16:01:21 -0500 |
commit | ca7631e4d71c693a5a502c05a482ab01ada7888a (patch) | |
tree | be01ebebc640a8cae69bf19a49f717fdd45721d1 /indra/newview | |
parent | 9d681027b343a68a4e1151855145b79b95717d57 (diff) |
MAINT-6183: Remove geometry bytes as a trigger for muted/impostor rendering
Diffstat (limited to 'indra/newview')
-rwxr-xr-x | indra/newview/app_settings/settings.xml | 6 | ||||
-rwxr-xr-x | indra/newview/llspatialpartition.cpp | 2 | ||||
-rwxr-xr-x | indra/newview/llviewerwindow.cpp | 3 | ||||
-rwxr-xr-x | indra/newview/llvoavatar.cpp | 27 | ||||
-rwxr-xr-x | indra/newview/llvoavatar.h | 6 | ||||
-rwxr-xr-x | indra/newview/llvovolume.cpp | 4 |
6 files changed, 11 insertions, 37 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 27cead9879..bb8b810b93 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -9972,13 +9972,13 @@ <key>RenderAutoMuteByteLimit</key> <map> <key>Comment</key> - <string>Maximum bytes of attachments before an avatar is rendered as a simple impostor (0 for no limit).</string> + <string>OBSOLETE and UNUSED.</string> <key>Persist</key> - <integer>1</integer> + <integer>0</integer> <key>Type</key> <string>U32</string> <key>Value</key> - <integer>10000000</integer> + <integer>0</integer> </map> <key>RenderAvatarMaxNonImpostors</key> <map> diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index bee57d595b..b0eb4137a7 100755 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -862,7 +862,7 @@ void LLSpatialGroup::handleDestruction(const TreeNode* node) { if (bridge->mAvatar.notNull()) { - bridge->mAvatar->subtractAttachmentSizes( mGeometryBytes, mSurfaceArea ); + bridge->mAvatar->subtractAttachmentArea(mSurfaceArea ); } } diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 3ce0b89fe8..8d05114146 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -680,11 +680,10 @@ public: avatar->calculateUpdateRenderComplexity(); // Make sure the numbers are up-to-date trunc_name = utf8str_truncate(avatar->getFullname(), 16); - addText(xpos, ypos, llformat("%s : %s, complexity %d, bytes %d area %.2f", + addText(xpos, ypos, llformat("%s : %s, complexity %d, area %.2f", trunc_name.c_str(), LLVOAvatar::rezStatusToString(avatar->getRezzedStatus()).c_str(), avatar->getVisualComplexity(), - avatar->getAttachmentGeometryBytes(), avatar->getAttachmentSurfaceArea())); ypos += y_inc; av_iter++; diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 12c1ff7611..c88f5d1fce 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -671,7 +671,6 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id, LLAvatarAppearance(&gAgentWearables), LLViewerObject(id, pcode, regionp), mSpecialRenderMode(0), - mAttachmentGeometryBytes(0), mAttachmentSurfaceArea(0.f), mReportedVisualComplexity(VISUAL_COMPLEXITY_UNKNOWN), mTurning(FALSE), @@ -6523,10 +6522,8 @@ bool LLVOAvatar::isTooComplex() const { // Determine if visually muted or not static LLCachedControl<U32> max_render_cost(gSavedSettings, "RenderAvatarMaxComplexity", 0U); - static LLCachedControl<U32> max_attachment_bytes(gSavedSettings, "RenderAutoMuteByteLimit", 0U); static LLCachedControl<F32> max_attachment_area(gSavedSettings, "RenderAutoMuteSurfaceAreaLimit", 10.0E6f); too_complex = ((max_render_cost > 0 && mVisualComplexity > max_render_cost) - || (max_attachment_bytes > 0 && mAttachmentGeometryBytes > max_attachment_bytes) || (max_attachment_area > 0.0f && mAttachmentSurfaceArea > max_attachment_area) ); } @@ -8304,37 +8301,17 @@ void LLVOAvatar::idleUpdateRenderComplexity() } mText->addLine(info_line, info_color, info_style); - // Attachment byte limit - static LLCachedControl<U32> max_attachment_bytes(gSavedSettings, "RenderAutoMuteByteLimit", 0); - info_line = llformat("%.1f KB", mAttachmentGeometryBytes/1024.f); - if (max_attachment_bytes != 0) // zero means don't care, so don't bother coloring based on this - { - green_level = 1.f-llclamp(((F32) mAttachmentGeometryBytes-(F32)max_attachment_bytes)/(F32)max_attachment_bytes, 0.f, 1.f); - red_level = llmin((F32) mAttachmentGeometryBytes/(F32)max_attachment_bytes, 1.f); - info_color.set(red_level, green_level, 0.0, 1.0); - info_style = ( mAttachmentGeometryBytes > max_attachment_bytes - ? LLFontGL::BOLD : LLFontGL::NORMAL ); - } - else - { - info_color.set(LLColor4::grey); - info_style = LLFontGL::NORMAL; - } - mText->addLine(info_line, info_color, info_style); - updateText(); // corrects position } } -void LLVOAvatar::addAttachmentSizes(U32 delta_bytes, F32 delta_area) +void LLVOAvatar::addAttachmentArea(F32 delta_area) { - mAttachmentGeometryBytes += delta_bytes; mAttachmentSurfaceArea += delta_area; } -void LLVOAvatar::subtractAttachmentSizes(U32 delta_bytes, F32 delta_area) +void LLVOAvatar::subtractAttachmentArea(F32 delta_area) { - mAttachmentGeometryBytes = delta_bytes > mAttachmentGeometryBytes ? 0 : mAttachmentGeometryBytes - delta_bytes; mAttachmentSurfaceArea = delta_area > mAttachmentSurfaceArea ? 0.0 : mAttachmentSurfaceArea - delta_area; } diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 10d10b2ed5..418cca519d 100755 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -259,10 +259,9 @@ public: void updateVisualComplexity(); U32 getVisualComplexity() { return mVisualComplexity; }; // Numbers calculated here by rendering AV - S32 getAttachmentGeometryBytes() { return mAttachmentGeometryBytes; }; // number of bytes in attached geometry F32 getAttachmentSurfaceArea() { return mAttachmentSurfaceArea; }; // estimated surface area of attachments - void addAttachmentSizes(U32 delta_bytes, F32 delta_area); - void subtractAttachmentSizes(U32 delta_bytes, F32 delta_area); + void addAttachmentArea(F32 delta_area); + void subtractAttachmentArea(F32 delta_area); U32 getReportedVisualComplexity() { return mReportedVisualComplexity; }; // Numbers as reported by the SL server void setReportedVisualComplexity(U32 value) { mReportedVisualComplexity = value; }; @@ -412,7 +411,6 @@ public: S32 mSpecialRenderMode; // special lighting private: - S32 mAttachmentGeometryBytes; //number of bytes in attached geometry F32 mAttachmentSurfaceArea; //estimated surface area of attachments bool shouldAlphaMask(); diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index c15bf4ecf3..44daa939ad 100755 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -4727,7 +4727,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) if (pAvatarVO) { - pAvatarVO->subtractAttachmentSizes( group->mGeometryBytes, group->mSurfaceArea ); + pAvatarVO->subtractAttachmentArea( group->mSurfaceArea ); } group->mGeometryBytes = 0; @@ -5281,7 +5281,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) if (pAvatarVO) { - pAvatarVO->addAttachmentSizes( group->mGeometryBytes, group->mSurfaceArea ); + pAvatarVO->addAttachmentArea( group->mSurfaceArea ); } } |