From c2730b4fffe580bc99f29f1ba37aa45427f99b93 Mon Sep 17 00:00:00 2001 From: Vir Linden <60274682+vir-linden@users.noreply.github.com> Date: Fri, 19 Apr 2024 16:44:59 +0100 Subject: [PATCH 01/12] https://github.com/secondlife/viewer/issues/1286 - determine viewer_channel from branch name in builds --- .github/workflows/build.yaml | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 1dd2c1d5dfa..3abb43b2b2e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -5,7 +5,7 @@ on: pull_request: push: branches: ["main", "release/*", "project/*"] - tags: ["Second_Life_*"] + tags: ["Second_Life*"] jobs: build: @@ -170,13 +170,18 @@ jobs: # seen before, so numerous tests don't know about it. [[ "$arch" == "MINGW6" ]] && arch=CYGWIN export AUTOBUILD="$(which autobuild)" - # Build with a tag like "Second_Life_Project_Shiny#abcdef0" to get a - # viewer channel "Second Life Project Shiny" (ignoring "#hash", - # needed to disambiguate tags). - if [[ "$GITHUB_REF_TYPE" == "tag" && "${GITHUB_REF_NAME:0:12}" == "Second_Life_" ]] - then viewer_channel="${GITHUB_REF_NAME%#*}" - export viewer_channel="${viewer_channel//_/ }" - else export viewer_channel="Second Life Test" + + # determine the viewer channel from the branch name + IFS='/' read -ra ba <<< "$AUTOBUILD_VCS_BRANCH" + prefix=${ba[0]} + if [ "$prefix" == "project" ]; then + proj_name=$(echo ${ba[1]} | sed -e 's/_/ /g' | awk '{for(i=1;i<=NF;i++) $i=toupper(substr($i,1,1)) tolower(substr($i,2));}1') + export viewer_channel="Second Life Project $proj_name" + elif [ "$prefix" == "release" ] || [ "$prefix" == "main" ]; + then + export viewer_channel="Second Life Release" + else + export viewer_channel="Second Life Test" fi echo "viewer_channel=$viewer_channel" >> "$GITHUB_OUTPUT" @@ -326,7 +331,8 @@ jobs: release: needs: [sign-and-package-windows, sign-and-package-mac] runs-on: ubuntu-latest - if: github.ref_type == 'tag' && startsWith(github.ref_name, 'Second_Life_') + # Build with a tag like "Second_Life#abcdef0" to generate a release page (used for builds we are planning to deploy). + if: github.ref_type == 'tag' && startsWith(github.ref_name, 'Second_Life') steps: - uses: actions/download-artifact@v3 with: From f39987f3828fca4520db335582daadd9bc484255 Mon Sep 17 00:00:00 2001 From: Vir Linden <60274682+vir-linden@users.noreply.github.com> Date: Fri, 19 Apr 2024 19:47:46 +0100 Subject: [PATCH 02/12] https://github.com/secondlife/viewer/issues/1286 - branch var from github.repository --- .github/workflows/build.yaml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 3abb43b2b2e..f948669f320 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -172,10 +172,12 @@ jobs: export AUTOBUILD="$(which autobuild)" # determine the viewer channel from the branch name - IFS='/' read -ra ba <<< "$AUTOBUILD_VCS_BRANCH" - prefix=${ba[0]} + branch=${{ github.repository }} + IFS='/' read -ra ba <<< $branch + username=${ba[0]} + prefix=${ba[1]} if [ "$prefix" == "project" ]; then - proj_name=$(echo ${ba[1]} | sed -e 's/_/ /g' | awk '{for(i=1;i<=NF;i++) $i=toupper(substr($i,1,1)) tolower(substr($i,2));}1') + proj_name=$(echo ${ba[2]} | sed -e 's/_/ /g' | awk '{for(i=1;i<=NF;i++) $i=toupper(substr($i,1,1)) tolower(substr($i,2));}1') export viewer_channel="Second Life Project $proj_name" elif [ "$prefix" == "release" ] || [ "$prefix" == "main" ]; then @@ -184,7 +186,7 @@ jobs: export viewer_channel="Second Life Test" fi echo "viewer_channel=$viewer_channel" >> "$GITHUB_OUTPUT" - + exit 1 # On windows we need to point the build to the correct python # as neither CMake's FindPython nor our custom Python.cmake module # will resolve the correct interpreter location. From a65de9354196984fc78b82a7505723ab7f916f97 Mon Sep 17 00:00:00 2001 From: Vir Linden <60274682+vir-linden@users.noreply.github.com> Date: Fri, 19 Apr 2024 19:51:19 +0100 Subject: [PATCH 03/12] https://github.com/secondlife/viewer/issues/1286 - branch var from github.repository --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index f948669f320..20078f2e00c 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -173,6 +173,7 @@ jobs: # determine the viewer channel from the branch name branch=${{ github.repository }} + echo "branch=$branch" >> "$GITHUB_OUTPUT" IFS='/' read -ra ba <<< $branch username=${ba[0]} prefix=${ba[1]} @@ -186,7 +187,6 @@ jobs: export viewer_channel="Second Life Test" fi echo "viewer_channel=$viewer_channel" >> "$GITHUB_OUTPUT" - exit 1 # On windows we need to point the build to the correct python # as neither CMake's FindPython nor our custom Python.cmake module # will resolve the correct interpreter location. From 6ca4dfdb56d0107368a09af2b089c24d32e7108d Mon Sep 17 00:00:00 2001 From: Vir Linden <60274682+vir-linden@users.noreply.github.com> Date: Fri, 19 Apr 2024 16:16:26 -0400 Subject: [PATCH 04/12] Update build.yaml --- .github/workflows/build.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 20078f2e00c..ee02ed58e86 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -59,8 +59,13 @@ jobs: - name: Checkout code uses: actions/checkout@v4 with: - ref: ${{ github.event.pull_request.head.sha || github.sha }} - + ref: ${{ github.event.pull_request.head.sha || github.sha }} + + - name: Dump GitHub context + env: + GITHUB_CONTEXT: ${{ toJson(github) }} + run: echo "$GITHUB_CONTEXT" + - name: Setup python uses: actions/setup-python@v4 with: From f886a438ed11468a90ecca9ba8046a6719f0402c Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 25 Apr 2024 13:58:15 -0400 Subject: [PATCH 05/12] Adapt llimageworker_test for updated virtual method API. This was a broken test that got all the way to viewer release and the main branch. (cherry picked from commit a33a9d29380e6c1a0a9cc539be309d47adef4acf) --- indra/llimage/tests/llimageworker_test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/llimage/tests/llimageworker_test.cpp b/indra/llimage/tests/llimageworker_test.cpp index 0a97b739b09..ffcd7d257f6 100644 --- a/indra/llimage/tests/llimageworker_test.cpp +++ b/indra/llimage/tests/llimageworker_test.cpp @@ -98,7 +98,7 @@ namespace tut done = res; *done = false; } - virtual void completed(bool success, LLImageRaw* raw, LLImageRaw* aux) + virtual void completed(bool success, LLImageRaw* raw, LLImageRaw* aux, U32) { *done = true; } From 65495ba7655cbe17d282536a8c2a21d2ac29de23 Mon Sep 17 00:00:00 2001 From: Vir Linden <60274682+vir-linden@users.noreply.github.com> Date: Wed, 1 May 2024 16:42:09 +0100 Subject: [PATCH 06/12] set viewer channel from branch --- .github/workflows/build.yaml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 813b6a96efe..42d6562db63 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -59,11 +59,6 @@ jobs: uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha || github.sha }} - - - name: Dump GitHub context - env: - GITHUB_CONTEXT: ${{ toJson(github) }} - run: echo "$GITHUB_CONTEXT" - name: Setup python uses: actions/setup-python@v5 @@ -183,13 +178,12 @@ jobs: export AUTOBUILD="$(which autobuild)" # determine the viewer channel from the branch name - branch=${{ github.repository }} + branch=$AUTOBUILD_VCS_BRANCH echo "branch=$branch" >> "$GITHUB_OUTPUT" IFS='/' read -ra ba <<< $branch - username=${ba[0]} - prefix=${ba[1]} + prefix=${ba[0]} if [ "$prefix" == "project" ]; then - proj_name=$(echo ${ba[2]} | sed -e 's/_/ /g' | awk '{for(i=1;i<=NF;i++) $i=toupper(substr($i,1,1)) tolower(substr($i,2));}1') + proj_name=$(echo ${ba[1]} | sed -e 's/_/ /g' | awk '{for(i=1;i<=NF;i++) $i=toupper(substr($i,1,1)) tolower(substr($i,2));}1') export viewer_channel="Second Life Project $proj_name" elif [ "$prefix" == "release" ] || [ "$prefix" == "main" ]; then From 7f23f160d7520034afd8c3be8a184eac1716227a Mon Sep 17 00:00:00 2001 From: Vir Linden <60274682+vir-linden@users.noreply.github.com> Date: Wed, 1 May 2024 17:51:44 +0100 Subject: [PATCH 07/12] trim trailing whitespace --- .github/workflows/build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 42d6562db63..d318d2eaf35 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -58,8 +58,8 @@ jobs: - name: Checkout code uses: actions/checkout@v4 with: - ref: ${{ github.event.pull_request.head.sha || github.sha }} - + ref: ${{ github.event.pull_request.head.sha || github.sha }} + - name: Setup python uses: actions/setup-python@v5 with: From 4329e95379173a304e91dd0b7513e936aeded380 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 2 May 2024 09:14:55 -0400 Subject: [PATCH 08/12] Turn on LL_TESTS for CI builds. --- build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/build.sh b/build.sh index 46a287ea327..e025b731708 100755 --- a/build.sh +++ b/build.sh @@ -178,6 +178,7 @@ pre_build() "$autobuild" configure --quiet -c $variant \ ${eval_autobuild_configure_parameters:---} \ + -DLL_TESTS:BOOL=ON \ -DPACKAGE:BOOL=ON \ -DHAVOK:BOOL="$HAVOK" \ -DRELEASE_CRASH_REPORTING:BOOL="$RELEASE_CRASH_REPORTING" \ From eb0f963b46c68ad8faee133996599ba97b54d034 Mon Sep 17 00:00:00 2001 From: Vir Linden <60274682+vir-linden@users.noreply.github.com> Date: Thu, 2 May 2024 09:48:26 -0400 Subject: [PATCH 09/12] Update build.yaml --- .github/workflows/build.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d318d2eaf35..e4952d94934 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -179,13 +179,13 @@ jobs: # determine the viewer channel from the branch name branch=$AUTOBUILD_VCS_BRANCH - echo "branch=$branch" >> "$GITHUB_OUTPUT" IFS='/' read -ra ba <<< $branch prefix=${ba[0]} if [ "$prefix" == "project" ]; then - proj_name=$(echo ${ba[1]} | sed -e 's/_/ /g' | awk '{for(i=1;i<=NF;i++) $i=toupper(substr($i,1,1)) tolower(substr($i,2));}1') - export viewer_channel="Second Life Project $proj_name" - elif [ "$prefix" == "release" ] || [ "$prefix" == "main" ]; + IFS='_' read -ra prj << "${ba[1]}" + # uppercase first letter of each word + export viewer_channel="Second Life Project ${prj[*]^}" + elif [ "$prefix" == "release" || "$prefix" == "main" ]; then export viewer_channel="Second Life Release" else From 6eeef10cda794607c8fbed6fe89179c09a42224b Mon Sep 17 00:00:00 2001 From: Vir Linden <60274682+vir-linden@users.noreply.github.com> Date: Thu, 2 May 2024 10:08:46 -0400 Subject: [PATCH 10/12] Update build.yaml --- .github/workflows/build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index e4952d94934..4785273b78b 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -182,10 +182,10 @@ jobs: IFS='/' read -ra ba <<< $branch prefix=${ba[0]} if [ "$prefix" == "project" ]; then - IFS='_' read -ra prj << "${ba[1]}" + IFS='_' read -ra prj <<< "${ba[1]}" # uppercase first letter of each word export viewer_channel="Second Life Project ${prj[*]^}" - elif [ "$prefix" == "release" || "$prefix" == "main" ]; + elif [[ "$prefix" == "release" || "$prefix" == "main" ]]; then export viewer_channel="Second Life Release" else From 8d5372577cbfedb439541042ca6a169a97c8c251 Mon Sep 17 00:00:00 2001 From: Brad Linden Date: Thu, 2 May 2024 10:54:15 -0700 Subject: [PATCH 11/12] Update LLGLTFMaterial tests for changes introduced in SL-20523 also correct member packing to match server side --- indra/llprimitive/llgltfmaterial.h | 13 ++++++++----- indra/llprimitive/tests/llgltfmaterial_test.cpp | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/indra/llprimitive/llgltfmaterial.h b/indra/llprimitive/llgltfmaterial.h index 02f62fb08c4..f62cab1a61d 100644 --- a/indra/llprimitive/llgltfmaterial.h +++ b/indra/llprimitive/llgltfmaterial.h @@ -122,13 +122,20 @@ class LLGLTFMaterial : public LLRefCount F32 mRoughnessFactor = 1.f; F32 mAlphaCutoff = 0.5f; - bool mDoubleSided = false; AlphaMode mAlphaMode = ALPHA_MODE_OPAQUE; + bool mDoubleSided = false; + // override specific flags for state that can't use off-by-epsilon or UUID hack bool mOverrideDoubleSided = false; bool mOverrideAlphaMode = false; + // These fields are local to viewer and are a part of local bitmap support + typedef std::map local_tex_map_t; + local_tex_map_t mTrackingIdToLocalTexture; + +public: + // get a UUID based on a hash of this LLGLTFMaterial LLUUID getHash() const; @@ -229,10 +236,6 @@ class LLGLTFMaterial : public LLRefCount virtual bool replaceLocalTexture(const LLUUID& tracking_id, const LLUUID &old_id, const LLUUID& new_id); virtual void updateTextureTracking(); - // These fields are local to viewer and are a part of local bitmap support - typedef std::map local_tex_map_t; - local_tex_map_t mTrackingIdToLocalTexture; - protected: static LLVector2 vec2FromJson(const std::map& object, const char* key, const LLVector2& default_value); static F32 floatFromJson(const std::map& object, const char* key, const F32 default_value); diff --git a/indra/llprimitive/tests/llgltfmaterial_test.cpp b/indra/llprimitive/tests/llgltfmaterial_test.cpp index 88b6fae3a7a..b56c9ab4f5e 100644 --- a/indra/llprimitive/tests/llgltfmaterial_test.cpp +++ b/indra/llprimitive/tests/llgltfmaterial_test.cpp @@ -143,7 +143,7 @@ namespace tut #if LL_WINDOWS // If any fields are added/changed, these tests should be updated (consider also updating ASSET_VERSION in LLGLTFMaterial) // This test result will vary between compilers, so only test a single platform - ensure_equals("fields supported for GLTF (sizeof check)", sizeof(LLGLTFMaterial), 216); + ensure_equals("fields supported for GLTF (sizeof check)", sizeof(LLGLTFMaterial), 224); #endif #endif ensure_equals("LLGLTFMaterial texture info count", (U32)LLGLTFMaterial::GLTF_TEXTURE_INFO_COUNT, 4); From a2a4d70f4fbce25c9a3e735ac68cc792c8f59634 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Geenz\" Goodman" Date: Wed, 8 May 2024 12:47:46 -0700 Subject: [PATCH 12/12] #1165 Fix for clipping and culling for mirrors under water. --- indra/newview/pipeline.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 341c9706f88..8b1e46343b4 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -2269,7 +2269,8 @@ static LLTrace::BlockTimerStatHandle FTM_CULL("Object Culling"); // static bool LLPipeline::isWaterClip() { - return (!sRenderTransparentWater || gCubeSnapshot) && !sRenderingHUDs; + // We always pretend that we're not clipping water when rendering mirrors. + return (gPipeline.mHeroProbeManager.isMirrorPass()) ? false : (!sRenderTransparentWater || gCubeSnapshot) && !sRenderingHUDs; } void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result)