diff --git a/indra/llcommon/llmemory.cpp b/indra/llcommon/llmemory.cpp index d6ae1284d3..9bade9ea69 100644 --- a/indra/llcommon/llmemory.cpp +++ b/indra/llcommon/llmemory.cpp @@ -225,38 +225,72 @@ U64 LLMemory::getCurrentRSS() } #elif defined(LL_LINUX) +// Linux RSS appears to have drifted from the implementation below. +// U64 LLMemory::getCurrentRSS() +// { +// static const char statPath[] = "/proc/self/stat"; +// LLFILE *fp = LLFile::fopen(statPath, "r"); +// U64 rss = 0; -U64 LLMemory::getCurrentRSS() -{ - static const char statPath[] = "/proc/self/stat"; - LLFILE *fp = LLFile::fopen(statPath, "r"); - U64 rss = 0; +// if (fp == NULL) +// { +// LL_WARNS() << "couldn't open " << statPath << LL_ENDL; +// return 0; +// } - if (fp == NULL) - { - LL_WARNS() << "couldn't open " << statPath << LL_ENDL; - return 0; - } - - // Eee-yew! See Documentation/filesystems/proc.txt in your - // nearest friendly kernel tree for details. +// // Eee-yew! See Documentation/filesystems/proc.txt in your +// // nearest friendly kernel tree for details. - { - int ret = fscanf(fp, "%*d (%*[^)]) %*c %*d %*d %*d %*d %*d %*d %*d " - "%*d %*d %*d %*d %*d %*d %*d %*d %*d %*d %*d %Lu", - &rss); - if (ret != 1) - { - LL_WARNS() << "couldn't parse contents of " << statPath << LL_ENDL; - rss = 0; - } - } +// { +// int ret = fscanf(fp, "%*d (%*[^)]) %*c %*d %*d %*d %*d %*d %*d %*d " +// "%*d %*d %*d %*d %*d %*d %*d %*d %*d %*d %*d %Lu", +// &rss); +// if (ret != 1) +// { +// LL_WARNS() << "couldn't parse contents of " << statPath << LL_ENDL; +// rss = 0; +// } +// } - fclose(fp); +// fclose(fp); - return rss; +// return rss; +// } +#include +#include +#include +#include +#include +#include + +// return the RSS in bytes. This value is converted to kilobytes implicitly elsewhere. +U64 LLMemory::getCurrentRSS() { + namespace fs = std::filesystem; + + // Get the page size (static variable) + static const long pageSize = sysconf(_SC_PAGESIZE); + + // Open the /proc/self/statm file + static const auto statmPath = fs::path("/proc/self/statm"); + std::ifstream statmFile(statmPath); + if (!statmFile.is_open()) { + return 0; // Return 0 if the file cannot be opened + } + + // Read the entire line from statm file + std::string line; + std::getline(statmFile, line); + statmFile.close(); + + // Extract the values from the line + std::istringstream iss(line); + long size, rss, shared, text, lib, data, dt; + iss >> size >> rss >> shared >> text >> lib >> data >> dt; + + // Convert pages to bytes and return RSS + return static_cast( rss * pageSize ); } - +// #else U64 LLMemory::getCurrentRSS() diff --git a/indra/llcommon/llthreadsafequeue.h b/indra/llcommon/llthreadsafequeue.h index 48b50a2cea..082337cf3e 100644 --- a/indra/llcommon/llthreadsafequeue.h +++ b/indra/llcommon/llthreadsafequeue.h @@ -311,7 +311,7 @@ bool LLThreadSafeQueue::push_(lock_t& lock, T&& element) // Make thread queue capacity hangs visible // return false; { - LL_WARNS("ThreadPool") << "Threadsafe queue push_(lockacquired) queue full " << mStorage.size() << " >= " << mCapacity << LL_ENDL; + LL_WARNS_ONCE("ThreadPool") << "Threadsafe queue push_(lockacquired) queue full " << mStorage.size() << " >= " << mCapacity << LL_ENDL; return false; } // diff --git a/indra/llinventory/llpermissions.cpp b/indra/llinventory/llpermissions.cpp index fd9997b885..d3b5734616 100644 --- a/indra/llinventory/llpermissions.cpp +++ b/indra/llinventory/llpermissions.cpp @@ -947,7 +947,7 @@ std::ostream& operator<<(std::ostream &s, const LLAggregatePermissions &perm) } // This converts a permissions mask into a string for debugging use. -void mask_to_string(U32 mask, char* str) +void mask_to_string(U32 mask, char* str, bool isOpenSim /*=false*/) // remove misleading X for export when not in OpenSim { if (mask & PERM_MOVE) { @@ -990,23 +990,29 @@ void mask_to_string(U32 mask, char* str) str++; // OpenSim export permission - if (mask & PERM_EXPORT) +#ifdef OPENSIM + // The export permission is only available in OpenSim. + if (isOpenSim) { - *str = 'X'; + if (mask & PERM_EXPORT) + { + *str = 'X'; + } + else + { + *str = ' '; + } + str++; } - else - { - *str = ' '; - } - str++; +#endif // *str = '\0'; } -std::string mask_to_string(U32 mask) +std::string mask_to_string(U32 mask, bool isOpenSim /*=false*/) // remove misleading X for export when not in OpenSim { char str[16]; - mask_to_string(mask, str); + mask_to_string(mask, str, isOpenSim); // remove misleading X for export when not in OpenSim return std::string(str); } diff --git a/indra/llinventory/llpermissions.h b/indra/llinventory/llpermissions.h index 8646224b7e..bcf03b8e41 100644 --- a/indra/llinventory/llpermissions.h +++ b/indra/llinventory/llpermissions.h @@ -35,8 +35,8 @@ // prototypes class LLMessageSystem; -extern void mask_to_string(U32 mask, char* str); -extern std::string mask_to_string(U32 mask); +extern void mask_to_string(U32 mask, char* str, bool isOpenSim=false); +extern std::string mask_to_string(U32 mask, bool isOpenSim=false); template class LLMetaClassT; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 56d1b498e3..b03eb1dc9c 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -9948,7 +9948,7 @@ Type U32 Value - 64 + 0 NoPreload @@ -14282,7 +14282,7 @@ Change of this parameter will affect the layout of buttons in notification toast Type U32 Value - 2048 + 4096 SceneLoadLowMemoryBound @@ -14293,7 +14293,7 @@ Change of this parameter will affect the layout of buttons in notification toast Type U32 Value - 750 + 2048 SceneLoadMinRadius diff --git a/indra/newview/fsareasearch.cpp b/indra/newview/fsareasearch.cpp index b81a20454f..e1cf90b490 100644 --- a/indra/newview/fsareasearch.cpp +++ b/indra/newview/fsareasearch.cpp @@ -174,6 +174,11 @@ FSAreaSearch::FSAreaSearch(const LLSD& key) : mRlvBehaviorCallbackConnection() { LLViewerRegion::sFSAreaSearchActive = true; + if( LLViewerRegion* region = gAgent.getRegion() ) + { + checkRegion(); + } + mFactoryMap["area_search_list_panel"] = LLCallbackMap(createPanelList, this); mFactoryMap["area_search_find_panel"] = LLCallbackMap(createPanelFind, this); mFactoryMap["area_search_filter_panel"] = LLCallbackMap(createPanelFilter, this); @@ -185,11 +190,24 @@ FSAreaSearch::FSAreaSearch(const LLSD& key) : mParcelChangedObserver = std::make_unique(this); LLViewerParcelMgr::getInstance()->addObserver(mParcelChangedObserver.get()); + mRegionChangeConnection = gAgent.addRegionChangedCallback(boost::bind(&FSAreaSearch::checkRegion, this)); } FSAreaSearch::~FSAreaSearch() { LLViewerRegion::sFSAreaSearchActive = false; + + // Tell the Simulator not to send us everything anymore + // and revert to the regular "keyhole" frustum of interest + // list updates. + if( !LLApp::isExiting() ) + { + if( LLViewerRegion* region = gAgent.getRegion() ) + { + region->useFullUpdateInterestListMode(false); + } + } + if (!gIdleCallbacks.deleteFunction(idle, this)) { LL_WARNS("FSAreaSearch") << "FSAreaSearch::~FSAreaSearch() failed to delete callback" << LL_ENDL; @@ -214,6 +232,11 @@ FSAreaSearch::~FSAreaSearch() LLViewerParcelMgr::getInstance()->removeObserver(mParcelChangedObserver.get()); mParcelChangedObserver = nullptr; } + + if (mRegionChangeConnection.connected()) + { + mRegionChangeConnection.disconnect(); + } } BOOL FSAreaSearch::postBuild() @@ -320,24 +343,27 @@ void FSAreaSearch::updateRlvRestrictions(ERlvBehaviour behavior) void FSAreaSearch::checkRegion() { - if (mActive) - { - // Check if we changed region, and if we did, clear the object details cache. - if (LLViewerRegion* region = gAgent.getRegion(); region && (region != mLastRegion)) + static LLViewerRegion *last_region = nullptr; + // Check if we changed region, if so reset the interest list to full, + LLViewerRegion* region = gAgent.getRegion(); + if( region && (region != last_region) ) + { + region->useFullUpdateInterestListMode(true, true); // we force this because we want a true count + if ( mActive ) { - if (!mExcludeNeighborRegions) + // and if we did and are active, clear the object details cache. + if( !mExcludeNeighborRegions ) { std::vector uniqueRegions; region->getNeighboringRegions(uniqueRegions); - if (std::find(uniqueRegions.begin(), uniqueRegions.end(), mLastRegion) != uniqueRegions.end()) + if( std::find( uniqueRegions.begin(), uniqueRegions.end(), last_region ) != uniqueRegions.end() ) { // Crossed into a neighboring region, no need to clear everything. - mLastRegion = region; + last_region = region; return; } // else teleported into a new region } - mLastRegion = region; mRequested = 0; mObjectDetails.clear(); mRegionRequests.clear(); @@ -347,7 +373,14 @@ void FSAreaSearch::checkRegion() mPanelList->setAgentLastPosition(gAgent.getPositionGlobal()); mRefresh = true; } + if( last_region ) + { + // we clear the old region status, because the instance may persist for us + // but the region itself will have reset when we left. + last_region->clearFullUpdateInterestList(); + } } + last_region = region; } void FSAreaSearch::refreshList(bool cache_clear) diff --git a/indra/newview/fsareasearch.h b/indra/newview/fsareasearch.h index 95939f17d7..b7dc2be0f3 100644 --- a/indra/newview/fsareasearch.h +++ b/indra/newview/fsareasearch.h @@ -213,7 +213,8 @@ private: typedef std::map name_cache_connection_map_t; name_cache_connection_map_t mNameCacheConnections; - LLViewerRegion* mLastRegion; + boost::signals2::connection mRegionChangeConnection; // reset interest list verbosity after TP + class FSParcelChangeObserver; friend class FSParcelChangeObserver; diff --git a/indra/newview/llfloater360capture.cpp b/indra/newview/llfloater360capture.cpp index 0648d651d1..975beca295 100644 --- a/indra/newview/llfloater360capture.cpp +++ b/indra/newview/llfloater360capture.cpp @@ -51,6 +51,27 @@ #include +// Fix 360 capture missing objects after TP +void LLFloater360Capture::checkRegion() +{ + static LLViewerRegion *last_region = nullptr; + // Check if we changed region, if so reset the interest list to full, + LLViewerRegion* region = gAgent.getRegion(); + if( region && (region != last_region) ) + { + region->useFullUpdateInterestListMode(true, true); + if( last_region ) + { + // we clear the old region status, because the instance may persist for us + // but the region itself will have reset when we left. + last_region->clearFullUpdateInterestList(); + } + } + last_region = region; +} + +// + LLFloater360Capture::LLFloater360Capture(const LLSD& key) : LLFloater(key) { @@ -66,10 +87,19 @@ LLFloater360Capture::LLFloater360Capture(const LLSD& key) // will take care of cleaning up for us. if (gSavedSettings.getBOOL("360CaptureUseInterestListCap")) { +// Fix 360 capture missing objects after TP // send everything to us for as long as this floater is open - const bool send_everything = true; - changeInterestListMode(send_everything); + // const bool send_everything = true; + // changeInterestListMode(send_everything); + // } + // } + if( LLViewerRegion* region = gAgent.getRegion() ) + { + checkRegion(); + } } + mRegionChangeConnection = gAgent.addRegionChangedCallback(boost::bind(&LLFloater360Capture::checkRegion, this)); +// } LLFloater360Capture::~LLFloater360Capture() @@ -86,9 +116,22 @@ LLFloater360Capture::~LLFloater360Capture() // list updates. if (!LLApp::isExiting() && gSavedSettings.getBOOL("360CaptureUseInterestListCap")) { - const bool send_everything = false; - changeInterestListMode(send_everything); +// Fix 360 capture missing objects after TP +// const bool send_everything = false; +// changeInterestListMode(send_everything); +// } +// } + + if( LLViewerRegion* region = gAgent.getRegion() ) + { + region->useFullUpdateInterestListMode(false); + } } + if (mRegionChangeConnection.connected()) + { + mRegionChangeConnection.disconnect(); + } +// } BOOL LLFloater360Capture::postBuild() @@ -171,6 +214,8 @@ void LLFloater360Capture::onChooseQualityRadioGroup() setSourceImageSize(); } +// Area search improvements - allow area search and 360 to coexist nicely. +// Code moved to LLViewerRegion.cpp // Using a new capability, tell the simulator that we want it to send everything // it knows about and not just what is in front of the camera, in its view // frustum. We need this feature so that the contents of the region that appears @@ -183,40 +228,40 @@ void LLFloater360Capture::onChooseQualityRadioGroup() // (hopefully) small period of time while the full contents resolves. // Pass in a flag to ask the simulator/interest list to "send everything" or // not (the default mode) -void LLFloater360Capture::changeInterestListMode(bool send_everything) -{ - LLSD body; +// void LLFloater360Capture::changeInterestListMode(bool send_everything) +// { +// LLSD body; +// if (send_everything) +// { +// body["mode"] = LLSD::String("360"); +// } +// else +// { +// body["mode"] = LLSD::String("default"); +// } - if (send_everything) - { - body["mode"] = LLSD::String("360"); - } - else - { - body["mode"] = LLSD::String("default"); - } - - if (gAgent.requestPostCapability("InterestList", body, [](const LLSD & response) - { - LL_INFOS("360Capture") << - "InterestList capability responded: \n" << - ll_pretty_print_sd(response) << - LL_ENDL; - })) - { - LL_INFOS("360Capture") << - "Successfully posted an InterestList capability request with payload: \n" << - ll_pretty_print_sd(body) << - LL_ENDL; - } - else - { - LL_INFOS("360Capture") << - "Unable to post an InterestList capability request with payload: \n" << - ll_pretty_print_sd(body) << - LL_ENDL; - } -} +// if (gAgent.requestPostCapability("InterestList", body, [](const LLSD & response) +// { +// LL_INFOS("360Capture") << +// "InterestList capability responded: \n" << +// ll_pretty_print_sd(response) << +// LL_ENDL; +// })) +// { +// LL_INFOS("360Capture") << +// "Successfully posted an InterestList capability request with payload: \n" << +// ll_pretty_print_sd(body) << +// LL_ENDL; +// } +// else +// { +// LL_INFOS("360Capture") << +// "Unable to post an InterestList capability request with payload: \n" << +// ll_pretty_print_sd(body) << +// LL_ENDL; +// } +// } +// // There is is a setting (360CaptureSourceImageSize) that holds the size // (width == height since it's a square) of each of the 6 source snapshots. diff --git a/indra/newview/llfloater360capture.h b/indra/newview/llfloater360capture.h index 8f765c0b1b..ccaab5ce6d 100644 --- a/indra/newview/llfloater360capture.h +++ b/indra/newview/llfloater360capture.h @@ -50,11 +50,14 @@ class LLFloater360Capture: void onOpen(const LLSD& key) override; void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event) override; - void changeInterestListMode(bool send_everything); + // void changeInterestListMode(bool send_everything); // Area search improvements - code relocated to LLViewerRegion const std::string getHTMLBaseFolder(); void capture360Images(); - + // make 360 work properly after region crossing/TP + void checkRegion(); + boost::signals2::connection mRegionChangeConnection; + // const std::string makeFullPathToJS(const std::string filename); void writeDataURLHeader(const std::string filename); void writeDataURLFooter(const std::string filename); diff --git a/indra/newview/llfloaterproperties.cpp b/indra/newview/llfloaterproperties.cpp index 1c6d370478..116139a576 100644 --- a/indra/newview/llfloaterproperties.cpp +++ b/indra/newview/llfloaterproperties.cpp @@ -453,32 +453,40 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item) } std::string perm_string; - +// remove misleading X for export when not in OpenSim + bool isOpenSim {false}; +#ifdef OPENSIM + if( LLGridManager::instance().isInOpenSim() ) + { + isOpenSim = true; + } +#endif +// perm_string = "B: "; - perm_string += mask_to_string(base_mask); + perm_string += mask_to_string(base_mask, isOpenSim); // remove misleading X for export when not in OpenSim getChild("BaseMaskDebug")->setValue(perm_string); getChildView("BaseMaskDebug")->setVisible(TRUE); perm_string = "O: "; - perm_string += mask_to_string(owner_mask); + perm_string += mask_to_string(owner_mask, isOpenSim); // remove misleading X for export when not in OpenSim getChild("OwnerMaskDebug")->setValue(perm_string); getChildView("OwnerMaskDebug")->setVisible(TRUE); perm_string = "G"; perm_string += overwrite_group ? "*: " : ": "; - perm_string += mask_to_string(group_mask); + perm_string += mask_to_string(group_mask, isOpenSim); // remove misleading X for export when not in OpenSim getChild("GroupMaskDebug")->setValue(perm_string); getChildView("GroupMaskDebug")->setVisible(TRUE); perm_string = "E"; perm_string += overwrite_everyone ? "*: " : ": "; - perm_string += mask_to_string(everyone_mask); + perm_string += mask_to_string(everyone_mask, isOpenSim); // remove misleading X for export when not in OpenSim getChild("EveryoneMaskDebug")->setValue(perm_string); getChildView("EveryoneMaskDebug")->setVisible(TRUE); perm_string = "N"; perm_string += slam_perm ? "*: " : ": "; - perm_string += mask_to_string(next_owner_mask); + perm_string += mask_to_string(next_owner_mask, isOpenSim); // remove misleading X for export when not in OpenSim getChild("NextMaskDebug")->setValue(perm_string); getChildView("NextMaskDebug")->setVisible(TRUE); } diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp index 55c6de7696..315ffa203a 100644 --- a/indra/newview/llpanelpermissions.cpp +++ b/indra/newview/llpanelpermissions.cpp @@ -74,6 +74,7 @@ #include "rlvcommon.h" // [/RLVa:KB] // For OpenSim export permisson +#include "llviewernetwork.h" // for gridmanager #include "lfsimfeaturehandler.h" #include "llinventoryfunctions.h" @@ -630,7 +631,7 @@ void LLPanelPermissions::refresh() } else { -// FIRE-777:allow batch edit for name and description +// FIRE-777:�allow batch edit for name and description // getChild("Object Name")->setValue(LLStringUtil::null); // LineEditorObjectDesc->setText(LLStringUtil::null); if (keyboard_focus_view != LineEditorObjectName) @@ -650,7 +651,7 @@ void LLPanelPermissions::refresh() // figure out the contents of the name, description, & category BOOL edit_name_desc = FALSE; -// FIRE-777:allow batch edit for name and description +// FIRE-777:�allow batch edit for name and description // if (is_one_object && objectp->permModify() && !objectp->isPermanentEnforced()) if (objectp->permModify()) // /FIRE-777 @@ -811,20 +812,28 @@ void LLPanelPermissions::refresh() &next_owner_mask_on, &next_owner_mask_off); - if (gSavedSettings.getBOOL("DebugPermissions") ) { +// remove misleading X for export when not in OpenSim + bool isOpenSim {false}; +#ifdef OPENSIM + if( LLGridManager::instance().isInOpenSim() ) + { + isOpenSim = true; + } +#endif +// if (valid_base_perms) { - getChild("B:")->setValue("B: " + mask_to_string(base_mask_on)); + getChild("B:")->setValue("B: " + mask_to_string(base_mask_on, isOpenSim)); // remove misleading X for export when not in OpenSim getChildView("B:")->setVisible(TRUE); - getChild("O:")->setValue("O: " + mask_to_string(owner_mask_on)); + getChild("O:")->setValue("O: " + mask_to_string(owner_mask_on, isOpenSim)); // remove misleading X for export when not in OpenSim getChildView("O:")->setVisible(TRUE); - getChild("G:")->setValue("G: " + mask_to_string(group_mask_on)); + getChild("G:")->setValue("G: " + mask_to_string(group_mask_on, isOpenSim)); // remove misleading X for export when not in OpenSim getChildView("G:")->setVisible(TRUE); - getChild("E:")->setValue("E: " + mask_to_string(everyone_mask_on)); + getChild("E:")->setValue("E: " + mask_to_string(everyone_mask_on, isOpenSim)); // remove misleading X for export when not in OpenSim getChildView("E:")->setVisible(TRUE); - getChild("N:")->setValue("N: " + mask_to_string(next_owner_mask_on)); + getChild("N:")->setValue("N: " + mask_to_string(next_owner_mask_on, isOpenSim)); // remove misleading X for export when not in OpenSim getChildView("N:")->setVisible(TRUE); } else if(!root_selected) @@ -834,15 +843,15 @@ void LLPanelPermissions::refresh() LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstNode(); if (node && node->mValid) { - getChild("B:")->setValue("B: " + mask_to_string( node->mPermissions->getMaskBase())); + getChild("B:")->setValue("B: " + mask_to_string( node->mPermissions->getMaskBase(), isOpenSim)); // remove misleading X for export when not in OpenSim getChildView("B:")->setVisible(TRUE); - getChild("O:")->setValue("O: " + mask_to_string(node->mPermissions->getMaskOwner())); + getChild("O:")->setValue("O: " + mask_to_string(node->mPermissions->getMaskOwner(), isOpenSim)); // remove misleading X for export when not in OpenSim getChildView("O:")->setVisible(TRUE); - getChild("G:")->setValue("G: " + mask_to_string(node->mPermissions->getMaskGroup())); + getChild("G:")->setValue("G: " + mask_to_string(node->mPermissions->getMaskGroup(), isOpenSim)); // remove misleading X for export when not in OpenSim getChildView("G:")->setVisible(TRUE); - getChild("E:")->setValue("E: " + mask_to_string(node->mPermissions->getMaskEveryone())); + getChild("E:")->setValue("E: " + mask_to_string(node->mPermissions->getMaskEveryone(), isOpenSim)); // remove misleading X for export when not in OpenSim getChildView("E:")->setVisible(TRUE); - getChild("N:")->setValue("N: " + mask_to_string(node->mPermissions->getMaskNextOwner())); + getChild("N:")->setValue("N: " + mask_to_string(node->mPermissions->getMaskNextOwner(), isOpenSim)); // remove misleading X for export when not in OpenSim getChildView("N:")->setVisible(TRUE); } } @@ -864,7 +873,7 @@ void LLPanelPermissions::refresh() //if (objectp->permExport()) flag_mask |= PERM_EXPORT; // OpenSim export permissions - getChild("F:")->setValue("F:" + mask_to_string(flag_mask)); + getChild("F:")->setValue("F:" + mask_to_string(flag_mask, isOpenSim)); // remove misleading X for export when not in OpenSim getChildView("F:")->setVisible( TRUE); } else @@ -910,7 +919,7 @@ void LLPanelPermissions::refresh() getChildView("checkbox allow everyone copy")->setEnabled(FALSE); } - // Opensim export permissions - Codeblock courtesy of Liru Frs. + // Opensim export permissions - Codeblock courtesy of Liru F�rs. // Is this user allowed to toggle export on this object? if (LFSimFeatureHandler::instance().simSupportsExport() && self_owned && mCreatorID == mOwnerID diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp index c1666dc2c7..f6e5b96d73 100644 --- a/indra/newview/llsidepaneliteminfo.cpp +++ b/indra/newview/llsidepaneliteminfo.cpp @@ -54,6 +54,7 @@ #include "llexperiencecache.h" #include "lltrans.h" #include "llviewerregion.h" +#include "llviewernetwork.h" // for gridmanager // [RLVa:KB] - Checked: RLVa-2.0.1 #include "rlvactions.h" #include "rlvcommon.h" @@ -610,27 +611,37 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) std::string perm_string; +// remove misleading X for export when not in OpenSim + bool isOpenSim {false}; +#ifdef OPENSIM + if( LLGridManager::instance().isInOpenSim() ) + { + isOpenSim = true; + } +#endif +// + perm_string = "B: "; - perm_string += mask_to_string(base_mask); + perm_string += mask_to_string(base_mask, isOpenSim); // remove misleading X for export when not in OpenSim getChild("BaseMaskDebug")->setValue(perm_string); perm_string = "O: "; - perm_string += mask_to_string(owner_mask); + perm_string += mask_to_string(owner_mask, isOpenSim); // remove misleading X for export when not in OpenSim getChild("OwnerMaskDebug")->setValue(perm_string); perm_string = "G"; perm_string += overwrite_group ? "*: " : ": "; - perm_string += mask_to_string(group_mask); + perm_string += mask_to_string(group_mask, isOpenSim); // remove misleading X for export when not in OpenSim getChild("GroupMaskDebug")->setValue(perm_string); perm_string = "E"; perm_string += overwrite_everyone ? "*: " : ": "; - perm_string += mask_to_string(everyone_mask); + perm_string += mask_to_string(everyone_mask, isOpenSim); // remove misleading X for export when not in OpenSim getChild("EveryoneMaskDebug")->setValue(perm_string); perm_string = "N"; perm_string += slam_perm ? "*: " : ": "; - perm_string += mask_to_string(next_owner_mask); + perm_string += mask_to_string(next_owner_mask, isOpenSim); // remove misleading X for export when not in OpenSim getChild("NextMaskDebug")->setValue(perm_string); } else diff --git a/indra/newview/llsidepaneltaskinfo.cpp b/indra/newview/llsidepaneltaskinfo.cpp index d173841f6d..1039115c56 100644 --- a/indra/newview/llsidepaneltaskinfo.cpp +++ b/indra/newview/llsidepaneltaskinfo.cpp @@ -65,6 +65,7 @@ #include "lltextbase.h" #include "llstring.h" #include "lltrans.h" +#include "llviewernetwork.h" // for gridmanager // [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.2a) #include "llslurl.h" #include "rlvhandler.h" @@ -638,21 +639,30 @@ void LLSidepanelTaskInfo::refresh() if (gSavedSettings.getBOOL("DebugPermissions") ) { +// remove misleading X for export when not in OpenSim + bool isOpenSim {false}; +#ifdef OPENSIM + if( LLGridManager::instance().isInOpenSim() ) + { + isOpenSim = true; + } +#endif +// if (valid_base_perms) { - getChild("B:")->setValue("B: " + mask_to_string(base_mask_on)); + getChild("B:")->setValue("B: " + mask_to_string(base_mask_on, isOpenSim)); // remove misleading X for export when not in OpenSim getChildView("B:")->setVisible( TRUE); - getChild("O:")->setValue("O: " + mask_to_string(owner_mask_on)); + getChild("O:")->setValue("O: " + mask_to_string(owner_mask_on, isOpenSim)); // remove misleading X for export when not in OpenSim getChildView("O:")->setVisible( TRUE); - getChild("G:")->setValue("G: " + mask_to_string(group_mask_on)); + getChild("G:")->setValue("G: " + mask_to_string(group_mask_on, isOpenSim)); // remove misleading X for export when not in OpenSim getChildView("G:")->setVisible( TRUE); - getChild("E:")->setValue("E: " + mask_to_string(everyone_mask_on)); + getChild("E:")->setValue("E: " + mask_to_string(everyone_mask_on, isOpenSim)); // remove misleading X for export when not in OpenSim getChildView("E:")->setVisible( TRUE); - getChild("N:")->setValue("N: " + mask_to_string(next_owner_mask_on)); + getChild("N:")->setValue("N: " + mask_to_string(next_owner_mask_on, isOpenSim)); // remove misleading X for export when not in OpenSim getChildView("N:")->setVisible( TRUE); } @@ -662,7 +672,7 @@ void LLSidepanelTaskInfo::refresh() if (objectp->permCopy()) flag_mask |= PERM_COPY; if (objectp->permTransfer()) flag_mask |= PERM_TRANSFER; - getChild("F:")->setValue("F:" + mask_to_string(flag_mask)); + getChild("F:")->setValue("F:" + mask_to_string(flag_mask, isOpenSim)); // remove misleading X for export when not in OpenSim getChildView("F:")->setVisible( TRUE); } else diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 83523f44a7..2bb112c184 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -1480,49 +1480,85 @@ class LLAdvancedDumpRegionObjectCache : public view_listener_t } }; -class LLAdvancedInterestListFullUpdate : public view_listener_t +// Handle InterestListFullUpdate as a proper state toggle +// class LLAdvancedInterestListFullUpdate : public view_listener_t +// { +// bool handleEvent(const LLSD& userdata) +// { +// LLSD request; +// LLSD body; +// static bool using_360 = false; + +// if (using_360) +// { +// body["mode"] = LLSD::String("default"); +// } +// else +// { +// body["mode"] = LLSD::String("360"); +// } +// using_360 = !using_360; + +// if (gAgent.requestPostCapability("InterestList", body, [](const LLSD& response) +// { +// LL_INFOS("Int") << +// "InterestList capability responded: \n" << +// ll_pretty_print_sd(response) << +// LL_ENDL; +// })) +// { +// LL_INFOS("360Capture") << +// "Successfully posted an InterestList capability request with payload: \n" << +// ll_pretty_print_sd(body) << +// LL_ENDL; +// return true; +// } +// else +// { +// LL_INFOS("360Capture") << +// "Unable to post an InterestList capability request with payload: \n" << +// ll_pretty_print_sd(body) << +// LL_ENDL; +// return false; +// } +// } +// }; +class LLAdvancedCheckInterestListFullUpdate : public view_listener_t { bool handleEvent(const LLSD& userdata) { - LLSD request; - LLSD body; - static bool using_360 = false; - - if (using_360) + LLViewerRegion* regionp = gAgent.getRegion(); + if (regionp) { - body["mode"] = LLSD::String("default"); + bool current_value = ( regionp->mFullUpdateInUseCount > 0 ); + return current_value; } - else - { - body["mode"] = LLSD::String("360"); - } - using_360 = !using_360; - - if (gAgent.requestPostCapability("InterestList", body, [](const LLSD& response) - { - LL_INFOS("360Capture") << - "InterestList capability responded: \n" << - ll_pretty_print_sd(response) << - LL_ENDL; - })) - { - LL_INFOS("360Capture") << - "Successfully posted an InterestList capability request with payload: \n" << - ll_pretty_print_sd(body) << - LL_ENDL; - return true; - } - else - { - LL_INFOS("360Capture") << - "Unable to post an InterestList capability request with payload: \n" << - ll_pretty_print_sd(body) << - LL_ENDL; - return false; - } + return false; } }; - +class LLAdvancedToggleInterestListFullUpdate : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + LLViewerRegion* regionp = gAgent.getRegion(); + if (regionp) + { + bool current_value = ( regionp->mFullUpdateInUseCount > 0 ); + if(current_value) + { + regionp->useFullUpdateInterestListMode(false, true); + return false; + } + else + { + regionp->useFullUpdateInterestListMode(true); + return true; + } + } + return false; + } +}; +// class LLAdvancedBuyCurrencyTest : public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -12236,7 +12272,12 @@ void initialize_menus() // Advanced > World view_listener_t::addMenu(new LLAdvancedDumpScriptedCamera(), "Advanced.DumpScriptedCamera"); view_listener_t::addMenu(new LLAdvancedDumpRegionObjectCache(), "Advanced.DumpRegionObjectCache"); - view_listener_t::addMenu(new LLAdvancedInterestListFullUpdate(), "Advanced.InterestListFullUpdate"); + + // Make InterestList a proper stateful toggle + // view_listener_t::addMenu(new LLAdvancedInterestListFullUpdate(), "Advanced.InterestListFullUpdate"); + view_listener_t::addMenu(new LLAdvancedCheckInterestListFullUpdate(), "Advanced.CheckInterestListFullUpdate"); + view_listener_t::addMenu(new LLAdvancedToggleInterestListFullUpdate(), "Advanced.ToggleInterestListFullUpdate"); + // // Advanced > UI commit.add("Advanced.WebBrowserTest", boost::bind(&handle_web_browser_test, _2)); // sigh! this one opens the MEDIA browser diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 30b2cea296..de2b842143 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -1728,6 +1728,7 @@ BOOL LLViewerRegion::isViewerCameraStatic() void LLViewerRegion::killInvisibleObjects(F32 max_time) { + if(sFSAreaSearchActive){ return; } // FIRE-32668 Area Search improvements if(!sVOCacheCullingEnabled) { return; @@ -3555,6 +3556,53 @@ void LLViewerRegion::logActiveCapabilities() const log_capabilities(mImpl->mCapabilities); } +// Area Search improvement +void LLViewerRegion::useFullUpdateInterestListMode(bool send_everything, bool force_update) +{ + static const char *FSLogTag = "InterestListMode"; + U32 previousCount = mFullUpdateInUseCount; + LLSD body; + LL_DEBUGS(FSLogTag) << "useFullUpdateInterestListMode" << " send_everything:" << send_everything << " inUse: " << mFullUpdateInUseCount << LL_ENDL; + if (send_everything) + { + body["mode"] = LLSD::String("360"); + mFullUpdateInUseCount++; // we increment irrespective of the actual success as we're really just tracking the attempts. + } + else + { + if(mFullUpdateInUseCount > 0) + { + mFullUpdateInUseCount--; // see above. + } + if(force_update) + { + mFullUpdateInUseCount=0; // when we are forcing the off state then we need to clear the count to zero. + } + body["mode"] = LLSD::String("default"); + } + + if( force_update || ( send_everything && mFullUpdateInUseCount == 1 ) || ( ( !send_everything ) && mFullUpdateInUseCount == 0 && previousCount != 0) ) // Only send if this is the first enable or last disable. + { + if (gAgent.requestPostCapability("InterestList", body, + [](const LLSD &response) + { + LL_INFOS(FSLogTag) << "InterestList capability responded: \n" + << ll_pretty_print_sd(response) << LL_ENDL; + })) + { + LL_INFOS(FSLogTag) << "Successfully posted an InterestList capability request with payload: \n" + << ll_pretty_print_sd(body) << LL_ENDL; + } + else + { + LL_INFOS(FSLogTag) << "Unable to post an InterestList capability request with payload: \n" + << ll_pretty_print_sd(body) << LL_ENDL; + } + } + LL_DEBUGS(FSLogTag) << "useFullUpdateInterestListMode" << " (AFTER): inUse: " << mFullUpdateInUseCount << LL_ENDL; +} +// + LLSpatialPartition* LLViewerRegion::getSpatialPartition(U32 type) { if (type < mImpl->mObjectPartition.size() && type < PARTITION_VO_CACHE) diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index 786b530ab9..e1ab37b890 100644 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -351,7 +351,11 @@ public: bool dynamicPathfindingEnabled() const; bool avatarHoverHeightEnabled() const; - +// Area search improvements + U32 mFullUpdateInUseCount {0}; + void clearFullUpdateInterestList(){ LL_DEBUGS("InterestListMode") << "Resetting for previous region" << LL_ENDL; mFullUpdateInUseCount = 0; }; + void useFullUpdateInterestListMode(bool full_update, bool force_update=false); +// // #ifdef OPENSIM std::set getGods() { return mGodNames; }; diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp index be7b2b1453..b92f147506 100644 --- a/indra/newview/llvocache.cpp +++ b/indra/newview/llvocache.cpp @@ -383,6 +383,21 @@ void LLVOCacheEntry::updateDebugSettings() LLMemory::updateMemoryInfo() ; U32 allocated_mem = LLMemory::getAllocatedMemKB().value(); static const F32 KB_to_MB = 1.f / 1024.f; + // FIRE-32688 Area search and other visibility issues + // If this machine has limited RAM, then restore the LL defaults. + // So long as we have at least 8GB of RAM, then we will use our values. + if( LLMemory::getAvailableMemKB() * KB_to_MB < 8096 ) + { + if( (U32)low_mem_bound_MB > 768 ) + { + gSavedSettings.setU32("SceneLoadLowMemoryBound", 768); + } + if( (U32)high_mem_bound_MB > 2048 ) + { + gSavedSettings.setU32("SceneLoadLowMemoryBound", 2048); + } + } + // U32 clamped_memory = llclamp(allocated_mem * KB_to_MB, (F32) low_mem_bound_MB, (F32) high_mem_bound_MB); const F32 adjust_range = high_mem_bound_MB - low_mem_bound_MB; const F32 adjust_factor = (high_mem_bound_MB - clamped_memory) / adjust_range; // [0, 1] @@ -404,7 +419,11 @@ void LLVOCacheEntry::updateDebugSettings() //the number of frames invisible objects stay in memory static LLCachedControl inv_obj_time(gSavedSettings,"NonvisibleObjectsInMemoryTime"); static const U32 MIN_FRAMES = 10; - static const U32 MAX_FRAMES = 64; + // FIRE-32688 Area search and other visibility + // static const U32 MAX_FRAMES = 64; + // 64 frames for many users now is about a second. Having this as the longest we wait before purging leads to excessively aggressive purging. + static const U32 MAX_FRAMES = 1024; + // const U32 clamped_frames = inv_obj_time ? llclamp((U32) inv_obj_time, MIN_FRAMES, MAX_FRAMES) : MAX_FRAMES; // [10, 64], with zero => 64 sMinFrameRange = MIN_FRAMES + ((clamped_frames - MIN_FRAMES) * adjust_factor); } diff --git a/indra/newview/skins/default/xui/de/floater_translation_settings.xml b/indra/newview/skins/default/xui/de/floater_translation_settings.xml index daec529fd4..89c6298b6c 100644 --- a/indra/newview/skins/default/xui/de/floater_translation_settings.xml +++ b/indra/newview/skins/default/xui/de/floater_translation_settings.xml @@ -1,17 +1,23 @@ - - Bing-AppID nicht verifiziert. Versuchen Sie es erneut. + + Azure-Service-Identifikator nicht verifiziert. Versuchen Sie es erneut. Google-API-Schlüssel nicht verifiziert. Versuchen Sie es erneut. - - Bing-AppID verifiziert. + + DeepL-Authentifizierungsschlüssel nicht verifiziert. Versuchen Sie es erneut. + + + Azure-Service-Identifikator verifiziert. Google-API-Schlüssel verifiziert. + + DeepL-Authentifizierungsschlüssel verifiziert. + Chat übersetzen in: @@ -39,19 +45,43 @@ Übersetzungsservice auswählen: - - + + + - - Bing-[http://www.bing.com/developers/createapp.aspx AppID]: + + [https://learn.microsoft.com/de-de/azure/cognitive-services/translator/create-translator-resource Einrichtung] -