From a4cabf80d3c7a125a23dbab0fadec5c8c5ab8d97 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 29 Jan 2020 16:39:49 +0200 Subject: [PATCH 01/27] SL-12590 SL-12608 Fixed wrong states --- indra/newview/llpanellogin.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 7ef3685cdb..224cec9650 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -1230,6 +1230,8 @@ void LLPanelLogin::updateLoginButtons() if (user_combo->getCurrentIndex() != -1) { remember_name->setValue(true); + LLCheckBoxCtrl* remember_pass = getChild("remember_password"); + remember_pass->setEnabled(TRUE); } // Note: might be good idea to do "else remember_name->setValue(mRememberedState)" but it might behave 'weird' to user } } @@ -1239,6 +1241,8 @@ void LLPanelLogin::populateUserList(LLPointer credential) LLComboBox* user_combo = getChild("username_combo"); user_combo->removeall(); user_combo->clear(); + user_combo->setValue(std::string()); + getChild("password_edit")->setValue(std::string()); mUsernameLength = 0; mPasswordLength = 0; @@ -1261,9 +1265,7 @@ void LLPanelLogin::populateUserList(LLPointer credential) if (credential.isNull() || !user_combo->setSelectedByValue(LLSD(credential->userID()), true)) { - // selection failed, just deselect whatever might be selected - user_combo->setValue(std::string()); - getChild("password_edit")->setValue(std::string()); + // selection failed, fields will be mepty updateLoginButtons(); } else @@ -1278,7 +1280,8 @@ void LLPanelLogin::populateUserList(LLPointer credential) const LLSD &ident = credential->getIdentifier(); if (ident.isMap() && ident.has("type")) { - user_combo->add(LLPanelLogin::getUserName(credential), credential->userID(), ADD_BOTTOM, TRUE); + // this llsd might hold invalid credencial (failed login), so + // do not add to the list, just set field. setFields(credential); } else From a8437a7636c065ae06e53281db1be94dd4ae9e88 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 29 Jan 2020 18:02:41 +0200 Subject: [PATCH 02/27] potential crashfix --- indra/newview/llimprocessing.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/indra/newview/llimprocessing.cpp b/indra/newview/llimprocessing.cpp index d3537dc24e..c3375a3779 100644 --- a/indra/newview/llimprocessing.cpp +++ b/indra/newview/llimprocessing.cpp @@ -1569,6 +1569,12 @@ void LLIMProcessing::requestOfflineMessagesCoro(std::string url) return; } + if (gAgent.getRegion() == NULL) + { + LL_WARNS("Messaging") << "Region null while attempting to load messages." << LL_ENDL; + return; + } + LL_INFOS("Messaging") << "Processing offline messages." << LL_ENDL; std::vector data; From 66a831dcf94edb7e391c270ccb79a8f023219e09 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 29 Jan 2020 18:09:19 +0200 Subject: [PATCH 03/27] SL-4354 Mesh avatars look broken while loading. --- indra/newview/llvoavatar.cpp | 35 ++++++++++++++++++++++++++++------- indra/newview/llvoavatar.h | 2 ++ 2 files changed, 30 insertions(+), 7 deletions(-) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 887456dcfb..f4f91a4009 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -197,6 +197,8 @@ const F32 NAMETAG_VERT_OFFSET_WEIGHT = 0.17f; const U32 LLVOAvatar::VISUAL_COMPLEXITY_UNKNOWN = 0; const F64 HUD_OVERSIZED_TEXTURE_DATA_SIZE = 1024 * 1024; +const F32 MAX_TEXTURE_WAIT_TIME_SEC = 60; + enum ERenderName { RENDER_NAME_NEVER, @@ -663,6 +665,7 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id, mFullyLoadedInitialized(FALSE), mVisualComplexity(VISUAL_COMPLEXITY_UNKNOWN), mLoadedCallbacksPaused(FALSE), + mLoadedCallbackTextures(0), mRenderUnloadedAvatar(LLCachedControl(gSavedSettings, "RenderUnloadedAvatar", false)), mLastRezzedStatus(-1), mIsEditingAppearance(FALSE), @@ -5327,6 +5330,7 @@ void LLVOAvatar::checkTextureLoading() if(mCallbackTextureList.empty()) //when is self or no callbacks. Note: this list for self is always empty. { mLoadedCallbacksPaused = pause ; + mLoadedCallbackTextures = 0; return ; //nothing to check. } @@ -5334,7 +5338,9 @@ void LLVOAvatar::checkTextureLoading() { return ; //have not been invisible for enough time. } - + + mLoadedCallbackTextures = 0; + for(LLLoadedCallbackEntry::source_callback_list_t::iterator iter = mCallbackTextureList.begin(); iter != mCallbackTextureList.end(); ++iter) { @@ -5356,8 +5362,12 @@ void LLVOAvatar::checkTextureLoading() tex->unpauseLoadedCallbacks(&mCallbackTextureList) ; tex->addTextureStats(START_AREA); //jump start the fetching again } - } - } + } + if (tex->isFullyLoaded()) + { + mLoadedCallbackTextures++; + } + } if(!pause) { @@ -7799,9 +7809,19 @@ BOOL LLVOAvatar::updateIsFullyLoaded() { S32 rez_status = getRezzedStatus(); bool loading = getIsCloud(); - if (mFirstFullyVisible && !mIsControlAvatar && rez_status < 3) + if (mFirstFullyVisible && !mIsControlAvatar) { - loading = ((rez_status < 2) || !isFullyBaked()); + loading = ((rez_status < 2) + || mMeshTexturesDirty + || mVisualComplexityStale //complexity just updated + // Wait at least 60s for unfinished textures to finish on first load, + // don't wait forever, it might fail. Even if it will eventually load by + // itself and update mLoadedCallbackTextures (or fail and clean the list), + // avatars are more time-sensitive than textures and can't wait that long. + || (mLoadedCallbackTextures != mCallbackTextureList.size() && mLastTexCallbackAddedTime.getElapsedTimeF32() <= MAX_TEXTURE_WAIT_TIME_SEC) + || !mPendingAttachment.empty() + || (rez_status < 3 && !isFullyBaked()) + ); } updateRezzedStatusTimers(rez_status); updateRuthTimer(loading); @@ -8185,6 +8205,7 @@ void LLVOAvatar::updateMeshTextures() } baked_img->setLoadedCallback(onBakedTextureLoaded, SWITCH_TO_BAKED_DISCARD, FALSE, FALSE, new LLUUID( mID ), src_callback_list, paused ); + mLastTexCallbackAddedTime.reset(); // this could add paused texture callbacks mLoadedCallbacksPaused |= paused; @@ -8578,7 +8599,7 @@ void LLVOAvatar::onFirstTEMessageReceived() LL_DEBUGS("Avatar") << avString() << "layer_baked, setting onInitialBakedTextureLoaded as callback" << LL_ENDL; image->setLoadedCallback( onInitialBakedTextureLoaded, MAX_DISCARD_LEVEL, FALSE, FALSE, new LLUUID( mID ), src_callback_list, paused ); - + mLastTexCallbackAddedTime.reset(); // this could add paused texture callbacks mLoadedCallbacksPaused |= paused; } @@ -10351,7 +10372,7 @@ void LLVOAvatar::calculateUpdateRenderComplexity() // Diagnostic list of all textures on our avatar static std::set all_textures; - if (mVisualComplexityStale) + if (mVisualComplexityStale) { U32 cost = VISUAL_COMPLEXITY_UNKNOWN; LLVOVolume::texture_cost_t textures; diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index e352a6c1fa..3526142ff5 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -629,6 +629,8 @@ protected: LLLoadedCallbackEntry::source_callback_list_t mCallbackTextureList ; BOOL mLoadedCallbacksPaused; + S32 mLoadedCallbackTextures; // count of fully loaded textures filled from mCallbackTextureList + LLFrameTimer mLastTexCallbackAddedTime; std::set mTextureIDs; //-------------------------------------------------------------------- // Local Textures From 712164210cf57cfde3b17c3162dc4129d52e2780 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 30 Jan 2020 15:20:00 +0200 Subject: [PATCH 04/27] SL-4354 Mesh avatars look broken while loading. --- indra/newview/llvoavatar.cpp | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index f4f91a4009..780b6f81f1 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5339,7 +5339,7 @@ void LLVOAvatar::checkTextureLoading() return ; //have not been invisible for enough time. } - mLoadedCallbackTextures = 0; + mLoadedCallbackTextures = pause ? mCallbackTextureList.size() : 0; for(LLLoadedCallbackEntry::source_callback_list_t::iterator iter = mCallbackTextureList.begin(); iter != mCallbackTextureList.end(); ++iter) @@ -5361,12 +5361,13 @@ void LLVOAvatar::checkTextureLoading() tex->unpauseLoadedCallbacks(&mCallbackTextureList) ; tex->addTextureStats(START_AREA); //jump start the fetching again + + if (tex->isFullyLoaded()) + { + mLoadedCallbackTextures++; // consider it loaded + } } } - if (tex->isFullyLoaded()) - { - mLoadedCallbackTextures++; - } } if(!pause) @@ -7812,13 +7813,11 @@ BOOL LLVOAvatar::updateIsFullyLoaded() if (mFirstFullyVisible && !mIsControlAvatar) { loading = ((rez_status < 2) - || mMeshTexturesDirty - || mVisualComplexityStale //complexity just updated // Wait at least 60s for unfinished textures to finish on first load, // don't wait forever, it might fail. Even if it will eventually load by // itself and update mLoadedCallbackTextures (or fail and clean the list), // avatars are more time-sensitive than textures and can't wait that long. - || (mLoadedCallbackTextures != mCallbackTextureList.size() && mLastTexCallbackAddedTime.getElapsedTimeF32() <= MAX_TEXTURE_WAIT_TIME_SEC) + || (mLoadedCallbackTextures < mCallbackTextureList.size() && mLastTexCallbackAddedTime.getElapsedTimeF32() < MAX_TEXTURE_WAIT_TIME_SEC) || !mPendingAttachment.empty() || (rez_status < 3 && !isFullyBaked()) ); @@ -8205,7 +8204,14 @@ void LLVOAvatar::updateMeshTextures() } baked_img->setLoadedCallback(onBakedTextureLoaded, SWITCH_TO_BAKED_DISCARD, FALSE, FALSE, new LLUUID( mID ), src_callback_list, paused ); - mLastTexCallbackAddedTime.reset(); + if (!baked_img->isFullyLoaded() && !paused) + { + mLastTexCallbackAddedTime.reset(); + } + else + { + mLoadedCallbackTextures++; // consider it loaded + } // this could add paused texture callbacks mLoadedCallbacksPaused |= paused; @@ -8599,7 +8605,14 @@ void LLVOAvatar::onFirstTEMessageReceived() LL_DEBUGS("Avatar") << avString() << "layer_baked, setting onInitialBakedTextureLoaded as callback" << LL_ENDL; image->setLoadedCallback( onInitialBakedTextureLoaded, MAX_DISCARD_LEVEL, FALSE, FALSE, new LLUUID( mID ), src_callback_list, paused ); - mLastTexCallbackAddedTime.reset(); + if (!image->isFullyLoaded() && !paused) + { + mLastTexCallbackAddedTime.reset(); + } + else + { + mLoadedCallbackTextures++; // consider it loaded + } // this could add paused texture callbacks mLoadedCallbacksPaused |= paused; } From 9ef897a1782c4ca9fa91d071d2495203046f8dc1 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 1 Feb 2020 14:44:52 +0100 Subject: [PATCH 05/27] exclude all tags/branches to always just get a git hash rather than an amalgamation of tag/branch and hash (which though is valid too). --- scripts/configure_firestorm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/configure_firestorm.sh b/scripts/configure_firestorm.sh index a19c5d25fa..2d2ff9bce4 100755 --- a/scripts/configure_firestorm.sh +++ b/scripts/configure_firestorm.sh @@ -405,7 +405,7 @@ if [ \( $WANTS_VERSION -eq $TRUE \) -o \( $WANTS_CONFIG -eq $TRUE \) ] ; then majorVer=`cat indra/newview/VIEWER_VERSION.txt | cut -d "." -f 1` minorVer=`cat indra/newview/VIEWER_VERSION.txt | cut -d "." -f 2` patchVer=`cat indra/newview/VIEWER_VERSION.txt | cut -d "." -f 3` - gitHash=`git describe --always` + gitHash=`git describe --always --exclude '*'` echo "Channel : ${CHANNEL}" echo "Version : ${majorVer}.${minorVer}.${patchVer}.${buildVer} [${gitHash}]" GITHASH=-DVIEWER_VERSION_GITHASH=\"${gitHash}\" From ee1b848f81543d9af123b2c7da461c12b79036ed Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sat, 1 Feb 2020 19:30:33 +0100 Subject: [PATCH 06/27] Buildfix for non-OS builds --- indra/newview/llviewerregion.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 603beffd4b..1b43e8a11a 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -82,14 +82,11 @@ #include "llcorehttputil.h" #include "llcallstack.h" -// Opensim -#include "llviewerparcelmgr.h" //Aurora Sim -#ifdef OPENSIM -#include "llviewernetwork.h" -#endif -// -#include "llviewermenu.h" +// Firestorm includes #include "lfsimfeaturehandler.h" +#include "llviewermenu.h" +#include "llviewernetwork.h" +#include "llviewerparcelmgr.h" //Aurora Sim #ifdef LL_WINDOWS #pragma warning(disable:4355) From 8f535fa9874d90540ead1e9fe96ea9e30811d42c Mon Sep 17 00:00:00 2001 From: Ansariel Date: Mon, 3 Feb 2020 10:51:51 +0100 Subject: [PATCH 07/27] FIRE-29310: Fix typo in preferences --- .../newview/skins/default/xui/en/panel_preferences_privacy.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml b/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml index fe0dfa525b..4f4ceffa8b 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml @@ -586,7 +586,7 @@ name="autorespond_nf_response_label" top_pad="5" width="450"> - Automatic response to non-friends when in AUTOREPONSE TO NON-FRIENDS mode: + Automatic response to non-friends when in AUTORESPONSE TO NON-FRIENDS mode: Date: Tue, 4 Feb 2020 22:41:55 +0200 Subject: [PATCH 08/27] SL-4354 Used wrong condition --- indra/newview/llvoavatar.cpp | 9 +++++---- indra/newview/llvoavatar.h | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 780b6f81f1..090766e71c 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5362,9 +5362,10 @@ void LLVOAvatar::checkTextureLoading() tex->unpauseLoadedCallbacks(&mCallbackTextureList) ; tex->addTextureStats(START_AREA); //jump start the fetching again - if (tex->isFullyLoaded()) + // technically shouldn't need to account for missing, but callback might not have happened yet + if (tex->getDiscardLevel() >= 0 || tex->isMissingAsset()) { - mLoadedCallbackTextures++; // consider it loaded + mLoadedCallbackTextures++; // consider it loaded (we have at least some data) } } } @@ -8204,7 +8205,7 @@ void LLVOAvatar::updateMeshTextures() } baked_img->setLoadedCallback(onBakedTextureLoaded, SWITCH_TO_BAKED_DISCARD, FALSE, FALSE, new LLUUID( mID ), src_callback_list, paused ); - if (!baked_img->isFullyLoaded() && !paused) + if (baked_img->getDiscardLevel() < 0 && !paused) { mLastTexCallbackAddedTime.reset(); } @@ -8605,7 +8606,7 @@ void LLVOAvatar::onFirstTEMessageReceived() LL_DEBUGS("Avatar") << avString() << "layer_baked, setting onInitialBakedTextureLoaded as callback" << LL_ENDL; image->setLoadedCallback( onInitialBakedTextureLoaded, MAX_DISCARD_LEVEL, FALSE, FALSE, new LLUUID( mID ), src_callback_list, paused ); - if (!image->isFullyLoaded() && !paused) + if (image->getDiscardLevel() < 0 && !paused) { mLastTexCallbackAddedTime.reset(); } diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 3526142ff5..55d8886daf 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -629,7 +629,7 @@ protected: LLLoadedCallbackEntry::source_callback_list_t mCallbackTextureList ; BOOL mLoadedCallbacksPaused; - S32 mLoadedCallbackTextures; // count of fully loaded textures filled from mCallbackTextureList + S32 mLoadedCallbackTextures; // count of 'loaded' textures filled from mCallbackTextureList LLFrameTimer mLastTexCallbackAddedTime; std::set mTextureIDs; //-------------------------------------------------------------------- From 47622f0af60b7577b803fa98549aaeb8d709b960 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 5 Feb 2020 03:52:49 +0200 Subject: [PATCH 09/27] Revert SL-4354 --- indra/newview/llvoavatar.cpp | 79 +++++++----------------------------- indra/newview/llvoavatar.h | 4 +- 2 files changed, 16 insertions(+), 67 deletions(-) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 090766e71c..71ff441600 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -197,8 +197,6 @@ const F32 NAMETAG_VERT_OFFSET_WEIGHT = 0.17f; const U32 LLVOAvatar::VISUAL_COMPLEXITY_UNKNOWN = 0; const F64 HUD_OVERSIZED_TEXTURE_DATA_SIZE = 1024 * 1024; -const F32 MAX_TEXTURE_WAIT_TIME_SEC = 60; - enum ERenderName { RENDER_NAME_NEVER, @@ -665,7 +663,6 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id, mFullyLoadedInitialized(FALSE), mVisualComplexity(VISUAL_COMPLEXITY_UNKNOWN), mLoadedCallbacksPaused(FALSE), - mLoadedCallbackTextures(0), mRenderUnloadedAvatar(LLCachedControl(gSavedSettings, "RenderUnloadedAvatar", false)), mLastRezzedStatus(-1), mIsEditingAppearance(FALSE), @@ -886,9 +883,8 @@ BOOL LLVOAvatar::hasGray() const S32 LLVOAvatar::getRezzedStatus() const { if (getIsCloud()) return 0; - bool textured = isFullyTextured(); - if (textured && allBakedTexturesCompletelyDownloaded()) return 3; - if (textured) return 2; + if (isFullyTextured() && allBakedTexturesCompletelyDownloaded()) return 3; + if (isFullyTextured()) return 2; llassert(hasGray()); return 1; // gray } @@ -5330,7 +5326,6 @@ void LLVOAvatar::checkTextureLoading() if(mCallbackTextureList.empty()) //when is self or no callbacks. Note: this list for self is always empty. { mLoadedCallbacksPaused = pause ; - mLoadedCallbackTextures = 0; return ; //nothing to check. } @@ -5338,9 +5333,7 @@ void LLVOAvatar::checkTextureLoading() { return ; //have not been invisible for enough time. } - - mLoadedCallbackTextures = pause ? mCallbackTextureList.size() : 0; - + for(LLLoadedCallbackEntry::source_callback_list_t::iterator iter = mCallbackTextureList.begin(); iter != mCallbackTextureList.end(); ++iter) { @@ -5361,15 +5354,9 @@ void LLVOAvatar::checkTextureLoading() tex->unpauseLoadedCallbacks(&mCallbackTextureList) ; tex->addTextureStats(START_AREA); //jump start the fetching again - - // technically shouldn't need to account for missing, but callback might not have happened yet - if (tex->getDiscardLevel() >= 0 || tex->isMissingAsset()) - { - mLoadedCallbackTextures++; // consider it loaded (we have at least some data) - } } - } - } + } + } if(!pause) { @@ -7633,13 +7620,14 @@ bool LLVOAvatar::getIsCloud() const ); } -void LLVOAvatar::updateRezzedStatusTimers(S32 rez_status) +void LLVOAvatar::updateRezzedStatusTimers() { // State machine for rezzed status. Statuses are -1 on startup, 0 // = cloud, 1 = gray, 2 = downloading, 3 = full. // Purpose is to collect time data for each it takes avatar to reach // various loading landmarks: gray, textured (partial), textured fully. + S32 rez_status = getRezzedStatus(); if (rez_status != mLastRezzedStatus) { LL_DEBUGS("Avatar") << avString() << "rez state change: " << mLastRezzedStatus << " -> " << rez_status << LL_ENDL; @@ -7809,21 +7797,8 @@ void LLVOAvatar::logMetricsTimerRecord(const std::string& phase_name, F32 elapse // returns true if the value has changed. BOOL LLVOAvatar::updateIsFullyLoaded() { - S32 rez_status = getRezzedStatus(); - bool loading = getIsCloud(); - if (mFirstFullyVisible && !mIsControlAvatar) - { - loading = ((rez_status < 2) - // Wait at least 60s for unfinished textures to finish on first load, - // don't wait forever, it might fail. Even if it will eventually load by - // itself and update mLoadedCallbackTextures (or fail and clean the list), - // avatars are more time-sensitive than textures and can't wait that long. - || (mLoadedCallbackTextures < mCallbackTextureList.size() && mLastTexCallbackAddedTime.getElapsedTimeF32() < MAX_TEXTURE_WAIT_TIME_SEC) - || !mPendingAttachment.empty() - || (rez_status < 3 && !isFullyBaked()) - ); - } - updateRezzedStatusTimers(rez_status); + const bool loading = getIsCloud(); + updateRezzedStatusTimers(); updateRuthTimer(loading); return processFullyLoadedChange(loading); } @@ -7859,22 +7834,13 @@ void LLVOAvatar::updateRuthTimer(bool loading) BOOL LLVOAvatar::processFullyLoadedChange(bool loading) { - // We wait a little bit before giving the 'all clear', to let things to - // settle down (models to snap into place, textures to get first packets) - const F32 LOADED_DELAY = 1.f; - const F32 FIRST_USE_DELAY = 3.f; - + // we wait a little bit before giving the all clear, + // to let textures settle down + const F32 PAUSE = 1.f; if (loading) mFullyLoadedTimer.reset(); - - if (mFirstFullyVisible) - { - mFullyLoaded = (mFullyLoadedTimer.getElapsedTimeF32() > FIRST_USE_DELAY); - } - else - { - mFullyLoaded = (mFullyLoadedTimer.getElapsedTimeF32() > LOADED_DELAY); - } + + mFullyLoaded = (mFullyLoadedTimer.getElapsedTimeF32() > PAUSE); if (!mPreviousFullyLoaded && !loading && mFullyLoaded) { @@ -8205,14 +8171,6 @@ void LLVOAvatar::updateMeshTextures() } baked_img->setLoadedCallback(onBakedTextureLoaded, SWITCH_TO_BAKED_DISCARD, FALSE, FALSE, new LLUUID( mID ), src_callback_list, paused ); - if (baked_img->getDiscardLevel() < 0 && !paused) - { - mLastTexCallbackAddedTime.reset(); - } - else - { - mLoadedCallbackTextures++; // consider it loaded - } // this could add paused texture callbacks mLoadedCallbacksPaused |= paused; @@ -8606,14 +8564,7 @@ void LLVOAvatar::onFirstTEMessageReceived() LL_DEBUGS("Avatar") << avString() << "layer_baked, setting onInitialBakedTextureLoaded as callback" << LL_ENDL; image->setLoadedCallback( onInitialBakedTextureLoaded, MAX_DISCARD_LEVEL, FALSE, FALSE, new LLUUID( mID ), src_callback_list, paused ); - if (image->getDiscardLevel() < 0 && !paused) - { - mLastTexCallbackAddedTime.reset(); - } - else - { - mLoadedCallbackTextures++; // consider it loaded - } + // this could add paused texture callbacks mLoadedCallbacksPaused |= paused; } diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 55d8886daf..00dccc5d12 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -348,7 +348,7 @@ public: BOOL isFullyTextured() const; BOOL hasGray() const; S32 getRezzedStatus() const; // 0 = cloud, 1 = gray, 2 = textured, 3 = textured and fully downloaded. - void updateRezzedStatusTimers(S32 status); + void updateRezzedStatusTimers(); S32 mLastRezzedStatus; @@ -629,8 +629,6 @@ protected: LLLoadedCallbackEntry::source_callback_list_t mCallbackTextureList ; BOOL mLoadedCallbacksPaused; - S32 mLoadedCallbackTextures; // count of 'loaded' textures filled from mCallbackTextureList - LLFrameTimer mLastTexCallbackAddedTime; std::set mTextureIDs; //-------------------------------------------------------------------- // Local Textures From 219defd4c52d643e9c20c75cb9d8d0fff855bacd Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 8 Feb 2020 20:15:16 +0100 Subject: [PATCH 10/27] Remmove opensim include guard to fix build failure for SL only builds. --- indra/newview/llvoavatarself.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 70a0115f73..b876ae6fd4 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -82,9 +82,7 @@ // [Legacy Bake] -#ifdef OPENSIM #include "llviewernetwork.h" -#endif // [Legacy Bake] #if LL_MSVC From f6012f78f9580439079063924043cb8ab0c0f917 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sun, 9 Feb 2020 19:36:10 +0100 Subject: [PATCH 11/27] FIRE-29311: Fix building with OpenAL on Windows, based on a patch by Testicular Slingshot --- indra/cmake/Copy3rdPartyLibs.cmake | 4 ++++ indra/lib/python/indra/util/llmanifest.py | 2 ++ indra/newview/CMakeLists.txt | 16 ++++++++++++++++ indra/newview/viewer_manifest.py | 5 +++++ scripts/configure_firestorm.sh | 16 +++++++++++++--- 5 files changed, 40 insertions(+), 3 deletions(-) diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index 265502a02d..069eada980 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -76,6 +76,10 @@ if(WINDOWS) endif(ADDRESS_SIZE EQUAL 32) endif (FMODEX) + if (OPENAL) + set(release_files ${release_files} OpenAL32.dll alut.dll) + endif (OPENAL) + #******************************* # Copy MS C runtime dlls, required for packaging. # *TODO - Adapt this to support VC9 diff --git a/indra/lib/python/indra/util/llmanifest.py b/indra/lib/python/indra/util/llmanifest.py index 201a2214ba..ffde022166 100755 --- a/indra/lib/python/indra/util/llmanifest.py +++ b/indra/lib/python/indra/util/llmanifest.py @@ -162,6 +162,8 @@ BASE_ARGUMENTS=[ description='Type of viewer build. Can be oss or hvk.', default="oss"), dict(name='fmodversion', description='Version of FMOD used. Can be fmodstudio or fmodex.', default=None), + dict(name='openal', + description='If OpenAL is used.', default=None) ] def usage(arguments, srctree=""): diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 258b99db28..22c34de0d0 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -2269,6 +2269,15 @@ if (WINDOWS) ) endif (FMODEX) + if (OPENAL) + list(APPEND COPY_INPUT_DEPENDENCIES + ${SHARED_LIB_STAGING_DIR}/Release/OpenAL32.dll + ${SHARED_LIB_STAGING_DIR}/Release/alut.dll + ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/OpenAL32.dll + ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/alut.dll + ) + endif (OPENAL) + add_custom_command( OUTPUT ${CMAKE_CFG_INTDIR}/copy_touched.bat COMMAND ${PYTHON_EXECUTABLE} @@ -2289,6 +2298,7 @@ if (WINDOWS) --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --viewer_flavor=${ND_VIEWER_FLAVOR} --fmodversion=${FMODVERSION} + --openal=${OPENAL} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py stage_third_party_libs @@ -2352,6 +2362,7 @@ if (WINDOWS) --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --viewer_flavor=${ND_VIEWER_FLAVOR} --fmodversion=${FMODVERSION} + --openal=${OPENAL} DEPENDS ${VIEWER_BINARY_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py @@ -2440,6 +2451,7 @@ target_link_libraries(${VIEWER_BINARY_NAME} ${DBUSGLIB_LIBRARIES} ${OPENGL_LIBRARIES} ${FMODWRAPPER_LIBRARY} # must come after LLAudio + ${OPENAL_LIBRARIES} ${GLOD_LIBRARIES} ${OPENGL_LIBRARIES} ${JSONCPP_LIBRARIES} @@ -2523,6 +2535,7 @@ endif (NOT ENABLE_MEDIA_PLUGINS) --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --viewer_flavor=${ND_VIEWER_FLAVOR} --fmodversion=${FMODVERSION} + --openal=${OPENAL} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py ${COPY_INPUT_DEPENDENCIES} @@ -2548,6 +2561,7 @@ endif (NOT ENABLE_MEDIA_PLUGINS) --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --viewer_flavor=${ND_VIEWER_FLAVOR} --fmodversion=${FMODVERSION} + --openal=${OPENAL} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py ${COPY_INPUT_DEPENDENCIES} @@ -2632,6 +2646,7 @@ if (DARWIN) --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --viewer_flavor=${ND_VIEWER_FLAVOR} --fmodversion=${FMODVERSION} + --openal=${OPENAL} DEPENDS ${VIEWER_BINARY_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py @@ -2668,6 +2683,7 @@ if (DARWIN) --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --viewer_flavor=${ND_VIEWER_FLAVOR} --fmodversion=${FMODVERSION} + --openal=${OPENAL} ${SIGNING_SETTING} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 606a9bcc98..785b427f59 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -589,6 +589,11 @@ class WindowsManifest(ViewerManifest): else: self.path("fmodex.dll") + # Get openal dll + if self.args.get('openal'): + self.path("OpenAL32.dll") + self.path("alut.dll") + # For textures self.path("openjpeg.dll") diff --git a/scripts/configure_firestorm.sh b/scripts/configure_firestorm.sh index 2d2ff9bce4..3bc1a96a8d 100755 --- a/scripts/configure_firestorm.sh +++ b/scripts/configure_firestorm.sh @@ -35,6 +35,7 @@ WANTS_VERSION=$FALSE WANTS_KDU=$FALSE WANTS_FMODSTUDIO=$FALSE WANTS_FMODEX=$FALSE +WANTS_OPENAL=$FALSE WANTS_OPENSIM=$TRUE WANTS_SINGLEGRID=$FALSE WANTS_AVX=$FALSE @@ -72,6 +73,7 @@ showUsage() echo " --no-package : Build without installer (Overrides --package)" echo " --fmodstudio : Build with FMOD Studio" echo " --fmodex : Build with FMOD Ex" + echo " --openal : Build with OpenAL" echo " --opensim : Build with OpenSim support (Disables Havok features)" echo " --no-opensim : Build without OpenSim support (Overrides --opensim)" echo " --singlegrid : Build for single grid usage (Requires --opensim)" @@ -91,7 +93,7 @@ getArgs() # $* = the options passed in from main { if [ $# -gt 0 ]; then - while getoptex "clean build config version package no-package fmodstudio fmodex ninja jobs: platform: kdu opensim no-opensim singlegrid: avx avx2 crashreporting testbuild: help chan: btype:" "$@" ; do + while getoptex "clean build config version package no-package fmodstudio fmodex openal ninja jobs: platform: kdu opensim no-opensim singlegrid: avx avx2 crashreporting testbuild: help chan: btype:" "$@" ; do #ensure options are valid if [ -z "$OPTOPT" ] ; then @@ -111,6 +113,7 @@ getArgs() kdu) WANTS_KDU=$TRUE;; fmodstudio) WANTS_FMODSTUDIO=$TRUE;; fmodex) WANTS_FMODEX=$TRUE;; + openal) WANTS_OPENAL=$TRUE;; opensim) WANTS_OPENSIM=$TRUE;; no-opensim) WANTS_OPENSIM=$FALSE;; singlegrid) WANTS_SINGLEGRID=$TRUE @@ -294,10 +297,11 @@ if [ ! -d `dirname "$LOG"` ] ; then fi echo -e "configure_firestorm.sh" > $LOG -echo -e " PLATFORM: '$PLATFORM'" | tee -a $LOG +echo -e " PLATFORM: $PLATFORM" | tee -a $LOG echo -e " KDU: `b2a $WANTS_KDU`" | tee -a $LOG echo -e " FMODSTUDIO: `b2a $WANTS_FMODSTUDIO`" | tee -a $LOG echo -e " FMODEX: `b2a $WANTS_FMODEX`" | tee -a $LOG +echo -e " OPENAL: `b2a $WANTS_OPENAL`" | tee -a $LOG echo -e " OPENSIM: `b2a $WANTS_OPENSIM`" | tee -a $LOG if [ $WANTS_SINGLEGRID -eq $TRUE ] ; then echo -e " SINGLEGRID: `b2a $WANTS_SINGLEGRID` ($SINGLEGRID_URI)" | tee -a $LOG @@ -430,6 +434,11 @@ if [ $WANTS_CONFIG -eq $TRUE ] ; then else FMODEX="-DFMODEX:BOOL=OFF" fi + if [ $WANTS_OPENAL -eq $TRUE ] ; then + OPENAL="-DOPENAL:BOOL=ON" + else + OPENAL="-DOPENAL:BOOL=OFF" + fi if [ $WANTS_OPENSIM -eq $TRUE ] ; then OPENSIM="-DOPENSIM:BOOL=ON" else @@ -507,7 +516,8 @@ if [ $WANTS_CONFIG -eq $TRUE ] ; then UNATTENDED="-DUNATTENDED=ON" fi - cmake -G "$TARGET" ../indra $CHANNEL ${GITHASH} $FMODSTUDIO $FMODEX $KDU $OPENSIM $SINGLEGRID $AVX_OPTIMIZATION $AVX2_OPTIMIZATION $TESTBUILD $PACKAGE $UNATTENDED -DLL_TESTS:BOOL=OFF -DADDRESS_SIZE:STRING=$AUTOBUILD_ADDRSIZE -DCMAKE_BUILD_TYPE:STRING=$BTYPE \ + cmake -G "$TARGET" ../indra $CHANNEL ${GITHASH} $FMODSTUDIO $FMODEX $OPENAL $KDU $OPENSIM $SINGLEGRID $AVX_OPTIMIZATION $AVX2_OPTIMIZATION $TESTBUILD $PACKAGE \ + $UNATTENDED -DLL_TESTS:BOOL=OFF -DADDRESS_SIZE:STRING=$AUTOBUILD_ADDRSIZE -DCMAKE_BUILD_TYPE:STRING=$BTYPE \ $CRASH_REPORTING -DVIEWER_SYMBOL_FILE:STRING="${VIEWER_SYMBOL_FILE:-}" -DROOT_PROJECT_NAME:STRING=Firestorm $LL_ARGS_PASSTHRU | tee $LOG if [ $PLATFORM == "windows" ] ; then From 59a92532c3083470c48ca9bdbe1042ca468fc676 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Mon, 10 Feb 2020 18:50:19 +0100 Subject: [PATCH 12/27] Fix building with OpenAL packaging --- indra/newview/CMakeLists.txt | 16 ++++++++++------ indra/newview/viewer_manifest.py | 2 +- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 22c34de0d0..e5bf44fbf5 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -2163,6 +2163,10 @@ elseif (FMODEX) set(FMODVERSION "fmodex") endif (FMODSTUDIO) +if (OPENAL) + set(USE_OPENAL "true") +endif (OPENAL) + if (WINDOWS) set_target_properties(${VIEWER_BINARY_NAME} PROPERTIES @@ -2298,7 +2302,7 @@ if (WINDOWS) --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --viewer_flavor=${ND_VIEWER_FLAVOR} --fmodversion=${FMODVERSION} - --openal=${OPENAL} + --openal=${USE_OPENAL} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py stage_third_party_libs @@ -2362,7 +2366,7 @@ if (WINDOWS) --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --viewer_flavor=${ND_VIEWER_FLAVOR} --fmodversion=${FMODVERSION} - --openal=${OPENAL} + --openal=${USE_OPENAL} DEPENDS ${VIEWER_BINARY_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py @@ -2535,7 +2539,7 @@ endif (NOT ENABLE_MEDIA_PLUGINS) --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --viewer_flavor=${ND_VIEWER_FLAVOR} --fmodversion=${FMODVERSION} - --openal=${OPENAL} + --openal=${USE_OPENAL} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py ${COPY_INPUT_DEPENDENCIES} @@ -2561,7 +2565,7 @@ endif (NOT ENABLE_MEDIA_PLUGINS) --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --viewer_flavor=${ND_VIEWER_FLAVOR} --fmodversion=${FMODVERSION} - --openal=${OPENAL} + --openal=${USE_OPENAL} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py ${COPY_INPUT_DEPENDENCIES} @@ -2646,7 +2650,7 @@ if (DARWIN) --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --viewer_flavor=${ND_VIEWER_FLAVOR} --fmodversion=${FMODVERSION} - --openal=${OPENAL} + --openal=${USE_OPENAL} DEPENDS ${VIEWER_BINARY_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py @@ -2683,7 +2687,7 @@ if (DARWIN) --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --viewer_flavor=${ND_VIEWER_FLAVOR} --fmodversion=${FMODVERSION} - --openal=${OPENAL} + --openal=${USE_OPENAL} ${SIGNING_SETTING} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 785b427f59..b9f718863a 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -590,7 +590,7 @@ class WindowsManifest(ViewerManifest): self.path("fmodex.dll") # Get openal dll - if self.args.get('openal'): + if self.args.get('openal').lower() == 'true': self.path("OpenAL32.dll") self.path("alut.dll") From e9ad14eb25fd2a5eee12935b53647e50e6fffe6e Mon Sep 17 00:00:00 2001 From: Ansariel Date: Fri, 14 Feb 2020 23:43:29 +0100 Subject: [PATCH 13/27] Yoink back OpenAL changes from LL and sync with upstream --- indra/lib/python/indra/util/llmanifest.py | 4 +--- indra/llaudio/CMakeLists.txt | 4 ++++ indra/newview/CMakeLists.txt | 26 +++++++++++------------ indra/newview/viewer_manifest.py | 3 ++- 4 files changed, 19 insertions(+), 18 deletions(-) diff --git a/indra/lib/python/indra/util/llmanifest.py b/indra/lib/python/indra/util/llmanifest.py index ffde022166..f8771b5936 100755 --- a/indra/lib/python/indra/util/llmanifest.py +++ b/indra/lib/python/indra/util/llmanifest.py @@ -161,9 +161,7 @@ BASE_ARGUMENTS=[ dict(name='viewer_flavor', description='Type of viewer build. Can be oss or hvk.', default="oss"), dict(name='fmodversion', - description='Version of FMOD used. Can be fmodstudio or fmodex.', default=None), - dict(name='openal', - description='If OpenAL is used.', default=None) + description='Version of FMOD used. Can be fmodstudio or fmodex.', default=None) ] def usage(arguments, srctree=""): diff --git a/indra/llaudio/CMakeLists.txt b/indra/llaudio/CMakeLists.txt index 0df1be69b9..9da9e8f27c 100644 --- a/indra/llaudio/CMakeLists.txt +++ b/indra/llaudio/CMakeLists.txt @@ -78,6 +78,10 @@ if (FMODEX) endif (FMODEX) if (OPENAL) + include_directories( + ${OPENAL_LIBRARIES} + ) + list(APPEND llaudio_SOURCE_FILES llaudioengine_openal.cpp lllistener_openal.cpp diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index e5bf44fbf5..735da21d05 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1974,6 +1974,10 @@ if (WINDOWS) LIST(APPEND viewer_SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/../tools/manifests/legacy.manifest) endif (ADDRESS_SIZE EQUAL 64) # + + if (OPENAL) + LIST(APPEND viewer_LIBRARIES ${OPENAL_LIBRARIES}) + endif (OPENAL) endif (WINDOWS) # Add the xui files. This is handy for searching for xui elements @@ -2163,10 +2167,6 @@ elseif (FMODEX) set(FMODVERSION "fmodex") endif (FMODSTUDIO) -if (OPENAL) - set(USE_OPENAL "true") -endif (OPENAL) - if (WINDOWS) set_target_properties(${VIEWER_BINARY_NAME} PROPERTIES @@ -2275,10 +2275,8 @@ if (WINDOWS) if (OPENAL) list(APPEND COPY_INPUT_DEPENDENCIES - ${SHARED_LIB_STAGING_DIR}/Release/OpenAL32.dll - ${SHARED_LIB_STAGING_DIR}/Release/alut.dll - ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/OpenAL32.dll - ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/alut.dll + ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/OpenAL32.dll + ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/alut.dll ) endif (OPENAL) @@ -2302,7 +2300,7 @@ if (WINDOWS) --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --viewer_flavor=${ND_VIEWER_FLAVOR} --fmodversion=${FMODVERSION} - --openal=${USE_OPENAL} + --openal=${OPENAL} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py stage_third_party_libs @@ -2366,7 +2364,7 @@ if (WINDOWS) --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --viewer_flavor=${ND_VIEWER_FLAVOR} --fmodversion=${FMODVERSION} - --openal=${USE_OPENAL} + --openal=${OPENAL} DEPENDS ${VIEWER_BINARY_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py @@ -2539,7 +2537,7 @@ endif (NOT ENABLE_MEDIA_PLUGINS) --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --viewer_flavor=${ND_VIEWER_FLAVOR} --fmodversion=${FMODVERSION} - --openal=${USE_OPENAL} + --openal=${OPENAL} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py ${COPY_INPUT_DEPENDENCIES} @@ -2565,7 +2563,7 @@ endif (NOT ENABLE_MEDIA_PLUGINS) --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --viewer_flavor=${ND_VIEWER_FLAVOR} --fmodversion=${FMODVERSION} - --openal=${USE_OPENAL} + --openal=${OPENAL} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py ${COPY_INPUT_DEPENDENCIES} @@ -2650,7 +2648,7 @@ if (DARWIN) --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --viewer_flavor=${ND_VIEWER_FLAVOR} --fmodversion=${FMODVERSION} - --openal=${USE_OPENAL} + --openal=${OPENAL} DEPENDS ${VIEWER_BINARY_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py @@ -2687,7 +2685,7 @@ if (DARWIN) --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --viewer_flavor=${ND_VIEWER_FLAVOR} --fmodversion=${FMODVERSION} - --openal=${USE_OPENAL} + --openal=${OPENAL} ${SIGNING_SETTING} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index b9f718863a..5e35b01063 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -590,7 +590,7 @@ class WindowsManifest(ViewerManifest): self.path("fmodex.dll") # Get openal dll - if self.args.get('openal').lower() == 'true': + if self.args.get('openal') == 'ON': self.path("OpenAL32.dll") self.path("alut.dll") @@ -2257,6 +2257,7 @@ if __name__ == "__main__": extra_arguments = [ dict(name='bugsplat', description="""BugSplat database to which to post crashes, if BugSplat crash reporting is desired""", default=''), + dict(name='openal', description="""Indication openal libraries are needed""", default='OFF') ] try: main(extra=extra_arguments) From 0ce85ef3b8b145fc13c7b56b781dc138bb2294f0 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 15 Feb 2020 10:22:19 +0100 Subject: [PATCH 14/27] Linux always builds (and always had been built) with OpenAL, make sure it is always enabled. --- scripts/configure_firestorm.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/configure_firestorm.sh b/scripts/configure_firestorm.sh index 3bc1a96a8d..3ce2959fec 100755 --- a/scripts/configure_firestorm.sh +++ b/scripts/configure_firestorm.sh @@ -506,6 +506,7 @@ if [ $WANTS_CONFIG -eq $TRUE ] ; then if [ $PLATFORM == "darwin" ] ; then TARGET="Xcode" elif [ \( $PLATFORM == "linux" \) ] ; then + OPENAL="-DOPENAL:BOOL=ON" if [ $WANTS_NINJA -eq $TRUE ] ; then TARGET="Ninja" else From f7b56e6f7cce8d221f439950badccb807ab73a51 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sun, 16 Feb 2020 01:46:08 +0100 Subject: [PATCH 15/27] FIRE-19933: Wire up context menu key in inventory (and other folder views) --- indra/llui/llfolderview.cpp | 40 +++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index d7d4249d93..4fa0ba0117 100644 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -1338,7 +1338,47 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask ) handled = TRUE; } break; + + // FIRE-19933: Open context menu on context menu key press + case KEY_CONTEXT_MENU: + S32 count = mSelectedItems.size(); + LLMenuGL* menu = (LLMenuGL*)mPopupMenuHandle.get(); + if (( count > 0 && (hasVisibleChildren()) ) // show menu only if selected items are visible + && menu ) + { + if (mCallbackRegistrar) + { + mCallbackRegistrar->pushScope(); + } + + updateMenuOptions(menu); + menu->updateParent(LLMenuGL::sMenuContainer); + + LLView* spawning_view = getParentByType(); + if (!spawning_view) + { + spawning_view = this; + } + + LLMenuGL::showPopup(spawning_view, menu, spawning_view->getRect().getCenterX(), spawning_view->getRect().getCenterY()); + + if (mCallbackRegistrar) + { + mCallbackRegistrar->popScope(); + } + } + else + { + if (menu && menu->getVisible()) + { + menu->setVisible(FALSE); + } + setSelection(NULL, FALSE, TRUE); + } + handled = TRUE; + break; } + // return handled; } From 1e8f149c7c71161f9eec27e484cd947becdf9629 Mon Sep 17 00:00:00 2001 From: Testy Date: Sun, 16 Feb 2020 06:14:34 -0400 Subject: [PATCH 16/27] Added a button to the sound explorer for stopping sounds that were played locally. --- indra/llaudio/llaudioengine.cpp | 9 ++- indra/llaudio/llaudioengine.h | 3 +- indra/newview/NACLfloaterexploresounds.cpp | 61 ++++++++++++++++++- indra/newview/NACLfloaterexploresounds.h | 4 ++ .../xui/en/floater_NACL_explore_sounds.xml | 1 + 5 files changed, 73 insertions(+), 5 deletions(-) diff --git a/indra/llaudio/llaudioengine.cpp b/indra/llaudio/llaudioengine.cpp index 2cb9f40a26..d3936298a1 100644 --- a/indra/llaudio/llaudioengine.cpp +++ b/indra/llaudio/llaudioengine.cpp @@ -832,7 +832,7 @@ F64 LLAudioEngine::mapWindVecToPan(LLVector3 wind_vec) void LLAudioEngine::triggerSound(const LLUUID &audio_uuid, const LLUUID& owner_id, const F32 gain, - const S32 type, const LLVector3d &pos_global, const LLUUID& source_object) + const S32 type, const LLVector3d &pos_global, const LLUUID& source_object, const LLUUID& audio_source_id) { // Create a new source (since this can't be associated with an existing source. //LL_INFOS() << "Localized: " << audio_uuid << LL_ENDL; @@ -843,8 +843,11 @@ void LLAudioEngine::triggerSound(const LLUUID &audio_uuid, const LLUUID& owner_i return; } - LLUUID source_id; - source_id.generate(); + LLUUID source_id = audio_source_id; + if (source_id.isNull()) + { + source_id.generate(); + } LLAudioSource *asp = new LLAudioSource(source_id, owner_id, gain, type, source_object, true); addAudioSource(asp); diff --git a/indra/llaudio/llaudioengine.h b/indra/llaudio/llaudioengine.h index 3e2bf542fb..245bf3c6ad 100644 --- a/indra/llaudio/llaudioengine.h +++ b/indra/llaudio/llaudioengine.h @@ -150,7 +150,8 @@ public: void triggerSound(const LLUUID &sound_id, const LLUUID& owner_id, const F32 gain, const S32 type = LLAudioEngine::AUDIO_TYPE_NONE, const LLVector3d &pos_global = LLVector3d::zero, - const LLUUID& source_object = LLUUID::null); + const LLUUID& source_object = LLUUID::null, + const LLUUID& audio_source_id = LLUUID::null); // NaCl End void triggerSound(SoundData& soundData); diff --git a/indra/newview/NACLfloaterexploresounds.cpp b/indra/newview/NACLfloaterexploresounds.cpp index c9e27c5fd4..9d6c38897c 100644 --- a/indra/newview/NACLfloaterexploresounds.cpp +++ b/indra/newview/NACLfloaterexploresounds.cpp @@ -63,6 +63,14 @@ NACLFloaterExploreSounds::~NACLFloaterExploreSounds() } } mBlacklistAvatarNameCacheConnections.clear(); + + uuid_list_t::iterator audio_source_id_iter = mLocalPlayingAudioSourceIDs.begin(); + uuid_list_t::iterator audio_source_id_end = mLocalPlayingAudioSourceIDs.end(); + for (; audio_source_id_iter != audio_source_id_end; ++audio_source_id_iter) + { + delete *audio_source_id_iter; + } + mLocalPlayingAudioSourceIDs.clear(); } BOOL NACLFloaterExploreSounds::postBuild() @@ -71,6 +79,7 @@ BOOL NACLFloaterExploreSounds::postBuild() getChild("look_at_btn")->setClickedCallback(boost::bind(&NACLFloaterExploreSounds::handleLookAt, this)); getChild("stop_btn")->setClickedCallback(boost::bind(&NACLFloaterExploreSounds::handleStop, this)); getChild("bl_btn")->setClickedCallback(boost::bind(&NACLFloaterExploreSounds::blacklistSound, this)); + getChild("stop_locally_btn")->setClickedCallback(boost::bind(&NACLFloaterExploreSounds::handleStopLocally, this)); mHistoryScroller = getChild("sound_list"); mHistoryScroller->setCommitCallback(boost::bind(&NACLFloaterExploreSounds::handleSelection, this)); @@ -296,6 +305,32 @@ BOOL NACLFloaterExploreSounds::tick() mHistoryScroller->selectMultiple(selected_ids); mHistoryScroller->setScrollPos(scroll_pos); + // Clean up stopped local audio source IDs + typedef std::vector uuid_vector_t; + uuid_vector_t stopped_audio_src_ids; + uuid_list_t::iterator audio_src_id_iter = mLocalPlayingAudioSourceIDs.begin(); + uuid_list_t::iterator audio_src_id_end = mLocalPlayingAudioSourceIDs.end(); + for (; audio_src_id_iter != audio_src_id_end; ++audio_src_id_iter) + { + LLUUID* audio_src_id = *audio_src_id_iter; + LLAudioSource* audio_source = gAudiop->findAudioSource(*audio_src_id); + if (!audio_source || audio_source->isDone()) + { + stopped_audio_src_ids.push_back(audio_src_id); + } + } + + uuid_vector_t::iterator stopped_audio_src_ids_iter = stopped_audio_src_ids.begin(); + uuid_vector_t::iterator stopped_audio_src_ids_end = stopped_audio_src_ids.end(); + for (; stopped_audio_src_ids_iter != stopped_audio_src_ids_end; ++stopped_audio_src_ids_iter) + { + LLUUID* audio_src_id = *stopped_audio_src_ids_iter; + mLocalPlayingAudioSourceIDs.remove(audio_src_id); + delete audio_src_id; + } + + childSetEnabled("stop_locally_btn", mLocalPlayingAudioSourceIDs.size() > 0); + return FALSE; } @@ -313,9 +348,14 @@ void NACLFloaterExploreSounds::handlePlayLocally() if(std::find(asset_list.begin(), asset_list.end(), item.mAssetID) == asset_list.end()) { asset_list.push_back(item.mAssetID); - gAudiop->triggerSound(item.mAssetID, gAgent.getID(), 1.0f, LLAudioEngine::AUDIO_TYPE_UI); + LLUUID* audio_source_id = new LLUUID(); + audio_source_id->generate(); + gAudiop->triggerSound(item.mAssetID, gAgent.getID(), 1.0f, LLAudioEngine::AUDIO_TYPE_UI, LLVector3d::zero, LLUUID::null, *audio_source_id); + mLocalPlayingAudioSourceIDs.push_back(audio_source_id); } } + + childSetEnabled("stop_locally_btn", mLocalPlayingAudioSourceIDs.size() > 0); } void NACLFloaterExploreSounds::handleLookAt() @@ -384,6 +424,25 @@ void NACLFloaterExploreSounds::handleStop() } } +void NACLFloaterExploreSounds::handleStopLocally() +{ + uuid_list_t::iterator audio_source_id_iter = mLocalPlayingAudioSourceIDs.begin(); + uuid_list_t::iterator audio_source_id_end = mLocalPlayingAudioSourceIDs.end(); + for (; audio_source_id_iter != audio_source_id_end; ++audio_source_id_iter) + { + LLUUID* audio_source_id = *audio_source_id_iter; + LLAudioSource* audio_source = gAudiop->findAudioSource(*audio_source_id); + if (audio_source && !audio_source->isDone()) + { + audio_source->play(LLUUID::null); + } + + delete audio_source_id; + } + + mLocalPlayingAudioSourceIDs.clear(); +} + //add sound to blacklist void NACLFloaterExploreSounds::blacklistSound() { diff --git a/indra/newview/NACLfloaterexploresounds.h b/indra/newview/NACLfloaterexploresounds.h index 33c1da97ce..5397f17adc 100644 --- a/indra/newview/NACLfloaterexploresounds.h +++ b/indra/newview/NACLfloaterexploresounds.h @@ -29,6 +29,7 @@ private: void handlePlayLocally(); void handleLookAt(); void handleStop(); + void handleStopLocally(); void handleSelection(); void blacklistSound(); @@ -41,6 +42,9 @@ private: std::list mLastHistory; + typedef std::list uuid_list_t; + uuid_list_t mLocalPlayingAudioSourceIDs; + typedef std::map blacklist_avatar_name_cache_connection_map_t; blacklist_avatar_name_cache_connection_map_t mBlacklistAvatarNameCacheConnections; diff --git a/indra/newview/skins/default/xui/en/floater_NACL_explore_sounds.xml b/indra/newview/skins/default/xui/en/floater_NACL_explore_sounds.xml index 7fe8c383ab..6a2f5ec867 100644 --- a/indra/newview/skins/default/xui/en/floater_NACL_explore_sounds.xml +++ b/indra/newview/skins/default/xui/en/floater_NACL_explore_sounds.xml @@ -47,6 +47,7 @@