From 11cbf8a3dc30fbcc00363ed9bd01a539c770d480 Mon Sep 17 00:00:00 2001 From: Angeldark Raymaker Date: Wed, 14 Aug 2024 22:49:28 +0100 Subject: [PATCH 1/6] FIRE-31508: check folder limit before attaching all the things in a folder --- indra/newview/llinventorybridge.cpp | 70 ++++++++++++++++++++++------- indra/newview/llinventorybridge.h | 1 + 2 files changed, 55 insertions(+), 16 deletions(-) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 22c488a892..088be32e8b 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -3680,6 +3680,11 @@ void LLFolderBridge::performAction(LLInventoryModel* model, std::string action) // Patch: ReplaceWornItemsOnly else if ("replaceitems" == action) { + // FIRE-31508: check folder limit + if (modifyOutfitExceedsWearFolderLimit()) + return; + // FIRE-31508 + LLInventoryModel* model = getInventoryModel(); if(!model) return; LLViewerInventoryCategory* cat = getCategory(); @@ -5368,6 +5373,35 @@ void LLFolderBridge::createWearable(LLFolderBridge* bridge, LLWearableType::ETyp LLAgentWearables::createWearable(type, false, parent_id); } +// FIRE-31508: refactored from void LLFolderBridge::modifyOutfit(BOOL append) +bool LLFolderBridge::modifyOutfitExceedsWearFolderLimit() +{ + LLInventoryModel *model = getInventoryModel(); + if (!model) + return false; + LLViewerInventoryCategory *cat = getCategory(); + if (!cat) + return false; + + // checking amount of items to wear + U32 max_items = gSavedSettings.getU32("WearFolderLimit"); + LLInventoryModel::cat_array_t cats; + LLInventoryModel::item_array_t items; + LLFindWearablesEx not_worn(/*is_worn=*/false, /*include_body_parts=*/false); + gInventory.collectDescendentsIf(cat->getUUID(), cats, items, LLInventoryModel::EXCLUDE_TRASH, not_worn); + + if (items.size() > max_items) + { + LLSD args; + args["AMOUNT"] = llformat("%d", max_items); + LLNotificationsUtil::add("TooManyWearables", args); + return true; + } + + return false; +} +// FIRE-31508 + void LLFolderBridge::modifyOutfit(BOOL append) { LLInventoryModel* model = getInventoryModel(); @@ -5375,24 +5409,28 @@ void LLFolderBridge::modifyOutfit(BOOL append) LLViewerInventoryCategory* cat = getCategory(); if(!cat) return; - // checking amount of items to wear - U32 max_items = gSavedSettings.getU32("WearFolderLimit"); - LLInventoryModel::cat_array_t cats; - LLInventoryModel::item_array_t items; - LLFindWearablesEx not_worn(/*is_worn=*/ false, /*include_body_parts=*/ false); - gInventory.collectDescendentsIf(cat->getUUID(), - cats, - items, - LLInventoryModel::EXCLUDE_TRASH, - not_worn); + // FIRE-31508: refactored to bool modifyOutfitExceedsWearFolderLimit(), rather than duplicating code + //// checking amount of items to wear + //U32 max_items = gSavedSettings.getU32("WearFolderLimit"); + //LLInventoryModel::cat_array_t cats; + //LLInventoryModel::item_array_t items; + //LLFindWearablesEx not_worn(/*is_worn=*/ false, /*include_body_parts=*/ false); + //gInventory.collectDescendentsIf(cat->getUUID(), + // cats, + // items, + // LLInventoryModel::EXCLUDE_TRASH, + // not_worn); - if (items.size() > max_items) - { - LLSD args; - args["AMOUNT"] = llformat("%d", max_items); - LLNotificationsUtil::add("TooManyWearables", args); + //if (items.size() > max_items) + //{ + // LLSD args; + // args["AMOUNT"] = llformat("%d", max_items); + // LLNotificationsUtil::add("TooManyWearables", args); + // return; + //} + if (modifyOutfitExceedsWearFolderLimit()) return; - } + // FIRE-31508 if (isAgentInventory()) { diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index bda5dca77a..d5210b79ca 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -389,6 +389,7 @@ protected: BOOL checkFolderForContentsOfType(LLInventoryModel* model, LLInventoryCollectFunctor& typeToCheck); + bool modifyOutfitExceedsWearFolderLimit(); // FIRE-31508 void modifyOutfit(BOOL append); void copyOutfitToClipboard(); void determineFolderType(); From 765652e337b4ac0979f93beeb04d904403ea4d14 Mon Sep 17 00:00:00 2001 From: Angeldark Raymaker Date: Tue, 20 Aug 2024 20:01:28 +0100 Subject: [PATCH 2/6] FIRE-31508: Remove/move unneeded gets --- indra/newview/llinventorybridge.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 088be32e8b..b7ed38fef0 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -5376,9 +5376,6 @@ void LLFolderBridge::createWearable(LLFolderBridge* bridge, LLWearableType::ETyp // FIRE-31508: refactored from void LLFolderBridge::modifyOutfit(BOOL append) bool LLFolderBridge::modifyOutfitExceedsWearFolderLimit() { - LLInventoryModel *model = getInventoryModel(); - if (!model) - return false; LLViewerInventoryCategory *cat = getCategory(); if (!cat) return false; @@ -5404,10 +5401,12 @@ bool LLFolderBridge::modifyOutfitExceedsWearFolderLimit() void LLFolderBridge::modifyOutfit(BOOL append) { - LLInventoryModel* model = getInventoryModel(); - if(!model) return; - LLViewerInventoryCategory* cat = getCategory(); - if(!cat) return; + // FIRE-31508: Commented out for slight efficiency. + // LLInventoryModel* model = getInventoryModel(); + // if(!model) return; + // LLViewerInventoryCategory* cat = getCategory(); + // if(!cat) return; + // FIRE-31508 // FIRE-31508: refactored to bool modifyOutfitExceedsWearFolderLimit(), rather than duplicating code //// checking amount of items to wear @@ -5430,6 +5429,10 @@ void LLFolderBridge::modifyOutfit(BOOL append) //} if (modifyOutfitExceedsWearFolderLimit()) return; + + LLViewerInventoryCategory *cat = getCategory(); + if (!cat) + return; // FIRE-31508 if (isAgentInventory()) From 45ebc5867a745dd4a746694317d715cbcead0871 Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Tue, 20 Aug 2024 15:34:20 -0700 Subject: [PATCH 3/6] Fix hang when incoming p2p or group calls throw up dialog. There were changes in atlasaurus that resulted in a hang for incoming p2p and group calls which throw up dialogs. The changes revolved around mutex, coroutines, job queues, and such. The fix was to do any processing that may result in callbacks from the webrtc code in a queued job instead of a coroutine. --- indra/newview/llvoicewebrtc.cpp | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp index 387016f9af..1ea5ef2670 100644 --- a/indra/newview/llvoicewebrtc.cpp +++ b/indra/newview/llvoicewebrtc.cpp @@ -549,13 +549,20 @@ void LLWebRTCVoiceClient::voiceConnectionCoro() updatePosition(); } } - - sessionState::processSessionStates(); - if (mProcessChannels && voiceEnabled && !mHidden) - { - sendPositionUpdate(false); - updateOwnVolume(); - } + LL::WorkQueue::postMaybe(mMainQueue, + [=] { + if (sShuttingDown) + { + return; + } + sessionState::processSessionStates(); + //sessionState::processSessionStates(); + if (mProcessChannels && voiceEnabled && !mHidden) + { + sendPositionUpdate(false); + updateOwnVolume(); + } + }); } } catch (const LLCoros::Stop&) @@ -2221,6 +2228,7 @@ void LLVoiceWebRTCConnection::OnIceCandidate(const llwebrtc::LLWebRTCIceCandidat void LLVoiceWebRTCConnection::processIceUpdates() { mOutstandingRequests++; + LLCoros::getInstance()->launch("LLVoiceWebRTCConnection::processIceUpdatesCoro", boost::bind(&LLVoiceWebRTCConnection::processIceUpdatesCoro, this->shared_from_this())); } From 7560bd0be2c4fbbe9bd9d3b218704229573fb5bc Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Tue, 20 Aug 2024 17:14:00 -0700 Subject: [PATCH 4/6] removed unnecessary comment --- indra/newview/llvoicewebrtc.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp index 1ea5ef2670..4c3ab11623 100644 --- a/indra/newview/llvoicewebrtc.cpp +++ b/indra/newview/llvoicewebrtc.cpp @@ -556,7 +556,6 @@ void LLWebRTCVoiceClient::voiceConnectionCoro() return; } sessionState::processSessionStates(); - //sessionState::processSessionStates(); if (mProcessChannels && voiceEnabled && !mHidden) { sendPositionUpdate(false); From 33c7a879c1762895e4ab353f0fecc223640f89ec Mon Sep 17 00:00:00 2001 From: Brad Linden <46733234+brad-linden@users.noreply.github.com> Date: Wed, 21 Aug 2024 12:02:21 -0700 Subject: [PATCH 5/6] Bump featuretable versions to fix secondlife/viewer#2345 (#2386) also fixed mac High entry for RenderMirrors that got missed --- indra/newview/featuretable.txt | 2 +- indra/newview/featuretable_linux.txt | 2 +- indra/newview/featuretable_mac.txt | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt index 3b2a298647..c37ea84556 100644 --- a/indra/newview/featuretable.txt +++ b/indra/newview/featuretable.txt @@ -1,4 +1,4 @@ -version 61 +version 62 // The version number above should be incremented IF AND ONLY IF some // change has been made that is sufficiently important to justify // resetting the graphics preferences of all users to the recommended diff --git a/indra/newview/featuretable_linux.txt b/indra/newview/featuretable_linux.txt index 4b617fd7f4..6f7f553cec 100644 --- a/indra/newview/featuretable_linux.txt +++ b/indra/newview/featuretable_linux.txt @@ -1,4 +1,4 @@ -version 28 +version 29 // The version number above should be incremented IF AND ONLY IF some // change has been made that is sufficiently important to justify // resetting the graphics preferences of all users to the recommended diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt index f4d24459fc..2ecbf311ca 100644 --- a/indra/newview/featuretable_mac.txt +++ b/indra/newview/featuretable_mac.txt @@ -1,4 +1,4 @@ -version 58 +version 59 // The version number above should be incremented IF AND ONLY IF some // change has been made that is sufficiently important to justify // resetting the graphics preferences of all users to the recommended @@ -250,7 +250,7 @@ RenderReflectionsEnabled 1 1 RenderReflectionProbeDetail 1 1 RenderScreenSpaceReflections 1 0 RenderReflectionProbeLevel 1 1 -RenderMirrors 1 1 +RenderMirrors 1 0 RenderHeroProbeResolution 1 512 RenderHeroProbeDistance 1 8 RenderHeroProbeUpdateRate 1 2 From 25c4ba3a76c3dd81bb9554abf27ab3cbe5dcd95d Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Thu, 22 Aug 2024 15:59:22 -0500 Subject: [PATCH 6/6] #2397 Sanity clamp haze contribution to avoid NaN like blowouts. (#2402) --- .../shaders/class1/windlight/atmosphericsFuncs.glsl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl index 55daa83750..359bfe8253 100644 --- a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl +++ b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl @@ -124,6 +124,9 @@ void calcAtmosphericVars(vec3 inPositionEye, vec3 light_dir, float ambFactor, ou amblit = tmpAmbient; additive *= vec3(1.0 - combined_haze); + + // sanity clamp haze contribution + additive = min(additive, vec3(10)); } vec3 srgb_to_linear(vec3 col);