diff options
| author | Jonathan "Geenz" Goodman <geenz@lindenlab.com> | 2025-10-17 19:30:49 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-17 19:30:49 -0400 |
| commit | 3ca323db9e71a342bf1ca895e23ab180ce048add (patch) | |
| tree | cd52ee85740d6cf788e918187c2b7c196407a7a6 /indra | |
| parent | 01a799495b93cb9f7d5b9298bfb57afc99e47e1b (diff) | |
| parent | bbc2ad8fc50b2efb19a40a2db57043690addc492 (diff) | |
Merge pull request #4850 from secondlife/geenz/main-to-develop
Catch some commits that didn't make it back to develop.
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/cmake/LLPhysicsExtensions.cmake | 9 | ||||
| -rw-r--r-- | indra/llwebrtc/llwebrtc.cpp | 4 | ||||
| -rw-r--r-- | indra/newview/CMakeLists.txt | 12 | ||||
| -rw-r--r-- | indra/newview/llreflectionmapmanager.cpp | 4 | ||||
| -rw-r--r-- | indra/newview/llvoicewebrtc.cpp | 16 | ||||
| -rw-r--r-- | indra/newview/llvoicewebrtc.h | 4 |
6 files changed, 44 insertions, 5 deletions
diff --git a/indra/cmake/LLPhysicsExtensions.cmake b/indra/cmake/LLPhysicsExtensions.cmake index bb6cb703d2..25563546eb 100644 --- a/indra/cmake/LLPhysicsExtensions.cmake +++ b/indra/cmake/LLPhysicsExtensions.cmake @@ -22,8 +22,15 @@ if (HAVOK) include(Havok) use_prebuilt_binary(llphysicsextensions_source) set(LLPHYSICSEXTENSIONS_SRC_DIR ${LIBS_PREBUILT_DIR}/llphysicsextensions/src) - target_link_libraries( llphysicsextensions_impl INTERFACE llphysicsextensions) target_compile_definitions( llphysicsextensions_impl INTERFACE LL_HAVOK=1 ) + if(DARWIN) + set(LLPHYSICSEXTENSIONS_STUB_DIR ${LIBS_PREBUILT_DIR}/llphysicsextensions/stub) + # can't set these library dependencies per-arch here, need to do it using XCODE_ATTRIBUTE_OTHER_LDFLAGS[arch=*] in newview/CMakeLists.txt + #target_link_libraries( llphysicsextensions_impl INTERFACE llphysicsextensions) + #target_link_libraries( llphysicsextensions_impl INTERFACE llphysicsextensionsstub) + else() + target_link_libraries( llphysicsextensions_impl INTERFACE llphysicsextensions) + endif() elseif (HAVOK_TPV) use_prebuilt_binary(llphysicsextensions_tpv) if(WINDOWS) diff --git a/indra/llwebrtc/llwebrtc.cpp b/indra/llwebrtc/llwebrtc.cpp index f93ad07c1f..b9f126e511 100644 --- a/indra/llwebrtc/llwebrtc.cpp +++ b/indra/llwebrtc/llwebrtc.cpp @@ -1540,6 +1540,10 @@ void freePeerConnection(LLWebRTCPeerConnectionInterface* peer_connection) void init(LLWebRTCLogCallback* logCallback) { + if (gWebRTCImpl) + { + return; + } gWebRTCImpl = new LLWebRTCImpl(logCallback); gWebRTCImpl->init(); } diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 0f7670a57a..4c6c42e7a2 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -59,6 +59,11 @@ if (NOT HAVOK_TPV) # which means we need to duct tape this togther ... add_subdirectory(${LLPHYSICSEXTENSIONS_SRC_DIR} llphysicsextensions) + if (NOT "${LLPHYSICSEXTENSIONS_STUB_DIR}" STREQUAL "") + # for darwin universal builds we need both real llphysicsextensions and the stub for aarch64 fallback + # this will only be set when HAVOK is ON, otherwise the normal stub fallback will be in effect + add_subdirectory(${LLPHYSICSEXTENSIONS_STUB_DIR} llphysicsextensionsstub) + endif() # Another hack that works with newer cmake versions: cmake_policy( SET CMP0079 NEW) @@ -1946,8 +1951,13 @@ elseif (DARWIN) set_target_properties(${VIEWER_BINARY_NAME} PROPERTIES RESOURCE SecondLife.xib - #LINK_FLAGS_RELEASE "${LINK_FLAGS_RELEASE} -Xlinker -dead_strip -Xlinker -map -Xlinker ${CMAKE_CURRENT_BINARY_DIR}/${VIEWER_BINARY_NAME}.MAP" LINK_FLAGS_RELEASE "${LINK_FLAGS_RELEASE} -Xlinker -dead_strip" + # arch specific flags for universal builds: https://stackoverflow.com/a/77942065 + XCODE_ATTRIBUTE_OTHER_CFLAGS[arch=x86_64] "$(inherited) -DLLPHYSICSEXTENSIONS_USE_FULL" + XCODE_ATTRIBUTE_OTHER_CFLAGS[arch=arm64] "$(inherited) -DLLPHYSICSEXTENSIONS_USE_STUB" + # only generate the .MAP file for llphysicsextensions_tpv on x86_64 + XCODE_ATTRIBUTE_OTHER_LDFLAGS[arch=x86_64] "$(inherited) -L${CMAKE_CURRENT_BINARY_DIR}/llphysicsextensions/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,${CMAKE_CFG_INTDIR}>/ -lllphysicsextensions -Xlinker -map -Xlinker ${CMAKE_CURRENT_BINARY_DIR}/${VIEWER_BINARY_NAME}.MAP" + XCODE_ATTRIBUTE_OTHER_LDFLAGS[arch=arm64] "$(inherited) -L${CMAKE_CURRENT_BINARY_DIR}/llphysicsextensionsstub/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,${CMAKE_CFG_INTDIR}>/ -lllphysicsextensionsstub" ) else (WINDOWS) # Linux diff --git a/indra/newview/llreflectionmapmanager.cpp b/indra/newview/llreflectionmapmanager.cpp index eb7fe06e7d..c6fa64753c 100644 --- a/indra/newview/llreflectionmapmanager.cpp +++ b/indra/newview/llreflectionmapmanager.cpp @@ -998,11 +998,11 @@ void LLReflectionMapManager::updateProbeFace(LLReflectionMap* probe, U32 face) mTexture->bind(channel); } } + + gIrradianceGenProgram.unbind(); } mMipChain[0].flush(); - - gIrradianceGenProgram.unbind(); } } diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp index 83f104ef01..e6fcc7bd6b 100644 --- a/indra/newview/llvoicewebrtc.cpp +++ b/indra/newview/llvoicewebrtc.cpp @@ -273,6 +273,11 @@ void LLWebRTCVoiceClient::cleanupSingleton() void LLWebRTCVoiceClient::init(LLPumpIO* pump) { // constructor will set up LLVoiceClient::getInstance() + initWebRTC(); +} + +void LLWebRTCVoiceClient::initWebRTC() +{ llwebrtc::init(this); mWebRTCDeviceInterface = llwebrtc::getDeviceInterface(); @@ -293,6 +298,8 @@ void LLWebRTCVoiceClient::terminate() mVoiceEnabled = false; sShuttingDown = true; // so that coroutines won't post more work. llwebrtc::terminate(); + + mWebRTCDeviceInterface = nullptr; } //--------------------------------------------------- @@ -1804,6 +1811,15 @@ void LLWebRTCVoiceClient::onChangeDetailed(const LLMute& mute) } } +void LLWebRTCVoiceClient::userAuthorized(const std::string& user_id, const LLUUID& agentID) +{ + if (sShuttingDown) + { + sShuttingDown = false; // was terminated, restart + initWebRTC(); + } +} + void LLWebRTCVoiceClient::predSetUserMute(const LLWebRTCVoiceClient::sessionStatePtr_t &session, const LLUUID &id, bool mute) { session->setUserMute(id, mute); diff --git a/indra/newview/llvoicewebrtc.h b/indra/newview/llvoicewebrtc.h index 722d81fdc2..2ce575852a 100644 --- a/indra/newview/llvoicewebrtc.h +++ b/indra/newview/llvoicewebrtc.h @@ -204,7 +204,7 @@ public: //@} // authorize the user - void userAuthorized(const std::string &user_id, const LLUUID &agentID) override {}; + void userAuthorized(const std::string &user_id, const LLUUID &agentID) override; void OnConnectionEstablished(const std::string& channelID, const LLUUID& regionID); @@ -443,6 +443,8 @@ public: boost::signals2::connection mAvatarNameCacheConnection; private: + // init or restart the WebRTC device interface. + void initWebRTC(); // Coroutine support methods //--- |
