From ecc4e9392042f41cbf9b72d796bdc6e876f8f35f Mon Sep 17 00:00:00 2001 From: Ansariel Date: Wed, 12 Jun 2024 13:38:14 +0200 Subject: [PATCH 01/97] FIRE-34012: Add additional render target for 1024x dynamic texture bakes; might also fix FIRE-34016 happening on Intel GPUs --- indra/newview/lldynamictexture.cpp | 4 +++- indra/newview/pipeline.cpp | 18 +++++++++++++++++- indra/newview/pipeline.h | 3 +++ 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/indra/newview/lldynamictexture.cpp b/indra/newview/lldynamictexture.cpp index 993de7c7d4..f486ecfe16 100644 --- a/indra/newview/lldynamictexture.cpp +++ b/indra/newview/lldynamictexture.cpp @@ -191,7 +191,9 @@ BOOL LLViewerDynamicTexture::updateAllInstances() return TRUE; } - LLRenderTarget& bake_target = gPipeline.mAuxillaryRT.deferredScreen; + // Auxillary render target pack for 1024px LLDynamicTexture + //LLRenderTarget& bake_target = gPipeline.mAuxillaryRT.deferredScreen; + LLRenderTarget& bake_target = gPipeline.mDynamicTextureRT.deferredScreen; if (!bake_target.isComplete()) { diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index ece2d49d00..22ff3f8457 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -219,7 +219,9 @@ S32 LLPipeline::RenderHeroProbeUpdateRate; S32 LLPipeline::RenderHeroProbeConservativeUpdateMultiplier; LLTrace::EventStatHandle LLPipeline::sStatBatchSize("renderbatchsize"); -const U32 LLPipeline::MAX_BAKE_WIDTH = 512; +// 1024px previews +//const U32 LLPipeline::MAX_BAKE_WIDTH = 512; +const U32 LLPipeline::MAX_BAKE_WIDTH = 1024; const F32 BACKLIGHT_DAY_MAGNITUDE_OBJECT = 0.1f; const F32 BACKLIGHT_NIGHT_MAGNITUDE_OBJECT = 0.08f; @@ -860,6 +862,12 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples) allocateScreenBuffer(res, res, samples); } + // Auxillary render target pack for 1024px LLDynamicTexture + mRT = &mDynamicTextureRT; + res = MAX_BAKE_WIDTH; + allocateScreenBuffer(res, res, samples); + // + mRT = &mMainRT; gCubeSnapshot = FALSE; } @@ -1257,6 +1265,14 @@ void LLPipeline::releaseScreenBuffers() mHeroProbeRT.fxaaBuffer.release(); mHeroProbeRT.deferredScreen.release(); mHeroProbeRT.deferredLight.release(); + + // Auxillary render target pack for 1024px LLDynamicTexture + mDynamicTextureRT.uiScreen.release(); + mDynamicTextureRT.screen.release(); + mDynamicTextureRT.fxaaBuffer.release(); + mDynamicTextureRT.deferredScreen.release(); + mDynamicTextureRT.deferredLight.release(); + // } void LLPipeline::releaseSunShadowTarget(U32 index) diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index a370f66108..9929650c9f 100644 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -719,6 +719,9 @@ public: // Auxillary render target pack scaled to the hero probe's per-face size. RenderTargetPack mHeroProbeRT; + // Auxillary render target pack for 1024px LLDynamicTexture + RenderTargetPack mDynamicTextureRT; + // currently used render target pack RenderTargetPack* mRT; From 02abb21cf4872f9d9aacc9fff12a461cb296c8ff Mon Sep 17 00:00:00 2001 From: Beq Date: Thu, 13 Jun 2024 01:50:19 +0100 Subject: [PATCH 02/97] FIRE-34104 - Add support for OpenSim spec for PBR Terrain --- indra/newview/llviewerregion.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index d9fdc8fafa..f7ac27556e 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -3518,6 +3518,10 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames) capabilityNames.append("ViewerMetrics"); capabilityNames.append("ViewerStartAuction"); capabilityNames.append("ViewerStats"); + // [FIRE-34104] Add special opensim Capability for signalling PBR Terrain support + constexpr const char* OpenSimPBRTerrain = "VETPBR"; + capabilityNames.append(OpenSimPBRTerrain); + // // Please add new capabilities alphabetically to reduce // merge conflicts. From ed9f48470ea44211d624af6a202a54ba348a02dc Mon Sep 17 00:00:00 2001 From: Beq Date: Thu, 13 Jun 2024 02:06:02 +0100 Subject: [PATCH 03/97] Make gcc happier, maybe clang too. --- indra/newview/llviewerregion.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index f7ac27556e..c9500da357 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -3519,7 +3519,7 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames) capabilityNames.append("ViewerStartAuction"); capabilityNames.append("ViewerStats"); // [FIRE-34104] Add special opensim Capability for signalling PBR Terrain support - constexpr const char* OpenSimPBRTerrain = "VETPBR"; + constexpr char OpenSimPBRTerrain[]{"VETPBR"}; capabilityNames.append(OpenSimPBRTerrain); // From edbbd77b2bf12d605ef75463b6e50f1a4feecc0a Mon Sep 17 00:00:00 2001 From: Zi Ree Date: Thu, 13 Jun 2024 16:30:59 +0200 Subject: [PATCH 04/97] Fix restricting maximum texture resolution and add option for 512 - 1024 pixels, internally ready for even larger texture sizes --- indra/newview/app_settings/settings.xml | 13 ++++++- indra/newview/llviewertexture.cpp | 2 +- indra/newview/llviewerwindow.cpp | 23 +++++++++++-- .../xui/en/panel_preferences_graphics1.xml | 34 ++++++++++++++++--- 4 files changed, 63 insertions(+), 9 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 85a79e36d2..4384b96d12 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -25019,7 +25019,7 @@ Change of this parameter will affect the layout of buttons in notification toast FSRestrictMaxTextureSize Comment - If enabled, the maximum resolution for fetched textures will be restricted and lowered by factor 2 (64bit versions only; requires restart) + If enabled, the maximum resolution for fetched textures will be restricted to FSRestrictMaxTexturePixels pixels (64bit versions only; requires restart) Persist 1 Type @@ -25027,6 +25027,17 @@ Change of this parameter will affect the layout of buttons in notification toast Value 0 + FSRestrictMaxTexturePixels + + Comment + Maximum texture resolution when FSRestrictMaxTextureSize is enabled. Must be a power of 2 and at least 512 pixels. + Persist + 1 + Type + U32 + Value + 512 + FSScriptInfoExtended Comment diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index dea4bda154..6fd2da17b4 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -113,7 +113,7 @@ LLViewerTexture::EDebugTexels LLViewerTexture::sDebugTexelsMode = LLViewerTextur const F64 log_2 = log(2.0); #if ADDRESS_SIZE == 32 -/*const*/ U32 DESIRED_NORMAL_TEXTURE_SIZE = (U32)LLViewerFetchedTexture::MAX_IMAGE_SIZE_DEFAULT / 2; // Max texture resolution +/*const*/ U32 DESIRED_NORMAL_TEXTURE_SIZE = 512 // Max texture resolution // Zi: Pin at 512 since MAX_IMAGE_SIZE_DEFAULT might change again #else /*const*/ U32 DESIRED_NORMAL_TEXTURE_SIZE = (U32)LLViewerFetchedTexture::MAX_IMAGE_SIZE_DEFAULT; // Max texture resolution #endif diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 31d3325e70..6f9974ca6b 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2093,11 +2093,30 @@ LLViewerWindow::LLViewerWindow(const Params& p) gSavedSettings.setU32("RenderQualityPerformance", 0); } - // Max texture resolution + // Max texture resolution / Zi: changed this to accept pixel values so we are independent from maximum texture size #if ADDRESS_SIZE == 64 if (gSavedSettings.getBOOL("FSRestrictMaxTextureSize")) { - DESIRED_NORMAL_TEXTURE_SIZE = (U32)LLViewerFetchedTexture::MAX_IMAGE_SIZE_DEFAULT / 2; + // fallback value if no matching pixel size is found (i.e. someone fiddled with the debugs) + DESIRED_NORMAL_TEXTURE_SIZE = 512; + + // clamp pixels between 512 and half the current maximum texture size + U32 pixels = llclamp(gSavedSettings.getU32("FSRestrictMaxTexturePixels"), 512, (U32)LLViewerFetchedTexture::MAX_IMAGE_SIZE_DEFAULT / 2); + + // check pixel value against powers of 2 up to (not including) current maximum texture size + U32 pow_of_2 = 512; + while(pow_of_2 < (U32)LLViewerFetchedTexture::MAX_IMAGE_SIZE_DEFAULT) + { + // power of 2 matches, save it + if (pixels == pow_of_2) + { + DESIRED_NORMAL_TEXTURE_SIZE = pixels; + break; + } + + // next power of 2 + pow_of_2 <<= 1; + } } #else gSavedSettings.setBOOL("FSRestrictMaxTextureSize", TRUE); diff --git a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml index 01d3109af5..6d870c17b6 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml @@ -1053,7 +1053,7 @@ If you do not understand the distinction then leave this control alone." label="Freeze updates to World (pause everything)" tool_tip="Set this to freeze all updates from the server - stops all actions in-world but does not affect chat, IMs or voice" layout="topleft" - left_delta="5" + left_delta="10" name="WorldPause" top_pad="6" width="256"/> @@ -1074,14 +1074,38 @@ If you do not understand the distinction then leave this control alone." + + + + + + Max Texture Quality Level: From 78a92108e81513eaa1201b7655fac11b5ad9e297 Mon Sep 17 00:00:00 2001 From: Zi Ree Date: Thu, 13 Jun 2024 17:22:30 +0200 Subject: [PATCH 05/97] Followup patch, remove 32 bit disclaimer and internal code, we do not support 32 bit any longer. --- indra/newview/llviewertexture.cpp | 4 ---- indra/newview/llviewerwindow.cpp | 4 ---- .../xui/en/panel_preferences_graphics1.xml | 19 ++++++++++++++++--- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 6fd2da17b4..4a7fc95ac4 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -112,11 +112,7 @@ LLViewerTexture::EDebugTexels LLViewerTexture::sDebugTexelsMode = LLViewerTextur const F64 log_2 = log(2.0); -#if ADDRESS_SIZE == 32 -/*const*/ U32 DESIRED_NORMAL_TEXTURE_SIZE = 512 // Max texture resolution // Zi: Pin at 512 since MAX_IMAGE_SIZE_DEFAULT might change again -#else /*const*/ U32 DESIRED_NORMAL_TEXTURE_SIZE = (U32)LLViewerFetchedTexture::MAX_IMAGE_SIZE_DEFAULT; // Max texture resolution -#endif LLUUID LLViewerTexture::sInvisiprimTexture1 = LLUUID::null; LLUUID LLViewerTexture::sInvisiprimTexture2 = LLUUID::null; diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 6f9974ca6b..515c8d3721 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2094,7 +2094,6 @@ LLViewerWindow::LLViewerWindow(const Params& p) } // Max texture resolution / Zi: changed this to accept pixel values so we are independent from maximum texture size -#if ADDRESS_SIZE == 64 if (gSavedSettings.getBOOL("FSRestrictMaxTextureSize")) { // fallback value if no matching pixel size is found (i.e. someone fiddled with the debugs) @@ -2118,9 +2117,6 @@ LLViewerWindow::LLViewerWindow(const Params& p) pow_of_2 <<= 1; } } -#else - gSavedSettings.setBOOL("FSRestrictMaxTextureSize", TRUE); -#endif LL_INFOS() << "Maximum fetched texture size: " << DESIRED_NORMAL_TEXTURE_SIZE << "px" << LL_ENDL; // diff --git a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml index 6d870c17b6..3258ecc1d8 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml @@ -1074,13 +1074,13 @@ If you do not understand the distinction then leave this control alone." + width="250"/> + + (requires restart) + + Date: Thu, 13 Jun 2024 23:18:48 +0200 Subject: [PATCH 06/97] Making one string translatable in graphics' prefs --- .../newview/skins/default/xui/en/panel_preferences_graphics1.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml index 3258ecc1d8..60f5f03585 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml @@ -1107,6 +1107,7 @@ If you do not understand the distinction then leave this control alone." Date: Fri, 14 Jun 2024 00:23:54 +0100 Subject: [PATCH 07/97] Move macos builds to Macos12 ahead of github removing the support. --- .github/workflows/build_viewer.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_viewer.yml b/.github/workflows/build_viewer.yml index 516dc67ad1..cdb0a069db 100644 --- a/.github/workflows/build_viewer.yml +++ b/.github/workflows/build_viewer.yml @@ -25,7 +25,7 @@ jobs: build_matrix: strategy: matrix: - os: [macos-11,ubuntu-22.04,windows-2022] + os: [macos-12,ubuntu-22.04,windows-2022] grid: [sl,os] addrsize: [64] runs-on: ${{ matrix.os }} From bc6dab0b52b849a4254f4901be426a10bcd25fc3 Mon Sep 17 00:00:00 2001 From: Beq Date: Fri, 14 Jun 2024 00:38:39 +0100 Subject: [PATCH 08/97] Align bandwidth default to same as LL viewer. --- indra/newview/app_settings/settings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 4384b96d12..8e1009201b 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -15141,7 +15141,7 @@ Change of this parameter will affect the layout of buttons in notification toast Type F32 Value - 500.0 + 3000.0 ToolTipDelay From efa2f1db01a9f7b82aa1025d3514294cf0d5ab8d Mon Sep 17 00:00:00 2001 From: Beq Date: Fri, 14 Jun 2024 08:37:21 +0100 Subject: [PATCH 09/97] unused variable upsets clang --- indra/newview/vjlocalmesh.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/indra/newview/vjlocalmesh.cpp b/indra/newview/vjlocalmesh.cpp index d6a0f0ad94..b5f27b61ff 100644 --- a/indra/newview/vjlocalmesh.cpp +++ b/indra/newview/vjlocalmesh.cpp @@ -310,7 +310,6 @@ void LLLocalMeshObject::fillVolume(LLLocalMeshFileLOD lod) // generate face data std::vector new_faces; - bool weight_attributes_found = false; for (auto& current_submesh : mFaces[lod]) { @@ -342,7 +341,6 @@ void LLLocalMeshObject::fillVolume(LLLocalMeshFileLOD lod) // weight attribute if (!current_submesh->getSkin().empty()) { - weight_attributes_found = true; new_face.allocateWeights(current_submesh->getSkin().size()); for (size_t weight_iter = 0; weight_iter < current_submesh->getSkin().size(); ++weight_iter) { From e904999135483c0a7462885508c7259947e57bb8 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Fri, 14 Jun 2024 10:26:30 +0200 Subject: [PATCH 10/97] FIRE-34015: Re-apply saved user settings after loading skin defaults --- indra/newview/llappviewer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 12cab03b14..28197796f6 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3139,7 +3139,7 @@ bool LLAppViewer::initConfiguration() loadSettingsFromDirectory("UserSession"); - //AO: Re-read user settings again. This is a Firestorm hack to get user settings to override modes + // Re-read user settings again. This is a Firestorm hack to get user settings to override modes //Todo, find a cleaner way of doing this via the various set_default arguments. loadSettingsFromDirectory("User"); @@ -3293,6 +3293,7 @@ bool LLAppViewer::initConfiguration() gSavedSettings.getString("SkinCurrentTheme"), gSavedSettings.getString("Language")); loadSettingsFromDirectory("CurrentSkin"); + loadSettingsFromDirectory("User"); // [/SL:KB] // gDirUtilp->setSkinFolder(skinfolder->getValue().asString(), // gSavedSettings.getString("Language")); From 0a538a75138761828d4ca055c9bb0fef658bce6e Mon Sep 17 00:00:00 2001 From: Ansariel Date: Fri, 14 Jun 2024 10:32:24 +0200 Subject: [PATCH 11/97] Update German translation --- .../default/xui/de/panel_preferences_graphics1.xml | 12 +++++++++++- .../default/xui/en/panel_preferences_graphics1.xml | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/indra/newview/skins/default/xui/de/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/de/panel_preferences_graphics1.xml index dd7cb84db0..763493f4b8 100644 --- a/indra/newview/skins/default/xui/de/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/de/panel_preferences_graphics1.xml @@ -163,7 +163,17 @@ - + + + + + + + + (erfordert Neustart) + Maximales Qualitätslevel für Texturen: diff --git a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml index 60f5f03585..c23b69d2b5 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml @@ -1075,7 +1075,7 @@ If you do not understand the distinction then leave this control alone." control_name="FSRestrictMaxTextureSize" height="16" label="Restrict maximum texture resolution to:" - tool_tip="Set this restrict the maximum display resolution for inworld textures to 512px. This allows displaying more textures before exceeding the available texture memory and observing blurry textures." + tool_tip="Set this restrict the maximum display resolution for inworld textures. This allows displaying more textures before exceeding the available texture memory and observing blurry textures." layout="topleft" left_delta="10" name="FSRestrictMaxTextureSize" From c27cf95b91a864d081f56e60c73532c28bd0a64e Mon Sep 17 00:00:00 2001 From: Zi Ree Date: Fri, 14 Jun 2024 17:15:59 +0200 Subject: [PATCH 12/97] Pass pointers to the actual texture controls instead of their names, remove unused parameters --- indra/newview/fspanelface.cpp | 91 ++++++++++++++++------------------- indra/newview/fspanelface.h | 10 ++-- 2 files changed, 46 insertions(+), 55 deletions(-) diff --git a/indra/newview/fspanelface.cpp b/indra/newview/fspanelface.cpp index 9dbdddfb44..b111e8b7b8 100644 --- a/indra/newview/fspanelface.cpp +++ b/indra/newview/fspanelface.cpp @@ -751,29 +751,29 @@ BOOL FSPanelFace::postBuild() // Blinn-Phong Diffuse texture swatch mTextureCtrl->setDefaultImageAssetID(DEFAULT_OBJECT_TEXTURE); - mTextureCtrl->setCommitCallback(boost::bind(&FSPanelFace::onCommitTexture, this, _1, _2)); + mTextureCtrl->setCommitCallback(boost::bind(&FSPanelFace::onCommitTexture, this)); mTextureCtrl->setOnCancelCallback(boost::bind(&FSPanelFace::onCancelTexture, this)); mTextureCtrl->setDragCallback(boost::bind(&FSPanelFace::onDragTexture, this, _2)); - mTextureCtrl->setOnCloseCallback(boost::bind(&FSPanelFace::onCloseTexturePicker, this, _2)); + mTextureCtrl->setOnCloseCallback(boost::bind(&FSPanelFace::onCloseTexturePicker, this)); mTextureCtrl->setImmediateFilterPermMask(PERM_NONE); mTextureCtrl->setDnDFilterPermMask(PERM_COPY | PERM_TRANSFER); // Blinn-Phong Normal texture swatch mBumpyTextureCtrl->setDefaultImageAssetID(DEFAULT_OBJECT_NORMAL); mBumpyTextureCtrl->setBlankImageAssetID(BLANK_OBJECT_NORMAL); - mBumpyTextureCtrl->setCommitCallback(boost::bind(&FSPanelFace::onCommitNormalTexture, this, _1, _2)); + mBumpyTextureCtrl->setCommitCallback(boost::bind(&FSPanelFace::onCommitNormalTexture, this)); mBumpyTextureCtrl->setOnCancelCallback(boost::bind(&FSPanelFace::onCancelNormalTexture, this)); mBumpyTextureCtrl->setDragCallback(boost::bind(&FSPanelFace::onDragTexture, this, _2)); - mBumpyTextureCtrl->setOnCloseCallback(boost::bind(&FSPanelFace::onCloseTexturePicker, this, _2)); + mBumpyTextureCtrl->setOnCloseCallback(boost::bind(&FSPanelFace::onCloseTexturePicker, this)); mBumpyTextureCtrl->setImmediateFilterPermMask(PERM_NONE); mBumpyTextureCtrl->setDnDFilterPermMask(PERM_COPY | PERM_TRANSFER); // Blinn-Phong Specular texture swatch mShinyTextureCtrl->setDefaultImageAssetID(DEFAULT_OBJECT_SPECULAR); - mShinyTextureCtrl->setCommitCallback(boost::bind(&FSPanelFace::onCommitSpecularTexture, this, _1, _2)); + mShinyTextureCtrl->setCommitCallback(boost::bind(&FSPanelFace::onCommitSpecularTexture, this)); mShinyTextureCtrl->setOnCancelCallback(boost::bind(&FSPanelFace::onCancelSpecularTexture, this)); mShinyTextureCtrl->setDragCallback(boost::bind(&FSPanelFace::onDragTexture, this, _2)); - mShinyTextureCtrl->setOnCloseCallback(boost::bind(&FSPanelFace::onCloseTexturePicker, this, _2)); + mShinyTextureCtrl->setOnCloseCallback(boost::bind(&FSPanelFace::onCloseTexturePicker, this)); mShinyTextureCtrl->setImmediateFilterPermMask(PERM_NONE); mShinyTextureCtrl->setDnDFilterPermMask(PERM_COPY | PERM_TRANSFER); @@ -800,7 +800,7 @@ BOOL FSPanelFace::postBuild() mMaterialCtrlPBR->setOnSelectCallback(boost::bind(&FSPanelFace::onSelectPbr, this)); mMaterialCtrlPBR->setDragCallback(boost::bind(&FSPanelFace::onDragPbr, this, _2)); mMaterialCtrlPBR->setOnTextureSelectedCallback(boost::bind(&FSPanelFace::onPbrSelectionChanged, this, _1)); - mMaterialCtrlPBR->setOnCloseCallback(boost::bind(&FSPanelFace::onCloseTexturePicker, this, _2)); + mMaterialCtrlPBR->setOnCloseCallback(boost::bind(&FSPanelFace::onCloseTexturePicker, this)); mMaterialCtrlPBR->setImmediateFilterPermMask(PERM_NONE); mMaterialCtrlPBR->setDnDFilterPermMask(PERM_COPY | PERM_TRANSFER); mMaterialCtrlPBR->setBakeTextureEnabled(false); @@ -3601,7 +3601,7 @@ BOOL FSPanelFace::onDragTexture(LLInventoryItem* item) return accept; } -void FSPanelFace::onCommitTexture(const LLUICtrl* ctrl, const LLSD& data) +void FSPanelFace::onCommitTexture() { LL_WARNS() << "onCommitTexture" << LL_ENDL; add(LLStatViewer::EDIT_TEXTURE, 1); @@ -3635,29 +3635,24 @@ void FSPanelFace::onCommitTexture(const LLUICtrl* ctrl, const LLSD& data) LLSelectedTEMaterial::setDiffuseAlphaMode(this, getCurrentDiffuseAlphaMode()); - // can't just pass "ctrl" on because it's const, and we also need to check - // the ctrl type so we make sure it's a texture swatch - onTextureSelectionChanged(ctrl->getName()); + onTextureSelectionChanged(mTextureCtrl); } -void FSPanelFace::onCommitNormalTexture(const LLUICtrl* ctrl, const LLSD& data) +void FSPanelFace::onCommitNormalTexture() { - LL_DEBUGS("Materials") << data << LL_ENDL; LLUUID nmap_id = getCurrentNormalMap(); sendBump(nmap_id.isNull() ? 0 : BUMPY_TEXTURE); - onTextureSelectionChanged(ctrl->getName()); + onTextureSelectionChanged(mBumpyTextureCtrl); } -void FSPanelFace::onCommitSpecularTexture(const LLUICtrl* ctrl, const LLSD& data) +void FSPanelFace::onCommitSpecularTexture() { - LL_DEBUGS("Materials") << data << LL_ENDL; sendShiny(SHINY_TEXTURE); - onTextureSelectionChanged(ctrl->getName()); + onTextureSelectionChanged(mShinyTextureCtrl); } -void FSPanelFace::onCloseTexturePicker(const LLSD& data) +void FSPanelFace::onCloseTexturePicker() { - LL_DEBUGS("Materials") << data << LL_ENDL; updateUI(); } @@ -5350,47 +5345,43 @@ void FSPanelFace::onCommitGLTFUVSpinner(const LLUICtrl* ctrl, const LLSD& user_d } // selection inside the texture/material picker changed -void FSPanelFace::onTextureSelectionChanged(const std::string& which_control) +void FSPanelFace::onTextureSelectionChanged(LLTextureCtrl* texture_ctrl) { - LL_DEBUGS("Materials") << "control " << which_control << LL_ENDL; + LL_DEBUGS("Materials") << "control " << texture_ctrl->getName() << LL_ENDL; - LLTextureCtrl* texture_ctrl = findChild(which_control); - if (texture_ctrl) + LLInventoryItem* itemp = gInventory.getItem(texture_ctrl->getImageItemID()); + if (!itemp) { - LLInventoryItem* itemp = gInventory.getItem(texture_ctrl->getImageItemID()); - if (!itemp) - { - // no inventory asset available, i.e. could be "Blank" - return; - } + // no inventory asset available, i.e. could be "Blank" + return; + } - LL_WARNS("Materials") << "item inventory id " << itemp->getUUID() << " - item asset " << itemp->getAssetUUID() << LL_ENDL; + LL_WARNS("Materials") << "item inventory id " << itemp->getUUID() << " - item asset " << itemp->getAssetUUID() << LL_ENDL; - LLUUID obj_owner_id; - std::string obj_owner_name; - LLSelectMgr::instance().selectGetOwner(obj_owner_id, obj_owner_name); + LLUUID obj_owner_id; + std::string obj_owner_name; + LLSelectMgr::instance().selectGetOwner(obj_owner_id, obj_owner_name); - LLSaleInfo sale_info; - LLSelectMgr::instance().selectGetSaleInfo(sale_info); + LLSaleInfo sale_info; + LLSelectMgr::instance().selectGetSaleInfo(sale_info); - bool can_copy = itemp->getPermissions().allowCopyBy(gAgentID); // do we have perm to copy this texture? - bool can_transfer = itemp->getPermissions().allowOperationBy(PERM_TRANSFER, gAgentID); // do we have perm to transfer this texture? - bool is_object_owner = gAgentID == obj_owner_id; // does object for which we are going to apply texture belong to the agent? - bool not_for_sale = !sale_info.isForSale(); // is object for which we are going to apply texture not for sale? + bool can_copy = itemp->getPermissions().allowCopyBy(gAgentID); // do we have perm to copy this texture? + bool can_transfer = itemp->getPermissions().allowOperationBy(PERM_TRANSFER, gAgentID); // do we have perm to transfer this texture? + bool is_object_owner = gAgentID == obj_owner_id; // does object for which we are going to apply texture belong to the agent? + bool not_for_sale = !sale_info.isForSale(); // is object for which we are going to apply texture not for sale? - if (can_copy && can_transfer) - { - texture_ctrl->setCanApply(true, true); - return; - } + if (can_copy && can_transfer) + { + texture_ctrl->setCanApply(true, true); + return; + } - // if texture has (no-transfer) attribute it can be applied only for object which we own and is not for sale - texture_ctrl->setCanApply(false, can_transfer ? true : is_object_owner && not_for_sale); + // if texture has (no-transfer) attribute it can be applied only for object which we own and is not for sale + texture_ctrl->setCanApply(false, can_transfer ? true : is_object_owner && not_for_sale); - if (gSavedSettings.getBOOL("TextureLivePreview")) - { - LLNotificationsUtil::add("LivePreviewUnavailable"); - } + if (gSavedSettings.getBOOL("TextureLivePreview")) + { + LLNotificationsUtil::add("LivePreviewUnavailable"); } } diff --git a/indra/newview/fspanelface.h b/indra/newview/fspanelface.h index 2d5614e3c4..296b1a0785 100644 --- a/indra/newview/fspanelface.h +++ b/indra/newview/fspanelface.h @@ -197,17 +197,17 @@ protected: void onSelectColor(); // Blinn-Phong Diffuse texture swatch - void onCommitTexture(const LLUICtrl* ctrl, const LLSD& data); + void onCommitTexture(); void onCancelTexture(); BOOL onDragTexture(LLInventoryItem* item); // this function is to return TRUE if the drag should succeed. - void onCloseTexturePicker(const LLSD& data); + void onCloseTexturePicker(); // Blinn-Phong Normal texture swatch - void onCommitNormalTexture(const LLUICtrl* ctrl, const LLSD& data); + void onCommitNormalTexture(); void onCancelNormalTexture(); // Blinn-Phong Specular texture swatch - void onCommitSpecularTexture(const LLUICtrl* ctrl, const LLSD& data); + void onCommitSpecularTexture(); void onCancelSpecularTexture(); // Blinn-Phong Specular tint color swatch @@ -225,7 +225,7 @@ protected: * If agent selects texture which is not allowed to be applied for the currently selected object, * all controls of the floater texture picker which allow to apply the texture will be disabled. */ - void onTextureSelectionChanged(const std::string& which_control); + void onTextureSelectionChanged(LLTextureCtrl* texture_ctrl); // Media void onClickBtnEditMedia(); From 2d0c807daf88e03f14e3e8935c6af32c8b91aeb4 Mon Sep 17 00:00:00 2001 From: Zi Ree Date: Fri, 14 Jun 2024 17:26:28 +0200 Subject: [PATCH 13/97] Fix BP texture picker applying texture to the wrong material channel when different transforms tab is open --- indra/newview/fspanelface.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/indra/newview/fspanelface.cpp b/indra/newview/fspanelface.cpp index b111e8b7b8..3fe3d8695d 100644 --- a/indra/newview/fspanelface.cpp +++ b/indra/newview/fspanelface.cpp @@ -3606,6 +3606,9 @@ void FSPanelFace::onCommitTexture() LL_WARNS() << "onCommitTexture" << LL_ENDL; add(LLStatViewer::EDIT_TEXTURE, 1); + // appying the texture relies on the tab control showing the correct channel + selectMatChannel(MATTYPE_DIFFUSE); + LLSelectMgr::getInstance()->saveSelectedObjectTextures(); sendTexture(); @@ -3641,12 +3644,19 @@ void FSPanelFace::onCommitTexture() void FSPanelFace::onCommitNormalTexture() { LLUUID nmap_id = getCurrentNormalMap(); + + // appying the texture relies on the tab control showing the correct channel + selectMatChannel(MATTYPE_NORMAL); + sendBump(nmap_id.isNull() ? 0 : BUMPY_TEXTURE); onTextureSelectionChanged(mBumpyTextureCtrl); } void FSPanelFace::onCommitSpecularTexture() { + // appying the texture relies on the tab control showing the correct channel + selectMatChannel(MATTYPE_SPECULAR); + sendShiny(SHINY_TEXTURE); onTextureSelectionChanged(mShinyTextureCtrl); } From c03f0fe416760e70c6f6b7f7db023fd4352dea0a Mon Sep 17 00:00:00 2001 From: Beq Date: Fri, 14 Jun 2024 16:54:10 +0100 Subject: [PATCH 14/97] remove some unused variables that upset clang and modernise a loop or two --- indra/newview/llmodelpreview.cpp | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/indra/newview/llmodelpreview.cpp b/indra/newview/llmodelpreview.cpp index 68eb0fea50..a11e24cfb5 100644 --- a/indra/newview/llmodelpreview.cpp +++ b/indra/newview/llmodelpreview.cpp @@ -1662,11 +1662,11 @@ void LLModelPreview::genGlodLODs(S32 which_lod, U32 decimation, bool enforce_tri U32 instanced_triangle_count = 0; //get the triangle count for the whole scene - for (LLModelLoader::scene::iterator iter = mBaseScene.begin(), endIter = mBaseScene.end(); iter != endIter; ++iter) + for (auto& [pos, instance_list] : mBaseScene) { - for (LLModelLoader::model_instance_list::iterator instance = iter->second.begin(), end_instance = iter->second.end(); instance != end_instance; ++instance) + for (auto& instance : instance_list) { - LLModel* mdl = instance->mModel; + LLModel* mdl = instance.mModel; if (mdl) { instanced_triangle_count += mdl->getNumTriangles(); @@ -1675,9 +1675,9 @@ void LLModelPreview::genGlodLODs(S32 which_lod, U32 decimation, bool enforce_tri } //get the triangle count for the non-instanced set of models - for (U32 i = 0; i < mBaseModel.size(); ++i) + for (auto& model : mBaseModel) { - triangle_count += mBaseModel[i]->getNumTriangles(); + triangle_count += model->getNumTriangles(); } //get ratio of uninstanced triangles to instanced triangles @@ -1736,9 +1736,9 @@ void LLModelPreview::genGlodLODs(S32 which_lod, U32 decimation, bool enforce_tri if (object_dirty) { - for (LLModelLoader::model_list::iterator iter = mBaseModel.begin(); iter != mBaseModel.end(); ++iter) + bool first_model = true; + for (auto mdl : mBaseModel) { //build GLOD objects for each model in base model list - LLModel* mdl = *iter; if (mObject[mdl] != 0) { @@ -1750,17 +1750,17 @@ void LLModelPreview::genGlodLODs(S32 which_lod, U32 decimation, bool enforce_tri glodNewObject(mObject[mdl], mGroup, GLOD_DISCRETE); stop_gloderror(); - if (iter == mBaseModel.begin() && !mdl->mSkinWeights.empty()) + if (first_model && !mdl->mSkinWeights.empty()) { //regenerate vertex buffer for skinned models to prevent animation feedback during LOD generation mVertexBuffer[5].clear(); } + first_model = false; if (mVertexBuffer[5].empty()) { genBuffers(5, false); } - U32 tri_count = 0; for (U32 i = 0; i < mVertexBuffer[5][mdl].size(); ++i) { LLVertexBuffer* buff = mVertexBuffer[5][mdl][i]; @@ -1806,7 +1806,6 @@ void LLModelPreview::genGlodLODs(S32 which_lod, U32 decimation, bool enforce_tri glodInsertElements( mObject[ mdl ], i, GL_TRIANGLES, num_indices, GL_UNSIGNED_SHORT, (U8*)index_strider.get(), 0, 0.f, &vbo ); // } - tri_count += num_indices / 3; stop_gloderror(); } @@ -1854,8 +1853,6 @@ void LLModelPreview::genGlodLODs(S32 which_lod, U32 decimation, bool enforce_tri mModel[lod].resize(mBaseModel.size()); mVertexBuffer[lod].clear(); - U32 actual_tris = 0; - U32 actual_verts = 0; U32 submeshes = 0; mRequestedTriangleCount[lod] = (S32)((F32)triangle_count / triangle_ratio); @@ -2001,8 +1998,6 @@ void LLModelPreview::genGlodLODs(S32 which_lod, U32 decimation, bool enforce_tri buff->getIndexStrider(index); target_model->setVolumeFaceData(names[i], pos, norm, tc, index, buff->getNumVerts(), buff->getNumIndices()); - actual_tris += buff->getNumIndices() / 3; - actual_verts += buff->getNumVerts(); ++submeshes; if (!validate_face(target_model->getVolumeFace(names[i]))) From cc4c4148731111a670cd38fe1db865efd07dadf7 Mon Sep 17 00:00:00 2001 From: Zi Ree Date: Fri, 14 Jun 2024 17:59:05 +0200 Subject: [PATCH 15/97] FIRE-33856 - fix cancel button for BP diffuse textures --- indra/newview/fspanelface.cpp | 8 ++++++++ indra/newview/fspanelface.h | 1 + 2 files changed, 9 insertions(+) diff --git a/indra/newview/fspanelface.cpp b/indra/newview/fspanelface.cpp index 3fe3d8695d..e0d9edde48 100644 --- a/indra/newview/fspanelface.cpp +++ b/indra/newview/fspanelface.cpp @@ -751,6 +751,7 @@ BOOL FSPanelFace::postBuild() // Blinn-Phong Diffuse texture swatch mTextureCtrl->setDefaultImageAssetID(DEFAULT_OBJECT_TEXTURE); + mTextureCtrl->setOnSelectCallback( boost::bind(&FSPanelFace::onSelectTexture, this)); mTextureCtrl->setCommitCallback(boost::bind(&FSPanelFace::onCommitTexture, this)); mTextureCtrl->setOnCancelCallback(boost::bind(&FSPanelFace::onCancelTexture, this)); mTextureCtrl->setDragCallback(boost::bind(&FSPanelFace::onDragTexture, this, _2)); @@ -3605,6 +3606,13 @@ void FSPanelFace::onCommitTexture() { LL_WARNS() << "onCommitTexture" << LL_ENDL; add(LLStatViewer::EDIT_TEXTURE, 1); + sendTexture(); +} + +void FSPanelFace::onSelectTexture() +{ + LL_WARNS() << "onSelectTexture" << LL_ENDL; + add(LLStatViewer::EDIT_TEXTURE, 1); // appying the texture relies on the tab control showing the correct channel selectMatChannel(MATTYPE_DIFFUSE); diff --git a/indra/newview/fspanelface.h b/indra/newview/fspanelface.h index 296b1a0785..04c9db1476 100644 --- a/indra/newview/fspanelface.h +++ b/indra/newview/fspanelface.h @@ -197,6 +197,7 @@ protected: void onSelectColor(); // Blinn-Phong Diffuse texture swatch + void onSelectTexture(); void onCommitTexture(); void onCancelTexture(); BOOL onDragTexture(LLInventoryItem* item); // this function is to return TRUE if the drag should succeed. From b0cc304f3992c7baea1caae1626ab34d74465f16 Mon Sep 17 00:00:00 2001 From: PanteraPolnocy Date: Fri, 14 Jun 2024 19:10:07 +0200 Subject: [PATCH 16/97] FIRE-34032, FIRE-34031: Updated French (by Laurent Bechir), Russian (by Romka Swallowtail) and Polish translations --- .../floater_preferences_graphics_advanced.xml | 46 +++++++++++- .../skins/default/xui/fr/floater_tools.xml | 17 +++++ .../skins/default/xui/fr/menu_viewer.xml | 17 ++++- .../skins/default/xui/fr/notifications.xml | 58 +++++++++++++- .../xui/fr/panel_preferences_graphics1.xml | 31 ++++++-- .../default/xui/fr/panel_region_terrain.xml | 69 +++++++++++++---- .../floater_preferences_graphics_advanced.xml | 19 ++++- .../skins/default/xui/pl/floater_tools.xml | 9 +++ .../skins/default/xui/pl/menu_login.xml | 7 +- .../skins/default/xui/pl/menu_viewer.xml | 9 +++ .../skins/default/xui/pl/notifications.xml | 51 ++++++++++++- .../xui/pl/panel_preferences_graphics1.xml | 27 ++++++- .../default/xui/pl/panel_region_terrain.xml | 13 ++++ .../floater_preferences_graphics_advanced.xml | 75 +++++++------------ .../skins/default/xui/ru/floater_tools.xml | 7 ++ .../default/xui/ru/menu_inventory_add.xml | 2 +- .../skins/default/xui/ru/menu_viewer.xml | 12 ++- .../skins/default/xui/ru/notifications.xml | 65 +++++++++++++++- .../xui/ru/panel_preferences_graphics1.xml | 64 ++++++++-------- .../default/xui/ru/panel_region_terrain.xml | 23 ++++-- 20 files changed, 493 insertions(+), 128 deletions(-) diff --git a/indra/newview/skins/default/xui/fr/floater_preferences_graphics_advanced.xml b/indra/newview/skins/default/xui/fr/floater_preferences_graphics_advanced.xml index 6e78ff3006..db60b59db7 100644 --- a/indra/newview/skins/default/xui/fr/floater_preferences_graphics_advanced.xml +++ b/indra/newview/skins/default/xui/fr/floater_preferences_graphics_advanced.xml @@ -49,14 +49,11 @@ - + - - (redémarrage requis) - Maillage @@ -76,6 +73,9 @@ Faible + + (redémarrage requis) + Effets @@ -113,6 +113,44 @@ + + + Détail des réflexions : + + + + + + + + Couverture de réflexion : + + + + + + + + + + + Résolution des miroirs : + + + + + + + + + Rafraîchissement : + + + + + + + + + + + + + + + Date: Sat, 6 Jul 2024 04:14:10 +0200 Subject: [PATCH 81/97] FIRE-33958: Let's see if this fixes the stuck notifications by not removing toasts from the incorrect channel at startup --- indra/llui/llnotifications.cpp | 20 +++----------------- indra/newview/llstartup.cpp | 12 ++++++++---- 2 files changed, 11 insertions(+), 21 deletions(-) diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index a8d12a77d2..5a37a853e2 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -1014,7 +1014,6 @@ LLBoundListener LLNotificationChannelBase::connectChangedImpl(const LLEventListe LLBoundListener LLNotificationChannelBase::connectAtFrontChangedImpl(const LLEventListener& slot) { - LLMutexLock lock(&mItemsMutex); // Guard against against unlocked access to mItems for (LLNotificationSet::iterator it = mItems.begin(); it != mItems.end(); ++it) { slot(LLSD().with("sigtype", "load").with("id", (*it)->id())); @@ -1053,17 +1052,10 @@ bool LLNotificationChannelBase::updateItem(const LLSD& payload) bool LLNotificationChannelBase::updateItem(const LLSD& payload, LLNotificationPtr pNotification) { std::string cmd = payload["sigtype"]; - // Guard against unlocked access to mItems - // LLNotificationSet::iterator foundItem = mItems.find(pNotification); - // bool wasFound = (foundItem != mItems.end()); - bool wasFound = false; - { - LLMutexLock lock(&mItemsMutex); - LLNotificationSet::iterator foundItem = mItems.find(pNotification); - wasFound = (foundItem != mItems.end()); - } - // + LLNotificationSet::iterator foundItem = mItems.find(pNotification); + bool wasFound = (foundItem != mItems.end()); bool passesFilter = mFilter ? mFilter(pNotification) : true; + // first, we offer the result of the filter test to the simple // signals for pass/fail. One of these is guaranteed to be called. // If either signal returns true, the change processing is NOT performed @@ -1092,7 +1084,6 @@ bool LLNotificationChannelBase::updateItem(const LLSD& payload, LLNotificationPt assert(!wasFound); if (passesFilter) { - LLMutexLock lock(&mItemsMutex); // Guard against unlocked access to mItems // not in our list, add it and say so mItems.insert(pNotification); onLoad(pNotification); @@ -1116,7 +1107,6 @@ bool LLNotificationChannelBase::updateItem(const LLSD& payload, LLNotificationPt } else { - LLMutexLock lock(&mItemsMutex); // Guard against unlocked access to mItems // not in our list, add it and say so mItems.insert(pNotification); onChange(pNotification); @@ -1130,7 +1120,6 @@ bool LLNotificationChannelBase::updateItem(const LLSD& payload, LLNotificationPt { if (wasFound) { - LLMutexLock lock(&mItemsMutex); // Guard against unlocked access to mItems // it already existed, so this is a delete mItems.erase(pNotification); onChange(pNotification); @@ -1149,7 +1138,6 @@ bool LLNotificationChannelBase::updateItem(const LLSD& payload, LLNotificationPt assert(!wasFound); if (passesFilter) { - LLMutexLock lock(&mItemsMutex); // Guard against unlocked access to mItems // not in our list, add it and say so mItems.insert(pNotification); onAdd(pNotification); @@ -1161,7 +1149,6 @@ bool LLNotificationChannelBase::updateItem(const LLSD& payload, LLNotificationPt // if we have it in our list, pass on the delete, then delete it, else do nothing if (wasFound) { - LLMutexLock lock(&mItemsMutex); // Guard against unlocked access to mItems onDelete(pNotification); abortProcessing = mChanged(payload); mItems.erase(pNotification); @@ -1726,7 +1713,6 @@ void LLNotifications::add(const LLNotificationPtr pNotif) if (pNotif == NULL) return; // first see if we already have it -- if so, that's a problem - LLMutexLock lock(&mItemsMutex); // Guard against unlocked acceess to mItems LLNotificationSet::iterator it=mItems.find(pNotif); if (it != mItems.end()) { diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index aba4f12d88..99886c2c8f 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -1269,11 +1269,13 @@ bool idle_startup() gLoginMenuBarView->setVisible( TRUE ); gLoginMenuBarView->setEnabled( TRUE ); - LLNotificationsUI::LLScreenChannelBase* chat_channel = LLNotificationsUI::LLChannelManager::getInstance()->findChannelByID(LLNotificationsUI::NOTIFICATION_CHANNEL_UUID); - if(chat_channel) + // Fixing chat toasts to not show on the login page when login progress screens are disabled. + LLNotificationsUI::LLScreenChannelBase* chat_channel = LLNotificationsUI::LLChannelManager::getInstance()->findChannelByID(LLNotificationsUI::NEARBY_CHAT_CHANNEL_UUID); + if (chat_channel) { chat_channel->removeToastsFromChannel(); } + // show_debug_menus(); @@ -3976,11 +3978,13 @@ void reset_login() } // Hide any other stuff - LLNotificationsUI::LLScreenChannelBase* chat_channel = LLNotificationsUI::LLChannelManager::getInstance()->findChannelByID(LLNotificationsUI::NOTIFICATION_CHANNEL_UUID); - if(chat_channel) + // Fixing chat toasts to not show on the login page when login progress screens are disabled. + LLNotificationsUI::LLScreenChannelBase* chat_channel = LLNotificationsUI::LLChannelManager::getInstance()->findChannelByID(LLNotificationsUI::NEARBY_CHAT_CHANNEL_UUID); + if (chat_channel) { chat_channel->removeToastsFromChannel(); } + // LLFloaterReg::hideVisibleInstances(); LLStartUp::setStartupState( STATE_BROWSER_INIT ); From 0a0368c2324aca861ec308cb40ad29eeed693785 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sat, 6 Jul 2024 13:25:54 +0200 Subject: [PATCH 82/97] FIRE-34230: Fix muted avatars showing not showing in italic font in radar (Default font for scroll list cells now is emoji font - which does not support italic apparently) --- indra/newview/fspanelradar.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/indra/newview/fspanelradar.cpp b/indra/newview/fspanelradar.cpp index 4d7334007e..d1ea04d0d9 100644 --- a/indra/newview/fspanelradar.cpp +++ b/indra/newview/fspanelradar.cpp @@ -331,6 +331,8 @@ void FSPanelRadar::updateList(const std::vector& entries, const LLSD& stat mRadarList->clearRows(); for (const auto& avdata : entries) { + constexpr char font_name[] = "SANSSERIF_SMALL"; + LLSD entry = avdata["entry"]; LLSD options = avdata["options"]; @@ -338,10 +340,12 @@ void FSPanelRadar::updateList(const std::vector& entries, const LLSD& stat row_data["value"] = entry["id"]; row_data["columns"][0]["column"] = "name"; row_data["columns"][0]["value"] = entry["name"]; + row_data["columns"][0]["font"] = font_name; row_data["columns"][1]["column"] = "voice_level"; row_data["columns"][1]["type"] = "icon"; row_data["columns"][1]["value"] = ""; // Need to set it after the row has been created because it's to big for the row + row_data["columns"][1]["font"] = font_name; row_data["columns"][2]["column"] = "in_region"; row_data["columns"][2]["type"] = "icon"; @@ -377,13 +381,16 @@ void FSPanelRadar::updateList(const std::vector& entries, const LLSD& stat row_data["columns"][7]["column"] = "age"; row_data["columns"][7]["value"] = entry["age"]; row_data["columns"][7]["halign"] = "right"; + row_data["columns"][7]["font"] = font_name; row_data["columns"][8]["column"] = "seen"; row_data["columns"][8]["value"] = entry["seen"]; row_data["columns"][8]["halign"] = "right"; + row_data["columns"][8]["font"] = font_name; row_data["columns"][9]["column"] = "range"; row_data["columns"][9]["value"] = entry["range"]; + row_data["columns"][9]["font"] = font_name; row_data["columns"][10]["column"] = "seen_sort"; row_data["columns"][10]["value"] = entry["seen"].asString() + "_" + entry["name"].asString(); From bb95cee882b431338fff66e9fda17ecaad63c0a0 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sat, 6 Jul 2024 13:27:23 +0200 Subject: [PATCH 83/97] Don't create debug log messages for intentional no-op cases --- indra/newview/lggcontactsets.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/indra/newview/lggcontactsets.cpp b/indra/newview/lggcontactsets.cpp index cd3dbf7309..df5cbb8aa9 100644 --- a/indra/newview/lggcontactsets.cpp +++ b/indra/newview/lggcontactsets.cpp @@ -320,6 +320,8 @@ LLColor4 LGGContactSets::colorize(const LLUUID& uuid, LLColor4 color, ContactSet color = LLUIColorTable::instance().getColor("MapAvatarSelfColor", LLColor4::white).get(); break; case ContactSetType::RADAR: + // Do nothing + break; default: LL_DEBUGS("ContactSets") << "Unhandled colorize case!" << LL_ENDL; break; @@ -378,6 +380,8 @@ LLColor4 LGGContactSets::colorize(const LLUUID& uuid, LLColor4 color, ContactSet color = LLUIColorTable::instance().getColor("MapAvatarMutedColor", LLColor4::grey3).get(); break; case ContactSetType::RADAR: + // Do nothing + break; default: LL_DEBUGS("ContactSets") << "Unhandled colorize case!" << LL_ENDL; break; @@ -398,6 +402,8 @@ LLColor4 LGGContactSets::colorize(const LLUUID& uuid, LLColor4 color, ContactSet color = LLUIColorTable::instance().getColor("MapAvatarFirestormColor", LLColor4::red).get(); break; case ContactSetType::RADAR: + // Do nothing + break; default: LL_DEBUGS("ContactSets") << "Unhandled colorize case!" << LL_ENDL; break; From c2b696b6c924d0dae4fd0cf1f20c5dd6d560e644 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sat, 6 Jul 2024 13:36:17 +0200 Subject: [PATCH 84/97] FIRE-34192: Fix (revert) avatar height fudge factor after LL's av height measuring changes have been reverted --- indra/newview/llpaneleditwearable.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index 1b4a9676da..2366e721a2 100644 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -1478,10 +1478,10 @@ void LLPanelEditWearable::updateTypeSpecificControls(LLWearableType::EType type) if (type == LLWearableType::WT_SHAPE) { // Update avatar height - // The .08 is a fudge factor derived by measuring against + // The .195 is a fudge factor derived by measuring against // prims inworld, carried forward from Phoenix and adjusted // after LL's calculation change for shape sizes. -- TS - F32 new_size = gAgentAvatarp->mBodySize.mV[VZ] + .08f; + F32 new_size = gAgentAvatarp->mBodySize.mV[VZ] + .195f; if (gSavedSettings.getBOOL("HeightUnits") == FALSE) { From 0377b775d7ef313ddb9a7383848486c874e4c5ff Mon Sep 17 00:00:00 2001 From: chanayane Date: Wed, 10 Jul 2024 00:05:47 +0200 Subject: [PATCH 85/97] Raised the 512x512 limitation for uploading snapshots to inventory to 2048x2048 --- indra/newview/llagentbenefits.cpp | 19 +++++++++++++++++++ indra/newview/llagentbenefits.h | 3 +++ indra/newview/llfloatersnapshot.cpp | 5 ++++- indra/newview/llpanelsnapshot.cpp | 12 ++++++++++-- indra/newview/llpanelsnapshotinventory.cpp | 18 +++++++++++++++++- indra/newview/llpanelsnapshotoptions.cpp | 18 +++++++++++++++++- indra/newview/llsnapshotlivepreview.cpp | 10 ++++++++-- 7 files changed, 78 insertions(+), 7 deletions(-) diff --git a/indra/newview/llagentbenefits.cpp b/indra/newview/llagentbenefits.cpp index d09faeb9e0..4c752485d5 100644 --- a/indra/newview/llagentbenefits.cpp +++ b/indra/newview/llagentbenefits.cpp @@ -267,6 +267,25 @@ S32 LLAgentBenefits::getTextureUploadCost(const LLImageBase* tex) const return getTextureUploadCost(); } +// 2048x2048 snapshots upload to inventory +S32 LLAgentBenefits::getTextureUploadCost(S32 w, S32 h) const +{ + if (w > 0 && h > 0) + { + S32 area = w * h; + if (area >= MIN_2K_TEXTURE_AREA) + { + return get2KTextureUploadCost(area); + } + else + { + return getTextureUploadCost(); + } + } + return getTextureUploadCost(); +} +// + S32 LLAgentBenefits::get2KTextureUploadCost(S32 area) const { if (m_2k_texture_upload_cost.empty()) diff --git a/indra/newview/llagentbenefits.h b/indra/newview/llagentbenefits.h index ff23241aa9..2e693798bf 100644 --- a/indra/newview/llagentbenefits.h +++ b/indra/newview/llagentbenefits.h @@ -54,6 +54,9 @@ public: S32 getTextureUploadCost() const; S32 getTextureUploadCost(const LLViewerTexture* tex) const; S32 getTextureUploadCost(const LLImageBase* tex) const; + // 2048x2048 snapshots upload to inventory + S32 getTextureUploadCost(S32 w, S32 h) const; + // S32 get2KTextureUploadCost(S32 area) const; bool findUploadCost(LLAssetType::EType& asset_type, S32& cost) const; diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index 9d1288bd96..3b7ff6b907 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -58,7 +58,10 @@ LLSnapshotFloaterView* gSnapshotFloaterView = NULL; const F32 AUTO_SNAPSHOT_TIME_DELAY = 1.f; const S32 MAX_POSTCARD_DATASIZE = 1572864; // 1.5 megabyte, similar to simulator limit -const S32 MAX_TEXTURE_SIZE = 512 ; //max upload texture size 512 * 512 +// 2048x2048 snapshots upload to inventory +//const S32 MAX_TEXTURE_SIZE = 512 ; //max upload texture size 512 * 512 +const S32 MAX_TEXTURE_SIZE = 2048 ; //max upload texture size 2048 * 2048 +// 2048x2048 snapshots upload to inventory static LLDefaultChildRegistry::Register r("snapshot_floater_view"); diff --git a/indra/newview/llpanelsnapshot.cpp b/indra/newview/llpanelsnapshot.cpp index 3664d755bb..495d3b6242 100644 --- a/indra/newview/llpanelsnapshot.cpp +++ b/indra/newview/llpanelsnapshot.cpp @@ -41,7 +41,10 @@ #include "llagentbenefits.h" -const S32 MAX_TEXTURE_SIZE = 512 ; //max upload texture size 512 * 512 +// 2048x2048 snapshots upload to inventory +//const S32 MAX_TEXTURE_SIZE = 512 ; //max upload texture size 512 * 512 +const S32 MAX_TEXTURE_SIZE = 2048 ; //max upload texture size 2048 * 2048 +// S32 power_of_two(S32 sz, S32 upper) { @@ -66,7 +69,12 @@ BOOL LLPanelSnapshot::postBuild() LLUICtrl* save_btn = findChild("save_btn"); if (save_btn) { - save_btn->setLabelArg("[UPLOAD_COST]", std::to_string(LLAgentBenefitsMgr::current().getTextureUploadCost())); + // 2048x2048 snapshots upload to inventory + //save_btn->setLabelArg("[UPLOAD_COST]", std::to_string(LLAgentBenefitsMgr::current().getTextureUploadCost())); + S32 w = getTypedPreviewWidth(); + S32 h = getTypedPreviewHeight(); + save_btn->setLabelArg("[UPLOAD_COST]", std::to_string(LLAgentBenefitsMgr::current().getTextureUploadCost(w, h))); + // } // getChild(getImageSizeComboName())->setCommitCallback(boost::bind(&LLPanelSnapshot::onResolutionComboCommit, this, _1)); diff --git a/indra/newview/llpanelsnapshotinventory.cpp b/indra/newview/llpanelsnapshotinventory.cpp index c2f40d051f..ce130922ed 100644 --- a/indra/newview/llpanelsnapshotinventory.cpp +++ b/indra/newview/llpanelsnapshotinventory.cpp @@ -187,7 +187,23 @@ LLPanelSnapshotInventory::~LLPanelSnapshotInventory() void LLPanelSnapshotInventoryBase::onSend() { - S32 expected_upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost(); + // 2048x2048 snapshots upload to inventory + //S32 expected_upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost(); + S32 w = 0; + S32 h = 0; + + if( mSnapshotFloater ) + { + LLSnapshotLivePreview* preview = mSnapshotFloater->getPreviewView(); + if( preview ) + { + preview->getSize(w, h); + } + } + + S32 expected_upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost(w, h); + // + if (can_afford_transaction(expected_upload_cost)) { if (mSnapshotFloater) diff --git a/indra/newview/llpanelsnapshotoptions.cpp b/indra/newview/llpanelsnapshotoptions.cpp index 4c71ed91f8..d744dd3682 100644 --- a/indra/newview/llpanelsnapshotoptions.cpp +++ b/indra/newview/llpanelsnapshotoptions.cpp @@ -30,6 +30,7 @@ #include "llsidetraypanelcontainer.h" #include "llfloatersnapshot.h" // FIXME: create a snapshot model +#include "llsnapshotlivepreview.h" // 2048x2048 snapshots upload to inventory #include "llfloaterreg.h" #include "llfloaterflickr.h" // Share to Flickr @@ -92,7 +93,22 @@ void LLPanelSnapshotOptions::onOpen(const LLSD& key) void LLPanelSnapshotOptions::updateUploadCost() { - S32 upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost(); + // 2048x2048 snapshots upload to inventory + //S32 upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost(); + S32 w = 0; + S32 h = 0; + + if( mSnapshotFloater ) + { + LLSnapshotLivePreview* preview = mSnapshotFloater->getPreviewView(); + if( preview ) + { + preview->getSize(w, h); + } + } + + S32 upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost(w, h); + // getChild("save_to_inventory_btn")->setLabelArg("[AMOUNT]", llformat("%d", upload_cost)); } diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp index 1228715eb7..dee8f4504d 100644 --- a/indra/newview/llsnapshotlivepreview.cpp +++ b/indra/newview/llsnapshotlivepreview.cpp @@ -66,7 +66,10 @@ F32 FALL_TIME = 0.6f; S32 BORDER_WIDTH = 6; S32 TOP_PANEL_HEIGHT = 30; -const S32 MAX_TEXTURE_SIZE = 512 ; //max upload texture size 512 * 512 +// 2048x2048 snapshots upload to inventory +//const S32 MAX_TEXTURE_SIZE = 512 ; //max upload texture size 512 * 512 +const S32 MAX_TEXTURE_SIZE = 2048 ; //max upload texture size 2048 * 2048 +// 2048x2048 snapshots upload to inventory std::set LLSnapshotLivePreview::sList; LLPointer LLSnapshotLivePreview::sSaveLocalImage = NULL; @@ -1131,7 +1134,10 @@ void LLSnapshotLivePreview::saveTexture(BOOL outfit_snapshot, std::string name) LLAgentUI::buildLocationString(pos_string, LLAgentUI::LOCATION_FORMAT_FULL); std::string who_took_it; LLAgentUI::buildFullname(who_took_it); - S32 expected_upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost(); + // 2048x2048 snapshots upload to inventory + //S32 expected_upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost(); + S32 expected_upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost(scaled->getWidth(), scaled->getHeight()); + // std::string res_name = outfit_snapshot ? name : "Snapshot : " + pos_string; std::string res_desc = outfit_snapshot ? "" : "Taken by " + who_took_it + " at " + pos_string; LLFolderType::EType folder_type = outfit_snapshot ? LLFolderType::FT_NONE : LLFolderType::FT_SNAPSHOT_CATEGORY; From 2719c6b3da9906acd08eedbfda8b3de75ec84c10 Mon Sep 17 00:00:00 2001 From: Zi Ree Date: Sun, 14 Jul 2024 03:08:48 +0200 Subject: [PATCH 86/97] FIRE-33958 - possible fix for stuck notices when (re)opening local chat while notices are on-screen --- indra/newview/fsfloaternearbychat.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/fsfloaternearbychat.cpp b/indra/newview/fsfloaternearbychat.cpp index bc72dedca8..ed9c1b89cb 100644 --- a/indra/newview/fsfloaternearbychat.cpp +++ b/indra/newview/fsfloaternearbychat.cpp @@ -405,7 +405,7 @@ void FSFloaterNearbyChat::openFloater(const LLSD& key) void FSFloaterNearbyChat::removeScreenChat() { - LLNotificationsUI::LLScreenChannelBase* chat_channel = LLNotificationsUI::LLChannelManager::getInstance()->findChannelByID(LLNotificationsUI::NOTIFICATION_CHANNEL_UUID); + LLNotificationsUI::LLScreenChannelBase* chat_channel = LLNotificationsUI::LLChannelManager::getInstance()->findChannelByID(LLNotificationsUI::NEARBY_CHAT_CHANNEL_UUID); if (chat_channel) { chat_channel->removeToastsFromChannel(); From 2e7ed2a172d3d79f45d4d5e32b465d40206685d7 Mon Sep 17 00:00:00 2001 From: Beq Date: Tue, 16 Jul 2024 01:11:21 +0100 Subject: [PATCH 87/97] Add some debug logging for memory tracking Two setting MemoryInfo will enable the logging of updates to the memory stats. TextureMemory will enable the logging of whether low RAM is skewing the bias. --- indra/llcommon/llmemory.cpp | 7 +++++++ indra/newview/llviewertexture.cpp | 2 ++ 2 files changed, 9 insertions(+) diff --git a/indra/llcommon/llmemory.cpp b/indra/llcommon/llmemory.cpp index 69c9ba38f1..c296112a4c 100644 --- a/indra/llcommon/llmemory.cpp +++ b/indra/llcommon/llmemory.cpp @@ -191,6 +191,13 @@ void LLMemory::updateMemoryInfo() { sAvailPhysicalMemInKB = U32Kilobytes(0); } + // debug log the memory info + LL_DEBUGS("MemoryInfo") << "Memory Info:" + << "Heap: " << sMaxHeapSizeInKB << "; " // Heap + << "Free: " << sAvailPhysicalMemInKB << "; " // Free + << "FS Use: " << sAllocatedMemInKB << "; " // In use by this instance right now + << "FS Max poss: " << sMaxPhysicalMemInKB << "; " // How much we could have (In use now + free) + << LL_ENDL; // return ; } diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 377153a099..2ed465af87 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -607,6 +607,7 @@ void LLViewerTexture::updateClass() if (isSystemMemoryForTextureLow()) { // System RAM is low -> ramp up discard bias over time to free memory + LL_DEBUGS("TextureMemory") << "System memory is low, use more aggressive discard bias." << LL_ENDL; if (sEvaluationTimer.getElapsedTimeF32() > GPU_MEMORY_CHECK_WAIT_TIME) { sDesiredDiscardBias += llmax(.1f, over_pct); // add at least 10% over-percentage @@ -615,6 +616,7 @@ void LLViewerTexture::updateClass() } else { + LL_DEBUGS("TextureMemory") << "System memory is plentiful, act normally." << LL_ENDL; sDesiredDiscardBias = llmax(sDesiredDiscardBias, 1.f + over_pct); if (sDesiredDiscardBias > 1.f) From a447221d66d67bc2be3d8b62942e5a4dcf869b6f Mon Sep 17 00:00:00 2001 From: Beq Date: Tue, 16 Jul 2024 01:19:02 +0100 Subject: [PATCH 88/97] Updated memory calculation logic for MacOS The available physical memory computation now includes the inactive_count along with the free_count. --- indra/llcommon/llmemory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/llcommon/llmemory.cpp b/indra/llcommon/llmemory.cpp index c296112a4c..ced68a5212 100644 --- a/indra/llcommon/llmemory.cpp +++ b/indra/llcommon/llmemory.cpp @@ -154,7 +154,7 @@ void LLMemory::updateMemoryInfo() // align MemInfo across platforms // sAvailPhysicalMemInKB = U32Bytes(vmstat.free_count * page_size); // sMaxPhysicalMemInKB = LLMemoryInfo::getHardwareMemSize(); - avail_phys = U32Bytes(vmstat.free_count * page_size); + avail_phys = U32Bytes( (vmstat.free_count + vmstat.inactive_count) * page_size); sMaxHeapSizeInKB = LLMemoryInfo::getHardwareMemSize(); // } From 66cac4b9057d5cd8039c345e210a1d0d39d440fe Mon Sep 17 00:00:00 2001 From: Zi Ree Date: Tue, 16 Jul 2024 12:56:16 +0200 Subject: [PATCH 89/97] FIRE-34300 - Fix label not showing in texture picker floater title --- indra/newview/lltexturectrl.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index 64dd442699..7927cddc70 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -1814,6 +1814,7 @@ LLTextureCtrl::LLTextureCtrl(const LLTextureCtrl::Params& p) mFallbackImage(p.fallback_image), mTextEnabledColor(p.text_enabled_color), // Add label/caption colors mTextDisabledColor(p.text_disabled_color), // Add label/caption colors + mLabel(p.label), // FIRE-34300 - Fix label not showing in texture picker floater title // Mask texture if desired mIsMasked(FALSE) { From 351f6723d9abcc2bbf00d70e4e292b7a3f830ad7 Mon Sep 17 00:00:00 2001 From: PanteraPolnocy Date: Wed, 17 Jul 2024 19:00:17 +0200 Subject: [PATCH 90/97] updated polish translation, camera roll --- indra/newview/skins/ansastorm/xui/pl/floater_camera.xml | 2 ++ indra/newview/skins/default/xui/pl/floater_camera.xml | 2 ++ indra/newview/skins/default/xui/pl/floater_fs_camera_small.xml | 2 ++ 3 files changed, 6 insertions(+) diff --git a/indra/newview/skins/ansastorm/xui/pl/floater_camera.xml b/indra/newview/skins/ansastorm/xui/pl/floater_camera.xml index 9cd2a6e411..8e03199c8b 100644 --- a/indra/newview/skins/ansastorm/xui/pl/floater_camera.xml +++ b/indra/newview/skins/ansastorm/xui/pl/floater_camera.xml @@ -18,6 +18,8 @@ +