From bc02334284839e6e7fb133d8b5b4d75fec919691 Mon Sep 17 00:00:00 2001
From: Maxim Nikolenko <maximnproductengine@lindenlab.com>
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/newview')

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 <andreykproductengine@lindenlab.com>
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/newview')

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<LLRenderTarget> & 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 <remmy@megapahit.net>
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/newview')

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 8f99590d58e02705d7baf799c3c4db6863eb36a4 Mon Sep 17 00:00:00 2001
From: Erik Kundiman <erik@megapahit.org>
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/newview')

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 <erik@megapahit.org>
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/newview/FixBundle.cmake.in  | 14 +++-----------
 indra/newview/FixPackage.cmake.in | 14 +++-----------
 2 files changed, 6 insertions(+), 22 deletions(-)

(limited to 'indra/newview')

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 <erik@megapahit.org>
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/newview')

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