From bc02334284839e6e7fb133d8b5b4d75fec919691 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Wed, 26 Feb 2025 15:35:04 +0200 Subject: #3270 use TELEPORT_LOCAL when teleporting within a region via landmark --- indra/newview/llagent.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 8756baa04a..dde4555770 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -56,6 +56,7 @@ #include "llgroupmgr.h" #include "llhudmanager.h" #include "lljoystickbutton.h" +#include "lllandmarkactions.h" #include "llmorphview.h" #include "llmoveview.h" #include "llnavigationbar.h" // to show/hide navigation bar when changing mouse look state @@ -4317,8 +4318,17 @@ void LLAgent::teleportViaLandmark(const LLUUID& landmark_asset_id) void LLAgent::doTeleportViaLandmark(const LLUUID& landmark_asset_id) { - LLViewerRegion *regionp = getRegion(); - if(regionp && teleportCore()) + bool is_local(false); + LLViewerRegion* regionp = getRegion(); + + if (LLLandmark* landmark = gLandmarkList.getAsset(landmark_asset_id, NULL)) + { + LLVector3d pos_global; + landmark->getGlobalPos(pos_global); + is_local = (regionp->getHandle() == to_region_handle_global((F32)pos_global.mdV[VX], (F32)pos_global.mdV[VY])); + } + + if(regionp && teleportCore(is_local)) { LL_INFOS("Teleport") << "Sending TeleportLandmarkRequest. Current region handle " << regionp->getHandle() << " region id " << regionp->getRegionID() -- cgit v1.2.3 From 42ceac9695f7e098f15264977396a939c8ddfd23 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 26 Feb 2025 20:01:26 +0200 Subject: Revert "#2639 GPU test twice to fix misreported bandwidth (#3558)" This reverts commit b0d80552b3177269eb24ef9a1e0d58a98d95a96f. --- indra/newview/llglsandbox.cpp | 66 ++++++++++++++++++------------------------- 1 file changed, 27 insertions(+), 39 deletions(-) (limited to 'indra') diff --git a/indra/newview/llglsandbox.cpp b/indra/newview/llglsandbox.cpp index 5484ce6276..112008172e 100644 --- a/indra/newview/llglsandbox.cpp +++ b/indra/newview/llglsandbox.cpp @@ -903,39 +903,6 @@ private: }; -F32 shader_timer_benchmark(std::vector & dest, TextureHolder & texHolder, U32 textures_count, LLVertexBuffer * buff, F32 &seconds) -{ - // run GPU timer benchmark - - //number of samples to take - const S32 samples = 64; - - { - ShaderProfileHelper initProfile; - dest[0].bindTarget(); - gBenchmarkProgram.bind(); - for (S32 c = 0; c < samples; ++c) - { - for (U32 i = 0; i < textures_count; ++i) - { - texHolder.bind(i); - buff->setBuffer(); - buff->drawArrays(LLRender::TRIANGLES, 0, 3); - } - } - gBenchmarkProgram.unbind(); - dest[0].flush(); - } - - F32 ms = gBenchmarkProgram.mTimeElapsed / 1000000.f; - seconds = ms / 1000.f; - - F64 samples_drawn = (F64)gBenchmarkProgram.mSamplesDrawn; - F64 gpixels_drawn = samples_drawn / 1000000000.0; - F32 samples_sec = (F32)(gpixels_drawn / seconds); - return samples_sec * 4; // 4 bytes per sample -} - //----------------------------------------------------------------------------- // gpu_benchmark() // returns measured memory bandwidth of GPU in gigabytes per second @@ -977,6 +944,9 @@ F32 gpu_benchmark() //number of textures const U32 count = 32; + //number of samples to take + const S32 samples = 64; + //time limit, allocation operations shouldn't take longer then 30 seconds, same for actual benchmark. const F32 time_limit = 30; @@ -1066,15 +1036,33 @@ F32 gpu_benchmark() LLGLSLShader::unbind(); - // run GPU timer benchmark twice - F32 seconds = 0; - F32 gbps = shader_timer_benchmark(dest, texHolder, count, buff.get(), seconds); + // run GPU timer benchmark + { + ShaderProfileHelper initProfile; + dest[0].bindTarget(); + gBenchmarkProgram.bind(); + for (S32 c = 0; c < samples; ++c) + { + for (U32 i = 0; i < count; ++i) + { + texHolder.bind(i); + buff->setBuffer(); + buff->drawArrays(LLRender::TRIANGLES, 0, 3); + } + } + gBenchmarkProgram.unbind(); + dest[0].flush(); + } - LL_INFOS("Benchmark") << "Memory bandwidth, 1st run is " << llformat("%.3f", gbps) << " GB/sec according to ARB_timer_query, total time " << seconds << " seconds" << LL_ENDL; + F32 ms = gBenchmarkProgram.mTimeElapsed/1000000.f; + F32 seconds = ms/1000.f; - gbps = shader_timer_benchmark(dest, texHolder, count, buff.get(), seconds); + F64 samples_drawn = (F64)gBenchmarkProgram.mSamplesDrawn; + F64 gpixels_drawn = samples_drawn / 1000000000.0; + F32 samples_sec = (F32)(gpixels_drawn/seconds); + F32 gbps = samples_sec*4; // 4 bytes per sample - LL_INFOS("Benchmark") << "Memory bandwidth, final run is " << llformat("%.3f", gbps) << " GB/sec according to ARB_timer_query, total time " << seconds << " seconds" << LL_ENDL; + LL_INFOS("Benchmark") << "Memory bandwidth is " << llformat("%.3f", gbps) << " GB/sec according to ARB_timer_query, total time " << seconds << " seconds" << LL_ENDL; return gbps; } -- cgit v1.2.3 From 530ff898b00d1759ab4abb32dcf9767960ce7170 Mon Sep 17 00:00:00 2001 From: secretfoxtail Date: Thu, 6 Mar 2025 00:37:30 -0700 Subject: update openSUSE Tumbleweed readme & cmakelists update & include new libboost packages --- indra/newview/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index b54ec7f035..cfbea419b2 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -2163,7 +2163,7 @@ if (LINUX) CACHE STRING "RPM package requirements.") elseif (${LINUX_DISTRO} MATCHES opensuse-tumbleweed) set(CPACK_RPM_PACKAGE_REQUIRES - "libapr-util1-0, libboost_fiber1_87_0, libboost_program_options1_87_0, libboost_regex1_87_0, libboost_thread1_87_0, expat, libfltk1_3, libGLU1, libhunspell-1_7-0, libnghttp2-14, libSDL2-2_0-0, liburiparser1, libvlc5, vlc-codecs, libvorbis0" + "libapr-util1-0, libboost_fiber1_87_0, libboost_program_options1_87_0, libboost_regex1_87_0, libboost_thread1_87_0, libboost_url1_87_0, libboost_url1_87_0-x86-64-v3, expat, libfltk1_3, libGLU1, libhunspell-1_7-0, libnghttp2-14, libSDL2-2_0-0, liburiparser1, libvlc5, vlc-codecs, libvorbis0" CACHE STRING "RPM package requirements.") endif (${LINUX_DISTRO} MATCHES fedora) elseif (${LINUX_DISTRO} MATCHES arch) -- cgit v1.2.3 From 2170cca3a9f205bc6dda9d1b084ff5c8821186c9 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sat, 8 Mar 2025 17:45:47 +0800 Subject: Exempt Tumbleweed from PipeWire since they upgraded to 1.3.83 from stable 1.2.7 and there seem to be API changes and we're not ready for them yet. --- indra/media_plugins/cef/CMakeLists.txt | 9 +++++++++ indra/media_plugins/cef/linux/volume_catcher_linux.cpp | 2 ++ 2 files changed, 11 insertions(+) (limited to 'indra') diff --git a/indra/media_plugins/cef/CMakeLists.txt b/indra/media_plugins/cef/CMakeLists.txt index 007b74eda7..4c0abcda97 100644 --- a/indra/media_plugins/cef/CMakeLists.txt +++ b/indra/media_plugins/cef/CMakeLists.txt @@ -49,6 +49,11 @@ if (LINUX) linux/volume_catcher_pipewire.cpp ) + if (${LINUX_DISTRO} MATCHES opensuse-tumbleweed) + message( "Building with Linux volume catcher for PulseAudio only and cancelling PipeWire" ) + list(REMOVE_ITEM LINUX_VOLUME_CATCHER linux/volume_catcher_pipewire.cpp) + endif () + list(APPEND media_plugin_cef_SOURCE_FILES ${LINUX_VOLUME_CATCHER}) set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--build-id -Wl,-rpath,'$ORIGIN:$ORIGIN/../../lib'") list(APPEND media_plugin_cef_LINK_LIBRARIES llwindow ) @@ -71,6 +76,10 @@ add_library(media_plugin_cef ${media_plugin_cef_SOURCE_FILES} ) +if (NOT (${LINUX_DISTRO} MATCHES opensuse-tumbleweed)) + target_compile_definitions(media_plugin_cef PRIVATE USE_VOLUME_CATCHER_PW=1) +endif () + #add_dependencies(media_plugin_cef # ${MEDIA_PLUGIN_BASE_LIBRARIES} #) diff --git a/indra/media_plugins/cef/linux/volume_catcher_linux.cpp b/indra/media_plugins/cef/linux/volume_catcher_linux.cpp index 7d33242063..ba2ed1aa56 100644 --- a/indra/media_plugins/cef/linux/volume_catcher_linux.cpp +++ b/indra/media_plugins/cef/linux/volume_catcher_linux.cpp @@ -37,12 +37,14 @@ void VolumeCatcher::onEnablePipeWireVolumeCatcher(bool enable) if (pimpl != nullptr) return; +#if USE_VOLUME_CATCHER_PW if (enable) { LL_DEBUGS() << "volume catcher using pipewire" << LL_ENDL; pimpl = new VolumeCatcherPipeWire(); } else +#endif { LL_DEBUGS() << "volume catcher using pulseaudio" << LL_ENDL; pimpl = new VolumeCatcherPulseAudio(); -- cgit v1.2.3 From 8f99590d58e02705d7baf799c3c4db6863eb36a4 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sun, 9 Mar 2025 17:35:13 +0800 Subject: Comment out sampleReflectionProbesLegacy redeclaration which isn't used anyway in that file, and differs in parameter qualifiers, which caused a crash (only) on Ubuntu 24.x, with errors: Fragment info ------------- 0(857) : error c1106: overloaded function declaration "samplereflectionprobeslegacy" differs only in parameter qualifiers 2025-03-09T07:51:26Z WARNING # llrender/llglslshader.cpp(513) createShader : Failed to link shader: Water Shader 2025-03-09T07:51:26Z WARNING # llrender/llglslshader.cpp(518) createShader : Failed to link using shader level 3 trying again using shader level 2 Vertex info ----------- 0(107) : error C3002: call to undefined function "void calcAtmospherics(vec3);" --- indra/newview/app_settings/shaders/class3/environment/waterF.glsl | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra') diff --git a/indra/newview/app_settings/shaders/class3/environment/waterF.glsl b/indra/newview/app_settings/shaders/class3/environment/waterF.glsl index 7320e9ca06..d08bae0d7d 100644 --- a/indra/newview/app_settings/shaders/class3/environment/waterF.glsl +++ b/indra/newview/app_settings/shaders/class3/environment/waterF.glsl @@ -135,8 +135,10 @@ void sampleReflectionProbesWater(inout vec3 ambenv, inout vec3 glossenv, void sampleReflectionProbes(inout vec3 ambenv, inout vec3 glossenv, vec2 tc, vec3 pos, vec3 norm, float glossiness, bool transparent, vec3 amblit_linear); +/* void sampleReflectionProbesLegacy(inout vec3 ambenv, inout vec3 glossenv, inout vec3 legacyenv, vec2 tc, vec3 pos, vec3 norm, float glossiness, float envIntensity, bool transparent, vec3 amblit); +*/ vec3 getPositionWithNDC(vec3 ndc); -- cgit v1.2.3 From b038c1e2f5d881c1907252a2f3c0e72e24418534 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Tue, 11 Mar 2025 05:56:21 +0800 Subject: Replace MacPorts' Boost 1.81 with 1.87 and therefore LL's Collada DOM can be upgraded to something newer than r4, and therefore PCRE can be no longer depended on. Have to set the C++ standard so it doesn't use anything old, but also it wasn't ready for something as new as C++20 yet, that's why it's explicitly set to C++17. Have to set the architecture too when you're cross-compiling, it would use the native architecture. --- indra/cmake/Boost.cmake | 4 +-- indra/cmake/LLPrimitive.cmake | 60 +++++++++++++++---------------- indra/media_plugins/cef/CMakeLists.txt | 16 ++++----- indra/media_plugins/libvlc/CMakeLists.txt | 16 ++++----- indra/newview/FixBundle.cmake.in | 14 ++------ indra/newview/FixPackage.cmake.in | 14 ++------ 6 files changed, 52 insertions(+), 72 deletions(-) (limited to 'indra') diff --git a/indra/cmake/Boost.cmake b/indra/cmake/Boost.cmake index 26c0843300..c9688d0fe0 100644 --- a/indra/cmake/Boost.cmake +++ b/indra/cmake/Boost.cmake @@ -15,8 +15,8 @@ elseif( NOT USE_AUTOBUILD_3P ) target_link_directories( ll::boost INTERFACE /opt/local/x86_64-w64-mingw32/lib) elseif (DARWIN) set(sfx -mt) - target_include_directories( ll::boost SYSTEM INTERFACE /opt/local/libexec/boost/1.81/include) - target_link_directories( ll::boost INTERFACE /opt/local/libexec/boost/1.81/lib) + target_include_directories( ll::boost SYSTEM INTERFACE /opt/local/libexec/boost/1.87/include) + target_link_directories( ll::boost INTERFACE /opt/local/libexec/boost/1.87/lib) else (WINDOWS) find_package( Boost REQUIRED ) endif (WINDOWS) diff --git a/indra/cmake/LLPrimitive.cmake b/indra/cmake/LLPrimitive.cmake index 39c07e3377..8055435c27 100644 --- a/indra/cmake/LLPrimitive.cmake +++ b/indra/cmake/LLPrimitive.cmake @@ -35,49 +35,48 @@ if( USESYSTEMLIBS ) include(FindPkgConfig) pkg_check_modules(Minizip REQUIRED minizip) pkg_check_modules(Libxml2 REQUIRED libxml-2.0) - pkg_check_modules(Libpcrecpp libpcrecpp) target_link_libraries( ll::minizip-ng INTERFACE ${Minizip_LIBRARIES} ) target_link_libraries( ll::libxml INTERFACE ${Libxml2_LIBRARIES} ) if( ${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/colladadom_installed OR NOT ${colladadom_installed} EQUAL 0 ) - if( NOT EXISTS ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4.tar.gz ) + if( NOT EXISTS ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r8.tar.gz ) file(DOWNLOAD - https://github.com/secondlife/3p-colladadom/archive/refs/tags/v2.3-r4.tar.gz - ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4.tar.gz + https://github.com/secondlife/3p-colladadom/archive/refs/tags/v2.3-r8.tar.gz + ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r8.tar.gz ) - endif( NOT EXISTS ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4.tar.gz ) + endif( NOT EXISTS ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r8.tar.gz ) file(ARCHIVE_EXTRACT - INPUT ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4.tar.gz + INPUT ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r8.tar.gz DESTINATION ${CMAKE_BINARY_DIR} ) file(MAKE_DIRECTORY ${LIBS_PREBUILT_DIR}/include/collada/1.4) if( DARWIN ) try_compile(COLLADADOM_RESULT PROJECT colladadom - SOURCE_DIR ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4 - BINARY_DIR ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4 + SOURCE_DIR ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r8 + BINARY_DIR ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r8 TARGET collada14dom CMAKE_FLAGS + -DCMAKE_CXX_STANDARD:STRING=17 -DCMAKE_CXX_FLAGS:STRING=-I${Minizip_INCLUDE_DIRS} - "-DCMAKE_SHARED_LINKER_FLAGS:STRING=-L${Minizip_LIBRARY_DIRS} -L${Minizip_LIBRARY_DIRS}exec/boost/1.81/lib" - -Dlibpcrecpp_LIBRARIES:STRING=pcrecpp + "-DCMAKE_SHARED_LINKER_FLAGS:STRING=-L${Minizip_LIBRARY_DIRS} -L${Minizip_LIBRARY_DIRS}exec/boost/1.87/lib" + -DCMAKE_OSX_ARCHITECTURES:STRING=${CMAKE_OSX_ARCHITECTURES} -DZLIB_LIBRARIES:STRING=${Libxml2_LIBRARIES} -DBoost_FILESYSTEM_LIBRARY:STRING=boost_filesystem-mt -DBoost_SYSTEM_LIBRARY:STRING=boost_system-mt - -Dlibpcrecpp_CFLAGS_OTHERS:STRING=-I${Libpcrecpp_INCLUDE_DIRS} -DEXTRA_COMPILE_FLAGS:STRING=-I${Libxml2_INCLUDE_DIRS} - -DBoost_CFLAGS:STRING=-I${Libpcrecpp_LIBRARY_DIRS}exec/boost/1.81/include + -DBoost_CFLAGS:STRING=-I${Libxml2_LIBRARY_DIRS}exec/boost/1.87/include -DOPT_COLLADA14:BOOL=ON -DCOLLADA_DOM_INCLUDE_INSTALL_DIR:FILEPATH=${LIBS_PREBUILT_DIR}/include/collada -DCOLLADA_DOM_SOVERSION:STRING=0 - -DCOLLADA_DOM_VERSION:STRING=2.3-r4 + -DCOLLADA_DOM_VERSION:STRING=2.3-r8 OUTPUT_VARIABLE colladadom_installed ) if( ${COLLADADOM_RESULT} ) file( COPY - ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/src/1.4/libcollada14dom.2.3-r4.dylib - ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/src/1.4/libcollada14dom.0.dylib - ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/src/1.4/libcollada14dom.dylib + ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r8/src/1.4/libcollada14dom.2.3-r8.dylib + ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r8/src/1.4/libcollada14dom.0.dylib + ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r8/src/1.4/libcollada14dom.dylib DESTINATION ${LIBS_PREBUILT_DIR}/lib/release FOLLOW_SYMLINK_CHAIN ) @@ -85,31 +84,30 @@ if( USESYSTEMLIBS ) else( DARWIN ) execute_process( COMMAND sed -i "" -e "s/SHARED/STATIC/g" 1.4/CMakeLists.txt - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/src + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r8/src ) try_compile(COLLADADOM_RESULT PROJECT colladadom - SOURCE_DIR ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4 - BINARY_DIR ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4 + SOURCE_DIR ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r8 + BINARY_DIR ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r8 TARGET collada14dom CMAKE_FLAGS + -DCMAKE_CXX_STANDARD:STRING=17 -DCMAKE_CXX_FLAGS:STRING=-I${Minizip_INCLUDE_DIRS} -DCMAKE_SHARED_LINKER_FLAGS:STRING=-L${Minizip_LIBRARY_DIRS} - -Dlibpcrecpp_LIBRARIES:STRING=pcrecpp -DZLIB_LIBRARIES:STRING=${Libxml2_LIBRARIES} -DBoost_FILESYSTEM_LIBRARY:STRING=boost_filesystem -DBoost_SYSTEM_LIBRARY:STRING=boost_system - -Dlibpcrecpp_CFLAGS_OTHERS:STRING=-I${Libpcrecpp_INCLUDE_DIRS} -DEXTRA_COMPILE_FLAGS:STRING=-I${Libxml2_INCLUDE_DIRS} -DOPT_COLLADA14:BOOL=ON -DCOLLADA_DOM_INCLUDE_INSTALL_DIR:FILEPATH=${LIBS_PREBUILT_DIR}/include/collada -DCOLLADA_DOM_SOVERSION:STRING=0 - -DCOLLADA_DOM_VERSION:STRING=2.3-r4 + -DCOLLADA_DOM_VERSION:STRING=2.3-r8 OUTPUT_VARIABLE colladadom_installed ) if( ${COLLADADOM_RESULT} ) file( - COPY ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/src/1.4/libcollada14dom.a + COPY ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r8/src/1.4/libcollada14dom.a DESTINATION ${LIBS_PREBUILT_DIR}/lib/release ) endif( ${COLLADADOM_RESULT} ) @@ -118,12 +116,12 @@ if( USESYSTEMLIBS ) file(REMOVE_RECURSE ${LIBS_PREBUILT_DIR}/include/collada/1.4) file( COPY - ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/include/1.4 - ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/include/1.5 - ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/include/dae - ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/include/dae.h - ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/include/dom.h - ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/include/modules + ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r8/include/1.4 + ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r8/include/1.5 + ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r8/include/dae + ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r8/include/dae.h + ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r8/include/dom.h + ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r8/include/modules DESTINATION ${LIBS_PREBUILT_DIR}/include/collada ) file(WRITE ${PREBUILD_TRACKING_DIR}/colladadom_installed "${colladadom_installed}") @@ -156,8 +154,6 @@ target_include_directories( ll::colladadom SYSTEM INTERFACE ) if (WINDOWS) target_link_libraries(ll::colladadom INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libcollada14dom23-s.lib ll::libxml ll::minizip-ng ) -elseif (DARWIN) - target_link_libraries(ll::colladadom INTERFACE collada14dom ll::boost ll::libxml ll::minizip-ng) else () - target_link_libraries(ll::colladadom INTERFACE collada14dom ll::boost ll::libxml ll::minizip-ng ${Libpcrecpp_LIBRARIES}) + target_link_libraries(ll::colladadom INTERFACE collada14dom ll::boost ll::libxml ll::minizip-ng) endif() diff --git a/indra/media_plugins/cef/CMakeLists.txt b/indra/media_plugins/cef/CMakeLists.txt index 4c0abcda97..7590ff08a5 100644 --- a/indra/media_plugins/cef/CMakeLists.txt +++ b/indra/media_plugins/cef/CMakeLists.txt @@ -119,14 +119,14 @@ if (DARWIN) -change "/opt/local/lib/libiconv.2.dylib" "@loader_path/../../Frameworks/libiconv.2.dylib" -change "/opt/local/lib/libapr-1.0.dylib" "@loader_path/../../Frameworks/libapr-1.0.dylib" -change "/opt/local/lib/libexpat.1.dylib" "@loader_path/../../Frameworks/libexpat.1.dylib" - -change "/opt/local/libexec/boost/1.81/lib/libboost_context-mt.dylib" "@loader_path/../../Frameworks/libboost_context-mt.dylib" - -change "/opt/local/libexec/boost/1.81/lib/libboost_fiber-mt.dylib" "@loader_path/../../Frameworks/libboost_fiber-mt.dylib" - -change "/opt/local/libexec/boost/1.81/lib/libboost_filesystem-mt.dylib" "@loader_path/../../Frameworks/libboost_filesystem-mt.dylib" - -change "/opt/local/libexec/boost/1.81/lib/libboost_program_options-mt.dylib" "@loader_path/../../Frameworks/libboost_program_options-mt.dylib" - -change "/opt/local/libexec/boost/1.81/lib/libboost_regex-mt.dylib" "@loader_path/../../Frameworks/libboost_regex-mt.dylib" - -change "/opt/local/libexec/boost/1.81/lib/libboost_system-mt.dylib" "@loader_path/../../Frameworks/libboost_system-mt.dylib" - -change "/opt/local/libexec/boost/1.81/lib/libboost_thread-mt.dylib" "@loader_path/../../Frameworks/libboost_thread-mt.dylib" - -change "/opt/local/libexec/boost/1.81/lib/libboost_url-mt.dylib" "@loader_path/../../Frameworks/libboost_url-mt.dylib" + -change "/opt/local/libexec/boost/1.87/lib/libboost_context-mt.dylib" "@loader_path/../../Frameworks/libboost_context-mt.dylib" + -change "/opt/local/libexec/boost/1.87/lib/libboost_fiber-mt.dylib" "@loader_path/../../Frameworks/libboost_fiber-mt.dylib" + -change "/opt/local/libexec/boost/1.87/lib/libboost_filesystem-mt.dylib" "@loader_path/../../Frameworks/libboost_filesystem-mt.dylib" + -change "/opt/local/libexec/boost/1.87/lib/libboost_program_options-mt.dylib" "@loader_path/../../Frameworks/libboost_program_options-mt.dylib" + -change "/opt/local/libexec/boost/1.87/lib/libboost_regex-mt.dylib" "@loader_path/../../Frameworks/libboost_regex-mt.dylib" + -change "/opt/local/libexec/boost/1.87/lib/libboost_system-mt.dylib" "@loader_path/../../Frameworks/libboost_system-mt.dylib" + -change "/opt/local/libexec/boost/1.87/lib/libboost_thread-mt.dylib" "@loader_path/../../Frameworks/libboost_thread-mt.dylib" + -change "/opt/local/libexec/boost/1.87/lib/libboost_url-mt.dylib" "@loader_path/../../Frameworks/libboost_url-mt.dylib" -change "/opt/local/lib/libz.1.dylib" "@loader_path/../../Frameworks/libz.1.dylib" -change "/opt/local/lib/libnghttp2.14.dylib" "@loader_path/../../Frameworks/libnghttp2.14.dylib" "$" diff --git a/indra/media_plugins/libvlc/CMakeLists.txt b/indra/media_plugins/libvlc/CMakeLists.txt index 84e0d1da59..91e6df92de 100644 --- a/indra/media_plugins/libvlc/CMakeLists.txt +++ b/indra/media_plugins/libvlc/CMakeLists.txt @@ -56,14 +56,14 @@ if (DARWIN) -change "/opt/local/lib/libiconv.2.dylib" "@loader_path/../../Frameworks/libiconv.2.dylib" -change "/opt/local/lib/libapr-1.0.dylib" "@loader_path/../../Frameworks/libapr-1.0.dylib" -change "/opt/local/lib/libexpat.1.dylib" "@loader_path/../../Frameworks/libexpat.1.dylib" - -change "/opt/local/libexec/boost/1.81/lib/libboost_context-mt.dylib" "@loader_path/../../Frameworks/libboost_context-mt.dylib" - -change "/opt/local/libexec/boost/1.81/lib/libboost_fiber-mt.dylib" "@loader_path/../../Frameworks/libboost_fiber-mt.dylib" - -change "/opt/local/libexec/boost/1.81/lib/libboost_filesystem-mt.dylib" "@loader_path/../../Frameworks/libboost_filesystem-mt.dylib" - -change "/opt/local/libexec/boost/1.81/lib/libboost_program_options-mt.dylib" "@loader_path/../../Frameworks/libboost_program_options-mt.dylib" - -change "/opt/local/libexec/boost/1.81/lib/libboost_regex-mt.dylib" "@loader_path/../../Frameworks/libboost_regex-mt.dylib" - -change "/opt/local/libexec/boost/1.81/lib/libboost_system-mt.dylib" "@loader_path/../../Frameworks/libboost_system-mt.dylib" - -change "/opt/local/libexec/boost/1.81/lib/libboost_thread-mt.dylib" "@loader_path/../../Frameworks/libboost_thread-mt.dylib" - -change "/opt/local/libexec/boost/1.81/lib/libboost_url-mt.dylib" "@loader_path/../../Frameworks/libboost_url-mt.dylib" + -change "/opt/local/libexec/boost/1.87/lib/libboost_context-mt.dylib" "@loader_path/../../Frameworks/libboost_context-mt.dylib" + -change "/opt/local/libexec/boost/1.87/lib/libboost_fiber-mt.dylib" "@loader_path/../../Frameworks/libboost_fiber-mt.dylib" + -change "/opt/local/libexec/boost/1.87/lib/libboost_filesystem-mt.dylib" "@loader_path/../../Frameworks/libboost_filesystem-mt.dylib" + -change "/opt/local/libexec/boost/1.87/lib/libboost_program_options-mt.dylib" "@loader_path/../../Frameworks/libboost_program_options-mt.dylib" + -change "/opt/local/libexec/boost/1.87/lib/libboost_regex-mt.dylib" "@loader_path/../../Frameworks/libboost_regex-mt.dylib" + -change "/opt/local/libexec/boost/1.87/lib/libboost_system-mt.dylib" "@loader_path/../../Frameworks/libboost_system-mt.dylib" + -change "/opt/local/libexec/boost/1.87/lib/libboost_thread-mt.dylib" "@loader_path/../../Frameworks/libboost_thread-mt.dylib" + -change "/opt/local/libexec/boost/1.87/lib/libboost_url-mt.dylib" "@loader_path/../../Frameworks/libboost_url-mt.dylib" -change "/opt/local/lib/libz.1.dylib" "@loader_path/../../Frameworks/libz.1.dylib" -change "/opt/local/lib/libnghttp2.14.dylib" "@loader_path/../../Frameworks/libnghttp2.14.dylib" -change "@rpath/libvlc.dylib" "@loader_path/plugins/libvlc.dylib" diff --git a/indra/newview/FixBundle.cmake.in b/indra/newview/FixBundle.cmake.in index 066cdc1a1b..7f06249224 100644 --- a/indra/newview/FixBundle.cmake.in +++ b/indra/newview/FixBundle.cmake.in @@ -187,9 +187,9 @@ execute_process( COMMAND lipo libbz2.1.0.8.dylib -thin ${CMAKE_OSX_ARCHITECTURES} -output libbz2.1.0.8.dylib - COMMAND lipo libcollada14dom.2.3-r4.dylib + COMMAND lipo libcollada14dom.2.3-r8.dylib -thin ${CMAKE_OSX_ARCHITECTURES} - -output libcollada14dom.2.3-r4.dylib + -output libcollada14dom.2.3-r8.dylib COMMAND lipo libexpat.1.10.0.dylib -thin ${CMAKE_OSX_ARCHITECTURES} -output libexpat.1.10.0.dylib @@ -238,12 +238,6 @@ execute_process( COMMAND lipo libopenal.1.24.2.dylib -thin ${CMAKE_OSX_ARCHITECTURES} -output libopenal.1.24.2.dylib - COMMAND lipo libpcre.1.dylib - -thin ${CMAKE_OSX_ARCHITECTURES} - -output libpcre.1.dylib - COMMAND lipo libpcrecpp.0.dylib - -thin ${CMAKE_OSX_ARCHITECTURES} - -output libpcrecpp.0.dylib COMMAND lipo libpng16.16.dylib -thin ${CMAKE_OSX_ARCHITECTURES} -output libpng16.16.dylib @@ -294,7 +288,7 @@ execute_process( Frameworks/libbrotlicommon.1.1.0.dylib Frameworks/libbrotlidec.1.1.0.dylib Frameworks/libbz2.1.0.8.dylib - Frameworks/libcollada14dom.2.3-r4.dylib + Frameworks/libcollada14dom.2.3-r8.dylib Frameworks/libexpat.1.10.0.dylib Frameworks/libfreetype.6.dylib Frameworks/libhunspell-1.7.0.dylib @@ -311,8 +305,6 @@ execute_process( Frameworks/libnghttp2.14.dylib Frameworks/libogg.0.dylib Frameworks/libopenal.1.24.2.dylib - Frameworks/libpcre.1.dylib - Frameworks/libpcrecpp.0.dylib Frameworks/libpng16.16.dylib Frameworks/libvlc.5.dylib Frameworks/libvlccore.9.dylib diff --git a/indra/newview/FixPackage.cmake.in b/indra/newview/FixPackage.cmake.in index 1cff561ea6..074a6e5815 100644 --- a/indra/newview/FixPackage.cmake.in +++ b/indra/newview/FixPackage.cmake.in @@ -187,9 +187,9 @@ execute_process( COMMAND lipo libbz2.1.0.8.dylib -thin ${CMAKE_OSX_ARCHITECTURES} -output libbz2.1.0.8.dylib - COMMAND lipo libcollada14dom.2.3-r4.dylib + COMMAND lipo libcollada14dom.2.3-r8.dylib -thin ${CMAKE_OSX_ARCHITECTURES} - -output libcollada14dom.2.3-r4.dylib + -output libcollada14dom.2.3-r8.dylib COMMAND lipo libexpat.1.10.0.dylib -thin ${CMAKE_OSX_ARCHITECTURES} -output libexpat.1.10.0.dylib @@ -238,12 +238,6 @@ execute_process( COMMAND lipo libopenal.1.24.2.dylib -thin ${CMAKE_OSX_ARCHITECTURES} -output libopenal.1.24.2.dylib - COMMAND lipo libpcre.1.dylib - -thin ${CMAKE_OSX_ARCHITECTURES} - -output libpcre.1.dylib - COMMAND lipo libpcrecpp.0.dylib - -thin ${CMAKE_OSX_ARCHITECTURES} - -output libpcrecpp.0.dylib COMMAND lipo libpng16.16.dylib -thin ${CMAKE_OSX_ARCHITECTURES} -output libpng16.16.dylib @@ -294,7 +288,7 @@ execute_process( Frameworks/libbrotlicommon.1.1.0.dylib Frameworks/libbrotlidec.1.1.0.dylib Frameworks/libbz2.1.0.8.dylib - Frameworks/libcollada14dom.2.3-r4.dylib + Frameworks/libcollada14dom.2.3-r8.dylib Frameworks/libexpat.1.10.0.dylib Frameworks/libfreetype.6.dylib Frameworks/libhunspell-1.7.0.dylib @@ -311,8 +305,6 @@ execute_process( Frameworks/libnghttp2.14.dylib Frameworks/libogg.0.dylib Frameworks/libopenal.1.24.2.dylib - Frameworks/libpcre.1.dylib - Frameworks/libpcrecpp.0.dylib Frameworks/libpng16.16.dylib Frameworks/libvlc.5.dylib Frameworks/libvlccore.9.dylib -- cgit v1.2.3 From 7ef668c43389ee302751d2f8fb83df8da42aa9fa Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Tue, 11 Mar 2025 07:30:05 +0800 Subject: Remove PCRE dependency on FreeBSD The Collada DOM upstream patch version is one that doesn't depend on PCRE anymore anyway. --- indra/newview/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 09a3ed029d..040fc7955e 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -2290,7 +2290,7 @@ elseif (USESYSTEMLIBS) set(CPACK_FREEBSD_PACKAGE_ORIGIN net/${VIEWER_BINARY_NAME} CACHE STRING "FreeBSD package origin.") set(CPACK_FREEBSD_PACKAGE_DEPS - "audio/freealut;graphics/libGLU;textproc/hunspell;misc/meshoptimizer;archivers/minizip;www/libnghttp2;devel/pcre;net/uriparser;multimedia/vlc;audio/libvorbis" + "audio/freealut;graphics/libGLU;textproc/hunspell;misc/meshoptimizer;archivers/minizip;www/libnghttp2;net/uriparser;multimedia/vlc;audio/libvorbis" CACHE STRING "FreeBSD package dependencies.") endif (CMAKE_SYSTEM_NAME MATCHES FreeBSD AND PACKAGE) endif (LINUX) -- cgit v1.2.3 From e047700957d27d1737149e4156e80660377eb393 Mon Sep 17 00:00:00 2001 From: Rye Date: Sat, 16 Nov 2024 03:51:33 -0500 Subject: Restore support for anistropic filtering on macos --- indra/llrender/llgl.cpp | 7 ++++++- indra/llrender/llrender.cpp | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index 17fa8f14a9..2799743e36 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -1273,7 +1273,7 @@ bool LLGLManager::initGL() // there's some implementation that reports a crazy value mMaxUniformBlockSize = llmin(mMaxUniformBlockSize, 65536); - if (mGLVersion >= 4.59f) + if (mHasAnisotropic) { glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &mMaxAnisotropy); } @@ -1440,6 +1440,11 @@ void LLGLManager::initExtensions() mHasCubeMapArray = mGLVersion >= 3.99f; mHasTransformFeedback = mGLVersion >= 3.99f; mHasDebugOutput = mGLVersion >= 4.29f; + mHasAnisotropic = mGLVersion >= 4.59f; + if(!mHasAnisotropic && gGLHExts.mSysExts) + { + mHasAnisotropic = ExtensionExists("GL_EXT_texture_filter_anisotropic", gGLHExts.mSysExts); + } // Misc glGetIntegerv(GL_MAX_ELEMENTS_VERTICES, (GLint*) &mGLMaxVertexRange); diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp index 9f3f42d6d5..cbb178b6f8 100644 --- a/indra/llrender/llrender.cpp +++ b/indra/llrender/llrender.cpp @@ -517,7 +517,7 @@ void LLTexUnit::setTextureFilteringOption(LLTexUnit::eTextureFilterOptions optio } } - if (gGLManager.mGLVersion >= 4.59f) + if (gGLManager.mHasAnisotropic) { if (LLImageGL::sGlobalUseAnisotropic && option == TFO_ANISOTROPIC) { -- cgit v1.2.3 From e26d1cee02541b72a04da0bd5a1cde6dc3155bd2 Mon Sep 17 00:00:00 2001 From: mobserveur Date: Sat, 15 Mar 2025 19:07:16 +0100 Subject: Disabling Smoothie in llvertexbuffer Disabled Smoothie in llvertexbuffer, using LL method --- indra/llrender/llvertexbuffer.cpp | 90 +++++++++++++++------------------------ 1 file changed, 35 insertions(+), 55 deletions(-) (limited to 'indra') diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp index 96569a33e9..ac6db0b34f 100644 --- a/indra/llrender/llvertexbuffer.cpp +++ b/indra/llrender/llvertexbuffer.cpp @@ -945,8 +945,7 @@ void LLVertexBuffer::initClass(LLWindow* window) { llassert(sVBOPool == nullptr); - //if (gGLManager.mIsApple) - if(0) + if (gGLManager.mIsApple) { LL_INFOS() << "VBO Pooling Disabled" << LL_ENDL; sVBOPool = new LLAppleVBOPool(); @@ -1289,8 +1288,7 @@ U8* LLVertexBuffer::mapVertexBuffer(LLVertexBuffer::AttributeType type, U32 inde count = mNumVerts - index; } - //if (!gGLManager.mIsApple) - if (1) + if (!gGLManager.mIsApple) { U32 start = mOffsets[type] + sTypeSize[type] * index; U32 end = start + sTypeSize[type] * count-1; @@ -1327,8 +1325,7 @@ U8* LLVertexBuffer::mapIndexBuffer(U32 index, S32 count) count = mNumIndices-index; } - //if (!gGLManager.mIsApple) - if(1) + if (!gGLManager.mIsApple) { U32 start = sizeof(U16) * index; U32 end = start + sizeof(U16) * count-1; @@ -1365,20 +1362,6 @@ void LLVertexBuffer::flush_vbo(GLenum target, U32 start, U32 end, void* data, U8 { if (gGLManager.mIsApple) { - U32 MapBits = GL_MAP_WRITE_BIT; - U32 buffer_size = end-start+1; - - U8 * mptr = NULL; - mptr = (U8*) glMapBufferRange( target, start, end-start+1, MapBits); - - if (mptr) - { - std::memcpy(mptr, (U8*) data, buffer_size); - if(!glUnmapBuffer(target)) LL_WARNS() << "glUnmapBuffer() failed" << LL_ENDL; - } - else LL_WARNS() << "glMapBufferRange() returned NULL" << LL_ENDL; - - /* // on OS X, flush_vbo doesn't actually write to the GL buffer, so be sure to call // _mapBuffer to tag the buffer for flushing to GL _mapBuffer(); @@ -1386,7 +1369,6 @@ void LLVertexBuffer::flush_vbo(GLenum target, U32 start, U32 end, void* data, U8 STOP_GLERROR; // copy into mapped buffer memcpy(dst+start, data, end-start+1); - */ } else { @@ -1444,8 +1426,7 @@ void LLVertexBuffer::_unmapBuffer() } }; - //if (gGLManager.mIsApple) - if (0) + if (gGLManager.mIsApple) { STOP_GLERROR; if (mMappedData) @@ -1726,55 +1707,58 @@ void LLVertexBuffer::setupVertexBuffer() STOP_GLERROR; U8* base = nullptr; + AttributeType loc; + void* ptr = nullptr; + U32 data_mask = LLGLSLShader::sCurBoundShaderPtr->mAttributeMask; if (data_mask & MAP_NORMAL) { - AttributeType loc = TYPE_NORMAL; - void* ptr = (void*)(base + mOffsets[TYPE_NORMAL]); + loc = TYPE_NORMAL; + ptr = (void*)(base + mOffsets[TYPE_NORMAL]); glVertexAttribPointer(loc, 3, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_NORMAL], ptr); } if (data_mask & MAP_TEXCOORD3) { - AttributeType loc = TYPE_TEXCOORD3; - void* ptr = (void*)(base + mOffsets[TYPE_TEXCOORD3]); + loc = TYPE_TEXCOORD3; + ptr = (void*)(base + mOffsets[TYPE_TEXCOORD3]); glVertexAttribPointer(loc, 2, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_TEXCOORD3], ptr); } if (data_mask & MAP_TEXCOORD2) { - AttributeType loc = TYPE_TEXCOORD2; - void* ptr = (void*)(base + mOffsets[TYPE_TEXCOORD2]); + loc = TYPE_TEXCOORD2; + ptr = (void*)(base + mOffsets[TYPE_TEXCOORD2]); glVertexAttribPointer(loc, 2, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_TEXCOORD2], ptr); } if (data_mask & MAP_TEXCOORD1) { - AttributeType loc = TYPE_TEXCOORD1; - void* ptr = (void*)(base + mOffsets[TYPE_TEXCOORD1]); + loc = TYPE_TEXCOORD1; + ptr = (void*)(base + mOffsets[TYPE_TEXCOORD1]); glVertexAttribPointer(loc, 2, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_TEXCOORD1], ptr); } if (data_mask & MAP_TANGENT) { - AttributeType loc = TYPE_TANGENT; - void* ptr = (void*)(base + mOffsets[TYPE_TANGENT]); + loc = TYPE_TANGENT; + ptr = (void*)(base + mOffsets[TYPE_TANGENT]); glVertexAttribPointer(loc, 4, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_TANGENT], ptr); } if (data_mask & MAP_TEXCOORD0) { - AttributeType loc = TYPE_TEXCOORD0; - void* ptr = (void*)(base + mOffsets[TYPE_TEXCOORD0]); + loc = TYPE_TEXCOORD0; + ptr = (void*)(base + mOffsets[TYPE_TEXCOORD0]); glVertexAttribPointer(loc, 2, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_TEXCOORD0], ptr); } if (data_mask & MAP_COLOR) { - AttributeType loc = TYPE_COLOR; + loc = TYPE_COLOR; //bind emissive instead of color pointer if emissive is present - void* ptr = (data_mask & MAP_EMISSIVE) ? (void*)(base + mOffsets[TYPE_EMISSIVE]) : (void*)(base + mOffsets[TYPE_COLOR]); + ptr = (data_mask & MAP_EMISSIVE) ? (void*)(base + mOffsets[TYPE_EMISSIVE]) : (void*)(base + mOffsets[TYPE_COLOR]); glVertexAttribPointer(loc, 4, GL_UNSIGNED_BYTE, GL_TRUE, LLVertexBuffer::sTypeSize[TYPE_COLOR], ptr); } if (data_mask & MAP_EMISSIVE) { - AttributeType loc = TYPE_EMISSIVE; - void* ptr = (void*)(base + mOffsets[TYPE_EMISSIVE]); + loc = TYPE_EMISSIVE; + ptr = (void*)(base + mOffsets[TYPE_EMISSIVE]); glVertexAttribPointer(loc, 4, GL_UNSIGNED_BYTE, GL_TRUE, LLVertexBuffer::sTypeSize[TYPE_EMISSIVE], ptr); if (!(data_mask & MAP_COLOR)) @@ -1785,38 +1769,38 @@ void LLVertexBuffer::setupVertexBuffer() } if (data_mask & MAP_WEIGHT) { - AttributeType loc = TYPE_WEIGHT; - void* ptr = (void*)(base + mOffsets[TYPE_WEIGHT]); + loc = TYPE_WEIGHT; + ptr = (void*)(base + mOffsets[TYPE_WEIGHT]); glVertexAttribPointer(loc, 1, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_WEIGHT], ptr); } if (data_mask & MAP_WEIGHT4) { - AttributeType loc = TYPE_WEIGHT4; - void* ptr = (void*)(base + mOffsets[TYPE_WEIGHT4]); + loc = TYPE_WEIGHT4; + ptr = (void*)(base + mOffsets[TYPE_WEIGHT4]); glVertexAttribPointer(loc, 4, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_WEIGHT4], ptr); } if (data_mask & MAP_JOINT) { - AttributeType loc = TYPE_JOINT; - void* ptr = (void*)(base + mOffsets[TYPE_JOINT]); + loc = TYPE_JOINT; + ptr = (void*)(base + mOffsets[TYPE_JOINT]); glVertexAttribIPointer(loc, 4, GL_UNSIGNED_SHORT, LLVertexBuffer::sTypeSize[TYPE_JOINT], ptr); } if (data_mask & MAP_CLOTHWEIGHT) { - AttributeType loc = TYPE_CLOTHWEIGHT; - void* ptr = (void*)(base + mOffsets[TYPE_CLOTHWEIGHT]); + loc = TYPE_CLOTHWEIGHT; + ptr = (void*)(base + mOffsets[TYPE_CLOTHWEIGHT]); glVertexAttribPointer(loc, 4, GL_FLOAT, GL_TRUE, LLVertexBuffer::sTypeSize[TYPE_CLOTHWEIGHT], ptr); } if (data_mask & MAP_TEXTURE_INDEX) { - AttributeType loc = TYPE_TEXTURE_INDEX; - void* ptr = (void*)(base + mOffsets[TYPE_VERTEX] + 12); + loc = TYPE_TEXTURE_INDEX; + ptr = (void*)(base + mOffsets[TYPE_VERTEX] + 12); glVertexAttribIPointer(loc, 1, GL_UNSIGNED_INT, LLVertexBuffer::sTypeSize[TYPE_VERTEX], ptr); } if (data_mask & MAP_VERTEX) { - AttributeType loc = TYPE_VERTEX; - void* ptr = (void*)(base + mOffsets[TYPE_VERTEX]); + loc = TYPE_VERTEX; + ptr = (void*)(base + mOffsets[TYPE_VERTEX]); glVertexAttribPointer(loc, 3, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_VERTEX], ptr); } STOP_GLERROR; @@ -1933,7 +1917,3 @@ void LLVertexBuffer::setIndexData(const U32* data, U32 offset, U32 count) } flush_vbo(GL_ELEMENT_ARRAY_BUFFER, offset * sizeof(U32), (offset + count) * sizeof(U32) - 1, (U8*)data, mMappedIndexData); } - - - - -- cgit v1.2.3 From eea2a8ff6e181e9093c5fffd9305fc3edaf62fac Mon Sep 17 00:00:00 2001 From: mobserveur Date: Sat, 15 Mar 2025 19:10:03 +0100 Subject: Performance tweaks related to glError Disabling glGetError() calls in release build --- indra/llrender/llgl.h | 13 +++-- indra/llwindow/llopenglview-objc.mm | 96 ++++++++++++++++++------------------- 2 files changed, 54 insertions(+), 55 deletions(-) (limited to 'indra') diff --git a/indra/llrender/llgl.h b/indra/llrender/llgl.h index 24ba4d6deb..bf8368a7b3 100644 --- a/indra/llrender/llgl.h +++ b/indra/llrender/llgl.h @@ -160,18 +160,17 @@ void assert_glerror(); void clear_glerror(); +#if !LL_RELEASE_FOR_DOWNLOAD # define stop_glerror() assert_glerror() # define llglassertok() assert_glerror() - -// stop_glerror is still needed on OS X but has performance implications -// use macro below to conditionally add stop_glerror to non-release builds -// on OS X -#if LL_DARWIN && !LL_RELEASE_FOR_DOWNLOAD -#define STOP_GLERROR stop_glerror() +# define STOP_GLERROR stop_glerror() #else -#define STOP_GLERROR +# define stop_glerror() +# define llglassertok() +# define STOP_GLERROR #endif + #define llglassertok_always() assert_glerror() //////////////////////// diff --git a/indra/llwindow/llopenglview-objc.mm b/indra/llwindow/llopenglview-objc.mm index 0bd4e506a2..6177eb4873 100644 --- a/indra/llwindow/llopenglview-objc.mm +++ b/indra/llwindow/llopenglview-objc.mm @@ -64,16 +64,16 @@ attributedStringInfo getSegments(NSAttributedString *str) segment_standouts seg_standouts; NSRange effectiveRange; NSRange limitRange = NSMakeRange(0, [str length]); - + while (limitRange.length > 0) { NSNumber *attr = [str attribute:NSUnderlineStyleAttributeName atIndex:limitRange.location longestEffectiveRange:&effectiveRange inRange:limitRange]; limitRange = NSMakeRange(NSMaxRange(effectiveRange), NSMaxRange(limitRange) - NSMaxRange(effectiveRange)); - + if (effectiveRange.length <= 0) { effectiveRange.length = 1; } - + if ([attr integerValue] == 2) { seg_lengths.push_back(effectiveRange.length); @@ -96,12 +96,12 @@ attributedStringInfo getSegments(NSAttributedString *str) + (NSScreen *)currentScreenForMouseLocation { NSPoint mouseLocation = [NSEvent mouseLocation]; - + NSEnumerator *screenEnumerator = [[NSScreen screens] objectEnumerator]; NSScreen *screen; while ((screen = [screenEnumerator nextObject]) && !NSMouseInRect(mouseLocation, screen.frame, NO)) ; - + return screen; } @@ -110,7 +110,7 @@ attributedStringInfo getSegments(NSAttributedString *str) { float normalizedX = fabs(fabs(self.frame.origin.x) - fabs(aPoint.x)); float normalizedY = aPoint.y - self.frame.origin.y; - + return NSMakePoint(normalizedX, normalizedY); } @@ -153,7 +153,7 @@ attributedStringInfo getSegments(NSAttributedString *str) { vram_megabytes = 256; } - + return (unsigned long)vram_megabytes; // return value is in megabytes. } @@ -162,15 +162,15 @@ attributedStringInfo getSegments(NSAttributedString *str) [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(windowResized:) name:NSWindowDidResizeNotification object:[self window]]; - + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(windowWillMiniaturize:) name:NSWindowWillMiniaturizeNotification object:[self window]]; - + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(windowDidDeminiaturize:) name:NSWindowDidDeminiaturizeNotification object:[self window]]; - + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(windowDidBecomeKey:) name:NSWindowDidBecomeKeyNotification object:[self window]]; @@ -246,7 +246,7 @@ attributedStringInfo getSegments(NSAttributedString *str) { [self registerForDraggedTypes:[NSArray arrayWithObject:NSURLPboardType]]; [self initWithFrame:frame]; - + // Initialize with a default "safe" pixel format that will work with versions dating back to OS X 10.6. // Any specialized pixel formats, i.e. a core profile pixel format, should be initialized through rebuildContextWithFormat. // 10.7 and 10.8 don't really care if we're defining a profile or not. If we don't explicitly request a core or legacy profile, it'll always assume a legacy profile (for compatibility reasons). @@ -255,8 +255,8 @@ attributedStringInfo getSegments(NSAttributedString *str) NSOpenGLPFADoubleBuffer, NSOpenGLPFAClosestPolicy, NSOpenGLPFAAccelerated, - NSOpenGLPFASampleBuffers, static_cast(samples > 0 ? 1 : 0), - NSOpenGLPFASamples, static_cast(samples), + NSOpenGLPFASampleBuffers, 0, + NSOpenGLPFASamples, 0, NSOpenGLPFAStencilSize, 8, NSOpenGLPFADepthSize, 24, NSOpenGLPFAAlphaSize, 8, @@ -264,34 +264,34 @@ attributedStringInfo getSegments(NSAttributedString *str) NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersion4_1Core, 0 }; - + NSOpenGLPixelFormat *pixelFormat = [[[NSOpenGLPixelFormat alloc] initWithAttributes:attrs] autorelease]; - + if (pixelFormat == nil) { NSLog(@"Failed to create pixel format!", nil); return nil; } - + NSOpenGLContext *glContext = [[NSOpenGLContext alloc] initWithFormat:pixelFormat shareContext:nil]; - + if (glContext == nil) { NSLog(@"Failed to create OpenGL context!", nil); return nil; } - + [self setPixelFormat:pixelFormat]; //for retina support [self setWantsBestResolutionOpenGLSurface:gHiDPISupport]; [self setOpenGLContext:glContext]; - + [glContext setView:self]; - + [glContext makeCurrentContext]; - + if (vsync) { GLint value = 1; @@ -303,9 +303,9 @@ attributedStringInfo getSegments(NSAttributedString *str) GLint swapInterval=0; [glContext setValues:&swapInterval forParameter:NSOpenGLCPSwapInterval]; } - + mOldResize = false; - + return self; } @@ -317,16 +317,16 @@ attributedStringInfo getSegments(NSAttributedString *str) - (BOOL) rebuildContextWithFormat:(NSOpenGLPixelFormat *)format { NSOpenGLContext *ctx = [self openGLContext]; - + [ctx clearDrawable]; [ctx initWithFormat:format shareContext:nil]; - + if (ctx == nil) { NSLog(@"Failed to create OpenGL context!", nil); return false; } - + [self setOpenGLContext:ctx]; [ctx setView:self]; [ctx makeCurrentContext]; @@ -413,9 +413,9 @@ attributedStringInfo getSegments(NSAttributedString *str) float(dev_delta.x), float(dev_delta.y) }; - + callDeltaUpdate(mouseDeltas, 0); - + NSPoint mPoint = gHiDPISupport ? [self convertPointToBacking:[theEvent locationInWindow]] : [theEvent locationInWindow]; mMousePos[0] = mPoint.x; mMousePos[1] = mPoint.y; @@ -437,9 +437,9 @@ attributedStringInfo getSegments(NSAttributedString *str) float(dev_delta.x), float(dev_delta.y) }; - + callDeltaUpdate(mouseDeltas, 0); - + NSPoint mPoint = gHiDPISupport ? [self convertPointToBacking:[theEvent locationInWindow]] : [theEvent locationInWindow]; mMousePos[0] = mPoint.x; mMousePos[1] = mPoint.y; @@ -469,7 +469,7 @@ attributedStringInfo getSegments(NSAttributedString *str) - (void) otherMouseDragged:(NSEvent *)theEvent { - [self mouseDragged:theEvent]; + [self mouseDragged:theEvent]; } - (void) scrollWheel:(NSEvent *)theEvent @@ -493,7 +493,7 @@ attributedStringInfo getSegments(NSAttributedString *str) { NativeKeyEventData eventData = extractKeyDataFromKeyEvent(theEvent); eventData.mKeyEvent = NativeKeyEventData::KEYDOWN; - + uint keycode = [theEvent keyCode]; // We must not depend on flagsChange event to detect modifier flags changed, // must depend on the modifire flags in the event parameter. @@ -527,13 +527,13 @@ attributedStringInfo getSegments(NSAttributedString *str) - (void)flagsChanged:(NSEvent *)theEvent { NativeKeyEventData eventData = extractKeyDataFromModifierEvent(theEvent); - + mModifiers = [theEvent modifierFlags]; callModifier([theEvent modifierFlags]); - + NSInteger mask = 0; switch([theEvent keyCode]) - { + { case 56: mask = NSShiftKeyMask; break; @@ -544,9 +544,9 @@ attributedStringInfo getSegments(NSAttributedString *str) mask = NSControlKeyMask; break; default: - return; + return; } - + if (mModifiers & mask) { eventData.mKeyEvent = NativeKeyEventData::KEYDOWN; @@ -565,7 +565,7 @@ attributedStringInfo getSegments(NSAttributedString *str) { eventData.mKeyEvent = NativeKeyEventData::KEYUP; callKeyUp(&eventData, [theEvent keyCode], 0); - } + } } - (BOOL) acceptsFirstResponder @@ -577,11 +577,11 @@ attributedStringInfo getSegments(NSAttributedString *str) { NSPasteboard *pboard; NSDragOperation sourceDragMask; - + sourceDragMask = [sender draggingSourceOperationMask]; - + pboard = [sender draggingPasteboard]; - + if ([[pboard types] containsObject:NSURLPboardType]) { if (sourceDragMask & NSDragOperationLink) { @@ -596,7 +596,7 @@ attributedStringInfo getSegments(NSAttributedString *str) - (NSDragOperation)draggingUpdated:(id )sender { callHandleDragUpdated(mLastDraggedUrl); - + return NSDragOperationLink; } @@ -650,12 +650,12 @@ attributedStringInfo getSegments(NSAttributedString *str) unsigned(selectedRange.location), unsigned(selectedRange.length) }; - + unsigned int replacement[2] = { unsigned(replacementRange.location), unsigned(replacementRange.length) }; - + int string_length = [aString length]; unichar text[string_length]; attributedStringInfo segments; @@ -754,7 +754,7 @@ attributedStringInfo getSegments(NSAttributedString *str) return; } } - + @try { if (!mHasMarkedText) @@ -767,7 +767,7 @@ attributedStringInfo getSegments(NSAttributedString *str) resetPreedit(); // We may never get this point since unmarkText may be called before insertText ever gets called once we submit our text. // But just in case... - + for (NSInteger i = 0; i < [aString length]; i++) { handleUnicodeCharacter([aString characterAtIndex:i]); @@ -913,10 +913,10 @@ attributedStringInfo getSegments(NSAttributedString *str) NSPoint screenPoint = [[view window] convertBaseToScreen:windowPoint]; NSPoint flippedScreenPoint = [currentScreen flipPoint:screenPoint]; flippedScreenPoint.y += [currentScreen frame].origin.y; - + return flippedScreenPoint; } - + return NSZeroPoint; } -- cgit v1.2.3 From 26edcf2f039e5aca689ad231381df7b66ae43d89 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sun, 16 Mar 2025 07:01:59 +0800 Subject: Exempt Arch from PipeWire too since they upgraded to 1.4.1 from stable 1.2.7 and there seem to be API changes and we're not ready for them yet. --- indra/media_plugins/cef/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/media_plugins/cef/CMakeLists.txt b/indra/media_plugins/cef/CMakeLists.txt index 7590ff08a5..3fa029f260 100644 --- a/indra/media_plugins/cef/CMakeLists.txt +++ b/indra/media_plugins/cef/CMakeLists.txt @@ -49,7 +49,7 @@ if (LINUX) linux/volume_catcher_pipewire.cpp ) - if (${LINUX_DISTRO} MATCHES opensuse-tumbleweed) + if (${LINUX_DISTRO} MATCHES arch OR (${LINUX_DISTRO} MATCHES opensuse-tumbleweed)) message( "Building with Linux volume catcher for PulseAudio only and cancelling PipeWire" ) list(REMOVE_ITEM LINUX_VOLUME_CATCHER linux/volume_catcher_pipewire.cpp) endif () @@ -76,7 +76,7 @@ add_library(media_plugin_cef ${media_plugin_cef_SOURCE_FILES} ) -if (NOT (${LINUX_DISTRO} MATCHES opensuse-tumbleweed)) +if (NOT (${LINUX_DISTRO} MATCHES arch OR (${LINUX_DISTRO} MATCHES opensuse-tumbleweed))) target_compile_definitions(media_plugin_cef PRIVATE USE_VOLUME_CATCHER_PW=1) endif () -- cgit v1.2.3