From 2b1a3b22e940d3b9775877afe7df27b180523d97 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Thu, 5 Nov 2020 12:46:32 +0100 Subject: [PATCH 1/6] FIRE-30431: Keep radio button mode selection in texture selection --- indra/newview/lltexturectrl.cpp | 60 ++++++++++++++----- indra/newview/lltexturectrl.h | 8 ++- .../default/xui/de/floater_texture_ctrl.xml | 10 ++-- .../default/xui/en/floater_texture_ctrl.xml | 40 +++++++++---- .../default/xui/es/floater_texture_ctrl.xml | 10 ++-- .../default/xui/fr/floater_texture_ctrl.xml | 10 ++-- .../default/xui/it/floater_texture_ctrl.xml | 10 ++-- .../default/xui/ja/floater_texture_ctrl.xml | 10 ++-- .../default/xui/pl/floater_texture_ctrl.xml | 10 ++-- .../default/xui/pt/floater_texture_ctrl.xml | 10 ++-- .../default/xui/ru/floater_texture_ctrl.xml | 10 ++-- .../default/xui/tr/floater_texture_ctrl.xml | 10 ++-- .../default/xui/zh/floater_texture_ctrl.xml | 10 ++-- 13 files changed, 129 insertions(+), 79 deletions(-) diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index cce94dffd4..e9ca039f53 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -152,17 +152,25 @@ void LLFloaterTexturePicker::setImageID(const LLUUID& image_id, bool set_selecti if (LLAvatarAppearanceDefines::LLAvatarAppearanceDictionary::isBakedImageId(mImageAssetID)) { - if ( mBakeTextureEnabled && mModeSelector->getValue().asInteger() != 2) + // FIRE-30431: Keep radio button mode selection in texture selection + //if ( mBakeTextureEnabled && mModeSelector->getValue().asInteger() != 2) + if ( mBakeTextureEnabled && mModeSelector->getSelectedIndex() != 2) { - mModeSelector->selectByValue(2); + // FIRE-30431: Keep radio button mode selection in texture selection + //mModeSelector->selectByValue(2); + mModeSelector->setSelectedIndex(2, 0); onModeSelect(0,this); } } else { - if (mModeSelector->getValue().asInteger() == 2) + // FIRE-30431: Keep radio button mode selection in texture selection + //if (mModeSelector->getValue().asInteger() == 2) + if (mModeSelector->getSelectedIndex() == 2) { - mModeSelector->selectByValue(0); + // FIRE-30431: Keep radio button mode selection in texture selection + //mModeSelector->selectByValue(0); + mModeSelector->setSelectedIndex(0, 0); onModeSelect(0,this); } @@ -417,9 +425,14 @@ BOOL LLFloaterTexturePicker::postBuild() mInventoryPanel = getChild("inventory panel"); - mModeSelector = getChild("mode_selection"); + // FIRE-30431: Keep radio button mode selection in texture selection + //mModeSelector = getChild("mode_selection"); + //mModeSelector->setCommitCallback(onModeSelect, this); + //mModeSelector->selectByValue(0); + mModeSelector = getChild("mode_selection"); mModeSelector->setCommitCallback(onModeSelect, this); - mModeSelector->selectByValue(0); + mModeSelector->setSelectedIndex(0, 0); + // if(mInventoryPanel) { @@ -870,7 +883,9 @@ void LLFloaterTexturePicker::onSelectionChange(const std::dequemModeSelector->getValue().asInteger(); + // FIRE-30431: Keep radio button mode selection in texture selection + //int index = self->mModeSelector->getValue().asInteger(); + int index = self->mModeSelector->getSelectedIndex(); self->getChild("Default")->setVisible(index == 0 ? TRUE : FALSE); self->getChild("Blank")->setVisible(index == 0 ? TRUE : FALSE); @@ -1213,28 +1228,45 @@ void LLFloaterTexturePicker::onFilterEdit(const std::string& search_string ) void LLFloaterTexturePicker::setLocalTextureEnabled(BOOL enabled) { - mModeSelector->setEnabledByValue(1, enabled); -} + // FIRE-30431: Keep radio button mode selection in texture selection + //mModeSelector->setEnabledByValue(1, enabled); + mModeSelector->setIndexEnabled(1,enabled);} void LLFloaterTexturePicker::setBakeTextureEnabled(BOOL enabled) { BOOL changed = (enabled != mBakeTextureEnabled); mBakeTextureEnabled = enabled; - mModeSelector->setEnabledByValue(2, enabled); + // FIRE-30431: Keep radio button mode selection in texture selection + //mModeSelector->setEnabledByValue(2, enabled); - if (!mBakeTextureEnabled && (mModeSelector->getValue().asInteger() == 2)) + //if (!mBakeTextureEnabled && (mModeSelector->getValue().asInteger() == 2)) + //{ + // mModeSelector->selectByValue(0); + //} + // + //if (changed && mBakeTextureEnabled && LLAvatarAppearanceDefines::LLAvatarAppearanceDictionary::isBakedImageId(mImageAssetID)) + //{ + // if (mModeSelector->getValue().asInteger() != 2) + // { + // mModeSelector->selectByValue(2); + // } + //} + mModeSelector->setIndexEnabled(2, enabled); + + if (!mBakeTextureEnabled && (mModeSelector->getSelectedIndex() == 2)) { - mModeSelector->selectByValue(0); + mModeSelector->setSelectedIndex(0, 0); } if (changed && mBakeTextureEnabled && LLAvatarAppearanceDefines::LLAvatarAppearanceDictionary::isBakedImageId(mImageAssetID)) { - if (mModeSelector->getValue().asInteger() != 2) + if (mModeSelector->getSelectedIndex() != 2) { - mModeSelector->selectByValue(2); + mModeSelector->setSelectedIndex(2, 0); } } + // onModeSelect(0, this); } diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h index 470708319e..10e1f0e1d5 100644 --- a/indra/newview/lltexturectrl.h +++ b/indra/newview/lltexturectrl.h @@ -43,7 +43,9 @@ #include "llviewertexture.h" #include "llwindow.h" -class LLComboBox; +// FIRE-30431: Keep radio button mode selection in texture selection +//class LLComboBox; +class LLRadioGroup; class LLFloaterTexturePicker; class LLInventoryItem; class LLViewerFetchedTexture; @@ -382,7 +384,9 @@ protected: LLSaveFolderState mSavedFolderState; BOOL mSelectedItemPinned; - LLComboBox* mModeSelector; + // FIRE-30431: Keep radio button mode selection in texture selection + //LLComboBox* mModeSelector; + LLRadioGroup* mModeSelector; LLScrollListCtrl* mLocalScrollCtrl; private: diff --git a/indra/newview/skins/default/xui/de/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/de/floater_texture_ctrl.xml index 7c63e05550..3e0e9fc184 100644 --- a/indra/newview/skins/default/xui/de/floater_texture_ctrl.xml +++ b/indra/newview/skins/default/xui/de/floater_texture_ctrl.xml @@ -9,11 +9,11 @@ Mehrere Texturen - - - - - + + + + + Größe: [DIMENSIONS] diff --git a/indra/newview/skins/default/xui/en/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/en/floater_texture_ctrl.xml index 8a734faac0..d3074e6c97 100644 --- a/indra/newview/skins/default/xui/en/floater_texture_ctrl.xml +++ b/indra/newview/skins/default/xui/en/floater_texture_ctrl.xml @@ -48,27 +48,41 @@ - - + - + - + - + value="2" + width="50" /> + + top_pad="1"> Size: [DIMENSIONS] diff --git a/indra/newview/skins/default/xui/es/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/es/floater_texture_ctrl.xml index 8ebe4f2784..4b9704d61c 100644 --- a/indra/newview/skins/default/xui/es/floater_texture_ctrl.xml +++ b/indra/newview/skins/default/xui/es/floater_texture_ctrl.xml @@ -9,11 +9,11 @@ Texturas múltiples - - - - - + + + + + Tamaño: [DIMENSIONS] diff --git a/indra/newview/skins/default/xui/fr/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/fr/floater_texture_ctrl.xml index 25e6b5697c..7d8e6c969d 100644 --- a/indra/newview/skins/default/xui/fr/floater_texture_ctrl.xml +++ b/indra/newview/skins/default/xui/fr/floater_texture_ctrl.xml @@ -9,11 +9,11 @@ Textures multiples - - - - - + + + + + Taille: [DIMENSIONS] diff --git a/indra/newview/skins/default/xui/it/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/it/floater_texture_ctrl.xml index d03e88e738..43767956cc 100644 --- a/indra/newview/skins/default/xui/it/floater_texture_ctrl.xml +++ b/indra/newview/skins/default/xui/it/floater_texture_ctrl.xml @@ -9,11 +9,11 @@ Texture multiple - - - - - + + + + + Dimensioni: [DIMENSIONS] diff --git a/indra/newview/skins/default/xui/ja/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/ja/floater_texture_ctrl.xml index 106faec23f..00afcba886 100644 --- a/indra/newview/skins/default/xui/ja/floater_texture_ctrl.xml +++ b/indra/newview/skins/default/xui/ja/floater_texture_ctrl.xml @@ -9,11 +9,11 @@ 複数のテクスチャ - - - - - + + + + + サイズ: [DIMENSIONS] diff --git a/indra/newview/skins/default/xui/pl/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/pl/floater_texture_ctrl.xml index 9e0ea5bc13..dfa7925037 100644 --- a/indra/newview/skins/default/xui/pl/floater_texture_ctrl.xml +++ b/indra/newview/skins/default/xui/pl/floater_texture_ctrl.xml @@ -9,11 +9,11 @@ Wiele tekstur - - - - - + + + + + Rozmiar: [DIMENSIONS] diff --git a/indra/newview/skins/default/xui/pt/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/pt/floater_texture_ctrl.xml index e71a243032..f56392be02 100644 --- a/indra/newview/skins/default/xui/pt/floater_texture_ctrl.xml +++ b/indra/newview/skins/default/xui/pt/floater_texture_ctrl.xml @@ -9,11 +9,11 @@ Multiplas texturas - - - - - + + + + + Tamanho: [DIMENSÕES] diff --git a/indra/newview/skins/default/xui/ru/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/ru/floater_texture_ctrl.xml index 7e34e23bf8..1186beccc7 100644 --- a/indra/newview/skins/default/xui/ru/floater_texture_ctrl.xml +++ b/indra/newview/skins/default/xui/ru/floater_texture_ctrl.xml @@ -13,11 +13,11 @@ - - - - - + + + + + Размер: [DIMENSIONS] diff --git a/indra/newview/skins/default/xui/tr/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/tr/floater_texture_ctrl.xml index 941f8a289a..9d76e8eca0 100644 --- a/indra/newview/skins/default/xui/tr/floater_texture_ctrl.xml +++ b/indra/newview/skins/default/xui/tr/floater_texture_ctrl.xml @@ -9,11 +9,11 @@ Birden çok doku - - - - - + + + + + Büyüklük: [DIMENSIONS] diff --git a/indra/newview/skins/default/xui/zh/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/zh/floater_texture_ctrl.xml index 522467983e..dfdbbf2f00 100644 --- a/indra/newview/skins/default/xui/zh/floater_texture_ctrl.xml +++ b/indra/newview/skins/default/xui/zh/floater_texture_ctrl.xml @@ -9,11 +9,11 @@ 多重材質 - - - - - + + + + + 尺寸: [DIMENSIONS] From fa33589c4e08036b553ad2606c11ae9b59e894cc Mon Sep 17 00:00:00 2001 From: Ansariel Date: Thu, 5 Nov 2020 12:53:02 +0100 Subject: [PATCH 2/6] Fix width of file list in local mode for texture control --- indra/newview/skins/default/xui/en/floater_texture_ctrl.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/skins/default/xui/en/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/en/floater_texture_ctrl.xml index d3074e6c97..3a07df8d76 100644 --- a/indra/newview/skins/default/xui/en/floater_texture_ctrl.xml +++ b/indra/newview/skins/default/xui/en/floater_texture_ctrl.xml @@ -234,9 +234,9 @@ visible="false"/> Date: Wed, 4 Nov 2020 18:32:26 +0000 Subject: [PATCH 3/6] SL-14264 - BOM texture --- indra/newview/llviewerobject.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 856c8c35fd..00deddbf73 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -4954,9 +4954,7 @@ LLViewerTexture* LLViewerObject::getBakedTextureForMagicId(const LLUUID& id) } LLVOAvatar* avatar = getAvatar(); - if (avatar && !isHUDAttachment() - && isMesh() - && getVolume() && getVolume()->getParams().getSculptID().notNull()) // checking for the rigged mesh by params instead of using isRiggedMesh() to avoid false negatives when skin info isn't ready + if (avatar && !isHUDAttachment()) { LLAvatarAppearanceDefines::EBakedTextureIndex texIndex = LLAvatarAppearanceDefines::LLAvatarAppearanceDictionary::assetIdToBakedTextureIndex(id); LLViewerTexture* bakedTexture = avatar->getBakedTexture(texIndex); From c5f6fa2008e7ee21dcde94bcf6e4c400f057bf2e Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 1 Oct 2020 22:18:49 +0300 Subject: [PATCH 4/6] SL-14037 BugSplat Crash #646590: Enqueue failed in AIS --- indra/llmessage/llcoproceduremanager.cpp | 2 +- indra/newview/llaisapi.cpp | 48 +++++++++++++++++++++++- indra/newview/llaisapi.h | 3 ++ indra/newview/lllandmarklist.cpp | 40 +++++++++++++------- 4 files changed, 78 insertions(+), 15 deletions(-) diff --git a/indra/llmessage/llcoproceduremanager.cpp b/indra/llmessage/llcoproceduremanager.cpp index b4169f7dab..f3f87d15f6 100644 --- a/indra/llmessage/llcoproceduremanager.cpp +++ b/indra/llmessage/llcoproceduremanager.cpp @@ -360,7 +360,7 @@ LLUUID LLCoprocedurePool::enqueueCoprocedure(const std::string &name, LLCoproced } // The queue should never fill up. - LL_ERRS("CoProcMgr") << "Enqueue failed (" << unsigned(pushed) << ")" << LL_ENDL; + LL_ERRS("CoProcMgr") << "Enqueue into '" << name << "' failed (" << unsigned(pushed) << ")" << LL_ENDL; return {}; // never executed, pacify the compiler } diff --git a/indra/newview/llaisapi.cpp b/indra/newview/llaisapi.cpp index 5949981b0f..aa43da9e1e 100644 --- a/indra/newview/llaisapi.cpp +++ b/indra/newview/llaisapi.cpp @@ -46,6 +46,10 @@ const std::string AISAPI::INVENTORY_CAP_NAME("InventoryAPIv3"); const std::string AISAPI::LIBRARY_CAP_NAME("LibraryAPIv3"); +std::list AISAPI::sPostponedQuery; + +const S32 MAX_SIMULTANEOUS_COROUTINES = 2048; + //------------------------------------------------------------------------- /*static*/ bool AISAPI::isAvailable() @@ -371,9 +375,51 @@ void AISAPI::UpdateItem(const LLUUID &itemId, const LLSD &updates, completion_t /*static*/ void AISAPI::EnqueueAISCommand(const std::string &procName, LLCoprocedureManager::CoProcedure_t proc) { + LLCoprocedureManager &inst = LLCoprocedureManager::instance(); + S32 pending_in_pool = inst.countPending("AIS"); std::string procFullName = "AIS(" + procName + ")"; - LLCoprocedureManager::instance().enqueueCoprocedure("AIS", procFullName, proc); + if (pending_in_pool < MAX_SIMULTANEOUS_COROUTINES) + { + inst.enqueueCoprocedure("AIS", procFullName, proc); + } + else + { + // As I understand it, coroutines have built-in 'pending' pool + // but unfortunately it has limited size which inventory often goes over + // so this is a workaround to not overfill it. + if (sPostponedQuery.empty()) + { + sPostponedQuery.push_back(ais_query_item_t(procFullName, proc)); + gIdleCallbacks.addFunction(onIdle, NULL); + } + else + { + sPostponedQuery.push_back(ais_query_item_t(procFullName, proc)); + } + } +} +/*static*/ +void AISAPI::onIdle(void *userdata) +{ + if (!sPostponedQuery.empty()) + { + LLCoprocedureManager &inst = LLCoprocedureManager::instance(); + S32 pending_in_pool = inst.countPending("AIS"); + while (pending_in_pool < MAX_SIMULTANEOUS_COROUTINES && !sPostponedQuery.empty()) + { + ais_query_item_t &item = sPostponedQuery.front(); + inst.enqueueCoprocedure("AIS", item.first, item.second); + sPostponedQuery.pop_front(); + pending_in_pool++; + } + } + + if (sPostponedQuery.empty()) + { + // Nothing to do anymore + gIdleCallbacks.deleteFunction(onIdle, NULL); + } } /*static*/ diff --git a/indra/newview/llaisapi.h b/indra/newview/llaisapi.h index 200af0c67f..26d3e43a02 100644 --- a/indra/newview/llaisapi.h +++ b/indra/newview/llaisapi.h @@ -72,6 +72,7 @@ private: const std::string, LLSD, LLCore::HttpOptions::ptr_t, LLCore::HttpHeaders::ptr_t) > invokationFn_t; static void EnqueueAISCommand(const std::string &procName, LLCoprocedureManager::CoProcedure_t proc); + static void onIdle(void *userdata); // launches postponed AIS commands static std::string getInvCap(); static std::string getLibCap(); @@ -80,6 +81,8 @@ private: invokationFn_t invoke, std::string url, LLUUID targetId, LLSD body, completion_t callback, COMMAND_TYPE type); + typedef std::pair ais_query_item_t; + static std::list sPostponedQuery; }; class AISUpdate diff --git a/indra/newview/lllandmarklist.cpp b/indra/newview/lllandmarklist.cpp index 1fc70cd6d6..b4236c406b 100644 --- a/indra/newview/lllandmarklist.cpp +++ b/indra/newview/lllandmarklist.cpp @@ -40,8 +40,8 @@ LLLandmarkList gLandmarkList; // number is mostly arbitrary, but it should be below DEFAULT_QUEUE_SIZE pool size, -// which is 4096, to not overfill the pool if user has more than 4K of landmarks, -// and low number helps with not flooding server with requests +// which is 4096, to not overfill the pool if user has more than 4K of landmarks +// and it should leave some space for other potential simultaneous asset request const S32 MAX_SIMULTANEOUS_REQUESTS = 512; @@ -98,7 +98,11 @@ LLLandmark* LLLandmarkList::getAsset(const LLUUID& asset_uuid, loaded_callback_t if (mRequestedList.size() > MAX_SIMULTANEOUS_REQUESTS) { - // Postpone download till queu is emptier + // Workarounds for corutines pending list size limit: + // Postpone download till queue is emptier. + // Coroutines have own built in 'pending' list, but unfortunately + // it is too small compared to potential amount of landmarks + // or assets. mWaitList.insert(asset_uuid); return NULL; } @@ -176,17 +180,27 @@ void LLLandmarkList::processGetAssetReply( // todo: this should clean mLoadedCallbackMap! } - if (!gLandmarkList.mWaitList.empty()) + // getAssetData can fire callback immediately, causing + // a recursion which is suboptimal for very large wait list. + // 'scheduling' indicates that we are inside request and + // shouldn't be launching more requests. + static bool scheduling = false; + if (!scheduling && !gLandmarkList.mWaitList.empty()) { - // start new download from wait list - landmark_uuid_list_t::iterator iter = gLandmarkList.mWaitList.begin(); - LLUUID asset_uuid = *iter; - gLandmarkList.mWaitList.erase(iter); - gAssetStorage->getAssetData(asset_uuid, - LLAssetType::AT_LANDMARK, - LLLandmarkList::processGetAssetReply, - NULL); - gLandmarkList.mRequestedList[asset_uuid] = gFrameTimeSeconds; + scheduling = true; + while (!gLandmarkList.mWaitList.empty() && gLandmarkList.mRequestedList.size() < MAX_SIMULTANEOUS_REQUESTS) + { + // start new download from wait list + landmark_uuid_list_t::iterator iter = gLandmarkList.mWaitList.begin(); + LLUUID asset_uuid = *iter; + gLandmarkList.mWaitList.erase(iter); + gAssetStorage->getAssetData(asset_uuid, + LLAssetType::AT_LANDMARK, + LLLandmarkList::processGetAssetReply, + NULL); + gLandmarkList.mRequestedList[asset_uuid] = gFrameTimeSeconds; + } + scheduling = false; } } From 1731b1967cd3102fcc7fa35bd4fe3ffdb9aee8bd Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 29 Oct 2020 16:10:40 +0200 Subject: [PATCH 5/6] SL-14226 Cleanup teleport requests --- indra/newview/llagent.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 428dbf75a9..72fe7af24d 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -568,6 +568,8 @@ void LLAgent::init() void LLAgent::cleanup() { mRegionp = NULL; + mTeleportRequest = NULL; + mTeleportCanceled = NULL; if (mTeleportFinishedSlot.connected()) { mTeleportFinishedSlot.disconnect(); From fc3380293913ca5108730e57b6971334d9b3a111 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Thu, 5 Nov 2020 19:13:41 +0100 Subject: [PATCH 6/6] Manually update LLCA to latest version --- autobuild.xml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index b6ec499b60..50fa500773 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -2375,16 +2375,18 @@ archive hash - b677ee43822212f0a27c838dc8bf3623 + 9f4687d7d328b0c13a9e651e805e880a + hash_algorithm + md5 url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/67622/646614/llca-202009010215.548269-common-548269.tar.bz2 + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/71501/691487/llca-202011010215.551526-common-551526.tar.bz2 name common version - 202009010215.548269 + 202011010215.551526 llphysicsextensions_source