diff options
author | Graham Linden <graham@lindenlab.com> | 2019-02-08 12:44:29 -0800 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2019-02-08 12:44:29 -0800 |
commit | 5c5b625892a86dfa467225c059f7ef1188ba46ca (patch) | |
tree | 65773de98719a3e7e85f9ba4a76371f3a90ce444 /indra | |
parent | 9f2a0d2a082495ce878f0eb0d7348b181939d348 (diff) | |
parent | c909e496fd1a0710e5349441ef4e3cae5ff98de6 (diff) |
Merge SL-10501 fix
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llrender/llrender.cpp | 20 | ||||
-rw-r--r-- | indra/newview/lldrawpoolavatar.cpp | 19 | ||||
-rw-r--r-- | indra/newview/llenvironment.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llpanelenvironment.cpp | 15 | ||||
-rw-r--r-- | indra/newview/llweb.cpp | 11 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/notifications.xml | 13 |
6 files changed, 52 insertions, 27 deletions
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp index 6e15f52866..de04ea601a 100644 --- a/indra/llrender/llrender.cpp +++ b/indra/llrender/llrender.cpp @@ -895,15 +895,6 @@ void LLLightState::setDiffuse(const LLColor4& diffuse) } } -void LLLightState::setDiffuseB(const LLColor4& diffuse) -{ - if (mDiffuseB != diffuse) - { - ++gGL.mLightHash; - mDiffuseB = diffuse; - } -} - void LLLightState::setAmbient(const LLColor4& ambient) { if (mAmbient != ambient) @@ -1162,7 +1153,6 @@ void LLRender::syncLightState() LLVector3 direction[8]; LLVector4 attenuation[8]; LLVector3 diffuse[8]; - LLVector3 diffuseB[8]; for (U32 i = 0; i < 8; i++) { @@ -1172,7 +1162,6 @@ void LLRender::syncLightState() direction[i] = light->mSpotDirection; attenuation[i].set(light->mLinearAtten, light->mQuadraticAtten, light->mSpecular.mV[2], light->mSpecular.mV[3]); diffuse[i].set(light->mDiffuse.mV); - diffuseB[i].set(light->mDiffuseB.mV); } shader->uniform4fv(LLShaderMgr::LIGHT_POSITION, 8, position[0].mV); @@ -1180,8 +1169,8 @@ void LLRender::syncLightState() shader->uniform4fv(LLShaderMgr::LIGHT_ATTENUATION, 8, attenuation[0].mV); shader->uniform3fv(LLShaderMgr::LIGHT_DIFFUSE, 8, diffuse[0].mV); shader->uniform4fv(LLShaderMgr::LIGHT_AMBIENT, 1, mAmbientLightColor.mV); + //HACK -- duplicate sunlight color for compatibility with drivers that can't deal with multiple shader objects referencing the same uniform shader->uniform4fv(LLShaderMgr::SUNLIGHT_COLOR, 1, diffuse[0].mV); - shader->uniform4fv(LLShaderMgr::MOONLIGHT_COLOR, 1, diffuseB[0].mV); } } @@ -1488,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..3e1d78e6df 100644 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -1999,15 +1999,24 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow) if (face->mTextureMatrix && vobj->mTexAnimMode) { - gGL.matrixMode(LLRender::MM_TEXTURE); - gGL.loadMatrix((F32*) face->mTextureMatrix->mMatrix); + 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; + } buff->setBuffer(data_mask); buff->drawRange(LLRender::TRIANGLES, start, end, count, offset); - gGL.matrixMode(LLRender::MM_TEXTURE); - gGL.loadIdentity(); - + if (tex_index <= 1) + { + gGL.loadIdentity(); + } } else { 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); }; } 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<LLPanel> 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/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<std::string::const_iterator> 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<std::string::const_iterator> 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<std::string::const_iterator> matches; + return boost::regex_search(url, matches, pattern); #endif } 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 @@ -11310,6 +11310,19 @@ Are you sure you want to continue? <notification icon="alertmodal.tga" + name="SettingsConfirmReset" + type="alertmodal"> +You are about to remove all applied settings. +Are you sure you want to continue? + <tag>confirm</tag> + <usetemplate + name="okcancelbuttons" + notext="No" + yestext="Yes"/> + </notification> + + <notification + icon="alertmodal.tga" name="SettingsMakeNoTrans" type="alertmodal"> You are about to import non-transferable settings into this daycycle. Continuing will cause the settings you are editing to become non-transferable also. |