From a43c11bbaa7e424d092636840198ca5d210dd979 Mon Sep 17 00:00:00 2001 From: Beq Date: Fri, 15 Aug 2025 14:22:21 +0100 Subject: [PATCH 01/12] Test containerised build on Linux with g++14 toolchain. --- .github/workflows/build_viewer.yml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build_viewer.yml b/.github/workflows/build_viewer.yml index 1aeb6d6b0c..e98c498e71 100644 --- a/.github/workflows/build_viewer.yml +++ b/.github/workflows/build_viewer.yml @@ -38,6 +38,9 @@ jobs: os: [macos-15,ubuntu-24.04,windows-2022] grid: [sl,os] variant: [regular, avx] + include: + - os: ubuntu-24.04 + container_image: ubuntu:22.04 # only Linux uses a container runs-on: ${{ matrix.os }} outputs: viewer_channel: ${{ steps.channel.outputs.viewer_channel }} @@ -101,12 +104,16 @@ jobs: with: swap-storage: false - # - name: Set gcc version on Linux - # if: runner.os == 'Linux' - # run: | - # echo "CC=gcc-10" >> $GITHUB_ENV - # echo "CXX=g++-10" >> $GITHUB_ENV - + - name: Install GCC-14 + if: runner.os == 'Linux' + run: | + apt-get update + apt-get install -y software-properties-common + add-apt-repository -y ppa:ubuntu-toolchain-r/test + apt-get update + apt-get install -y gcc-14 g++-14 + echo "CC=gcc-14" >> $GITHUB_ENV + echo "CXX=g++-14" >> $GITHUB_ENV - name: Setup rclone and download the folder uses: beqjanus/setup-rclone@main From 16a2ae0179094ac365d2e2ab4e66e7efc7c0cff0 Mon Sep 17 00:00:00 2001 From: Beq Date: Fri, 15 Aug 2025 17:02:34 +0100 Subject: [PATCH 02/12] Use sudo inside dockerised Ubuntu --- .github/workflows/build_viewer.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build_viewer.yml b/.github/workflows/build_viewer.yml index e98c498e71..45a4896b6e 100644 --- a/.github/workflows/build_viewer.yml +++ b/.github/workflows/build_viewer.yml @@ -29,7 +29,7 @@ env: fallback_platform: ${platform} FS_RELEASE_CHAN: ${FS_RELEASE_TYPE}x64 FS_GRID: "GRID FLAGS NOT SET" - PYTHON: + PYTHON: Unknown jobs: build_matrix: @@ -107,11 +107,11 @@ jobs: - name: Install GCC-14 if: runner.os == 'Linux' run: | - apt-get update - apt-get install -y software-properties-common - add-apt-repository -y ppa:ubuntu-toolchain-r/test - apt-get update - apt-get install -y gcc-14 g++-14 + sudo apt-get update + sudo apt-get install -y software-properties-common + sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test + sudo apt-get update + sudo apt-get install -y gcc-14 g++-14 echo "CC=gcc-14" >> $GITHUB_ENV echo "CXX=g++-14" >> $GITHUB_ENV From 683384987611403af095ca9b291bc5637b2125d2 Mon Sep 17 00:00:00 2001 From: Beq Date: Fri, 15 Aug 2025 18:12:38 +0100 Subject: [PATCH 03/12] Need to adjust runs-on to pick up the container properly --- .github/workflows/build_viewer.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_viewer.yml b/.github/workflows/build_viewer.yml index 45a4896b6e..5c8697fc82 100644 --- a/.github/workflows/build_viewer.yml +++ b/.github/workflows/build_viewer.yml @@ -42,6 +42,7 @@ jobs: - os: ubuntu-24.04 container_image: ubuntu:22.04 # only Linux uses a container runs-on: ${{ matrix.os }} + container: ${{ matrix.container_image }} outputs: viewer_channel: ${{ steps.channel.outputs.viewer_channel }} viewer_version: ${{ steps.version.outputs.viewer_version }} From 0898e6dbb8232eb23c9884a2780892b65b271764 Mon Sep 17 00:00:00 2001 From: minerjr Date: Fri, 15 Aug 2025 14:34:04 -0300 Subject: [PATCH 04/12] Fix RelWithDebug compile issue in gltf\asset.cpp In indra\newview\gltf\asset.cpp when you compile in Visual Studio for windows with RelWithDebug, there is a compiling error due to #if being used instead #ifdef as the rest of the codebase uses. This is with the latest Visual Studio 17.14.11. The error given is Severity Code Description Project File Line Suppression State Details Error (active) E0029 expected an expression firestorm-bin G:\minerjr\firestorm\phoenix-firestorm\indra\newview\gltf\asset.cpp 592 Just changed #if's to #ifdef. Also moved the second #if to #ifdef on line 611 up before the assert as in Release both checks use the attribute_mask which is not defined as its only exists when SHOW_ASSERT exists. --- indra/newview/gltf/asset.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/newview/gltf/asset.cpp b/indra/newview/gltf/asset.cpp index b9a8879fb1..e6dd9c1749 100644 --- a/indra/newview/gltf/asset.cpp +++ b/indra/newview/gltf/asset.cpp @@ -589,7 +589,7 @@ bool Asset::prep() for (U32 variant = 0; variant < LLGLSLShader::NUM_GLTF_VARIANTS; ++variant) { -#if SHOW_ASSERT +#ifdef SHOW_ASSERT U32 attribute_mask = 0; #endif // for each mesh @@ -606,10 +606,10 @@ bool Asset::prep() vertex_count[variant] += primitive.getVertexCount(); index_count[variant] += primitive.getIndexCount(); - +#ifdef SHOW_ASSERT // all primitives of a given variant and material should all have the same attribute mask llassert(attribute_mask == 0 || primitive.mAttributeMask == attribute_mask); -#if SHOW_ASSERT + attribute_mask |= primitive.mAttributeMask; #endif } From 42bf6d155e19236dc91bf492bb9ea6cb56e2f397 Mon Sep 17 00:00:00 2001 From: minerjr Date: Fri, 15 Aug 2025 19:54:21 -0300 Subject: [PATCH 05/12] Revert "Fix RelWithDebug compile issue in gltf\asset.cpp" This reverts commit 0898e6dbb8232eb23c9884a2780892b65b271764. --- indra/newview/gltf/asset.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/newview/gltf/asset.cpp b/indra/newview/gltf/asset.cpp index e6dd9c1749..b9a8879fb1 100644 --- a/indra/newview/gltf/asset.cpp +++ b/indra/newview/gltf/asset.cpp @@ -589,7 +589,7 @@ bool Asset::prep() for (U32 variant = 0; variant < LLGLSLShader::NUM_GLTF_VARIANTS; ++variant) { -#ifdef SHOW_ASSERT +#if SHOW_ASSERT U32 attribute_mask = 0; #endif // for each mesh @@ -606,10 +606,10 @@ bool Asset::prep() vertex_count[variant] += primitive.getVertexCount(); index_count[variant] += primitive.getIndexCount(); -#ifdef SHOW_ASSERT + // all primitives of a given variant and material should all have the same attribute mask llassert(attribute_mask == 0 || primitive.mAttributeMask == attribute_mask); - +#if SHOW_ASSERT attribute_mask |= primitive.mAttributeMask; #endif } From df2df95a88a3eac7f3166c98ff35894e9a4ca76b Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sat, 16 Aug 2025 11:46:57 +0200 Subject: [PATCH 06/12] Reapply "Fix RelWithDebug compile issue in gltf\asset.cpp" This reverts commit 42bf6d155e19236dc91bf492bb9ea6cb56e2f397. --- indra/newview/gltf/asset.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/newview/gltf/asset.cpp b/indra/newview/gltf/asset.cpp index b9a8879fb1..e6dd9c1749 100644 --- a/indra/newview/gltf/asset.cpp +++ b/indra/newview/gltf/asset.cpp @@ -589,7 +589,7 @@ bool Asset::prep() for (U32 variant = 0; variant < LLGLSLShader::NUM_GLTF_VARIANTS; ++variant) { -#if SHOW_ASSERT +#ifdef SHOW_ASSERT U32 attribute_mask = 0; #endif // for each mesh @@ -606,10 +606,10 @@ bool Asset::prep() vertex_count[variant] += primitive.getVertexCount(); index_count[variant] += primitive.getIndexCount(); - +#ifdef SHOW_ASSERT // all primitives of a given variant and material should all have the same attribute mask llassert(attribute_mask == 0 || primitive.mAttributeMask == attribute_mask); -#if SHOW_ASSERT + attribute_mask |= primitive.mAttributeMask; #endif } From 6f21013d89d081fd0b8abc2b6a1a2b1b74d8c70c Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sat, 16 Aug 2025 13:38:27 +0200 Subject: [PATCH 07/12] Fix long standing build issue due to bug in build variables --- indra/cmake/00-Common.cmake | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 1e9e9f695a..c120ad545d 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -17,14 +17,7 @@ include_guard() include(Variables) # We go to some trouble to set LL_BUILD to the set of relevant compiler flags. -# Use the previous version for Windows or the compile command line will be screwed up royally -if (WINDOWS) - set(CMAKE_CXX_FLAGS_RELEASE "$ENV{LL_BUILD_RELEASE}") - set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "$ENV{LL_BUILD_RELWITHDEBINFO}") - set(CMAKE_CXX_FLAGS_DEBUG "$ENV{LL_BUILD_DEBUG}") -else (WINDOWS) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} $ENV{LL_BUILD}") -endif (WINDOWS) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} $ENV{LL_BUILD}") # Given that, all the flags you see added below are flags NOT present in # https://bitbucket.org/lindenlab/viewer-build-variables/src/tip/variables. # Before adding new ones here, it's important to ask: can this flag really be From 806b4b1f9d148a7ac704bc1d162ca076cedd238f Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sat, 16 Aug 2025 13:38:39 +0200 Subject: [PATCH 08/12] Sync with upstream fix --- indra/newview/gltf/asset.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/indra/newview/gltf/asset.cpp b/indra/newview/gltf/asset.cpp index e6dd9c1749..c22ed4d1f5 100644 --- a/indra/newview/gltf/asset.cpp +++ b/indra/newview/gltf/asset.cpp @@ -606,10 +606,9 @@ bool Asset::prep() vertex_count[variant] += primitive.getVertexCount(); index_count[variant] += primitive.getIndexCount(); -#ifdef SHOW_ASSERT // all primitives of a given variant and material should all have the same attribute mask llassert(attribute_mask == 0 || primitive.mAttributeMask == attribute_mask); - +#ifdef SHOW_ASSERT attribute_mask |= primitive.mAttributeMask; #endif } From f7cdf005833a4556a25794ecb98464ca32846924 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sat, 16 Aug 2025 19:39:25 +0200 Subject: [PATCH 09/12] Refactor some old code for minor performance improvements because why not? :) --- indra/newview/llfloaterworldmap.cpp | 21 +++++++++++---------- indra/newview/llnetmap.cpp | 18 +++++++++--------- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index 6a958f2653..23874b4832 100644 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -586,8 +586,9 @@ void LLFloaterWorldMap::reshape( S32 width, S32 height, bool called_from_parent void LLFloaterWorldMap::draw() { // Performance improvement - static LLView* show_destination_btn = getChildView("Show Destination"); - static LLUICtrl* zoom_slider = getChild("zoom slider"); + static LLView* show_destination_btn = getChildView("Show Destination"); + static LLUICtrl* zoom_slider = getChild("zoom slider"); + static LLButton* track_region_btn = getChild("track_region"); // Performance improvement static LLUIColor map_track_color = LLUIColorTable::instance().getColor("MapTrackColor", LLColor4::white); @@ -663,7 +664,7 @@ void LLFloaterWorldMap::draw() mGoHomeButton->setEnabled((!rlv_handler_t::isEnabled()) || !(gRlvHandler.hasBehaviour(RLV_BHVR_TPLM) && gRlvHandler.hasBehaviour(RLV_BHVR_TPLOC))); // Performance improvement // Alchemy region tracker - getChild("track_region")->setEnabled((bool) tracking_status || LLWorldMap::getInstance()->isTracking()); + track_region_btn->setEnabled((bool) tracking_status || LLWorldMap::getInstance()->isTracking()); setMouseOpaque(true); getDragHandle()->setMouseOpaque(true); @@ -1224,13 +1225,13 @@ void LLFloaterWorldMap::buildAvatarIDList() //} std::multimap buddymap; - for(; it != end; ++it) + for (; it != end; ++it) { - buddymap.insert(std::make_pair((*it).second, (*it).first)); + buddymap.emplace(it->second, it->first); } - for (std::multimap::iterator bit = buddymap.begin(); bit != buddymap.end(); ++bit) + for (const auto& [name, id] : buddymap) { - mFriendCombo->addSimpleElement((*bit).first, ADD_BOTTOM, (*bit).second); + mFriendCombo->addSimpleElement(name, ADD_BOTTOM, id); } // @@ -1285,11 +1286,11 @@ void LLFloaterWorldMap::buildLandmarkIDLists() // Filter duplicate landmarks on world map if (filterLandmarks) { - if (used_landmarks.find(item->getAssetUUID()) != used_landmarks.end()) + if (used_landmarks.contains(item->getAssetUUID())) { continue; } - used_landmarks.insert(item->getAssetUUID()); + used_landmarks.emplace(item->getAssetUUID()); } // @@ -1936,7 +1937,7 @@ void LLFloaterWorldMap::updateSims(bool found_null_sim) if (num_results > 0) { - // Ansariel: Let's sort the list to make it more user-friendly + // Let's sort the list to make it more user-friendly mSearchResults->sortByColumn("sim_name", true); // if match found, highlight it and go diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index 09f7ec42a6..13370a4cca 100644 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -318,12 +318,12 @@ void LLNetMap::draw() } // : Synchronize netmap scale throughout instances -// Aurora Sim + // Aurora Sim if (!LLWorld::getInstance()->getAllowMinimap()) { return; } -// Aurora Sim + // Aurora Sim static LLUIColor map_avatar_color = LLUIColorTable::instance().getColor("MapAvatarColor", LLColor4::white); static LLUIColor map_track_color = LLUIColorTable::instance().getColor("MapTrackColor", LLColor4::white); @@ -699,7 +699,9 @@ void LLNetMap::draw() // Draw avatars for (U32 i = 0; i < avatar_ids.size(); i++) { - LLUUID uuid = avatar_ids[i]; + // Performance improvement + //LLUUID uuid = avatar_ids[i]; + const LLUUID& uuid = avatar_ids.at(i); // Skip self, we'll draw it later if (uuid == gAgent.getID()) continue; @@ -872,8 +874,8 @@ void LLNetMap::draw() F32 ctr_x = (F32)center_sw_left; F32 ctr_y = (F32)center_sw_bottom; - const F32 steps_per_circle = 40.0f; - const F32 steps_per_radian = steps_per_circle / F_TWO_PI; + constexpr F32 steps_per_circle = 40.0f; + constexpr F32 steps_per_radian = steps_per_circle / F_TWO_PI; const F32 arc_start = -(horiz_fov / 2.0f) + F_PI_BY_TWO; const F32 arc_end = (horiz_fov / 2.0f) + F_PI_BY_TWO; const S32 steps = llmax(1, (S32)((horiz_fov * steps_per_radian) + 0.5f)); @@ -1958,8 +1960,7 @@ void LLNetMap::handleClearMarks() // static bool LLNetMap::getAvatarMarkColor(const LLUUID& avatar_id, LLColor4& color) { - avatar_marks_map_t::iterator found = sAvatarMarksMap.find(avatar_id); - if (found != sAvatarMarksMap.end()) + if (auto found = sAvatarMarksMap.find(avatar_id); found != sAvatarMarksMap.end()) { color = found->second; return true; @@ -2025,8 +2026,7 @@ LLColor4 LLNetMap::getAvatarColor(const LLUUID& avatar_id) cs_instance.hasFriendColorThatShouldShow(avatar_id, ContactSetType::MINIMAP, color); // Mark Avatars with special colors - avatar_marks_map_t::iterator found = sAvatarMarksMap.find(avatar_id); - if (found != sAvatarMarksMap.end()) + if (auto found = sAvatarMarksMap.find(avatar_id); found != sAvatarMarksMap.end()) { color = found->second; } From 979593d5fb0e93f1841b5b5f222c6931ccfe058a Mon Sep 17 00:00:00 2001 From: Beq Date: Sun, 17 Aug 2025 14:18:02 +0100 Subject: [PATCH 10/12] Workaround container needing 22.04 python --- .github/workflows/build_viewer.yml | 36 +++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build_viewer.yml b/.github/workflows/build_viewer.yml index 5c8697fc82..2ddb158517 100644 --- a/.github/workflows/build_viewer.yml +++ b/.github/workflows/build_viewer.yml @@ -62,15 +62,39 @@ jobs: echo "$(brew --prefix)/opt/gnu-sed/libexec/gnubin" >> $GITHUB_PATH - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - id: py311 + # Use apt-based Python when inside the Ubuntu 22.04 container + - name: Install Python 3.11 (container case) + if: matrix.container_image == 'ubuntu:22.04' + id: py311_apt + run: | + apt-get update + DEBIAN_FRONTEND=noninteractive apt-get install -y \ + python3.11 python3.11-venv python3-pip + python3.11 -m pip install --upgrade pip setuptools wheel + echo "python-path=$(command -v python3.11)" >> "$GITHUB_OUTPUT" + # Use setup-python for all other jobs + - name: Set up Python (normal case) + if: matrix.container_image != 'ubuntu:22.04' + id: py311_setup + uses: actions/setup-python@v5 with: python-version: '3.11' - - - name: Set PYTHON environment for CMake - run: | - echo "PYTHON=${{ steps.py311.outputs.python-path }}" >> $GITHUB_ENV + check-latest: true + - name: resolve python path + id: py311 shell: bash + run: | + if [ -n "${{ steps.py311_apt.outputs.python-path }}" ]; then + PY="${{ steps.py311_apt.outputs.python-path }}" + else + PY="${{ steps.py311_setup.outputs.python-path }}" + fi + echo "python-path=$PY" >> "$GITHUB_OUTPUT" + echo "Resolved Python at: $PY" + - name: Set PYTHON environment for CMake + run: | + echo "PYTHON=${{ steps.py311.outputs.python-path }}" >> $GITHUB_ENV + shell: bash - name: Install python requirements run: | From dabf5cc037d6ce64371f99504e81c025f9ac11ef Mon Sep 17 00:00:00 2001 From: Beq Date: Sun, 17 Aug 2025 14:26:21 +0100 Subject: [PATCH 11/12] Fx indent --- .github/workflows/build_viewer.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build_viewer.yml b/.github/workflows/build_viewer.yml index 2ddb158517..f1ec69928d 100644 --- a/.github/workflows/build_viewer.yml +++ b/.github/workflows/build_viewer.yml @@ -90,12 +90,11 @@ jobs: PY="${{ steps.py311_setup.outputs.python-path }}" fi echo "python-path=$PY" >> "$GITHUB_OUTPUT" - echo "Resolved Python at: $PY" - - name: Set PYTHON environment for CMake - run: | - echo "PYTHON=${{ steps.py311.outputs.python-path }}" >> $GITHUB_ENV - shell: bash - + echo "Resolved Python at: $PY" + - name: Set PYTHON environment for CMake + run: | + echo "PYTHON=${{ steps.py311.outputs.python-path }}" >> $GITHUB_ENV + shell: bash - name: Install python requirements run: | python3 -m pip install -r requirements.txt From 2339174f66374e66762ec533458d68a8a641d9cf Mon Sep 17 00:00:00 2001 From: Beq Date: Sun, 17 Aug 2025 14:47:11 +0100 Subject: [PATCH 12/12] Ubuntu 22.04 python is not python3 (I think) --- .github/workflows/build_viewer.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_viewer.yml b/.github/workflows/build_viewer.yml index f1ec69928d..1b65b9e791 100644 --- a/.github/workflows/build_viewer.yml +++ b/.github/workflows/build_viewer.yml @@ -69,7 +69,7 @@ jobs: run: | apt-get update DEBIAN_FRONTEND=noninteractive apt-get install -y \ - python3.11 python3.11-venv python3-pip + python3.11 python3.11-venv python3-pip python-is-python3 python3.11 -m pip install --upgrade pip setuptools wheel echo "python-path=$(command -v python3.11)" >> "$GITHUB_OUTPUT" # Use setup-python for all other jobs