From 47e2cc271ac924a39ef2b84a2232131120c6aa4f Mon Sep 17 00:00:00 2001 From: Ansariel Hiller Date: Wed, 10 Jul 2024 13:02:52 +0200 Subject: [PATCH 01/20] Remove orphaned constants gMinVideoRam and gMaxVideoRam (#1970) --- indra/newview/llviewertexture.cpp | 31 +++++++++++++------------------ indra/newview/llviewertexture.h | 3 --- 2 files changed, 13 insertions(+), 21 deletions(-) diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 9fa71fdff7..9648a9af18 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -63,23 +63,18 @@ #include "llwindow.h" /////////////////////////////////////////////////////////////////////////////// -// extern -const S32Megabytes gMinVideoRam(32); -const S32Megabytes gMaxVideoRam(512); - - // statics -LLPointer LLViewerTexture::sNullImagep = NULL; -LLPointer LLViewerTexture::sBlackImagep = NULL; -LLPointer LLViewerTexture::sCheckerBoardImagep = NULL; -LLPointer LLViewerFetchedTexture::sMissingAssetImagep = NULL; -LLPointer LLViewerFetchedTexture::sWhiteImagep = NULL; -LLPointer LLViewerFetchedTexture::sDefaultImagep = NULL; -LLPointer LLViewerFetchedTexture::sSmokeImagep = NULL; -LLPointer LLViewerFetchedTexture::sFlatNormalImagep = NULL; +LLPointer LLViewerTexture::sNullImagep = nullptr; +LLPointer LLViewerTexture::sBlackImagep = nullptr; +LLPointer LLViewerTexture::sCheckerBoardImagep = nullptr; +LLPointer LLViewerFetchedTexture::sMissingAssetImagep = nullptr; +LLPointer LLViewerFetchedTexture::sWhiteImagep = nullptr; +LLPointer LLViewerFetchedTexture::sDefaultImagep = nullptr; +LLPointer LLViewerFetchedTexture::sSmokeImagep = nullptr; +LLPointer LLViewerFetchedTexture::sFlatNormalImagep = nullptr; LLPointer LLViewerFetchedTexture::sDefaultIrradiancePBRp; LLViewerMediaTexture::media_map_t LLViewerMediaTexture::sMediaMap; -LLTexturePipelineTester* LLViewerTextureManager::sTesterp = NULL; +LLTexturePipelineTester* LLViewerTextureManager::sTesterp = nullptr; F32 LLViewerFetchedTexture::sMaxVirtualSize = 8192.f*8192.f; const std::string sTesterName("TextureTester"); @@ -91,11 +86,11 @@ LLFrameTimer LLViewerTexture::sEvaluationTimer; F32 LLViewerTexture::sDesiredDiscardBias = 0.f; S32 LLViewerTexture::sMaxSculptRez = 128; //max sculpt image size -const S32 MAX_CACHED_RAW_IMAGE_AREA = 64 * 64; +constexpr S32 MAX_CACHED_RAW_IMAGE_AREA = 64 * 64; const S32 MAX_CACHED_RAW_SCULPT_IMAGE_AREA = LLViewerTexture::sMaxSculptRez * LLViewerTexture::sMaxSculptRez; -const S32 MAX_CACHED_RAW_TERRAIN_IMAGE_AREA = 128 * 128; -const S32 DEFAULT_ICON_DIMENSIONS = 32; -const S32 DEFAULT_THUMBNAIL_DIMENSIONS = 256; +constexpr S32 MAX_CACHED_RAW_TERRAIN_IMAGE_AREA = 128 * 128; +constexpr S32 DEFAULT_ICON_DIMENSIONS = 32; +constexpr S32 DEFAULT_THUMBNAIL_DIMENSIONS = 256; U32 LLViewerTexture::sMinLargeImageSize = 65536; //256 * 256. U32 LLViewerTexture::sMaxSmallImageSize = MAX_CACHED_RAW_IMAGE_AREA; bool LLViewerTexture::sFreezeImageUpdates = false; diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index 5b2e3aaab7..ada818c220 100644 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -42,9 +42,6 @@ #include #include -extern const S32Megabytes gMinVideoRam; -extern const S32Megabytes gMaxVideoRam; - class LLFace; class LLImageGL ; class LLImageRaw; From 94ef434cbfa3e1220731a9ddf53066b36bd23784 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 10 Jul 2024 13:31:09 +0300 Subject: [PATCH 02/20] #1932 Fix a case where an IM toast wasn't displayed --- indra/newview/llimview.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index e39e0a332f..b12c2fdc52 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -372,8 +372,10 @@ void notify_of_message(const LLSD& msg, bool is_dnd_msg) // 4. Toast if ((("toast" == user_preferences) && (ON_TOP_AND_ITEM_IS_SELECTED != conversations_floater_status) && - (!session_floater->isTornOff() || !LLFloater::isVisible(session_floater))) - || !session_floater->isMessagePaneExpanded()) + (!session_floater->isTornOff() + || session_floater->isMinimized() + || !LLFloater::isVisible(session_floater))) + || !session_floater->isMessagePaneExpanded()) { //Show IM toasts (upper right toasts) From 35246a95039e242c6167f6c52a0c6cc49e004f23 Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Tue, 9 Jul 2024 17:00:31 +0200 Subject: [PATCH 03/20] #1959 BugSplat Crash #1489790: VCRUNTIME140!memcmp(72) --- indra/llmath/llvolume.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index 1c0befb3da..56ac22ca18 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -5462,7 +5462,11 @@ bool LLVolumeFace::cacheOptimize(bool gen_tangents) U32 stream_count = data.w.empty() ? 4 : 5; - S32 vert_count = static_cast(meshopt_generateVertexRemapMulti(&remap[0], nullptr, data.p.size(), data.p.size(), mos, stream_count)); + S32 vert_count = 0; + if (!data.p.empty()) + { + vert_count = static_cast(meshopt_generateVertexRemapMulti(&remap[0], nullptr, data.p.size(), data.p.size(), mos, stream_count)); + } if (vert_count < 65535 && vert_count != 0) { From 8b59d9bb42f7a0421c27daa75672ae775bb8927f Mon Sep 17 00:00:00 2001 From: nat-goodspeed Date: Wed, 10 Jul 2024 11:15:51 -0400 Subject: [PATCH 04/20] Introduce LLCoros::RMutex, use for SettingsConfig::mRecorderMutex (#1980) in llerror.cpp. --- indra/llcommon/llcoros.h | 9 ++++++++- indra/llcommon/llerror.cpp | 3 +-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/indra/llcommon/llcoros.h b/indra/llcommon/llcoros.h index 369d65407e..c3820ae987 100644 --- a/indra/llcommon/llcoros.h +++ b/indra/llcommon/llcoros.h @@ -31,8 +31,9 @@ #include "llexception.h" #include -#include #include +#include +#include #include "mutex.h" #include "llsingleton.h" #include "llinstancetracker.h" @@ -307,6 +308,12 @@ public: // use mutex, lock, condition_variable suitable for coroutines using Mutex = boost::fibers::mutex; + using RMutex = boost::fibers::recursive_mutex; + // With C++17, LockType is deprecated: at this point we can directly + // declare 'std::unique_lock lk(some_mutex)' without explicitly stating + // the mutex type. Sadly, making LockType an alias template for + // std::unique_lock doesn't work the same way: Class Template Argument + // Deduction only works for class templates, not alias templates. using LockType = std::unique_lock; using cv_status = boost::fibers::cv_status; using ConditionVariable = boost::fibers::condition_variable; diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp index ff80863497..6c3b9c9542 100644 --- a/indra/llcommon/llerror.cpp +++ b/indra/llcommon/llerror.cpp @@ -55,7 +55,6 @@ #include "llsingleton.h" #include "llstl.h" #include "lltimer.h" -#include // On Mac, got: // #error "Boost.Stacktrace requires `_Unwind_Backtrace` function. Define @@ -507,7 +506,7 @@ namespace LLError::TimeFunction mTimeFunction; Recorders mRecorders; - boost::fibers::recursive_mutex mRecorderMutex; + LLCoros::RMutex mRecorderMutex; int mShouldLogCallCounter; From e0b75e336666a87333dc92becf8411d8bffdaedf Mon Sep 17 00:00:00 2001 From: Cosmic Linden Date: Tue, 2 Jul 2024 14:19:45 -0700 Subject: [PATCH 05/20] secondlife/viewer#1885: Terrain texture repeats: Remove feature flag dependency on simulator feature in favor of cap --- indra/newview/app_settings/settings.xml | 2 +- indra/newview/llviewerregion.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index c455b6f5f1..26c043ee97 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -9267,7 +9267,7 @@ RenderTerrainPBREnabled Comment - EXPERIMENTAL: Enable PBR Terrain features. + Enable PBR Terrain features. Persist 1 Type diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 39244c8246..f58e9046f8 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -2496,10 +2496,10 @@ void LLViewerRegion::setSimulatorFeatures(const LLSD& sim_features) gSavedSettings.setBOOL("GLTFEnabled", false); } - if (features.has("PBRTerrainTransformsEnabled")) + llassert(gAgent.getRegion()); + if (gAgent.getRegion() && gAgent.getRegion()->isCapabilityAvailable("ModifyRegion")) { - bool enabled = features["PBRTerrainTransformsEnabled"]; - gSavedSettings.setBOOL("RenderTerrainPBRTransformsEnabled", enabled); + gSavedSettings.setBOOL("RenderTerrainPBRTransformsEnabled", true); } else { From 95f9946425f34fcee9feb15a5c7dfa1de2452534 Mon Sep 17 00:00:00 2001 From: Cosmic Linden Date: Wed, 10 Jul 2024 11:31:31 -0700 Subject: [PATCH 06/20] secondlife/viewer#1885: Update test plan --- doc/testplans/pbr_terrain_composition.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/testplans/pbr_terrain_composition.md b/doc/testplans/pbr_terrain_composition.md index 731da90aba..c2630d242f 100644 --- a/doc/testplans/pbr_terrain_composition.md +++ b/doc/testplans/pbr_terrain_composition.md @@ -44,6 +44,8 @@ The PBR terrain texture transform flag should be set automatically when logging When the PBR terrain texture transform feature is enabled, the UI of the Terrain tab should be overhauled. Availability of features depends on the type of terrain. +**Known issue:** The Region/Estate floater may have to be closed/reopened a second time in order for the UI overhaul to take effect, after teleporting between regions that do and do not have the feature flag set. + When "PBR Metallic Roughness" is checked: - There should be a way for the user to change the texture transforms for the terrain in the current region From 579a78a8dcbcb98bd181c9262e2288c5cf99febf Mon Sep 17 00:00:00 2001 From: Ansariel Hiller Date: Wed, 10 Jul 2024 20:54:32 +0200 Subject: [PATCH 07/20] Neither alpha, tattoo nor universal wearable edit panels contain a param list and a main panel (#1978) --- indra/newview/llpaneleditwearable.cpp | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index a14f1d54a2..e88f6c0470 100644 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -299,9 +299,9 @@ LLEditWearableDictionary::Subparts::Subparts() addEntry(SUBPART_UNDERSHIRT, new SubpartEntry(SUBPART_UNDERSHIRT, "mTorso", "undershirt", "undershirt_main_param_list", "undershirt_main_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(-1.f, 0.15f, 0.3f),SEX_BOTH)); addEntry(SUBPART_UNDERPANTS, new SubpartEntry(SUBPART_UNDERPANTS, "mPelvis", "underpants", "underpants_main_param_list", "underpants_main_tab", LLVector3d(0.f, 0.f, -0.5f), LLVector3d(-1.6f, 0.15f, -0.5f),SEX_BOTH)); addEntry(SUBPART_SKIRT, new SubpartEntry(SUBPART_SKIRT, "mPelvis", "skirt", "skirt_main_param_list", "skirt_main_tab", LLVector3d(0.f, 0.f, -0.5f), LLVector3d(-1.6f, 0.15f, -0.5f),SEX_BOTH)); - addEntry(SUBPART_ALPHA, new SubpartEntry(SUBPART_ALPHA, "mPelvis", "alpha", "alpha_main_param_list", "alpha_main_tab", LLVector3d(0.f, 0.f, 0.1f), LLVector3d(-2.5f, 0.5f, 0.8f),SEX_BOTH)); - addEntry(SUBPART_TATTOO, new SubpartEntry(SUBPART_TATTOO, "mPelvis", "tattoo", "tattoo_main_param_list", "tattoo_main_tab", LLVector3d(0.f, 0.f, 0.1f), LLVector3d(-2.5f, 0.5f, 0.8f),SEX_BOTH)); - addEntry(SUBPART_UNIVERSAL, new SubpartEntry(SUBPART_UNIVERSAL, "mPelvis", "universal", "universal_main_param_list", "universal_main_tab", LLVector3d(0.f, 0.f, 0.1f), LLVector3d(-2.5f, 0.5f, 0.8f), SEX_BOTH)); + addEntry(SUBPART_ALPHA, new SubpartEntry(SUBPART_ALPHA, "mPelvis", "alpha", "", "", LLVector3d(0.f, 0.f, 0.1f), LLVector3d(-2.5f, 0.5f, 0.8f),SEX_BOTH)); + addEntry(SUBPART_TATTOO, new SubpartEntry(SUBPART_TATTOO, "mPelvis", "tattoo", "", "", LLVector3d(0.f, 0.f, 0.1f), LLVector3d(-2.5f, 0.5f, 0.8f),SEX_BOTH)); + addEntry(SUBPART_UNIVERSAL, new SubpartEntry(SUBPART_UNIVERSAL, "mPelvis", "universal", "", "", LLVector3d(0.f, 0.f, 0.1f), LLVector3d(-2.5f, 0.5f, 0.8f), SEX_BOTH)); // WT_PHYSICS addEntry(SUBPART_PHYSICS_BREASTS_UPDOWN, new SubpartEntry(SUBPART_PHYSICS_BREASTS_UPDOWN, "mTorso", "physics_breasts_updown", "physics_breasts_updown_param_list", "physics_breasts_updown_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(0.f, 0.f, 0.f), SEX_FEMALE)); @@ -794,8 +794,12 @@ bool LLPanelEditWearable::postBuild() continue; } - const std::string accordion_tab = subpart_entry->mAccordionTab; - LLAccordionCtrlTab *tab = getChild(accordion_tab); + const std::string& accordion_tab = subpart_entry->mAccordionTab; + if (accordion_tab.empty()) + { + continue; + } + LLAccordionCtrlTab *tab = findChild(accordion_tab); if (!tab) { LL_WARNS() << "could not get llaccordionctrltab from UI with name: " << accordion_tab << LL_ENDL; @@ -1199,12 +1203,16 @@ void LLPanelEditWearable::showWearable(LLViewerWearable* wearable, bool show, bo continue; } - const std::string scrolling_panel = subpart_entry->mParamList; - const std::string accordion_tab = subpart_entry->mAccordionTab; + const std::string& scrolling_panel = subpart_entry->mParamList; + const std::string& accordion_tab = subpart_entry->mAccordionTab; - LLScrollingPanelList *panel_list = getChild(scrolling_panel); - LLAccordionCtrlTab *tab = getChild(accordion_tab); + if (scrolling_panel.empty() || accordion_tab.empty()) + { + continue; + } + LLScrollingPanelList *panel_list = findChild(scrolling_panel); + LLAccordionCtrlTab *tab = findChild(accordion_tab); if (!panel_list) { LL_WARNS() << "could not get scrolling panel list: " << scrolling_panel << LL_ENDL; From 52a581a39889dbc977f471c5e31e0fd468cc7bc6 Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Wed, 10 Jul 2024 20:22:41 +0200 Subject: [PATCH 08/20] #1859 BugSplat Crash: SecondLifeViewer!::operator()(61) --- indra/llwindow/llwindowwin32.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index 2f6c966fd8..70316ec36a 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -1383,7 +1383,7 @@ bool LLWindowWin32::switchContext(bool fullscreen, const LLCoordScreen& size, bo gGLManager.initWGL(); - if (wglChoosePixelFormatARB) + if (wglChoosePixelFormatARB && wglGetPixelFormatAttribivARB) { // OK, at this point, use the ARB wglChoosePixelFormatsARB function to see if we // can get exactly what we want. From cecc7261341cb6b7d65f0c851522610994a7521b Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 10 Jul 2024 14:43:31 +0300 Subject: [PATCH 09/20] viewer#1965 Fixed selection swirls swirling forever when the UI is hidden. --- indra/newview/llviewerdisplay.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index c774e17e0c..adcf91f4ed 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -1539,6 +1539,11 @@ void render_ui_3d() gObjectList.resetObjectBeacons(); gSky.addSunMoonBeacons(); } + else + { + // Make sure particle effects disappear + LLHUDObject::renderAllForTimer(); + } stop_glerror(); } From 223114f63d5b42916c1c793e07041890d968ceb7 Mon Sep 17 00:00:00 2001 From: Andrey Lihatskiy Date: Thu, 11 Jul 2024 09:17:02 +0300 Subject: [PATCH 10/20] Update llphysicsextensions_source to v1.0.66e6919 (#1985) --- autobuild.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index beabf2fd06..ea4f761441 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -1419,11 +1419,11 @@ creds github hash - 755a3de464149ae88b048f976828a8c0c46e3bdb + 9e59c93c7110e87b4ff3db330f11a23c50e5000f hash_algorithm sha1 url - https://api.github.com/repos/secondlife/llphysicsextensions_source/releases/assets/172966323 + https://api.github.com/repos/secondlife/llphysicsextensions_source/releases/assets/178910560 name darwin64 @@ -1435,11 +1435,11 @@ creds github hash - 813e7b5e294d7958e3d69e2252752ff346953b0c + 7ed994db5bafa9a7ad09a1b53da850a84715c65e hash_algorithm sha1 url - https://api.github.com/repos/secondlife/llphysicsextensions_source/releases/assets/172966322 + https://api.github.com/repos/secondlife/llphysicsextensions_source/releases/assets/178910561 name linux64 @@ -1451,18 +1451,18 @@ creds github hash - 67f647538b1b49d0152fd9d03cfb9bdf978e33d1 + 66824c02e0e5eabbfbe37bfb173360195f89697c hash_algorithm sha1 url - https://api.github.com/repos/secondlife/llphysicsextensions_source/releases/assets/172966328 + https://api.github.com/repos/secondlife/llphysicsextensions_source/releases/assets/178910562 name windows64 version - 1.0.b8b1f73 + 1.0.66e6919 llphysicsextensions_stub From aa3fe3352e5a96537aad475e6f6683baaa495090 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 11 Jul 2024 10:40:36 +0300 Subject: [PATCH 11/20] viewer#1975 Fixed "Allow Land Resell" option not switching --- indra/newview/llfloaterregioninfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 41d1fcff82..52eddcfc67 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -512,7 +512,7 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg) panel->getChild("block_fly_over_check")->setValue(is_flag_set(region_flags, REGION_FLAGS_BLOCK_FLYOVER)); panel->getChild("allow_damage_check")->setValue(is_flag_set(region_flags, REGION_FLAGS_ALLOW_DAMAGE)); panel->getChild("restrict_pushobject")->setValue(is_flag_set(region_flags, REGION_FLAGS_RESTRICT_PUSHOBJECT)); - panel->getChild("allow_land_resell_check")->setValue(is_flag_set(region_flags, REGION_FLAGS_BLOCK_LAND_RESELL)); + panel->getChild("allow_land_resell_check")->setValue(!is_flag_set(region_flags, REGION_FLAGS_BLOCK_LAND_RESELL)); panel->getChild("allow_parcel_changes_check")->setValue(is_flag_set(region_flags, REGION_FLAGS_ALLOW_PARCEL_CHANGES)); panel->getChild("block_parcel_search_check")->setValue(is_flag_set(region_flags, REGION_FLAGS_BLOCK_PARCEL_SEARCH)); panel->getChild("agent_limit_spin")->setValue(LLSD((F32)agent_limit)); From 067c4008032ae815c4fc6dbaf347bb91cefd5490 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 11 Jul 2024 16:39:28 +0300 Subject: [PATCH 12/20] viewer#1253 Viewer tries to detach attachments in inventory on shutdown --- indra/newview/llvoavatarself.cpp | 4 ++-- indra/newview/llvoavatarself.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 9c1c304133..57f7734fea 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -699,7 +699,7 @@ bool LLVOAvatarSelf::isValid() const // virtual void LLVOAvatarSelf::idleUpdate(LLAgent &agent, const F64 &time) { - if (isValid()) + if (isAgentAvatarValid()) { LLVOAvatar::idleUpdate(agent, time); idleUpdateTractorBeam(); @@ -1238,7 +1238,7 @@ bool LLVOAvatarSelf::detachObject(LLViewerObject *viewer_object) // Make sure the inventory is in sync with the avatar. // Update COF contents, don't trigger appearance update. - if (!isValid()) + if (!isAgentAvatarValid()) { LL_INFOS() << "removeItemLinks skipped, avatar is under destruction" << LL_ENDL; } diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h index 77556c8412..051ac791c0 100644 --- a/indra/newview/llvoavatarself.h +++ b/indra/newview/llvoavatarself.h @@ -111,7 +111,7 @@ private: public: /*virtual*/ bool isSelf() const { return true; } virtual bool isBuddy() const { return false; } - /*virtual*/ bool isValid() const; + /*virtual*/ bool isValid() const; // use isAgentAvatarValid, it's fuller //-------------------------------------------------------------------- // Updates From 98941831e4afab1cd5ccb5bab995a671df320f72 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Thu, 11 Jul 2024 11:36:36 -0500 Subject: [PATCH 13/20] Fix for GLTF scenes not uploading (#1994) --- indra/newview/gltf/asset.cpp | 6 ++++++ indra/newview/gltfscenemanager.cpp | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/indra/newview/gltf/asset.cpp b/indra/newview/gltf/asset.cpp index 5ba5951064..c210b9c61d 100644 --- a/indra/newview/gltf/asset.cpp +++ b/indra/newview/gltf/asset.cpp @@ -991,6 +991,12 @@ bool Image::prep(Asset& asset) return false; } + if (!asset.mFilename.empty()) + { // local preview, boost image so it doesn't discard and force to save raw image in case we save out or upload + mTexture->setBoostLevel(LLViewerTexture::BOOST_PREVIEW); + mTexture->forceToSaveRawImage(0, F32_MAX); + } + return true; } diff --git a/indra/newview/gltfscenemanager.cpp b/indra/newview/gltfscenemanager.cpp index 9bda70e643..44564b7926 100644 --- a/indra/newview/gltfscenemanager.cpp +++ b/indra/newview/gltfscenemanager.cpp @@ -148,6 +148,16 @@ void GLTFSceneManager::uploadSelection() raw = image.mTexture->getRawImage(); } + if (raw.isNull()) + { + raw = image.mTexture->getSavedRawImage(); + } + + if (raw.isNull()) + { + image.mTexture->readbackRawImage(); + } + if (raw.notNull()) { LLPointer j2c = LLViewerTextureList::convertToUploadFile(raw); From cc7a38d9d135ae29d0252e161a0540d254d2ee0e Mon Sep 17 00:00:00 2001 From: cosmic-linden <111533034+cosmic-linden@users.noreply.github.com> Date: Thu, 11 Jul 2024 12:18:47 -0700 Subject: [PATCH 14/20] Partially revert "secondlife/viewer#1885: Terrain texture repeats: Remove feature flag dependency on simulator feature in favor of cap" --- indra/newview/llviewerregion.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 96c839d918..25c07a5ff9 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -2496,10 +2496,10 @@ void LLViewerRegion::setSimulatorFeatures(const LLSD& sim_features) gSavedSettings.setBOOL("GLTFEnabled", false); } - llassert(gAgent.getRegion()); - if (gAgent.getRegion() && gAgent.getRegion()->isCapabilityAvailable("ModifyRegion")) + if (features.has("PBRTerrainTransformsEnabled")) { - gSavedSettings.setBOOL("RenderTerrainPBRTransformsEnabled", true); + bool enabled = features["PBRTerrainTransformsEnabled"]; + gSavedSettings.setBOOL("RenderTerrainPBRTransformsEnabled", enabled); } else { From becdc46bdc319b513e24f4338f6b8d95fab45575 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 11 Jul 2024 18:53:54 +0300 Subject: [PATCH 15/20] viewer#1988 "Set empty" for controls ignores "Apply to all" --- indra/newview/llsetkeybinddialog.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/llsetkeybinddialog.cpp b/indra/newview/llsetkeybinddialog.cpp index e172e15a0e..5dbd579b45 100644 --- a/indra/newview/llsetkeybinddialog.cpp +++ b/indra/newview/llsetkeybinddialog.cpp @@ -337,8 +337,8 @@ void LLSetKeyBindDialog::onCancel(void* user_data) void LLSetKeyBindDialog::onBlank(void* user_data) { LLSetKeyBindDialog* self = (LLSetKeyBindDialog*)user_data; - // tmp needs 'no key' button - self->setKeyBind(CLICK_NONE, KEY_NONE, MASK_NONE, false); + + self->setKeyBind(CLICK_NONE, KEY_NONE, MASK_NONE, self->pCheckBox->getValue().asBoolean()); self->closeFloater(); } From af93e581929f79b9a21ead6fca0a3c58c498b0d5 Mon Sep 17 00:00:00 2001 From: Zi Ree <81702435+zi-ree@users.noreply.github.com> Date: Fri, 12 Jul 2024 18:08:56 +0200 Subject: [PATCH 16/20] Initialize array before use (#2011) gcc detects usage of this array as uninitialized, so make sure it's initialized. I am not sure if this is a legitimate warning, or if the code guarantees the array gets initialized before use in lines 140-142 and this is a performance optimization. --- indra/newview/gltf/primitive.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/gltf/primitive.cpp b/indra/newview/gltf/primitive.cpp index e1579374d4..81caff8ab2 100644 --- a/indra/newview/gltf/primitive.cpp +++ b/indra/newview/gltf/primitive.cpp @@ -109,7 +109,7 @@ struct MikktMesh for (U32 tri_idx = 0; tri_idx < U32(triangle_count); ++tri_idx) { - U32 idx[3]; + U32 idx[3] = {0, 0, 0}; if (prim->mMode == Primitive::Mode::TRIANGLES) { From 934021f3244d5a090d5171676762f637a90e6d4e Mon Sep 17 00:00:00 2001 From: Zi Ree <81702435+zi-ree@users.noreply.github.com> Date: Fri, 12 Jul 2024 18:17:30 +0200 Subject: [PATCH 17/20] Make image_list_t iterator const (#2010) gcc complains about this iterator not being const --- indra/newview/llviewertexturelist.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/llviewertexturelist.h b/indra/newview/llviewertexturelist.h index 813fda1647..075f6ae915 100644 --- a/indra/newview/llviewertexturelist.h +++ b/indra/newview/llviewertexturelist.h @@ -229,8 +229,8 @@ public: bool mForceResetTextureStats; // to make "for (auto& imagep : gTextureList)" work - const image_list_t::iterator begin() const { return mImageList.begin(); } - const image_list_t::iterator end() const { return mImageList.end(); } + const image_list_t::const_iterator begin() const { return mImageList.cbegin(); } + const image_list_t::const_iterator end() const { return mImageList.cend(); } private: typedef std::map< LLTextureKey, LLPointer > uuid_map_t; From 4bc5c806c7c48a20d31a39e631601fdd04a51dfe Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 12 Jul 2024 12:56:11 +0300 Subject: [PATCH 18/20] viewer#1990 Fixed "Main dictionary" option is switching to the previous value --- indra/newview/llfloaterspellchecksettings.cpp | 8 ++++++-- indra/newview/llfloaterspellchecksettings.h | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/indra/newview/llfloaterspellchecksettings.cpp b/indra/newview/llfloaterspellchecksettings.cpp index 735776f7e5..e58e819345 100644 --- a/indra/newview/llfloaterspellchecksettings.cpp +++ b/indra/newview/llfloaterspellchecksettings.cpp @@ -67,7 +67,11 @@ bool LLFloaterSpellCheckerSettings::postBuild(void) LLSpellChecker::setSettingsChangeCallback(boost::bind(&LLFloaterSpellCheckerSettings::onSpellCheckSettingsChange, this)); getChild("spellcheck_remove_btn")->setCommitCallback(boost::bind(&LLFloaterSpellCheckerSettings::onBtnRemove, this)); getChild("spellcheck_import_btn")->setCommitCallback(boost::bind(&LLFloaterSpellCheckerSettings::onBtnImport, this)); - getChild("spellcheck_main_combo")->setCommitCallback(boost::bind(&LLFloaterSpellCheckerSettings::refreshDictionaries, this, false)); + getChild("spellcheck_main_combo")->setCommitCallback([this](LLUICtrl* ctrl, const LLSD& data) + { + mMainSelectionChanged = true; + refreshDictionaries(false); + }); getChild("spellcheck_moveleft_btn")->setCommitCallback(boost::bind(&LLFloaterSpellCheckerSettings::onBtnMove, this, "spellcheck_active_list", "spellcheck_available_list")); getChild("spellcheck_moveright_btn")->setCommitCallback(boost::bind(&LLFloaterSpellCheckerSettings::onBtnMove, this, "spellcheck_available_list", "spellcheck_active_list")); center(); @@ -146,7 +150,7 @@ void LLFloaterSpellCheckerSettings::onBtnRemove() void LLFloaterSpellCheckerSettings::onSpellCheckSettingsChange() { - refreshDictionaries(true); + refreshDictionaries(!mMainSelectionChanged); } void LLFloaterSpellCheckerSettings::refreshDictionaries(bool from_settings) diff --git a/indra/newview/llfloaterspellchecksettings.h b/indra/newview/llfloaterspellchecksettings.h index f05bf68040..ff76ff6ba5 100644 --- a/indra/newview/llfloaterspellchecksettings.h +++ b/indra/newview/llfloaterspellchecksettings.h @@ -45,6 +45,8 @@ protected: void onBtnRemove(); void onSpellCheckSettingsChange(); void refreshDictionaries(bool from_settings); + + bool mMainSelectionChanged{ false }; }; class LLFloaterSpellCheckerImport : public LLFloater From 27a2531c5bf375ed208d8fd5764a8797f08ce831 Mon Sep 17 00:00:00 2001 From: TommyTheTerrible <81168766+TommyTheTerrible@users.noreply.github.com> Date: Sat, 13 Jul 2024 17:39:09 -0400 Subject: [PATCH 19/20] Fix: Stop textures from being set as inactive if still on a face. (#2017) Textures were being set to Inactive even if still in scene, causing them to be deleted and re-decoded in a loop. --- indra/newview/llviewertexturelist.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index e486449b4d..d31c53d000 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -926,6 +926,7 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag } LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; + bool onFace = false; for (U32 i = 0; i < LLRender::NUM_TEXTURE_CHANNELS; ++i) { for (S32 fi = 0; fi < imagep->getNumFaces(i); ++fi) @@ -934,6 +935,7 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag if (face && face->getViewerObject()) { + onFace = true; F32 radius; F32 cos_angle_to_view_dir; bool in_frustum = face->calcPixelArea(cos_angle_to_view_dir, radius); @@ -1031,7 +1033,8 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag imagep->getLastReferencedTimer()->reset(); //reset texture state. - imagep->setInactive(); + if(!onFace) + imagep->setInactive(); } } From c8310aaea2fe6af7b66780c32afb226d1b4dc2ad Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 12 Jul 2024 21:44:25 +0300 Subject: [PATCH 20/20] viewer#2006 Fixed terrain textures not updating in the "Region/Estate" floater --- indra/newview/llviewerregion.cpp | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 25c07a5ff9..7623ab56a5 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -3147,16 +3147,24 @@ void LLViewerRegion::unpackRegionHandshake() compp->setParamsReady(); } - LLPBRTerrainFeatures::queueQuery(*this, [](LLUUID region_id, bool success, const LLModifyRegion& composition_changes) + std::string cap = getCapability("ModifyRegion"); // needed for queueQuery + if (cap.empty()) { - if (!success) { return; } - LLViewerRegion* region = LLWorld::getInstance()->getRegionFromID(region_id); - if (!region) { return; } - LLVLComposition* compp = region->getComposition(); - if (!compp) { return; } - compp->apply(composition_changes); - LLFloaterRegionInfo::sRefreshFromRegion(region); - }); + LLFloaterRegionInfo::sRefreshFromRegion(this); + } + else + { + LLPBRTerrainFeatures::queueQuery(*this, [](LLUUID region_id, bool success, const LLModifyRegion& composition_changes) + { + if (!success) { return; } + LLViewerRegion* region = LLWorld::getInstance()->getRegionFromID(region_id); + if (!region) { return; } + LLVLComposition* compp = region->getComposition(); + if (!compp) { return; } + compp->apply(composition_changes); + LLFloaterRegionInfo::sRefreshFromRegion(region); + }); + } }