diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index b385e3ba12..fd3b1e0e0a 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -22,6 +22,7 @@ jobs: # important to ensure it's the empty string when false. If you omit || '', # its value when false is "false", which is interpreted as true. RELEASE_RUN: ${{ (github.event.inputs.release_run || github.ref_type == 'tag' && startsWith(github.ref_name, 'Second_Life')) && 'Y' || '' }} + FROM_FORK: ${{ github.event.pull_request.head.repo.organization != 'secondlife' }} steps: - name: Set Variables id: setvar diff --git a/build.sh b/build.sh index f5cf448948..223ed0f3ae 100755 --- a/build.sh +++ b/build.sh @@ -146,12 +146,21 @@ pre_build() && [ -r "$master_message_template_checkout/message_template.msg" ] \ && template_verifier_master_url="-DTEMPLATE_VERIFIER_MASTER_URL=file://$master_message_template_checkout/message_template.msg" - RELEASE_CRASH_REPORTING=ON - HAVOK=ON + RELEASE_CRASH_REPORTING=OFF + HAVOK=OFF SIGNING=() - if [[ "$arch" == "Darwin" && "$variant" == "Release" ]] - then SIGNING=("-DENABLE_SIGNING:BOOL=YES" \ - "-DSIGNING_IDENTITY:STRING=Developer ID Application: Linden Research, Inc.") + if [[ "$variant" != *OS ]] + then + # Proprietary builds + + RELEASE_CRASH_REPORTING=ON + HAVOK=ON + + if [[ "$arch" == "Darwin" ]] + then + SIGNING=("-DENABLE_SIGNING:BOOL=YES" \ + "-DSIGNING_IDENTITY:STRING=Developer ID Application: Linden Research, Inc.") + fi fi if [ "${RELEASE_CRASH_REPORTING:-}" != "OFF" ] diff --git a/doc/contributions.txt b/doc/contributions.txt index 70fe3e20d4..852d35630a 100755 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -1442,6 +1442,30 @@ Sovereign Engineer SL-18534 SL-19690 SL-19336 + secondlife/viewer/pull/1283 + secondlife/viewer/pull/1287 + secondlife/viewer/pull/1906 + secondlife/viewer/pull/1930 + secondlife/viewer/pull/1941 + secondlife/viewer/pull/1946 + secondlife/viewer/pull/1948 + secondlife/viewer/pull/1950 + secondlife/viewer/pull/1951 + secondlife/viewer/pull/2066 + secondlife/viewer/pull/2077 + secondlife/viewer/pull/2078 + secondlife/viewer/pull/2080 + secondlife/viewer/pull/2085 + secondlife/viewer/pull/2098 + secondlife/viewer/pull/2099 + secondlife/viewer/pull/2105 + secondlife/viewer/pull/2115 + secondlife/viewer/pull/2116 + secondlife/viewer/pull/2124 + secondlife/viewer/pull/2125 + secondlife/viewer/pull/2135 + secondlife/viewer/pull/2136 + secondlife/viewer/pull/2149 SpacedOut Frye VWR-34 VWR-45 diff --git a/indra/llcommon/llthread.cpp b/indra/llcommon/llthread.cpp index 9fe5e48fdb..509a074b17 100644 --- a/indra/llcommon/llthread.cpp +++ b/indra/llcommon/llthread.cpp @@ -274,6 +274,7 @@ void LLThread::shutdown() mStatus = STOPPED; return; } + delete mThreadp; mThreadp = NULL; } @@ -304,6 +305,7 @@ void LLThread::start() { mThreadp = new std::thread(std::bind(&LLThread::threadRun, this)); mNativeHandle = mThreadp->native_handle(); + mThreadp->detach(); } catch (std::system_error& ex) { diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp index c1e14c9d15..af204422b5 100644 --- a/indra/llui/lltoolbar.cpp +++ b/indra/llui/lltoolbar.cpp @@ -1277,7 +1277,7 @@ bool LLToolBar::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, int orig_rank = getRankFromPosition(dragged_command); mDragRank = getRankFromPosition(x, y); // Don't DaD if we're dragging a command on itself - mDragAndDropTarget = ((orig_rank != RANK_NONE) && ((mDragRank == orig_rank) || ((mDragRank - 1) == orig_rank))); + mDragAndDropTarget = (orig_rank == RANK_NONE) || ((mDragRank != orig_rank) && ((mDragRank - 1) != orig_rank)); //LL_INFOS() << "Merov debug : DaD, rank = " << mDragRank << ", dragged uui = " << inv_item->getUUID() << LL_ENDL; /* Do the following if you want to animate the button itself LLCommandId dragged_command(inv_item->getUUID()); diff --git a/indra/llwebrtc/llwebrtc.h b/indra/llwebrtc/llwebrtc.h index fc9828ae45..c6fdb909dd 100644 --- a/indra/llwebrtc/llwebrtc.h +++ b/indra/llwebrtc/llwebrtc.h @@ -244,7 +244,7 @@ class LLWebRTCSignalingObserver // allows for management of this peer connection. class LLWebRTCPeerConnectionInterface { -public: + public: struct InitOptions { diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp index d137fad75c..11e25e91b7 100644 --- a/indra/newview/lldrawpoolwater.cpp +++ b/indra/newview/lldrawpoolwater.cpp @@ -247,8 +247,6 @@ void LLDrawPoolWater::renderPostDeferred(S32 pass) F32 screenRes[] = { 1.f / gGLViewport[2], 1.f / gGLViewport[3] }; - S32 diffTex = shader->enableTexture(LLShaderMgr::DIFFUSE_MAP); - shader->uniform2fv(LLShaderMgr::DEFERRED_SCREEN_RES, 1, screenRes); shader->uniform1f(LLShaderMgr::BLEND_FACTOR, blend_factor); @@ -322,8 +320,6 @@ void LLDrawPoolWater::renderPostDeferred(S32 pass) water = static_cast(face->getViewerObject()); if (!water) continue; - gGL.getTexUnit(diffTex)->bind(face->getTexture()); - if ((bool)edge == (bool)water->getIsEdgePatch()) { face->renderIndexed(); @@ -340,7 +336,6 @@ void LLDrawPoolWater::renderPostDeferred(S32 pass) shader->disableTexture(LLShaderMgr::ENVIRONMENT_MAP, LLTexUnit::TT_CUBE_MAP); shader->disableTexture(LLShaderMgr::WATER_SCREENTEX); shader->disableTexture(LLShaderMgr::BUMP_MAP); - shader->disableTexture(LLShaderMgr::DIFFUSE_MAP); shader->disableTexture(LLShaderMgr::WATER_REFTEX); // clean up diff --git a/indra/newview/llfloateremojipicker.cpp b/indra/newview/llfloateremojipicker.cpp index 1dbf51ba46..80a91b30e3 100644 --- a/indra/newview/llfloateremojipicker.cpp +++ b/indra/newview/llfloateremojipicker.cpp @@ -193,7 +193,7 @@ public: { mWStr = LLWString(1, emoji); mEmoji = emoji; - mTitle = title; + mTitle = utf8str_to_wstring(title); mBegin = begin; mEnd = end; } @@ -211,9 +211,9 @@ public: drawIcon(centerX, centerY - 1, iconWidth); static LLColor4 defaultColor(0.75f, 0.75f, 0.75f, 1.0f); - LLColor4 textColor = LLUIColorTable::instance().getColor("MenuItemEnabledColor", defaultColor); + static LLUIColor textColor = LLUIColorTable::instance().getColor("MenuItemEnabledColor", defaultColor); S32 max_pixels = clientWidth - iconWidth; - drawName((F32)iconWidth, centerY, max_pixels, textColor); + drawName((F32)iconWidth, centerY, max_pixels, textColor.get()); } protected: @@ -237,7 +237,7 @@ protected: max_pixels); // max_pixels } - void drawName(F32 x, F32 y, S32 max_pixels, LLColor4& color) + void drawName(F32 x, F32 y, S32 max_pixels, const LLColor4& color) { static LLCachedControl useBWEmojis(gSavedSettings, "FSUseBWEmojis", false); // Add B&W emoji font support @@ -246,9 +246,9 @@ protected: LLFontGL* font = LLFontGL::getFontEmojiLarge(useBWEmojis); // Add B&W emoji font support if (mBegin) { - std::string text = mTitle.substr(0, mBegin); - font->renderUTF8( - text, // text + LLWString text = mTitle.substr(0, mBegin); + font->render( + text.c_str(), // text 0, // begin_offset x0, // x y, // y @@ -259,14 +259,14 @@ protected: LLFontGL::DROP_SHADOW_SOFT, // shadow static_cast(text.size()), // max_chars (S32)x1); // max_pixels - F32 dx = font->getWidthF32(text); + F32 dx = font->getWidthF32(text.c_str()); x0 += dx; x1 -= dx; } if (x1 > 0 && mEnd > mBegin) { - std::string text = mTitle.substr(mBegin, mEnd - mBegin); - font->renderUTF8( + LLWString text = mTitle.substr(mBegin, mEnd - mBegin); + font->render( text, // text 0, // begin_offset x0, // x @@ -278,14 +278,14 @@ protected: LLFontGL::DROP_SHADOW_SOFT, // shadow static_cast(text.size()), // max_chars (S32)x1); // max_pixels - F32 dx = font->getWidthF32(text); + F32 dx = font->getWidthF32(text.c_str()); x0 += dx; x1 -= dx; } if (x1 > 0 && mEnd < mTitle.size()) { - std::string text = mEnd ? mTitle.substr(mEnd) : mTitle; - font->renderUTF8( + LLWString text = mEnd ? mTitle.substr(mEnd) : mTitle; + font->render( text, // text 0, // begin_offset x0, // x @@ -303,7 +303,7 @@ protected: private: llwchar mEmoji; LLWString mWStr; - std::string mTitle; + LLWString mTitle; size_t mBegin; size_t mEnd; }; @@ -443,6 +443,7 @@ void LLFloaterEmojiPicker::fillGroups() for (LLButton* button : mGroupButtons) { mGroups->removeChild(button); + button->die(); } mFilteredEmojiGroups.clear(); mFilteredEmojis.clear(); @@ -456,7 +457,7 @@ void LLFloaterEmojiPicker::fillGroups() rect.mBottom = mBadge->getRect().getHeight(); // Create button for "All categories" - params.name = "emojigroup_all_cagetories"; // Fix mandatory name missing (XUI parser warning) + params.name = "all_categories"; createGroupButton(params, rect, ALL_EMOJIS_IMAGE_INDEX); // Create group and button for "Recently used" and/or "Frequently used" @@ -470,7 +471,7 @@ void LLFloaterEmojiPicker::fillGroups() { mFilteredEmojiGroups.push_back(USED_EMOJIS_GROUP_INDEX); mFilteredEmojis.emplace_back(cats); - params.name = "emojigroup_recently_frequently"; // Fix mandatory name missing (XUI parser warning) + params.name = "used_categories"; createGroupButton(params, rect, USED_EMOJIS_IMAGE_INDEX); } } @@ -488,7 +489,7 @@ void LLFloaterEmojiPicker::fillGroups() { mFilteredEmojiGroups.push_back(i); mFilteredEmojis.emplace_back(cats); - params.name = "emojigroup_" + std::to_string(i); // Fix mandatory name missing (XUI parser warning) + params.name = "group_" + std::to_string(i); createGroupButton(params, rect, groups[i].Character); } } diff --git a/indra/newview/llreflectionmap.cpp b/indra/newview/llreflectionmap.cpp index 31fd6f3f07..8d164b6883 100644 --- a/indra/newview/llreflectionmap.cpp +++ b/indra/newview/llreflectionmap.cpp @@ -220,7 +220,7 @@ F32 LLReflectionMap::getNearClip() if (mViewerObject && mViewerObject->getVolume()) { - ret = ((LLVOVolume*)mViewerObject)->getReflectionProbeNearClip(); + ret = mViewerObject->getReflectionProbeNearClip(); } else if (mGroup) { @@ -240,7 +240,7 @@ bool LLReflectionMap::getIsDynamic() mViewerObject && mViewerObject->getVolume()) { - return ((LLVOVolume*)mViewerObject)->getReflectionProbeIsDynamic(); + return mViewerObject->getReflectionProbeIsDynamic(); } return false; diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index fab5249a54..e5a62b080f 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -269,7 +269,11 @@ public: virtual bool isRiggedMesh() const { return false; } virtual bool hasLightTexture() const { return false; } virtual bool isReflectionProbe() const { return false; } + virtual F32 getReflectionProbeAmbiance() const { return 0.f; } + virtual F32 getReflectionProbeNearClip() const { return 0.f; } virtual bool getReflectionProbeIsBox() const { return false; } + virtual bool getReflectionProbeIsDynamic() const { return false; }; + virtual bool getReflectionProbeIsMirror() const { return false; }; // This method returns true if the object is over land owned by // the agent, one of its groups, or it encroaches and diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index ca9cae5d22..a35cdf4d4b 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -555,9 +555,9 @@ void LLViewerTexture::updateClass() LL_WARNS() << "Low system memory detected, emergency downrezzing off screen textures" << LL_ENDL; sDesiredDiscardBias = llmax(sDesiredDiscardBias, 1.5f); - for (auto image : gTextureList) + for (auto& image : gTextureList) { - gTextureList.updateImageDecodePriority(image); + gTextureList.updateImageDecodePriority(image, false /*will modify gTextureList otherwise!*/); } } diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index a8f41ea41c..d795552089 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -917,7 +917,7 @@ void LLViewerTextureList::clearFetchingRequests() extern bool gCubeSnapshot; -void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imagep) +void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imagep, bool flush_images) { if (imagep->isInDebug() || imagep->isUnremovable()) { @@ -962,7 +962,9 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag // shows one letter at a time // // Maximum usage examples: huge chunk of terrain repeats texture - const LLTextureEntry* te = face->getTextureEntry(); + S32 te_offset = face->getTEOffset(); // offset is -1 if not inited + LLViewerObject* objp = face->getViewerObject(); + const LLTextureEntry* te = (te_offset < 0 || te_offset >= objp->getNumTEs()) ? nullptr : objp->getTE(te_offset); F32 min_scale = te ? llmin(fabsf(te->getScaleS()), fabsf(te->getScaleT())) : 1.f; min_scale = llclamp(min_scale * min_scale, texture_scale_min(), texture_scale_max()); vsize /= min_scale; @@ -1005,7 +1007,7 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag // Flush formatted images using a lazy flush // S32 num_refs = imagep->getNumRefs(); - if (num_refs == min_refs) + if (num_refs == min_refs && flush_images) { if (imagep->getLastReferencedTimer()->getElapsedTimeF32() > lazy_flush_timeout) { diff --git a/indra/newview/llviewertexturelist.h b/indra/newview/llviewertexturelist.h index 589c326e63..44c4b19d62 100644 --- a/indra/newview/llviewertexturelist.h +++ b/indra/newview/llviewertexturelist.h @@ -152,7 +152,7 @@ public: // - updates decode priority // - updates desired discard level // - cleans up textures that haven't been referenced in awhile - void updateImageDecodePriority(LLViewerFetchedTexture* imagep); + void updateImageDecodePriority(LLViewerFetchedTexture* imagep, bool flush_images = true); private: F32 updateImagesCreateTextures(F32 max_time); diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 5856c4769b..a6aacd1a8d 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -3667,9 +3667,9 @@ void LLVOAvatar::idleUpdateNameTagText(bool new_name) { is_muted = isInMuteList(); } -// bool is_friend = LLAvatarTracker::instance().isBuddy(getID()); +// bool is_friend = isBuddy(); // [RLVa:KB] - Checked: RLVa-1.2.2 - bool is_friend = (fRlvShowAvName) && (LLAvatarTracker::instance().isBuddy(getID())); + bool is_friend = fRlvShowAvName && isBuddy(); // [/RLVa:KB] bool is_cloud = getIsCloud(); @@ -9381,7 +9381,7 @@ bool LLVOAvatar::isTooComplex() const { bool too_complex; static LLCachedControl compelxity_render_mode(gSavedSettings, "RenderAvatarComplexityMode"); - bool render_friend = (LLAvatarTracker::instance().isBuddy(getID()) && compelxity_render_mode > AV_RENDER_LIMIT_BY_COMPLEXITY); + bool render_friend = (isBuddy() && compelxity_render_mode > AV_RENDER_LIMIT_BY_COMPLEXITY); if (isSelf() || render_friend || mVisuallyMuteSetting == AV_ALWAYS_RENDER) { @@ -9417,7 +9417,7 @@ bool LLVOAvatar::isTooSlow() const static LLCachedControl compelxity_render_mode(gSavedSettings, "RenderAvatarComplexityMode"); static LLCachedControl friends_only(gSavedSettings, "RenderAvatarFriendsOnly", false); - bool is_friend = LLAvatarTracker::instance().isBuddy(getID()); + bool is_friend = isBuddy(); bool render_friend = is_friend && compelxity_render_mode > AV_RENDER_LIMIT_BY_COMPLEXITY; if (render_friend || mVisuallyMuteSetting == AV_ALWAYS_RENDER) @@ -9475,7 +9475,7 @@ void LLVOAvatar::updateTooSlow() if(!mTooSlowWithoutShadows) // if we were not previously above the full impostor cap { bool always_render_friends = compelxity_render_mode > AV_RENDER_LIMIT_BY_COMPLEXITY; - bool render_friend_or_exception = (always_render_friends && LLAvatarTracker::instance().isBuddy( id ) ) || + bool render_friend_or_exception = (always_render_friends && isBuddy()) || ( getVisualMuteSettings() == LLVOAvatar::AV_ALWAYS_RENDER ); if( (!isSelf() || allowSelfImpostor) && !render_friend_or_exception) { @@ -12647,7 +12647,7 @@ void LLVOAvatar::calcMutedAVColor() new_color = LLColor4::grey4; change_msg = " not rendered: color is grey4"; } - else if (LLMuteList::getInstance()->isMuted(av_id)) // the user blocked them + else if (isInMuteList()) // the user blocked them { // blocked avatars are dark grey new_color = LLColor4::grey4; @@ -12899,7 +12899,21 @@ F32 LLVOAvatar::getAverageGPURenderTime() bool LLVOAvatar::isBuddy() const { - return LLAvatarTracker::instance().isBuddy(getID()); + bool is_friend = false; + F64 now = LLFrameTimer::getTotalSeconds(); + if (now < mCachedBuddyListUpdateTime) + { + is_friend = mCachedInBuddyList; + } + else + { + is_friend = LLAvatarTracker::instance().isBuddy(getID()); + + const F64 SECONDS_BETWEEN_BUDDY_UPDATES = 1; + mCachedBuddyListUpdateTime = now + SECONDS_BETWEEN_BUDDY_UPDATES; + mCachedInBuddyList = is_friend; + } + return is_friend; } diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 19cb28502e..ed0118b770 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -609,6 +609,8 @@ private: mutable bool mCachedInMuteList; mutable F64 mCachedMuteListUpdateTime; + mutable bool mCachedInBuddyList = false; + mutable F64 mCachedBuddyListUpdateTime = 0.0; // [RLVa:KB] - Checked: RLVa-2.2 (@setcam_avdist) mutable bool mCachedIsRlvSilhouette = false; mutable F64 mCachedRlvSilhouetteUpdateTime = 0.f; diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h index f0a45cc116..b3e4d44ead 100644 --- a/indra/newview/llvovolume.h +++ b/indra/newview/llvovolume.h @@ -309,11 +309,11 @@ public: bool setReflectionProbeIsMirror(bool is_mirror); bool isReflectionProbe() const override; - F32 getReflectionProbeAmbiance() const; - F32 getReflectionProbeNearClip() const; + F32 getReflectionProbeAmbiance() const override; + F32 getReflectionProbeNearClip() const override; bool getReflectionProbeIsBox() const override; - bool getReflectionProbeIsDynamic() const; - bool getReflectionProbeIsMirror() const; + bool getReflectionProbeIsDynamic() const override; + bool getReflectionProbeIsMirror() const override; // Flexible Objects U32 getVolumeInterfaceID() const; diff --git a/indra/newview/skins/default/xui/de/panel_region_debug.xml b/indra/newview/skins/default/xui/de/panel_region_debug.xml index 98ea78071d..d2f67af52e 100644 --- a/indra/newview/skins/default/xui/de/panel_region_debug.xml +++ b/indra/newview/skins/default/xui/de/panel_region_debug.xml @@ -24,7 +24,7 @@ Optionen: - +