From 47f6782ad0eaec8b77c968efc7145524dbba229e Mon Sep 17 00:00:00 2001 From: JJ Linden Date: Wed, 17 Feb 2016 16:46:40 -0800 Subject: [PATCH 1/7] kludge for darwin builds on el capitan --- indra/llcorehttp/CMakeLists.txt | 37 +++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/indra/llcorehttp/CMakeLists.txt b/indra/llcorehttp/CMakeLists.txt index a0b1ea13b1..8567254147 100755 --- a/indra/llcorehttp/CMakeLists.txt +++ b/indra/llcorehttp/CMakeLists.txt @@ -141,6 +141,43 @@ if (LL_TESTS) "${CMAKE_CURRENT_SOURCE_DIR}/tests/test_llcorehttp_peer.py" ) +if (DARWIN) + # Path inside the app bundle where we'll need to copy libraries + set(LL_TEST_DESTINATION_DIR + ${CMAKE_SOURCE_DIR}/../build-darwin-i386/sharedlibs/Resources + ) + + # Create the Contents/Resources directory + add_custom_command( + TARGET INTEGRATION_TEST_llcorehttp PRE_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS + -E + make_directory + ${LL_TEST_DESTINATION_DIR} + COMMENT "Creating Resources directory in app bundle." + ) + + # Copy the required libraries to the package app + add_custom_command(TARGET INTEGRATION_TEST_llcorehttp PRE_BUILD + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/../build-darwin-i386/packages/lib/release/libapr-1.0.dylib ${LL_TEST_DESTINATION_DIR} + DEPENDS ${CMAKE_SOURCE_DIR}/../build-darwin-i386/packages/lib/release/libapr-1.0.dylib + ) + add_custom_command(TARGET INTEGRATION_TEST_llcorehttp PRE_BUILD + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/../build-darwin-i386/packages/lib/release/libaprutil-1.0.dylib ${LL_TEST_DESTINATION_DIR} + DEPENDS ${CMAKE_SOURCE_DIR}/../build-darwin-i386/packages/lib/release/libaprutil-1.0.dylib + ) + add_custom_command(TARGET INTEGRATION_TEST_llcorehttp PRE_BUILD + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/../build-darwin-i386/packages/lib/release/libexception_handler.dylib ${LL_TEST_DESTINATION_DIR} + DEPENDS ${CMAKE_SOURCE_DIR}/../build-darwin-i386/packages/lib/release/libexception_handler.dylib + ) + add_custom_command(TARGET INTEGRATION_TEST_llcorehttp PRE_BUILD + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/../build-darwin-i386/packages/lib/release/libexpat.1.5.2.dylib ${LL_TEST_DESTINATION_DIR} + DEPENDS ${CMAKE_SOURCE_DIR}/../build-darwin-i386/packages/lib/release/libexpat.1.5.2.dylib + ) + +endif (DARWIN) + # # Example Programs # From 9d681027b343a68a4e1151855145b79b95717d57 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Fri, 26 Feb 2016 10:52:23 +0200 Subject: [PATCH 2/7] MAINT-5699 Graphics preset changes to None each time the Advanced Graphics floater is opened --- indra/newview/llfloaterpreference.cpp | 37 +++++++++++++++++++++++++++ indra/newview/llfloaterpreference.h | 3 +++ 2 files changed, 40 insertions(+) diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index cfaafeb496..718b068c8a 100755 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -673,6 +673,12 @@ void LLFloaterPreference::cancel() LLFloaterPathfindingConsole* pPathfindingConsole = pathfindingConsoleHandle.get(); pPathfindingConsole->onRegionBoundaryCross(); } + + if (!mSavedGraphicsPreset.empty()) + { + gSavedSettings.setString("PresetGraphicActive", mSavedGraphicsPreset); + LLPresetsManager::getInstance()->triggerChangeSignal(); + } } void LLFloaterPreference::onOpen(const LLSD& key) @@ -1970,6 +1976,18 @@ void LLFloaterPreference::onClickSpellChecker() void LLFloaterPreference::onClickAdvanced() { LLFloaterReg::showInstance("prefs_graphics_advanced"); + + LLTabContainer* tabcontainer = getChild("pref core"); + for (child_list_t::const_iterator iter = tabcontainer->getChildList()->begin(); + iter != tabcontainer->getChildList()->end(); ++iter) + { + LLView* view = *iter; + LLPanelPreferenceGraphics* panel = dynamic_cast(view); + if (panel) + { + panel->resetDirtyChilds(); + } + } } void LLFloaterPreference::onClickActionChange() @@ -2076,6 +2094,11 @@ void LLFloaterPreference::changed() } +void LLFloaterPreference::saveGraphicsPreset(std::string& preset) +{ + mSavedGraphicsPreset = preset; +} + //------------------------------Updater--------------------------------------- static bool handleBandwidthChanged(const LLSD& newvalue) @@ -2465,6 +2488,11 @@ void LLPanelPreferenceGraphics::setPresetText() if (hasDirtyChilds() && !preset_graphic_active.empty()) { + LLFloaterPreference* instance = LLFloaterReg::findTypedInstance("preferences"); + if (instance) + { + instance->saveGraphicsPreset(preset_graphic_active); + } gSavedSettings.setString("PresetGraphicActive", ""); preset_graphic_active.clear(); // This doesn't seem to cause an infinite recursion. This trigger is needed to cause the pulldown @@ -2599,6 +2627,15 @@ void LLFloaterPreferenceGraphicsAdvanced::onOpen(const LLSD& key) refresh(); } +void LLFloaterPreferenceGraphicsAdvanced::onClickCloseBtn(bool app_quitting) +{ + LLFloaterPreference* instance = LLFloaterReg::findTypedInstance("preferences"); + if (instance) + { + instance->cancel(); + } +} + LLFloaterPreferenceProxy::~LLFloaterPreferenceProxy() { } diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index 03dab13689..8de65b733b 100755 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -176,6 +176,7 @@ public: void buildPopupLists(); static void refreshSkin(void* data); void selectPanel(const LLSD& name); + void saveGraphicsPreset(std::string& preset); private: @@ -196,6 +197,7 @@ private: std::string mDirectoryVisibility; LLAvatarData mAvatarProperties; + std::string mSavedGraphicsPreset; LOG_CLASS(LLFloaterPreference); }; @@ -271,6 +273,7 @@ public: LLFloaterPreferenceGraphicsAdvanced(const LLSD& key); ~LLFloaterPreferenceGraphicsAdvanced(); void onOpen(const LLSD& key); + void onClickCloseBtn(bool app_quitting); void disableUnavailableSettings(); void refreshEnabledGraphics(); void refreshEnabledState(); From 0c94c3bbf000315869412a1c7ece02f2510d0e64 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Fri, 26 Feb 2016 10:04:47 -0500 Subject: [PATCH 3/7] MAINT-5360: restore builds for the EDU package --- BuildParams | 9 ++---- autobuild.xml | 8 ++--- indra/media_plugins/cef/CMakeLists.txt | 8 +++++ indra/newview/viewer_manifest.py | 41 +++++++++++++++++++------- 4 files changed, 46 insertions(+), 20 deletions(-) diff --git a/BuildParams b/BuildParams index 15fb56ec17..aeea3b1246 100755 --- a/BuildParams +++ b/BuildParams @@ -70,15 +70,12 @@ additional_packages = "" # the viewer_channel_suffix is prefixed by a blank and then appended to the viewer_channel # for the package in a setting that overrides the compiled-in value ################################################################ -## Removed 2015-07-02 (MAINT-5360) until we fix packaging step in Team City -## additional_packages = "EDU" +additional_packages = "EDU" # The EDU package allows us to create a separate release channel whose expirations # are synchronized as much as possible with the academic year -## Removed 2015-07-02 (MAINT-5360) until we fix packaging step in Team City -## EDU_sourceid = "" -## Removed 2015-07-02 (MAINT-5360) until we fix packaging step in Team City -## EDU_viewer_channel_suffix = "edu" +EDU_sourceid = "" +EDU_viewer_channel_suffix = "edu" # Notifications - to configure email notices, add a setting like this: # _.email = diff --git a/autobuild.xml b/autobuild.xml index 72f55fce1d..91fea28487 100755 --- a/autobuild.xml +++ b/autobuild.xml @@ -1536,11 +1536,11 @@ archive hash - 6b9eaaf83fcf8bfd4bb6966c24df7f29 + 29a1f64df46094eda0d681821a98d17e hash_algorithm md5 url - http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-llceflib_3p-llceflib/rev/310043/arch/Darwin/installer/llceflib-1.5.1.310043-darwin-310043.tar.bz2 + http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-llceflib_3p-llceflib/rev/311349/arch/Darwin/installer/llceflib-1.5.3.311349-darwin-311349.tar.bz2 name darwin @@ -1550,11 +1550,11 @@ archive hash - 578f21be02efc98bbf426529f916fce8 + 827b7c339a2cd401d9d23f9ee02cb83f hash_algorithm md5 url - http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-llceflib_3p-llceflib/rev/310043/arch/CYGWIN/installer/llceflib-1.5.1.310043-windows-310043.tar.bz2 + http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-llceflib_3p-llceflib/rev/311349/arch/CYGWIN/installer/llceflib-1.5.3.311349-windows-311349.tar.bz2 name windows diff --git a/indra/media_plugins/cef/CMakeLists.txt b/indra/media_plugins/cef/CMakeLists.txt index 1f6163e41e..388030c979 100644 --- a/indra/media_plugins/cef/CMakeLists.txt +++ b/indra/media_plugins/cef/CMakeLists.txt @@ -114,4 +114,12 @@ if (DARWIN) LINK_FLAGS "-exported_symbols_list ${CMAKE_CURRENT_SOURCE_DIR}/../base/media_plugin_base.exp" ) + add_custom_command(TARGET media_plugin_cef + POST_BUILD COMMAND ${CMAKE_INSTALL_NAME_TOOL} -change "@executable_path/Chromium Embedded Framework" + "@executable_path/../../../../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework" + "$" + VERBATIM + COMMENT "Fixing path to CEF Framework" + ) + endif (DARWIN) diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index f7992dba90..ab87f0da35 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -28,6 +28,7 @@ $/LicenseInfo$ """ import sys import os.path +import shutil import errno import re import tarfile @@ -855,14 +856,17 @@ class Darwin_i386_Manifest(ViewerManifest): # This code constructs a relative path from the # target framework folder back to the location of the symlink. # It needs to be relative so that the symlink still works when - # (as is normal) the user moves the app bunlde out of the DMG + # (as is normal) the user moves the app bundle out of the DMG # and into the /Applications folder. Note we also call 'raise' # to terminate the process if we get an error since without # this symlink, Second Life web media can't possibly work. # Real Framework folder: # Second Life.app/Contents/Frameworks/Chromium Embedded Framework.framework/ - # Location of symlink and why it'ds relavie + # Location of symlink and why it'ds relative # Second Life.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/Chromium Embedded Framework.framework/ + # Real Frameworks folder, with the symlink inside the bundled SLPlugin.app (and why it's relative) + # .app/Contents/Frameworks/Chromium Embedded Framework.framework/ + # .app/Contents/Resources/SLPlugin.app/Contents/Frameworks/Chromium Embedded Framework.framework -> frameworkpath = os.path.join(os.pardir, os.pardir, os.pardir, os.pardir, "Frameworks", "Chromium Embedded Framework.framework") try: symlinkf(frameworkpath, pluginframeworkpath) @@ -872,10 +876,6 @@ class Darwin_i386_Manifest(ViewerManifest): self.end_prefix("Contents") - # fix up media_plugin.dylib so it knows where to look for CEF files it needs - self.run_command('install_name_tool -change "@executable_path/Chromium Embedded Framework" "@executable_path/../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework" "%(config)s/Second Life.app/Contents/Resources/llplugin/media_plugin_cef.dylib"' % - { 'config' : self.args['configuration'] }) - # NOTE: the -S argument to strip causes it to keep enough info for # annotated backtraces (i.e. function names in the crash log). 'strip' with no # arguments yields a slightly smaller binary but makes crash logs mostly useless. @@ -1247,12 +1247,33 @@ def symlinkf(src, dst): # file, but that strategy doesn't work so well if we don't have # permissions to remove it. Check to see if it's already the # symlink we want, which is the usual reason for EEXIST. - if not (os.path.islink(dst) and os.readlink(dst) == src): - # Here either dst isn't a symlink or it's the wrong symlink. - # Remove and recreate. Caller will just have to deal with any - # exceptions at this stage. + elif os.path.islink(dst): + if os.readlink(dst) == src: + # the requested link already exists + pass + else: + # dst is the wrong symlink; attempt to remove and recreate it + os.remove(dst) + os.symlink(src, dst) + elif os.path.isdir(dst): + print "Requested symlink (%s) exists but is a directory; replacing" % dst + shutil.rmtree(dst) + os.symlink(src, dst) + elif os.path.exists(dst): + print "Requested symlink (%s) exists but is a file; replacing" % dst os.remove(dst) os.symlink(src, dst) + else: + # see if the problem is that the parent directory does not exist + # and try to explain what is missing + (parent, tail) = os.path.split(dst) + while not os.path.exists(parent): + (parent, tail) = os.path.split(parent) + if tail: + raise Exception("Requested symlink (%s) cannot be created because %s does not exist" + % os.path.join(parent, tail)) + else: + raise if __name__ == "__main__": main() From ca7631e4d71c693a5a502c05a482ab01ada7888a Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Tue, 1 Mar 2016 16:01:21 -0500 Subject: [PATCH 4/7] MAINT-6183: Remove geometry bytes as a trigger for muted/impostor rendering --- indra/newview/app_settings/settings.xml | 6 +++--- indra/newview/llspatialpartition.cpp | 2 +- indra/newview/llviewerwindow.cpp | 3 +-- indra/newview/llvoavatar.cpp | 27 ++----------------------- indra/newview/llvoavatar.h | 6 ++---- 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 @@ RenderAutoMuteByteLimit Comment - Maximum bytes of attachments before an avatar is rendered as a simple impostor (0 for no limit). + OBSOLETE and UNUSED. Persist - 1 + 0 Type U32 Value - 10000000 + 0 RenderAvatarMaxNonImpostors 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 max_render_cost(gSavedSettings, "RenderAvatarMaxComplexity", 0U); - static LLCachedControl max_attachment_bytes(gSavedSettings, "RenderAutoMuteByteLimit", 0U); static LLCachedControl 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 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 ); } } From 0ffc4f2667806653d1f0548fdda7eb91bdea5025 Mon Sep 17 00:00:00 2001 From: ruslantproductengine Date: Wed, 2 Mar 2016 18:35:43 +0200 Subject: [PATCH 5/7] MAINT-5700 [QuickGraphics-RC] Blocked avatars should always be derendered --- indra/newview/lldrawpoolavatar.cpp | 10 +++++++--- indra/newview/llviewermenu.cpp | 2 ++ indra/newview/llviewerpartsim.cpp | 8 +++++++- indra/newview/llvoavatar.cpp | 6 +++--- indra/newview/pipeline.cpp | 4 +++- 5 files changed, 22 insertions(+), 8 deletions(-) diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index c200ecfaf8..63e4abb308 100755 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -472,7 +472,9 @@ void LLDrawPoolAvatar::renderShadow(S32 pass) } BOOL impostor = avatarp->isImpostor(); - if (impostor) + if (impostor + && LLVOAvatar::AV_DO_NOT_RENDER != avatarp->getVisualMuteSettings() + && LLVOAvatar::AV_ALWAYS_RENDER != avatarp->getVisualMuteSettings()) { return; } @@ -1246,7 +1248,9 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass) BOOL impostor = avatarp->isImpostor() && !single_avatar; - if (impostor && pass != 0) + if (( avatarp->isInMuteList() + || impostor + || (LLVOAvatar::AV_DO_NOT_RENDER == avatarp->getVisualMuteSettings() && !avatarp->needsImpostorUpdate()) ) && pass != 0) { //don't draw anything but the impostor for impostored avatars return; } @@ -1263,7 +1267,7 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass) LLVOAvatar::sNumVisibleAvatars++; } - if (impostor) + if (impostor || (LLVOAvatar::AV_DO_NOT_RENDER == avatarp->getVisualMuteSettings() && !avatarp->needsImpostorUpdate())) { if (LLPipeline::sRenderDeferred && !LLPipeline::sReflectionRender && avatarp->mImpostor.isComplete()) { diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index cbc2ecc3c0..20f3d25be3 100755 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -3145,6 +3145,8 @@ class LLObjectMute : public view_listener_t LLVOAvatar* avatar = find_avatar_from_object(object); if (avatar) { + avatar->mNeedsImpostorUpdate = TRUE; + id = avatar->getID(); LLNameValue *firstname = avatar->getNVPair("FirstName"); diff --git a/indra/newview/llviewerpartsim.cpp b/indra/newview/llviewerpartsim.cpp index ab510c1e95..b4617566ac 100755 --- a/indra/newview/llviewerpartsim.cpp +++ b/indra/newview/llviewerpartsim.cpp @@ -705,7 +705,13 @@ void LLViewerPartSim::updateSimulation() { BOOL upd = TRUE; LLViewerObject* vobj = mViewerPartSources[i]->mSourceObjectp; - if (vobj && (vobj->getPCode() == LL_PCODE_VOLUME)) + + if (vobj && vobj->isAvatar() && ((LLVOAvatar*)vobj)->isInMuteList()) + { + upd = FALSE; + } + + if (upd && vobj && (vobj->getPCode() == LL_PCODE_VOLUME)) { if(vobj->getAvatar() && vobj->getAvatar()->isTooComplex()) { diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index c88f5d1fce..c3c18f7c54 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -1,4 +1,4 @@ -/** +/** * @File llvoavatar.cpp * @brief Implementation of LLVOAvatar class which is a derivation of LLViewerObject * @@ -8138,7 +8138,7 @@ void LLVOAvatar::updateImpostors() { LLVOAvatar* avatar = (LLVOAvatar*) *iter; if (!avatar->isDead() && avatar->isVisible() - && (avatar->isImpostor() && avatar->needsImpostorUpdate()) + && ((avatar->isImpostor() || LLVOAvatar::AV_DO_NOT_RENDER == avatar->getVisualMuteSettings()) && avatar->needsImpostorUpdate()) ) { avatar->calcMutedAVColor(); @@ -8487,7 +8487,7 @@ void LLVOAvatar::calculateUpdateRenderComplexity() void LLVOAvatar::setVisualMuteSettings(VisualMuteSettings set) { mVisuallyMuteSetting = set; - mNeedsImpostorUpdate = true; + mNeedsImpostorUpdate = TRUE; } diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 4d1725e927..a4d41164e5 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -3114,7 +3114,9 @@ void LLPipeline::markVisible(LLDrawable *drawablep, LLCamera& camera) if (vobj) // this test may not be needed, see above { LLVOAvatar* av = vobj->asAvatar(); - if (av && av->isImpostor()) + if (av && (av->isImpostor() + || av->isInMuteList() + || (LLVOAvatar::AV_DO_NOT_RENDER == av->getVisualMuteSettings() && !av->needsImpostorUpdate()) )) { return; } From 2ed1fd432ae40df91343f8c21dc6ed80abca9f0e Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 2 Mar 2016 13:10:06 -0500 Subject: [PATCH 6/7] clarify that forcing full rendering of an impostor is not persistent by removing "Always" --- indra/newview/skins/default/xui/en/menu_attachment_other.xml | 2 +- indra/newview/skins/default/xui/en/menu_avatar_other.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/skins/default/xui/en/menu_attachment_other.xml b/indra/newview/skins/default/xui/en/menu_attachment_other.xml index 0cb412ad9a..9e520b2d31 100755 --- a/indra/newview/skins/default/xui/en/menu_attachment_other.xml +++ b/indra/newview/skins/default/xui/en/menu_attachment_other.xml @@ -137,7 +137,7 @@ + label="Render Fully"> diff --git a/indra/newview/skins/default/xui/en/menu_avatar_other.xml b/indra/newview/skins/default/xui/en/menu_avatar_other.xml index 9fb1fd2aff..fadacbf3cb 100755 --- a/indra/newview/skins/default/xui/en/menu_avatar_other.xml +++ b/indra/newview/skins/default/xui/en/menu_avatar_other.xml @@ -127,7 +127,7 @@ + label="Render Fully"> From 09f43945d598b50a31bdbe4a3f86c73d909ec9bc Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Fri, 4 Mar 2016 16:42:41 -0500 Subject: [PATCH 7/7] MAINT-5721: set new (much lower) limits for RenderAutoMuteSurfaceAreaLimit, but also disable if RenderAvatarMaxComplexity is unlimited (zero) --- indra/newview/app_settings/high_graphics.xml | 2 +- indra/newview/app_settings/low_graphics.xml | 2 +- indra/newview/app_settings/mid_graphics.xml | 2 +- indra/newview/app_settings/settings.xml | 6 ++++-- indra/newview/app_settings/ultra_graphics.xml | 2 +- indra/newview/featuretable.txt | 3 +-- indra/newview/featuretable_mac.txt | 3 +-- indra/newview/llvoavatar.cpp | 16 ++++++++++------ 8 files changed, 20 insertions(+), 16 deletions(-) diff --git a/indra/newview/app_settings/high_graphics.xml b/indra/newview/app_settings/high_graphics.xml index f66ba3c4df..c38b3fcda4 100755 --- a/indra/newview/app_settings/high_graphics.xml +++ b/indra/newview/app_settings/high_graphics.xml @@ -29,7 +29,7 @@ - + diff --git a/indra/newview/app_settings/low_graphics.xml b/indra/newview/app_settings/low_graphics.xml index 304e7c7347..b0ddb5bd56 100755 --- a/indra/newview/app_settings/low_graphics.xml +++ b/indra/newview/app_settings/low_graphics.xml @@ -29,7 +29,7 @@ - + diff --git a/indra/newview/app_settings/mid_graphics.xml b/indra/newview/app_settings/mid_graphics.xml index 68f193a15f..41344f935d 100755 --- a/indra/newview/app_settings/mid_graphics.xml +++ b/indra/newview/app_settings/mid_graphics.xml @@ -29,7 +29,7 @@ - + diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index bb8b810b93..ef6107b1d5 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -10030,13 +10030,15 @@ RenderAutoMuteSurfaceAreaLimit Comment - Maximum surface area of attachments before an avatar is rendered as a simple impostor (0 to not use this limit). + Maximum surface area of attachments before an avatar is + rendered as a simple impostor (to not use this limit, set to zero + or set RenderAvatarMaxComplexity to zero). Persist 1 Type F32 Value - 10.0E6 + 1000.0 RenderAutoMuteLogging diff --git a/indra/newview/app_settings/ultra_graphics.xml b/indra/newview/app_settings/ultra_graphics.xml index a333634fea..6b8956bf79 100755 --- a/indra/newview/app_settings/ultra_graphics.xml +++ b/indra/newview/app_settings/ultra_graphics.xml @@ -30,7 +30,7 @@ based on default graphics setting --> - + diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt index 3b58b943cf..222a992f03 100755 --- a/indra/newview/featuretable.txt +++ b/indra/newview/featuretable.txt @@ -34,8 +34,7 @@ RenderAvatarPhysicsLODFactor 1 1.0 RenderAvatarMaxNonImpostors 1 16 RenderAvatarMaxComplexity 1 80000 RenderAvatarVP 1 1 -RenderAutoMuteByteLimit 1 10000000 -RenderAutoMuteSurfaceAreaLimit 1 1.0E6 +RenderAutoMuteSurfaceAreaLimit 1 1000.0 RenderCubeMap 1 1 RenderDelayVBUpdate 1 0 RenderFarClip 1 256 diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt index 024aab83dd..f46de50ef6 100755 --- a/indra/newview/featuretable_mac.txt +++ b/indra/newview/featuretable_mac.txt @@ -34,8 +34,7 @@ RenderAvatarPhysicsLODFactor 1 1.0 RenderAvatarMaxNonImpostors 1 12 RenderAvatarMaxComplexity 1 60000 RenderAvatarVP 1 1 -RenderAutoMuteByteLimit 1 10000000 -RenderAutoMuteSurfaceAreaLimit 1 1.0E6 +RenderAutoMuteSurfaceAreaLimit 1 1000.0 RenderCubeMap 1 1 RenderDelayVBUpdate 1 0 RenderFarClip 1 256 diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index c88f5d1fce..e5d440fa3e 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -6522,10 +6522,14 @@ bool LLVOAvatar::isTooComplex() const { // Determine if visually muted or not static LLCachedControl max_render_cost(gSavedSettings, "RenderAvatarMaxComplexity", 0U); - static LLCachedControl max_attachment_area(gSavedSettings, "RenderAutoMuteSurfaceAreaLimit", 10.0E6f); - too_complex = ((max_render_cost > 0 && mVisualComplexity > max_render_cost) - || (max_attachment_area > 0.0f && mAttachmentSurfaceArea > max_attachment_area) - ); + static LLCachedControl max_attachment_area(gSavedSettings, "RenderAutoMuteSurfaceAreaLimit", 1000.0f); + // If the user has chosen unlimited max complexity, we also disregard max attachment area + // so that unlimited will completely disable the overly complex impostor rendering + // yes, this leaves them vulnerable to griefing objects... their choice + too_complex = ( max_render_cost > 0 + && ( mVisualComplexity > max_render_cost + || (max_attachment_area > 0.0f && mAttachmentSurfaceArea > max_attachment_area) + )); } return too_complex; @@ -8282,10 +8286,10 @@ void LLVOAvatar::idleUpdateRenderComplexity() mText->addLine(info_line, info_color, info_style); // Attachment Surface Area - static LLCachedControl max_attachment_area(gSavedSettings, "RenderAutoMuteSurfaceAreaLimit", 10.0E6f); + static LLCachedControl max_attachment_area(gSavedSettings, "RenderAutoMuteSurfaceAreaLimit", 1000.0f); info_line = llformat("%.2f m^2", mAttachmentSurfaceArea); - if (max_attachment_area != 0) // zero means don't care, so don't bother coloring based on this + if (max_render_cost != 0 && max_attachment_area != 0) // zero means don't care, so don't bother coloring based on this { green_level = 1.f-llclamp((mAttachmentSurfaceArea-max_attachment_area)/max_attachment_area, 0.f, 1.f); red_level = llmin(mAttachmentSurfaceArea/max_attachment_area, 1.f);