From a9dd57c3517eb0ba1070f638d1eb6a4a56d4bfb7 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Thu, 7 Feb 2019 13:06:16 +0200 Subject: SL-10456 FIXED [EEP] Viewer continues to show last EEP environment after teleporting from EEP to non-EEP region --- indra/newview/llenvironment.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra') diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp index fa583bdc9c..9179c545df 100644 --- a/indra/newview/llenvironment.cpp +++ b/indra/newview/llenvironment.cpp @@ -1595,6 +1595,7 @@ void LLEnvironment::requestParcel(S32 parcel_id, environment_apply_fn cb) LLSettingsBase::Seconds transition = LLViewerParcelMgr::getInstance()->getTeleportInProgress() ? TRANSITION_FAST : TRANSITION_DEFAULT; cb = [this, transition](S32 pid, EnvironmentInfo::ptr_t envinfo) { + clearEnvironment(ENV_PARCEL); recordEnvironment(pid, envinfo, transition); }; } -- cgit v1.2.3 From 43327798dec61590dc256697771e0423eb1ece9c Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Thu, 7 Feb 2019 17:58:25 +0200 Subject: SL-10495 [EEP] Include a confirmation when clicking the Use Region Settings button --- indra/newview/llpanelenvironment.cpp | 15 ++++++++++++--- indra/newview/skins/default/xui/en/notifications.xml | 13 +++++++++++++ 2 files changed, 25 insertions(+), 3 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanelenvironment.cpp b/indra/newview/llpanelenvironment.cpp index 2cfd0c8fc9..06504bac37 100644 --- a/indra/newview/llpanelenvironment.cpp +++ b/indra/newview/llpanelenvironment.cpp @@ -42,6 +42,7 @@ #include "llfloaterreg.h" #include "llfloatereditextdaycycle.h" #include "llmultisliderctrl.h" +#include "llnotificationsutil.h" #include "llsettingsvo.h" #include "llappviewer.h" @@ -779,9 +780,17 @@ void LLPanelEnvironmentInfo::onAltSliderMouseUp() void LLPanelEnvironmentInfo::onBtnDefault() { LLHandle that_h = getHandle(); - - LLEnvironment::instance().resetParcel(getParcelId(), - [that_h](S32 parcel_id, LLEnvironment::EnvironmentInfo::ptr_t envifo) { _onEnvironmentReceived(that_h, parcel_id, envifo); }); + S32 parcel_id = getParcelId(); + LLNotificationsUtil::add("SettingsConfirmReset", LLSD(), LLSD(), + [that_h, parcel_id](const LLSD¬if, const LLSD&resp) + { + S32 opt = LLNotificationsUtil::getSelectedOption(notif, resp); + if (opt == 0) + { + LLEnvironment::instance().resetParcel(parcel_id, + [that_h](S32 parcel_id, LLEnvironment::EnvironmentInfo::ptr_t envifo) { _onEnvironmentReceived(that_h, parcel_id, envifo); }); + } + }); } void LLPanelEnvironmentInfo::onBtnEdit() diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 5ea5023c94..dfc392e1f7 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -11308,6 +11308,19 @@ Are you sure you want to continue? yestext="Yes"/> + +You are about to remove all applied settings. +Are you sure you want to continue? + confirm + + + Date: Thu, 7 Feb 2019 16:00:21 -0800 Subject: SL-10486, SL-10501, SL-10487 Make moon texture from default daycycle the default moon texture id and use it for the default and blank assets in the picker. Fix handling of MM_TEXTURE to correctly detect when texture units outside the range 0-3 are used with texture matrix ops to prevent mem overwrite bug and/or asserts. --- indra/llinventory/llsettingssky.cpp | 11 +---------- indra/llinventory/llsettingssky.h | 3 +-- indra/llrender/llrender.cpp | 7 +++++++ indra/newview/lldrawpoolavatar.cpp | 7 ++++--- indra/newview/llweb.cpp | 11 ++++------- 5 files changed, 17 insertions(+), 22 deletions(-) (limited to 'indra') diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp index 612c97168c..48352d685b 100644 --- a/indra/llinventory/llsettingssky.cpp +++ b/indra/llinventory/llsettingssky.cpp @@ -140,7 +140,7 @@ const std::string LLSettingsSky::SETTING_SKY_ICE_LEVEL("ice_level"); const LLUUID LLSettingsSky::DEFAULT_ASSET_ID("eb3a7080-831f-9f37-10f0-7b1f9ea4043c"); static const LLUUID DEFAULT_SUN_ID("32bfbcea-24b1-fb9d-1ef9-48a28a63730f"); // dataserver -static const LLUUID DEFAULT_MOON_ID("db13b827-7e6a-7ace-bed4-4419ee00984d"); // dataserver +static const LLUUID DEFAULT_MOON_ID("d07f6eed-b96a-47cd-b51d-400ad4a1c428"); // dataserver static const LLUUID DEFAULT_CLOUD_ID("1dc1368f-e8fe-f02d-a08d-9d9f11c1af6b"); const std::string LLSettingsSky::SETTING_LEGACY_HAZE("legacy_haze"); @@ -1238,12 +1238,6 @@ LLVector3 LLSettingsSky::getMoonDirection() const return mMoonDirection; } -LLColor4U LLSettingsSky::getFadeColor() const -{ - update(); - return mFadeColor; -} - LLColor4 LLSettingsSky::getMoonAmbient() const { update(); @@ -1308,9 +1302,6 @@ void LLSettingsSky::calculateLightSettings() const mMoonDiffuse = gammaCorrect(componentMult(LLColor3::white, light_transmittance)); mMoonAmbient = gammaCorrect(componentMult(LLColor3::white, light_transmittance) * 0.5f); mTotalAmbient = mSunAmbient; - - mFadeColor = mTotalAmbient + (mSunDiffuse + mMoonDiffuse) * 0.5f; - mFadeColor.setAlpha(0); } LLUUID LLSettingsSky::GetDefaultAssetId() diff --git a/indra/llinventory/llsettingssky.h b/indra/llinventory/llsettingssky.h index 65c0f2c581..cd173a6b18 100644 --- a/indra/llinventory/llsettingssky.h +++ b/indra/llinventory/llsettingssky.h @@ -280,7 +280,7 @@ public: LLVector3 getSunDirection() const; LLVector3 getMoonDirection() const; - LLColor4U getFadeColor() const; + LLColor4 getMoonAmbient() const; LLColor3 getMoonDiffuse() const; LLColor4 getSunAmbient() const; @@ -347,7 +347,6 @@ private: static const F32 DOME_RADIUS; static const F32 DOME_OFFSET; - mutable LLColor4U mFadeColor; mutable LLColor4 mMoonAmbient; mutable LLColor3 mMoonDiffuse; mutable LLColor4 mSunAmbient; diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp index 173444f708..de04ea601a 100644 --- a/indra/llrender/llrender.cpp +++ b/indra/llrender/llrender.cpp @@ -1477,6 +1477,13 @@ void LLRender::matrixMode(U32 mode) { if (mode == MM_TEXTURE) { + U32 tex_index = gGL.getCurrentTexUnitIndex(); + // the shaders don't actually reference anything beyond texture_matrix0/1 + if (tex_index > 3) + { + LL_WARNS_ONCE("render") << "Cannot use texture matrix with texture unit " << tex_index << " forcing texture matrix 3!" << LL_ENDL; + tex_index = 3; + } mode = MM_TEXTURE0 + gGL.getCurrentTexUnitIndex(); } diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index eaf5b7dd68..9fa76c0d97 100644 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -1999,13 +1999,14 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow) if (face->mTextureMatrix && vobj->mTexAnimMode) { + // we don't support tex matrix ops on anything but texture_matrix0 and texture_matrix1 + // if you hit this assert, you most likely need to fix your content + llassert(gGL.getCurrentTexUnitIndex() <= 1); + gGL.matrixMode(LLRender::MM_TEXTURE); gGL.loadMatrix((F32*) face->mTextureMatrix->mMatrix); - buff->setBuffer(data_mask); buff->drawRange(LLRender::TRIANGLES, start, end, count, offset); - - gGL.matrixMode(LLRender::MM_TEXTURE); gGL.loadIdentity(); } diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp index 768db047a4..2760ebd1df 100644 --- a/indra/newview/llweb.cpp +++ b/indra/newview/llweb.cpp @@ -268,12 +268,9 @@ bool LLWeb::useExternalBrowser(const std::string &url) boost::match_results matches; return !(boost::regex_search(uri_string, matches, pattern)); } - else - { - boost::regex pattern = boost::regex("^mailto:", boost::regex::perl | boost::regex::icase); - boost::match_results matches; - return boost::regex_search(url, matches, pattern); - } - return false; + + boost::regex pattern = boost::regex("^mailto:", boost::regex::perl | boost::regex::icase); + boost::match_results matches; + return boost::regex_search(url, matches, pattern); #endif } -- cgit v1.2.3 From c909e496fd1a0710e5349441ef4e3cae5ff98de6 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Fri, 8 Feb 2019 12:43:27 -0800 Subject: SL-10501 Remove assert and replace with warning when rigged mesh tries to use tex anim on tex index > 1. --- indra/newview/lldrawpoolavatar.cpp | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'indra') diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index 9fa76c0d97..3e1d78e6df 100644 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -1999,16 +1999,24 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow) if (face->mTextureMatrix && vobj->mTexAnimMode) { - // we don't support tex matrix ops on anything but texture_matrix0 and texture_matrix1 - // if you hit this assert, you most likely need to fix your content - llassert(gGL.getCurrentTexUnitIndex() <= 1); + U32 tex_index = gGL.getCurrentTexUnitIndex(); + if (tex_index <= 1) + { + gGL.matrixMode(LLRender::MM_TEXTURE); + gGL.loadMatrix((F32*) face->mTextureMatrix->mMatrix); + } + else + { + LL_WARNS_ONCE("render") << "Cannot use tex anim of tex index " << tex_index << " ignoring!" << LL_ENDL; + } - gGL.matrixMode(LLRender::MM_TEXTURE); - gGL.loadMatrix((F32*) face->mTextureMatrix->mMatrix); buff->setBuffer(data_mask); buff->drawRange(LLRender::TRIANGLES, start, end, count, offset); - gGL.loadIdentity(); - + + if (tex_index <= 1) + { + gGL.loadIdentity(); + } } else { -- cgit v1.2.3