summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Linden <brad@lindenlab.com>2024-10-04 10:51:30 -0700
committerBrad Linden <brad@lindenlab.com>2024-10-04 10:52:37 -0700
commit2f07279ccaf5aecc45ed9a78d337e73ab58d89a7 (patch)
treed90b74f4ec320a3bc53a889eb5ba41d18b00ab52
parent16e4747dcd04c78b438570ee6dea4ccc52e7485c (diff)
parent4339ad9a528c82946ce40ec2bd240b41d104f338 (diff)
Merge remote-tracking branch 'origin/develop' into leviathan/game-control
-rw-r--r--.github/workflows/build.yaml3
-rw-r--r--autobuild.xml98
-rw-r--r--indra/CMakeLists.txt22
-rw-r--r--indra/cmake/00-Common.cmake4
-rw-r--r--indra/cmake/Havok.cmake37
-rw-r--r--indra/cmake/OPENAL.cmake6
-rw-r--r--indra/cmake/bugsplat.cmake8
-rw-r--r--indra/llrender/llgl.cpp6
-rw-r--r--indra/llui/llstyle.cpp6
-rw-r--r--indra/llwindow/llwindowsdl.cpp29
-rw-r--r--indra/newview/CMakeLists.txt2
-rw-r--r--indra/newview/lltexturectrl.cpp50
-rw-r--r--indra/newview/lltexturectrl.h1
13 files changed, 142 insertions, 130 deletions
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 4ab627bdfe..7df105e2d5 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -47,11 +47,10 @@ jobs:
continue-on-error: ${{ matrix.experimental }}
strategy:
matrix:
- runner: [windows-large, macos-12-xl]
+ runner: [windows-large, macos-12-xl, linux-large]
configuration: ${{ fromJSON(needs.setup.outputs.configurations) }}
include:
- runner: linux-large
- configuration: ReleaseOS
experimental: true
runs-on: ${{ matrix.runner }}
outputs:
diff --git a/autobuild.xml b/autobuild.xml
index a1af9879fc..4f187c3c18 100644
--- a/autobuild.xml
+++ b/autobuild.xml
@@ -888,11 +888,11 @@
<key>creds</key>
<string>github</string>
<key>hash</key>
- <string>ae2c2a215b1bc2e3f37a67e301926dc405902d1a</string>
+ <string>1648aeb68395cba38f9326c671609d6730cbcc28</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://api.github.com/repos/secondlife/3p-havok-source/releases/assets/136778143</string>
+ <string>https://api.github.com/repos/secondlife/3p-havok-source/releases/assets/196725921</string>
</map>
<key>name</key>
<string>darwin64</string>
@@ -904,11 +904,11 @@
<key>creds</key>
<string>github</string>
<key>hash</key>
- <string>ebfb82b6143874e7938b9d1e8a70d0a2e28aa818</string>
+ <string>702ad28b6dbace2a68260d69f6d1768d163b5a6f</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://api.github.com/repos/secondlife/3p-havok-source/releases/assets/108912599</string>
+ <string>https://api.github.com/repos/secondlife/3p-havok-source/releases/assets/196725902</string>
</map>
<key>name</key>
<string>linux64</string>
@@ -920,11 +920,11 @@
<key>creds</key>
<string>github</string>
<key>hash</key>
- <string>0393dd75c58f7046bed47e62a8884a78cb02a5c3</string>
+ <string>ea980f372981fe7685f91a111da2785825d473ed</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://api.github.com/repos/secondlife/3p-havok-source/releases/assets/136778145</string>
+ <string>https://api.github.com/repos/secondlife/3p-havok-source/releases/assets/196725911</string>
</map>
<key>name</key>
<string>windows64</string>
@@ -1457,11 +1457,11 @@
<key>creds</key>
<string>github</string>
<key>hash</key>
- <string>9e59c93c7110e87b4ff3db330f11a23c50e5000f</string>
+ <string>7facda95e2f00c260513f3d4db42588fa8ba703c</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://api.github.com/repos/secondlife/llphysicsextensions_source/releases/assets/178910560</string>
+ <string>https://api.github.com/repos/secondlife/llphysicsextensions_source/releases/assets/196289774</string>
</map>
<key>name</key>
<string>darwin64</string>
@@ -1473,11 +1473,11 @@
<key>creds</key>
<string>github</string>
<key>hash</key>
- <string>7ed994db5bafa9a7ad09a1b53da850a84715c65e</string>
+ <string>01d08f13c7bc8d1b95b0330fa6833b7d8274e4d0</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://api.github.com/repos/secondlife/llphysicsextensions_source/releases/assets/178910561</string>
+ <string>https://api.github.com/repos/secondlife/llphysicsextensions_source/releases/assets/196289775</string>
</map>
<key>name</key>
<string>linux64</string>
@@ -1489,11 +1489,11 @@
<key>creds</key>
<string>github</string>
<key>hash</key>
- <string>66824c02e0e5eabbfbe37bfb173360195f89697c</string>
+ <string>6d00345c7d3471bc5f7c1218e014dd0f1a2c069b</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://api.github.com/repos/secondlife/llphysicsextensions_source/releases/assets/178910562</string>
+ <string>https://api.github.com/repos/secondlife/llphysicsextensions_source/releases/assets/196289778</string>
</map>
<key>name</key>
<string>windows64</string>
@@ -1506,7 +1506,7 @@
<key>copyright</key>
<string>Copyright (c) 2010, Linden Research, Inc.</string>
<key>version</key>
- <string>1.0.66e6919</string>
+ <string>1.0.11137145495</string>
<key>name</key>
<string>llphysicsextensions_source</string>
</map>
@@ -2138,11 +2138,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>archive</key>
<map>
<key>hash</key>
- <string>191e4ef07a35f7147708415465191ce7622e3012</string>
+ <string>32371131845ad85bf35e89f7a8ec073b89eeb3f1</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-openal-soft/releases/download/v1.23.1-8668009/openal-1.23.1-darwin64-8979520327.tar.zst</string>
+ <string>https://github.com/secondlife/3p-openal-soft/releases/download/v1.23.1-0247dd8/openal-1.23.1-darwin64-11115781501.tar.zst</string>
</map>
<key>name</key>
<string>darwin64</string>
@@ -2152,11 +2152,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>archive</key>
<map>
<key>hash</key>
- <string>3bd8c9028ef42bdb43c7422e7d324e213fdb081e</string>
+ <string>14856fb33e205138731865b2d1bb680104f83dd3</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-openal-soft/releases/download/v1.23.1-8668009/openal-1.23.1-linux64-8979520327.tar.zst</string>
+ <string>https://github.com/secondlife/3p-openal-soft/releases/download/v1.23.1-0247dd8/openal-1.23.1-linux64-11115781501.tar.zst</string>
</map>
<key>name</key>
<string>linux64</string>
@@ -2166,11 +2166,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>archive</key>
<map>
<key>hash</key>
- <string>4b849609abec790e89be5fad8ddee3717ee301c4</string>
+ <string>c84665726c23fa6f5d25c7a46f5e9d0153834a2a</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-openal-soft/releases/download/v1.23.1-8668009/openal-1.23.1-windows64-8979520327.tar.zst</string>
+ <string>https://github.com/secondlife/3p-openal-soft/releases/download/v1.23.1-0247dd8/openal-1.23.1-windows64-11115781501.tar.zst</string>
</map>
<key>name</key>
<string>windows64</string>
@@ -3018,7 +3018,6 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<string>-DADDRESS_SIZE:STRING=$AUTOBUILD_ADDRSIZE</string>
<string>-DROOT_PROJECT_NAME:STRING=SecondLife</string>
<string>-DINSTALL_PROPRIETARY=TRUE</string>
- <string>-DUSE_OPENAL:BOOL=ON</string>
</array>
</map>
<key>build</key>
@@ -3060,7 +3059,6 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<string>-DADDRESS_SIZE:STRING=$AUTOBUILD_ADDRSIZE</string>
<string>-DROOT_PROJECT_NAME:STRING=SecondLife</string>
<string>-DINSTALL_PROPRIETARY=TRUE</string>
- <string>-DUSE_OPENAL:BOOL=ON</string>
</array>
</map>
<key>build</key>
@@ -3229,8 +3227,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>options</key>
<array>
<string>-G</string>
- <string>Ninja</string>
- <string>-DUSE_OPENAL:BOOL=ON</string>
+ <string>Unix Makefiles</string>
</array>
<key>arguments</key>
<array>
@@ -3240,7 +3237,16 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>build</key>
<map>
<key>command</key>
- <string>ninja</string>
+ <string>cmake</string>
+ <key>options</key>
+ <array>
+ <string>--build</string>
+ <string>.</string>
+ <string>--config</string>
+ <string>Release</string>
+ <string>--parallel</string>
+ <string>$AUTOBUILD_CPU_COUNT</string>
+ </array>
</map>
<key>default</key>
<string>True</string>
@@ -3254,14 +3260,22 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>options</key>
<array>
<string>-G</string>
- <string>Ninja</string>
- <string>-DUSE_OPENAL:BOOL=ON</string>
+ <string>Unix Makefiles</string>
</array>
</map>
<key>build</key>
<map>
<key>command</key>
- <string>ninja</string>
+ <string>cmake</string>
+ <key>options</key>
+ <array>
+ <string>--build</string>
+ <string>.</string>
+ <string>--config</string>
+ <string>Release</string>
+ <string>--parallel</string>
+ <string>$AUTOBUILD_CPU_COUNT</string>
+ </array>
</map>
<key>name</key>
<string>ReleaseOS</string>
@@ -3303,15 +3317,15 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>build</key>
<map>
<key>command</key>
- <string>devenv</string>
+ <string>cmake</string>
<key>options</key>
<array>
- <string>/build</string>
- <string>RelWithDebInfo|${AUTOBUILD_WIN_VSPLATFORM|NOTWIN}</string>
- </array>
- <key>arguments</key>
- <array>
- <string>SecondLife.sln</string>
+ <string>--build</string>
+ <string>.</string>
+ <string>--config</string>
+ <string>RelWithDebInfo</string>
+ <string>--parallel</string>
+ <string>$AUTOBUILD_CPU_COUNT</string>
</array>
</map>
<key>default</key>
@@ -3331,7 +3345,6 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<string>${AUTOBUILD_WIN_VSPLATFORM|NOTWIN}</string>
<string>-DINSTALL_PROPRIETARY=FALSE</string>
<string>-DUSE_KDU=FALSE</string>
- <string>-DUSE_OPENAL:BOOL=ON</string>
</array>
<key>arguments</key>
<array>
@@ -3378,15 +3391,15 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>build</key>
<map>
<key>command</key>
- <string>devenv</string>
+ <string>cmake</string>
<key>options</key>
<array>
- <string>/build</string>
- <string>Release|${AUTOBUILD_WIN_VSPLATFORM|NOTWIN}</string>
- </array>
- <key>arguments</key>
- <array>
- <string>SecondLife.sln</string>
+ <string>--build</string>
+ <string>.</string>
+ <string>--config</string>
+ <string>Release</string>
+ <string>--parallel</string>
+ <string>$AUTOBUILD_CPU_COUNT</string>
</array>
</map>
<key>name</key>
@@ -3405,7 +3418,6 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<string>-DUNATTENDED:BOOL=ON</string>
<string>-DINSTALL_PROPRIETARY=FALSE</string>
<string>-DUSE_KDU=FALSE</string>
- <string>-DUSE_OPENAL:BOOL=ON</string>
</array>
<key>arguments</key>
<array>
diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt
index 422927704a..3be8ebafa8 100644
--- a/indra/CMakeLists.txt
+++ b/indra/CMakeLists.txt
@@ -82,17 +82,17 @@ if (ENABLE_MEDIA_PLUGINS)
add_subdirectory(${LIBS_OPEN_PREFIX}media_plugins)
endif (ENABLE_MEDIA_PLUGINS)
-if (LINUX)
- if (INSTALL_PROPRIETARY)
- include(LLAppearanceUtility)
- add_subdirectory(${LLAPPEARANCEUTILITY_SRC_DIR} ${LLAPPEARANCEUTILITY_BIN_DIR})
- endif (INSTALL_PROPRIETARY)
-elseif (WINDOWS)
- # cmake EXISTS requires an absolute path, see indra/cmake/Variables.cmake
- if (EXISTS ${VIEWER_DIR}win_setup)
- add_subdirectory(${VIEWER_DIR}win_setup)
- endif (EXISTS ${VIEWER_DIR}win_setup)
-endif (LINUX)
+# if (LINUX)
+# if (INSTALL_PROPRIETARY)
+# include(LLAppearanceUtility)
+# add_subdirectory(${LLAPPEARANCEUTILITY_SRC_DIR} ${LLAPPEARANCEUTILITY_BIN_DIR})
+# endif (INSTALL_PROPRIETARY)
+# elseif (WINDOWS)
+# # cmake EXISTS requires an absolute path, see indra/cmake/Variables.cmake
+# if (EXISTS ${VIEWER_DIR}win_setup)
+# add_subdirectory(${VIEWER_DIR}win_setup)
+# endif (EXISTS ${VIEWER_DIR}win_setup)
+# endif (LINUX)
if (WINDOWS)
# cmake EXISTS requires an absolute path, see indra/cmake/Variables.cmake
diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake
index be38574041..fc18ffebb5 100644
--- a/indra/cmake/00-Common.cmake
+++ b/indra/cmake/00-Common.cmake
@@ -178,7 +178,7 @@ if (DARWIN)
set(CLANG_DISABLE_FATAL_WARNINGS OFF)
set(CMAKE_CXX_LINK_FLAGS "-Wl,-headerpad_max_install_names,-search_paths_first")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_CXX_LINK_FLAGS}")
- set(DARWIN_extra_cstar_flags "-Wno-unused-local-typedef -Wno-deprecated-declarations")
+ set(DARWIN_extra_cstar_flags "-Wno-deprecated-declarations")
# Ensure that CMAKE_CXX_FLAGS has the correct -g debug information format --
# see Variables.cmake.
string(REPLACE "-gdwarf-2" "-g${CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT}"
@@ -197,7 +197,7 @@ if (DARWIN)
endif(DARWIN)
if(LINUX OR DARWIN)
- add_compile_options(-Wall -Wno-sign-compare -Wno-trigraphs -Wno-reorder -Wno-unused-but-set-variable -Wno-unused-variable)
+ add_compile_options(-Wall -Wno-sign-compare -Wno-trigraphs -Wno-reorder -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unused-local-typedef)
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
add_compile_options(-Wno-stringop-truncation -Wno-parentheses -Wno-c++20-compat)
diff --git a/indra/cmake/Havok.cmake b/indra/cmake/Havok.cmake
index c544440adc..64e33f6c83 100644
--- a/indra/cmake/Havok.cmake
+++ b/indra/cmake/Havok.cmake
@@ -27,26 +27,26 @@ else (LL_DEBUG_HAVOK)
endif (LL_DEBUG_HAVOK)
set(HAVOK_LIBS
- hkBase
- hkCompat
+ hkgpConvexDecomposition
hkGeometryUtilities
- hkInternal
hkSerialize
hkSceneData
hkpCollide
hkpUtilities
hkpConstraintSolver
hkpDynamics
- hkpInternal
- hkaiInternal
hkaiPathfinding
hkaiAiPhysicsBridge
- hkcdInternal
hkcdCollide
hkpVehicle
hkVisualize
hkaiVisualize
- hkgpConvexDecomposition
+ hkaiInternal
+ hkcdInternal
+ hkpInternal
+ hkInternal
+ hkCompat
+ hkBase
)
unset(HK_DEBUG_LIBRARIES)
@@ -60,16 +60,22 @@ if (DEBUG_PREBUILT)
# but making it pretty is a lot more work
message(STATUS "${ARGN}")
endfunction(DEBUG_MESSAGE)
+ function(DEBUG_EXEC_FUNC)
+ execute_process(COMMAND ${ARGN})
+ endfunction(DEBUG_EXEC_FUNC)
else (DEBUG_PREBUILT)
# without DEBUG_PREBUILT, DEBUG_MESSAGE() is a no-op
function(DEBUG_MESSAGE)
endfunction(DEBUG_MESSAGE)
+ function(DEBUG_EXEC_FUNC)
+ execute_process(COMMAND ${ARGN} OUTPUT_QUIET)
+ endfunction(DEBUG_EXEC_FUNC)
endif (DEBUG_PREBUILT)
# DEBUG_EXEC() reports each execute_process() before invoking
function(DEBUG_EXEC)
DEBUG_MESSAGE(${ARGN})
- execute_process(COMMAND ${ARGN})
+ DEBUG_EXEC_FUNC(${ARGN})
endfunction(DEBUG_EXEC)
# *TODO: Figure out why we need to extract like this...
@@ -79,9 +85,7 @@ foreach(HAVOK_LIB ${HAVOK_LIBS})
find_library(HAVOK_RELWITHDEBINFO_LIB_${HAVOK_LIB} ${HAVOK_LIB} PATHS ${HAVOK_RELWITHDEBINFO_LIBRARY_PATH})
if(LINUX)
- set(debug_dir "${HAVOK_DEBUG_LIBRARY_PATH}/${HAVOK_LIB}")
set(release_dir "${HAVOK_RELEASE_LIBRARY_PATH}/${HAVOK_LIB}")
- set(relwithdebinfo_dir "${HAVOK_RELWITHDEBINFO_LIBRARY_PATH}/${HAVOK_LIB}")
# Try to avoid extracting havok library each time we run cmake.
if("${havok_${HAVOK_LIB}_extracted}" STREQUAL "" AND EXISTS "${PREBUILD_TRACKING_DIR}/havok_${HAVOK_LIB}_extracted")
@@ -92,8 +96,8 @@ foreach(HAVOK_LIB ${HAVOK_LIBS})
if(${PREBUILD_TRACKING_DIR}/havok_source_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/havok_${HAVOK_LIB}_extracted OR NOT ${havok_${HAVOK_LIB}_extracted} EQUAL 0)
DEBUG_MESSAGE("Extracting ${HAVOK_LIB}...")
- foreach(lib ${debug_dir} ${release_dir} ${relwithdebinfo_dir})
- DEBUG_EXEC("mkdir" ${lib})
+ foreach(lib ${release_dir})
+ DEBUG_EXEC("mkdir" "-p" ${lib})
DEBUG_EXEC("ar" "-xv" "../lib${HAVOK_LIB}.a"
WORKING_DIRECTORY ${lib})
endforeach(lib)
@@ -104,17 +108,12 @@ foreach(HAVOK_LIB ${HAVOK_LIBS})
endif()
- file(GLOB extracted_debug "${debug_dir}/*.o")
file(GLOB extracted_release "${release_dir}/*.o")
- file(GLOB extracted_relwithdebinfo "${relwithdebinfo_dir}/*.o")
-
- DEBUG_MESSAGE("extracted_debug ${debug_dir}/*.o")
DEBUG_MESSAGE("extracted_release ${release_dir}/*.o")
- DEBUG_MESSAGE("extracted_relwithdebinfo ${relwithdebinfo_dir}/*.o")
- list(APPEND HK_DEBUG_LIBRARIES ${extracted_debug})
+ list(APPEND HK_DEBUG_LIBRARIES ${extracted_release})
list(APPEND HK_RELEASE_LIBRARIES ${extracted_release})
- list(APPEND HK_RELWITHDEBINFO_LIBRARIES ${extracted_relwithdebinfo})
+ list(APPEND HK_RELWITHDEBINFO_LIBRARIES ${extracted_release})
else(LINUX)
# Win32
list(APPEND HK_DEBUG_LIBRARIES ${HAVOK_DEBUG_LIB_${HAVOK_LIB}})
diff --git a/indra/cmake/OPENAL.cmake b/indra/cmake/OPENAL.cmake
index 347dd02cd7..355907bcf5 100644
--- a/indra/cmake/OPENAL.cmake
+++ b/indra/cmake/OPENAL.cmake
@@ -4,11 +4,7 @@ include(Prebuilt)
include_guard()
-# ND: Turn this off by default, the openal code in the viewer isn't very well maintained, seems
-# to have memory leaks, has no option to play music streams
-# It probably makes sense to to completely remove it
-
-set(USE_OPENAL OFF CACHE BOOL "Enable OpenAL")
+set(USE_OPENAL ON CACHE BOOL "Enable OpenAL")
# ND: To streamline arguments passed, switch from OPENAL to USE_OPENAL
# To not break all old build scripts convert old arguments but warn about it
if(OPENAL)
diff --git a/indra/cmake/bugsplat.cmake b/indra/cmake/bugsplat.cmake
index 509981d72c..0798d4f51f 100644
--- a/indra/cmake/bugsplat.cmake
+++ b/indra/cmake/bugsplat.cmake
@@ -1,13 +1,13 @@
-if (INSTALL_PROPRIETARY)
+if (INSTALL_PROPRIETARY AND NOT LINUX)
# Note that viewer_manifest.py makes decision based on BUGSPLAT_DB and not USE_BUGSPLAT
if (BUGSPLAT_DB)
set(USE_BUGSPLAT ON CACHE BOOL "Use the BugSplat crash reporting system")
else (BUGSPLAT_DB)
set(USE_BUGSPLAT OFF CACHE BOOL "Use the BugSplat crash reporting system")
endif (BUGSPLAT_DB)
-else (INSTALL_PROPRIETARY)
+else (INSTALL_PROPRIETARY AND NOT LINUX)
set(USE_BUGSPLAT OFF CACHE BOOL "Use the BugSplat crash reporting system")
-endif (INSTALL_PROPRIETARY)
+endif (INSTALL_PROPRIETARY AND NOT LINUX)
include_guard()
add_library( ll::bugsplat INTERFACE IMPORTED )
@@ -36,6 +36,6 @@ if (USE_BUGSPLAT)
set_property( TARGET ll::bugsplat APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS LL_BUGSPLAT)
else()
- set(BUGSPLAT_DB "" CACHE STRING "BugSplat crash database name")
+ set(BUGSPLAT_DB "" CACHE STRING "BugSplat crash database name" FORCE)
endif (USE_BUGSPLAT)
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp
index a9627a87d3..b4fe711859 100644
--- a/indra/llrender/llgl.cpp
+++ b/indra/llrender/llgl.cpp
@@ -1140,7 +1140,11 @@ bool LLGLManager::initGL()
// Trailing space necessary to keep "nVidia Corpor_ati_on" cards
// from being recognized as ATI.
// NOTE: AMD has been pretty good about not breaking this check, do not rename without good reason
- if (mGLVendor.substr(0,4) == "ATI ")
+ if (mGLVendor.substr(0,4) == "ATI "
+#if LL_LINUX
+ || mGLVendor.find("AMD") != std::string::npos
+#endif //LL_LINUX
+ )
{
mGLVendorShort = "AMD";
// *TODO: Fix this?
diff --git a/indra/llui/llstyle.cpp b/indra/llui/llstyle.cpp
index f1d57a2273..aafcfbc143 100644
--- a/indra/llui/llstyle.cpp
+++ b/indra/llui/llstyle.cpp
@@ -66,9 +66,9 @@ LLStyle* LLStyle::makeCopy() const
copy->mDropShadow = mDropShadow;
copy->mFontName = mFontName;
copy->mLink = mLink;
- copy->mColor = mColor;
- copy->mReadOnlyColor = mReadOnlyColor;
- copy->mSelectedColor = mSelectedColor;
+ copy->mColor.set(mColor.get());
+ copy->mReadOnlyColor.set(mReadOnlyColor.get());
+ copy->mSelectedColor.set(mSelectedColor.get());
copy->mFont = mFont;
copy->mImagep = mImagep;
copy->mAlpha = mAlpha;
diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp
index f88feadbc1..ea95a5aa2e 100644
--- a/indra/llwindow/llwindowsdl.cpp
+++ b/indra/llwindow/llwindowsdl.cpp
@@ -281,34 +281,17 @@ bool LLWindowSDL::createContext(int x, int y, int width, int height, int bits, b
// Setup default backing colors
GLint redBits{8}, greenBits{8}, blueBits{8}, alphaBits{8};
- GLint depthBits{(bits <= 16) ? 16 : 24}, stencilBits{8};
-
- if (getenv("LL_GL_NO_STENCIL"))
- stencilBits = 0;
+ GLint depthBits{24}, stencilBits{8};
SDL_GL_SetAttribute(SDL_GL_RED_SIZE, redBits);
SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, greenBits);
SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, blueBits);
SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE, alphaBits);
SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, depthBits);
-
- // We need stencil support for a few (minor) things.
- if (stencilBits)
- SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, stencilBits);
+ SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, stencilBits);
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
- if (LLRender::sGLCoreProfile)
- {
- SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
- }
-
- // This is requesting a minimum context version
- int major_gl_version = 3;
- int minor_gl_version = 2;
- SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, major_gl_version);
- SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, minor_gl_version);
-
U32 context_flags = 0;
if (gDebugGL)
{
@@ -339,7 +322,7 @@ bool LLWindowSDL::createContext(int x, int y, int width, int height, int bits, b
{
LL_WARNS() << "Failed to make context current. SDL: " << SDL_GetError() << LL_ENDL;
setupFailure("GL Context failed to set current failure", "Error", OSMB_OK);
- return FALSE;
+ return false;
}
mSurface = SDL_GetWindowSurface(mWindow);
@@ -654,7 +637,7 @@ bool LLWindowSDL::getVisible() const
Uint32 flags = SDL_GetWindowFlags(mWindow);
if (flags & SDL_WINDOW_SHOWN)
{
- result = TRUE;
+ result = true;
}
}
return result;
@@ -694,9 +677,9 @@ bool LLWindowSDL::maximize()
if (mWindow)
{
SDL_MaximizeWindow(mWindow);
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
bool LLWindowSDL::getPosition(LLCoordScreen *position) const
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 805b829b76..6c8d7b910e 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -1874,7 +1874,7 @@ else (WINDOWS)
# Linux
set_target_properties(${VIEWER_BINARY_NAME}
PROPERTIES
- LINK_FLAGS_RELEASE "${LINK_FLAGS_RELEASE} -Wl,--Map=${VIEWER_BINARY_NAME}.MAP"
+ LINK_FLAGS_RELEASE "${LINK_FLAGS_RELEASE} -no-pie -Wl,--Map=${VIEWER_BINARY_NAME}.MAP"
)
endif (WINDOWS)
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp
index 35057a910a..db3e6335ec 100644
--- a/indra/newview/lltexturectrl.cpp
+++ b/indra/newview/lltexturectrl.cpp
@@ -185,7 +185,8 @@ LLFloaterTexturePicker::LLFloaterTexturePicker(
mSetImageAssetIDCallback(NULL),
mOnUpdateImageStatsCallback(NULL),
mBakeTextureEnabled(false),
- mInventoryPickType(pick_type)
+ mInventoryPickType(pick_type),
+ mSelectionSource(PICKER_UNKNOWN)
{
mCanApplyImmediately = can_apply_immediately;
buildFromFile("floater_texture_ctrl.xml");
@@ -203,6 +204,7 @@ void LLFloaterTexturePicker::setImageID(const LLUUID& image_id, bool set_selecti
mNoCopyTextureSelected = false;
mViewModel->setDirty(); // *TODO: shouldn't we be using setValue() here?
mImageAssetID = image_id;
+ mSelectionSource = PICKER_UNKNOWN;
if (LLAvatarAppearanceDefines::LLAvatarAppearanceDictionary::isBakedImageId(mImageAssetID))
{
@@ -211,6 +213,7 @@ void LLFloaterTexturePicker::setImageID(const LLUUID& image_id, bool set_selecti
mModeSelector->selectByValue(2);
onModeSelect(0,this);
}
+ mSelectionSource = PICKER_BAKE;
}
else
{
@@ -257,6 +260,7 @@ void LLFloaterTexturePicker::setImageID(const LLUUID& image_id, bool set_selecti
getChild<LLUICtrl>("apply_immediate_check")->setValue(false);
mNoCopyTextureSelected = true;
}
+ mSelectionSource = PICKER_INVENTORY;
}
if (set_selection)
@@ -276,6 +280,7 @@ void LLFloaterTexturePicker::setImageIDFromItem(const LLInventoryItem* itemp, bo
asset_id = BLANK_MATERIAL_ASSET_ID;
}
setImageID(asset_id, set_selection);
+ mSelectionSource = PICKER_INVENTORY;
}
void LLFloaterTexturePicker::setActive( bool active )
@@ -890,10 +895,15 @@ void LLFloaterTexturePicker::commitCallback(LLTextureCtrl::ETexturePickOp op)
{
return;
}
+
LLUUID asset_id = mImageAssetID;
LLUUID inventory_id;
LLUUID tracking_id;
- LLPickerSource mode = (LLPickerSource)mModeSelector->getValue().asInteger();
+ LLPickerSource mode = mSelectionSource;
+ if (mode == PICKER_UNKNOWN)
+ {
+ mode = (LLPickerSource)mModeSelector->getValue().asInteger();
+ }
switch (mode)
{
@@ -919,11 +929,13 @@ void LLFloaterTexturePicker::commitCallback(LLTextureCtrl::ETexturePickOp op)
}
else
{
+ // Item's asset id changed?
mode = PICKER_UNKNOWN; // source of id unknown
}
}
else
{
+ // Item could have been removed from inventory
mode = PICKER_UNKNOWN; // source of id unknown
}
break;
@@ -947,6 +959,7 @@ void LLFloaterTexturePicker::commitCallback(LLTextureCtrl::ETexturePickOp op)
}
else
{
+ // List could have been emptied, with local image still selected
asset_id = mImageAssetID;
mode = PICKER_UNKNOWN; // source of id unknown
}
@@ -1000,18 +1013,6 @@ void LLFloaterTexturePicker::onBtnNone(void* userdata)
self->commitIfImmediateSet();
}
-/*
-// static
-void LLFloaterTexturePicker::onBtnRevert(void* userdata)
-{
- LLFloaterTexturePicker* self = (LLFloaterTexturePicker*) userdata;
- self->setImageID( self->mOriginalImageAssetID );
- // TODO: Change this to tell the owner to cancel. It needs to be
- // smart enough to restore multi-texture selections.
- self->mOwner->onFloaterCommit();
- self->mViewModel->resetDirty();
-}*/
-
// static
void LLFloaterTexturePicker::onBtnCancel(void* userdata)
{
@@ -1029,8 +1030,11 @@ void LLFloaterTexturePicker::onBtnCancel(void* userdata)
void LLFloaterTexturePicker::onBtnSelect(void* userdata)
{
LLFloaterTexturePicker* self = (LLFloaterTexturePicker*) userdata;
- if (self->mOnFloaterCommitCallback)
+ if (self->mViewModel->isDirty() && self->mOnFloaterCommitCallback)
{
+ // If nothing changed, don't commit.
+ // ex: can overwrite multiple original textures with a single one.
+ // or resubmit something thus overriding some other source of change
self->commitCallback(LLTextureCtrl::TEXTURE_SELECT);
}
self->closeFloater();
@@ -1067,8 +1071,18 @@ void LLFloaterTexturePicker::onSelectionChange(const std::deque<LLFolderViewItem
{
mNoCopyTextureSelected = true;
}
+ bool was_dirty = mViewModel->isDirty();
setImageIDFromItem(itemp, false);
- mViewModel->setDirty(); // *TODO: shouldn't we be using setValue() here?
+ if (user_action)
+ {
+ mViewModel->setDirty(); // *TODO: shouldn't we be using setValue() here?
+ setTentative( false );
+ }
+ else if (!was_dirty)
+ {
+ // setImageIDFromItem could have dropped the flag
+ mViewModel->resetDirty();
+ }
if(!mPreviewSettingChanged)
{
@@ -1215,6 +1229,8 @@ void LLFloaterTexturePicker::onLocalScrollCommit(LLUICtrl* ctrl, void* userdata)
inworld_id = LLLocalBitmapMgr::getInstance()->getWorldID(tracking_id);
}
+ self->mSelectionSource = PICKER_LOCAL;
+
if (self->mSetImageAssetIDCallback)
{
self->mSetImageAssetIDCallback(inworld_id);
@@ -1312,6 +1328,7 @@ void LLFloaterTexturePicker::onBakeTextureSelect(LLUICtrl* ctrl, void *user_data
// only commit intentional selections, not implicit ones
self->commitIfImmediateSet();
}
+ self->mSelectionSource = PICKER_BAKE;
}
void LLFloaterTexturePicker::setCanApply(bool can_preview, bool can_apply, bool inworld_image)
@@ -1627,6 +1644,7 @@ void LLFloaterTexturePicker::onTextureSelect( const LLTextureEntry& te )
// no copy texture
mNoCopyTextureSelected = true;
}
+ mSelectionSource = PICKER_INVENTORY;
commitIfImmediateSet();
}
diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h
index df5e763139..e4d877e229 100644
--- a/indra/newview/lltexturectrl.h
+++ b/indra/newview/lltexturectrl.h
@@ -447,6 +447,7 @@ private:
S32 mMaxDim;
S32 mMinDim;
EPickInventoryType mInventoryPickType;
+ LLPickerSource mSelectionSource;
texture_selected_callback mTextureSelectedCallback;