From 436544a51a99da007cdb702cee338ffb85da85a5 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 26 Apr 2022 14:43:55 -0500 Subject: SL-17086 Fix for bad lighting in upload preview render. --- indra/newview/app_settings/settings.xml | 6 ++--- .../shaders/class1/objects/previewV.glsl | 29 +++------------------- 2 files changed, 6 insertions(+), 29 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index a6dce3cceb..1a75456725 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -8110,9 +8110,9 @@ Color4 Value - 1.0 - 1.0 - 1.0 + 0.33 + 0.33 + 0.33 1.0 diff --git a/indra/newview/app_settings/shaders/class1/objects/previewV.glsl b/indra/newview/app_settings/shaders/class1/objects/previewV.glsl index 4bb588335a..5886f47cbc 100644 --- a/indra/newview/app_settings/shaders/class1/objects/previewV.glsl +++ b/indra/newview/app_settings/shaders/class1/objects/previewV.glsl @@ -51,30 +51,6 @@ float calcDirectionalLight(vec3 n, vec3 l) return a; } - -float calcLocalLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, float is_pointlight) -{ - //get light vector - vec3 lv = lp.xyz-v; - - //get distance - float d = length(lv); - - //normalize light vector - lv *= 1.0/d; - - //distance attenuation - float da = clamp(1.0/(la * d), 0.0, 1.0); - - // spotlight coefficient. - float spot = max(dot(-ln, lv), is_pointlight); - da *= spot*spot; // GL_SPOT_EXPONENT=2 - - //angular attenuation - da *= calcDirectionalLight(n, lv); - - return da; -} //==================================================================================================== @@ -91,7 +67,8 @@ void main() // Collect normal lights (need to be divided by two, as we later multiply by 2) col.rgb += light_diffuse[1].rgb * calcDirectionalLight(norm, light_position[1].xyz); - col.rgb += light_diffuse[2].rgb*calcLocalLight(pos.xyz, norm, light_position[2], light_direction[2], light_attenuation[2].x, light_attenuation[2].z); - col.rgb += light_diffuse[3].rgb*calcLocalLight(pos.xyz, norm, light_position[3], light_direction[3], light_attenuation[3].x, light_attenuation[3].z); + col.rgb += light_diffuse[2].rgb * calcDirectionalLight(norm, light_position[2].xyz); + col.rgb += light_diffuse[3].rgb * calcDirectionalLight(norm, light_position[3].xyz); + vertex_color = col*color; } -- cgit v1.2.3 From a00a569ac85b5a9e3198444eee9919af4e7e4a72 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 26 Apr 2022 16:38:47 -0500 Subject: SL-17276 Potential fix for crash on shutdown on mac. --- indra/newview/llspatialpartition.cpp | 1 + indra/newview/llvieweroctree.cpp | 10 ++++++++-- indra/newview/llvieweroctree.h | 4 ++++ indra/newview/llvocache.cpp | 7 +++++++ indra/newview/llvocache.h | 1 + 5 files changed, 21 insertions(+), 2 deletions(-) diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index 5c648c11e1..0d53950889 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -852,6 +852,7 @@ LLSpatialPartition::LLSpatialPartition(U32 data_mask, BOOL render_by_group, U32 LLSpatialPartition::~LLSpatialPartition() { + cleanup(); } LLSpatialGroup *LLSpatialPartition::put(LLDrawable *drawablep, BOOL was_visible) diff --git a/indra/newview/llvieweroctree.cpp b/indra/newview/llvieweroctree.cpp index 5eda75753e..87e296012d 100644 --- a/indra/newview/llvieweroctree.cpp +++ b/indra/newview/llvieweroctree.cpp @@ -1325,8 +1325,13 @@ LLViewerOctreePartition::LLViewerOctreePartition() : LLViewerOctreePartition::~LLViewerOctreePartition() { - delete mOctree; - mOctree = NULL; + cleanup(); +} + +void LLViewerOctreePartition::cleanup() +{ + delete mOctree; + mOctree = nullptr; } BOOL LLViewerOctreePartition::isOcclusionEnabled() @@ -1334,6 +1339,7 @@ BOOL LLViewerOctreePartition::isOcclusionEnabled() return mOcclusionEnabled || LLPipeline::sUseOcclusion > 2; } + //----------------------------------------------------------------------------------- //class LLViewerOctreeCull definitions //----------------------------------------------------------------------------------- diff --git a/indra/newview/llvieweroctree.h b/indra/newview/llvieweroctree.h index 11ba7e4f1e..e6974b0f84 100644 --- a/indra/newview/llvieweroctree.h +++ b/indra/newview/llvieweroctree.h @@ -352,6 +352,10 @@ public: virtual S32 cull(LLCamera &camera, bool do_occlusion) = 0; BOOL isOcclusionEnabled(); +protected: + // MUST call from destructor of any derived classes (SL-17276) + void cleanup(); + public: U32 mPartitionType; U32 mDrawableType; diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp index e10a9f9bcb..db8ad183f0 100644 --- a/indra/newview/llvocache.cpp +++ b/indra/newview/llvocache.cpp @@ -632,6 +632,13 @@ LLVOCachePartition::LLVOCachePartition(LLViewerRegion* regionp) new LLVOCacheGroup(mOctree, this); } +LLVOCachePartition::~LLVOCachePartition() +{ + // SL-17276 make sure to do base class cleanup while this instance + // can still be treated as an LLVOCachePartition + cleanup(); +} + bool LLVOCachePartition::addEntry(LLViewerOctreeEntry* entry) { llassert(entry->hasVOCacheEntry()); diff --git a/indra/newview/llvocache.h b/indra/newview/llvocache.h index c510ff77fc..55a13d934d 100644 --- a/indra/newview/llvocache.h +++ b/indra/newview/llvocache.h @@ -189,6 +189,7 @@ class LLVOCachePartition : public LLViewerOctreePartition { public: LLVOCachePartition(LLViewerRegion* regionp); + virtual ~LLVOCachePartition(); bool addEntry(LLViewerOctreeEntry* entry); void removeEntry(LLViewerOctreeEntry* entry); -- cgit v1.2.3 From 9c0ebc5469f8b98fdcbddd087666b38b88e88c22 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Thu, 28 Apr 2022 11:39:58 +0300 Subject: SL-17301 FIXED Friends are not showing in friendslist --- indra/newview/llcallingcard.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/newview/llcallingcard.cpp b/indra/newview/llcallingcard.cpp index bddbc79df4..8d1e9a438e 100644 --- a/indra/newview/llcallingcard.cpp +++ b/indra/newview/llcallingcard.cpp @@ -257,6 +257,7 @@ S32 LLAvatarTracker::addBuddyList(const LLAvatarTracker::buddy_map_t& buds) LLAvatarName av_name; LLAvatarNameCache::get(agent_id, &av_name); + addChangedMask(LLFriendObserver::ADD, agent_id); LL_DEBUGS() << "Added buddy " << agent_id << ", " << (mBuddyInfo[agent_id]->isOnline() ? "Online" : "Offline") << ", TO: " << mBuddyInfo[agent_id]->getRightsGrantedTo() -- cgit v1.2.3 From ac0c9a7412334ebda49467c14b3916618b56a8dc Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 28 Apr 2022 23:03:19 +0300 Subject: SL-16721 Crash at LLVOAvatar::idleUpdateMisc --- indra/newview/llvoavatar.cpp | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index cb50390f60..ccb1662139 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -2819,22 +2819,22 @@ void LLVOAvatar::idleUpdateMisc(bool detailed_update) attachment_iter != attachment->mAttachedObjects.end(); ++attachment_iter) { - LLViewerObject* attached_object = attachment_iter->get(); - BOOL visibleAttachment = visible || (attached_object && attached_object->mDrawable.notNull() && - !(attached_object->mDrawable->getSpatialBridge() && - attached_object->mDrawable->getSpatialBridge()->getRadius() < 2.0)); + LLViewerObject* attached_object = attachment_iter->get(); + if (!attached_object + || attached_object->isDead() + || !attachment->getValid() + || attached_object->mDrawable.isNull()) + { + continue; + } + + LLSpatialBridge* bridge = attached_object->mDrawable->getSpatialBridge(); - if (visibleAttachment - && attached_object - && !attached_object->isDead() - && attachment->getValid() - && attached_object->mDrawable.notNull()) + if (visible || !(bridge && bridge->getRadius() < 2.0)) { - //override rigged attachments' octree spatial extents with this avatar's bounding box - LLSpatialBridge* bridge = attached_object->mDrawable->getSpatialBridge(); bool rigged = false; - if (bridge && !bridge->isDead()) + if (bridge) { //transform avatar bounding box into attachment's coordinate frame LLVector4a extents[2]; @@ -2850,8 +2850,12 @@ void LLVOAvatar::idleUpdateMisc(bool detailed_update) attached_object->mDrawable->makeActive(); attached_object->mDrawable->updateXform(TRUE); - - if (bridge && !bridge->isDead()) + + // override_bbox calls movePartition() and getSpatialPartition(), + // so bridge might no longer be valid, get it again. + // ex: animesh stops being an animesh + bridge = attached_object->mDrawable->getSpatialBridge(); + if (bridge) { if (!rigged) { -- cgit v1.2.3 From 904b16a0a7fddb1cd36de8a33d5475df93d9cabe Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 29 Sep 2020 23:39:00 +0300 Subject: SL-17124 switchContext and loadShaderFile crashes - Do not try initializing shaders if requirements are not met or if window does not exist - Warn user before closing window. Situation is unexpected, there is chance of more issues, like a freeze or a crash on close() - mHasMultitexture is a solid requirement, if it is not present, we won't be able to run --- indra/llrender/llgl.cpp | 31 ++++++++++++---------- indra/llwindow/llwindowwin32.cpp | 26 +++++++++--------- indra/newview/llappviewer.cpp | 8 +----- indra/newview/llviewershadermgr.cpp | 7 +++++ indra/newview/llviewerwindow.cpp | 12 ++++----- .../newview/skins/default/xui/en/notifications.xml | 12 --------- 6 files changed, 44 insertions(+), 52 deletions(-) diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index 639d1fba32..18168d1c3f 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -722,20 +722,23 @@ bool LLGLManager::initGL() glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS_ARB, &num_tex_image_units); mNumTextureImageUnits = llmin(num_tex_image_units, 32); - if (LLRender::sGLCoreProfile) - { - mNumTextureUnits = llmin(mNumTextureImageUnits, MAX_GL_TEXTURE_UNITS); - } - else if (mHasMultitexture) - { - GLint num_tex_units; - glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &num_tex_units); - mNumTextureUnits = llmin(num_tex_units, (GLint)MAX_GL_TEXTURE_UNITS); - if (mIsIntel) - { - mNumTextureUnits = llmin(mNumTextureUnits, 2); - } - } + if (mHasMultitexture) + { + if (LLRender::sGLCoreProfile) + { + mNumTextureUnits = llmin(mNumTextureImageUnits, MAX_GL_TEXTURE_UNITS); + } + else + { + GLint num_tex_units; + glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &num_tex_units); + mNumTextureUnits = llmin(num_tex_units, (GLint)MAX_GL_TEXTURE_UNITS); + if (mIsIntel) + { + mNumTextureUnits = llmin(mNumTextureUnits, 2); + } + } + } else { mHasRequirements = FALSE; diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index 33b4257706..ddf6658ece 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -1251,9 +1251,9 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen& size, BO if (!DescribePixelFormat(mhDC, pixel_format, sizeof(PIXELFORMATDESCRIPTOR), &pfd)) { - close(); OSMessageBox(mCallbacks->translateString("MBPixelFmtDescErr"), mCallbacks->translateString("MBError"), OSMB_OK); + close(); return FALSE; } @@ -1290,42 +1290,42 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen& size, BO if (pfd.cColorBits < 32) { - close(); OSMessageBox(mCallbacks->translateString("MBTrueColorWindow"), mCallbacks->translateString("MBError"), OSMB_OK); + close(); return FALSE; } if (pfd.cAlphaBits < 8) { - close(); OSMessageBox(mCallbacks->translateString("MBAlpha"), mCallbacks->translateString("MBError"), OSMB_OK); + close(); return FALSE; } if (!SetPixelFormat(mhDC, pixel_format, &pfd)) { - close(); OSMessageBox(mCallbacks->translateString("MBPixelFmtSetErr"), mCallbacks->translateString("MBError"), OSMB_OK); + close(); return FALSE; } if (!(mhRC = SafeCreateContext(mhDC))) { - close(); OSMessageBox(mCallbacks->translateString("MBGLContextErr"), mCallbacks->translateString("MBError"), OSMB_OK); + close(); return FALSE; } if (!wglMakeCurrent(mhDC, mhRC)) { - close(); OSMessageBox(mCallbacks->translateString("MBGLContextActErr"), mCallbacks->translateString("MBError"), OSMB_OK); + close(); return FALSE; } @@ -1532,16 +1532,16 @@ const S32 max_format = (S32)num_formats - 1; if (!mhDC) { - close(); OSMessageBox(mCallbacks->translateString("MBDevContextErr"), mCallbacks->translateString("MBError"), OSMB_OK); + close(); return FALSE; } if (!SetPixelFormat(mhDC, pixel_format, &pfd)) { - close(); OSMessageBox(mCallbacks->translateString("MBPixelFmtSetErr"), mCallbacks->translateString("MBError"), OSMB_OK); + close(); return FALSE; } @@ -1577,8 +1577,8 @@ const S32 max_format = (S32)num_formats - 1; if (!DescribePixelFormat(mhDC, pixel_format, sizeof(PIXELFORMATDESCRIPTOR), &pfd)) { - close(); OSMessageBox(mCallbacks->translateString("MBPixelFmtDescErr"), mCallbacks->translateString("MBError"), OSMB_OK); + close(); return FALSE; } @@ -1590,15 +1590,15 @@ const S32 max_format = (S32)num_formats - 1; // make sure we have 32 bits per pixel if (pfd.cColorBits < 32 || GetDeviceCaps(mhDC, BITSPIXEL) < 32) { - close(); OSMessageBox(mCallbacks->translateString("MBTrueColorWindow"), mCallbacks->translateString("MBError"), OSMB_OK); + close(); return FALSE; } if (pfd.cAlphaBits < 8) { - close(); OSMessageBox(mCallbacks->translateString("MBAlpha"), mCallbacks->translateString("MBError"), OSMB_OK); + close(); return FALSE; } @@ -1614,8 +1614,8 @@ const S32 max_format = (S32)num_formats - 1; if (!wglMakeCurrent(mhDC, mhRC)) { - close(); OSMessageBox(mCallbacks->translateString("MBGLContextActErr"), mCallbacks->translateString("MBError"), OSMB_OK); + close(); return FALSE; } @@ -1623,8 +1623,8 @@ const S32 max_format = (S32)num_formats - 1; if (!gGLManager.initGL()) { - close(); OSMessageBox(mCallbacks->translateString("MBVideoDrvErr"), mCallbacks->translateString("MBError"), OSMB_OK); + close(); return FALSE; } diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index a63203f3cb..8255eb882c 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -957,13 +957,7 @@ bool LLAppViewer::init() // If we don't have the right GL requirements, exit. if (!gGLManager.mHasRequirements) { - // can't use an alert here since we're exiting and - // all hell breaks lose. - LLUIString details = LLNotifications::instance().getGlobalString("UnsupportedGLRequirements"); - OSMessageBox( - details.getString(), - LLStringUtil::null, - OSMB_OK); + // already handled with a MBVideoDrvErr return 0; } diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index 1cb2c6b9ee..086b433c72 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -426,6 +426,13 @@ void LLViewerShaderMgr::setShaders() return; } + if (!gGLManager.mHasRequirements) + { + // Viewer will show 'hardware requirements' warning later + LL_INFOS("ShaderLoading") << "Not supported hardware/software" << LL_ENDL; + return; + } + static LLCachedControl max_texture_index(gSavedSettings, "RenderMaxTextureIndex", 16); LLGLSLShader::sIndexedTextureChannels = llmax(llmin(gGLManager.mNumTextureImageUnits, (S32) max_texture_index), 1); diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 42e21f7130..8e565bbdca 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1914,12 +1914,6 @@ LLViewerWindow::LLViewerWindow(const Params& p) p.ignore_pixel_depth, gSavedSettings.getBOOL("RenderDeferred") ? 0 : gSavedSettings.getU32("RenderFSAASamples")); //don't use window level anti-aliasing if FBOs are enabled - if (!LLViewerShaderMgr::sInitialized) - { //immediately initialize shaders - LLViewerShaderMgr::sInitialized = TRUE; - LLViewerShaderMgr::instance()->setShaders(); - } - if (NULL == mWindow) { LLSplashScreen::update(LLTrans::getString("StartupRequireDriverUpdate")); @@ -1938,6 +1932,12 @@ LLViewerWindow::LLViewerWindow(const Params& p) #endif LLAppViewer::instance()->fastQuit(1); } + else if (!LLViewerShaderMgr::sInitialized) + { + //immediately initialize shaders + LLViewerShaderMgr::sInitialized = TRUE; + LLViewerShaderMgr::instance()->setShaders(); + } if (!LLAppViewer::instance()->restoreErrorTrap()) { diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index e1f6dde6ff..3add211247 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -9634,18 +9634,6 @@ Do you wish to continue? yestext="OK"/> - -You do not appear to meet the hardware requirements for [APP_NAME]. [APP_NAME] requires OpenGL 2.0 or later shader support. If this is the case, you may want to make sure that you have the latest drivers for your graphics card, and service packs and patches for your operating system. - -If you continue to have problems, please visit the [SUPPORT_SITE]. - - - -You do not appear to have the proper hardware requirements for [APP_NAME]. [APP_NAME] requires an OpenGL graphics card that has multitexture support. If this is the case, you may want to make sure that you have the latest drivers for your graphics card, and service packs and patches for your operating system. - -If you continue to have problems, please visit the [SUPPORT_SITE]. - - The installed Intel graphics driver for [GPUNAME], version [VERSION], is significantly out of date and is known to cause excessive rates of program crashes. You are strongly advised to update to a current Intel driver -- cgit v1.2.3 From da6f4204b7b4887d519f66d586b2782fb6beff2e Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 29 Apr 2022 22:13:16 +0300 Subject: SL-17124 make sure window thread wakes up to proces 'quit' message --- indra/llwindow/llwindowwin32.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index ddf6658ece..1f3823509c 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -907,6 +907,10 @@ void LLWindowWin32::close() } }); + // Window thread might be waiting for a getMessage(), give it + // a push to enshure it will process destroy_window_handler + kickWindowThread(); + // Even though the above lambda might not yet have run, we've already // bound mWindowHandle into it by value, which should suffice for the // operations we're asking. That's the last time WE should touch it. -- cgit v1.2.3 From 1a6eee4ea27923016fac790b47161ce00f2c9b4f Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Mon, 2 May 2022 11:52:45 -0500 Subject: SL-17321 Fix for some particle systems with custom blend functions not rendering. --- indra/newview/lldrawpoolalpha.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp index eebd89f77f..e674707c01 100644 --- a/indra/newview/lldrawpoolalpha.cpp +++ b/indra/newview/lldrawpoolalpha.cpp @@ -717,6 +717,16 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, bool depth_only, bool rigged) LLGLEnableFunc stencil_test(GL_STENCIL_TEST, params.mSelected, &LLGLCommonFunc::selected_stencil_test); gGL.blendFunc((LLRender::eBlendFactor) params.mBlendFuncSrc, (LLRender::eBlendFactor) params.mBlendFuncDst, mAlphaSFactor, mAlphaDFactor); + + bool reset_minimum_alpha = false; + if (!LLPipeline::sImpostorRender && + params.mBlendFuncDst != LLRender::BF_SOURCE_ALPHA && + params.mBlendFuncSrc != LLRender::BF_SOURCE_ALPHA) + { // this draw call has a custom blend function that may require rendering of "invisible" fragments + current_shader->setMinimumAlpha(0.f); + reset_minimum_alpha = true; + } + U32 drawMask = mask; if (params.mFullbright) { @@ -729,6 +739,11 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, bool depth_only, bool rigged) params.mVertexBuffer->setBufferFast(drawMask); params.mVertexBuffer->drawRangeFast(params.mDrawMode, params.mStart, params.mEnd, params.mCount, params.mOffset); + + if (reset_minimum_alpha) + { + current_shader->setMinimumAlpha(MINIMUM_ALPHA); + } } // If this alpha mesh has glow, then draw it a second time to add the destination-alpha (=glow). Interleaving these state-changing calls is expensive, but glow must be drawn Z-sorted with alpha. -- cgit v1.2.3 From 43517c5adc69ecb1d8a5e031a9e2840b005eecf9 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 5 May 2022 19:41:56 +0300 Subject: SL-17244 Fix 'empty leaf' crashes --- indra/llmath/lloctree.h | 12 +++++++++--- indra/llmath/llvolume.cpp | 4 ++-- indra/newview/llvieweroctree.cpp | 2 +- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/indra/llmath/lloctree.h b/indra/llmath/lloctree.h index 2283df1e1a..a9a54a8113 100644 --- a/indra/llmath/lloctree.h +++ b/indra/llmath/lloctree.h @@ -73,7 +73,7 @@ template class LLOctreeTravelerDepthFirst : public LLOctreeTraveler { public: - virtual void traverse(const LLOctreeNode* node); + virtual void traverse(const LLOctreeNode* node) override; }; template @@ -696,7 +696,7 @@ public: { } - bool balance() + bool balance() override { //LL_PROFILE_ZONE_NAMED_COLOR("Octree::balance()",OCTREE_DEBUG_COLOR_BALANCE); @@ -732,7 +732,7 @@ public: } // LLOctreeRoot::insert - bool insert(T* data) + bool insert(T* data) override { if (data == NULL) { @@ -835,6 +835,12 @@ public: return false; } + + bool isLeaf() const override + { + // root can't be a leaf + return false; + } }; //======================== diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index 3727ce85af..5099920f32 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -414,7 +414,7 @@ public: max.setMax(max, *tri->mV[2]); } } - else if (!branch->isLeaf()) + else if (branch->getChildCount() > 0) { //no data, but child nodes exist LLVolumeOctreeListener* child = (LLVolumeOctreeListener*) branch->getChild(0)->getListener(0); @@ -424,7 +424,7 @@ public: } else { - LL_ERRS() << "Empty leaf" << LL_ENDL; + llassert(!branch->isLeaf()); // Empty leaf } for (S32 i = 0; i < branch->getChildCount(); ++i) diff --git a/indra/newview/llvieweroctree.cpp b/indra/newview/llvieweroctree.cpp index 87e296012d..12624ec3a2 100644 --- a/indra/newview/llvieweroctree.cpp +++ b/indra/newview/llvieweroctree.cpp @@ -564,7 +564,7 @@ void LLViewerOctreeGroup::rebound() group->setState(SKIP_FRUSTUM_CHECK); } - else if (mOctreeNode->isLeaf()) + else if (mOctreeNode->getChildCount() == 0) { //copy object bounding box if this is a leaf boundObjects(TRUE, mExtents[0], mExtents[1]); mBounds[0] = mObjectBounds[0]; -- cgit v1.2.3 From ca24fc11eab5517a6f4a7359d330b7af9bc6d60d Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 6 May 2022 20:55:41 +0300 Subject: SL-17375 Crash at LLViewerOctreeEntry::getSpatialExtents() access violation, 'this' was null --- indra/newview/llface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index d1e2b8b93d..d0c26bc43b 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -2377,7 +2377,7 @@ BOOL LLFace::calcPixelArea(F32& cos_angle_to_view_dir, F32& radius) { //override with avatar bounding box LLVOAvatar* avatar = mVObjp->getAvatar(); - if (avatar) + if (avatar && avatar->mDrawable) { center.load3(avatar->getPositionAgent().mV); const LLVector4a* exts = avatar->mDrawable->getSpatialExtents(); -- cgit v1.2.3 From c0adc5e18106077eaf021599b80a822f7063df01 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Sat, 7 May 2022 01:55:41 +0300 Subject: SL-17376 Fix viewer failing due to missing vcruntime140_1 --- indra/cmake/Copy3rdPartyLibs.cmake | 1 + indra/newview/viewer_manifest.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index b408702f04..ff705101de 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -129,6 +129,7 @@ if(WINDOWS) msvcp${MSVC_VER}.dll msvcr${MSVC_VER}.dll vcruntime${MSVC_VER}.dll + vcruntime${MSVC_VER}_1.dll ) if(EXISTS "${registry_path}/${release_msvc_file}") to_staging_dirs( diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 76160b73ba..0f940dfa64 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -527,6 +527,7 @@ class WindowsManifest(ViewerManifest): # See http://msdn.microsoft.com/en-us/library/ms235291(VS.80).aspx self.path("msvcp140.dll") self.path("vcruntime140.dll") + self.path("vcruntime140_1.dll") # SLVoice executable with self.prefix(src=os.path.join(pkgdir, 'bin', 'release')): @@ -604,6 +605,7 @@ class WindowsManifest(ViewerManifest): 'sharedlibs', 'Release')): self.path("msvcp140.dll") self.path("vcruntime140.dll") + self.path("vcruntime140_1.dll") # CEF files common to all configurations with self.prefix(src=os.path.join(pkgdir, 'resources')): -- cgit v1.2.3 From f0fa74fde742b23f7de007140bd6c380550a513f Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 10 May 2022 14:23:01 +0300 Subject: SL-17376 Do not fail build if vcruntime140_1 is missing If there is no vcruntime140_1 in the build system, it is likely that file is not required for the viewer to run. --- indra/lib/python/indra/util/llmanifest.py | 43 +++++++++++++++++++++++++++++++ indra/newview/viewer_manifest.py | 4 +-- 2 files changed, 45 insertions(+), 2 deletions(-) diff --git a/indra/lib/python/indra/util/llmanifest.py b/indra/lib/python/indra/util/llmanifest.py index 30b7228289..aedd3b7ee4 100755 --- a/indra/lib/python/indra/util/llmanifest.py +++ b/indra/lib/python/indra/util/llmanifest.py @@ -881,6 +881,49 @@ class LLManifest(object, metaclass=LLManifestRegistry): # particular, let caller notice 0. return count + def path_optional(self, src, dst=None): + sys.stdout.flush() + if src == None: + raise ManifestError("No source file, dst is " + dst) + if dst == None: + dst = src + dst = os.path.join(self.get_dst_prefix(), dst) + sys.stdout.write("Processing %s => %s ... " % (src, self._relative_dst_path(dst))) + + def try_path(src): + # expand globs + count = 0 + if self.wildcard_pattern.search(src): + for s,d in self.expand_globs(src, dst): + assert(s != d) + count += self.process_file(s, d) + else: + # if we're specifying a single path (not a glob), + # we should error out if it doesn't exist + self.check_file_exists(src) + count += self.process_either(src, dst) + return count + + try_prefixes = [self.get_src_prefix(), self.get_artwork_prefix(), self.get_build_prefix()] + for pfx in try_prefixes: + try: + count = try_path(os.path.join(pfx, src)) + except MissingError: + # if we produce MissingError, just try the next prefix + continue + # If we actually found nonzero files, stop looking + if count: + break + else: + sys.stdout.write("Skipping %s\n" % (src)) + return 0 + + print("%d files" % count) + + # Let caller check whether we processed as many files as expected. In + # particular, let caller notice 0. + return count + def do(self, *actions): self.actions = actions self.construct() diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 0f940dfa64..de5ac5ed3d 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -527,7 +527,7 @@ class WindowsManifest(ViewerManifest): # See http://msdn.microsoft.com/en-us/library/ms235291(VS.80).aspx self.path("msvcp140.dll") self.path("vcruntime140.dll") - self.path("vcruntime140_1.dll") + self.path_optional("vcruntime140_1.dll") # SLVoice executable with self.prefix(src=os.path.join(pkgdir, 'bin', 'release')): @@ -605,7 +605,7 @@ class WindowsManifest(ViewerManifest): 'sharedlibs', 'Release')): self.path("msvcp140.dll") self.path("vcruntime140.dll") - self.path("vcruntime140_1.dll") + self.path_optional("vcruntime140_1.dll") # CEF files common to all configurations with self.prefix(src=os.path.join(pkgdir, 'resources')): -- cgit v1.2.3 From 63095005578007345d9916ebc6855246cdb08c7c Mon Sep 17 00:00:00 2001 From: Andrey Lihatskiy Date: Thu, 5 May 2022 18:57:03 +0300 Subject: SL-17356 Viewer changes for Premium Plus support --- indra/newview/llpanelgroupcreate.cpp | 2 +- indra/newview/llpanelpeople.cpp | 4 ++-- indra/newview/llstartup.cpp | 6 ------ indra/newview/skins/default/xui/de/strings.xml | 2 +- indra/newview/skins/default/xui/en/strings.xml | 2 +- indra/newview/skins/default/xui/fr/strings.xml | 2 +- indra/newview/skins/default/xui/it/strings.xml | 2 +- indra/newview/skins/default/xui/ja/strings.xml | 2 +- indra/newview/skins/default/xui/ru/strings.xml | 2 +- 9 files changed, 9 insertions(+), 15 deletions(-) diff --git a/indra/newview/llpanelgroupcreate.cpp b/indra/newview/llpanelgroupcreate.cpp index 52be75072c..01a4ab0455 100644 --- a/indra/newview/llpanelgroupcreate.cpp +++ b/indra/newview/llpanelgroupcreate.cpp @@ -104,7 +104,7 @@ void LLPanelGroupCreate::onOpen(const LLSD& key) // populate list addMembershipRow("Base"); addMembershipRow("Premium"); - addMembershipRow("Premium Plus"); + addMembershipRow("Premium_Plus"); addMembershipRow("Internal");// Present only if you are already in one, needed for testing S32 cost = LLAgentBenefitsMgr::current().getCreateGroupCost(); diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 5997d522c4..e424d6b5f5 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -1090,9 +1090,9 @@ void LLPanelPeople::onGroupLimitInfo() args["MAX_BASIC"] = max_basic; args["MAX_PREMIUM"] = max_premium; - if (LLAgentBenefitsMgr::has("Premium Plus")) + if (LLAgentBenefitsMgr::has("Premium_Plus")) { - S32 max_premium_plus = LLAgentBenefitsMgr::get("Premium Plus").getGroupMembershipLimit(); + S32 max_premium_plus = LLAgentBenefitsMgr::get("Premium_Plus").getGroupMembershipLimit(); args["MAX_PREMIUM_PLUS"] = max_premium_plus; LLNotificationsUtil::add("GroupLimitInfoPlus", args); } diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 5c0bb36d31..98b2bc703b 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -3333,12 +3333,6 @@ bool init_benefits(LLSD& response) succ = false; } - // FIXME PREMIUM - for testing if login does not yet provide Premium Plus. Should be removed thereafter. - //if (succ && !LLAgentBenefitsMgr::has("Premium Plus")) - //{ - // LLAgentBenefitsMgr::init("Premium Plus", packages_sd["Premium"]["benefits"]); - // llassert(LLAgentBenefitsMgr::has("Premium Plus")); - //} return succ; } diff --git a/indra/newview/skins/default/xui/de/strings.xml b/indra/newview/skins/default/xui/de/strings.xml index f021e03dc7..ba26f721fe 100644 --- a/indra/newview/skins/default/xui/de/strings.xml +++ b/indra/newview/skins/default/xui/de/strings.xml @@ -5101,7 +5101,7 @@ Bitte überprüfen Sie http://status.secondlifegrid.net, um herauszufinden, ob e Premium - + Premium Plus diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 866196a760..acb3a720b9 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -3964,7 +3964,7 @@ Please check http://status.secondlifegrid.net to see if there is a known problem Base Premium - Premium Plus + Premium Plus Internal Upgrade to Premium diff --git a/indra/newview/skins/default/xui/fr/strings.xml b/indra/newview/skins/default/xui/fr/strings.xml index 9fde703d6c..f7545f08d2 100644 --- a/indra/newview/skins/default/xui/fr/strings.xml +++ b/indra/newview/skins/default/xui/fr/strings.xml @@ -5102,7 +5102,7 @@ Veuillez vous reporter à http://status.secondlifegrid.net afin de déterminer s Premium - + Premium Plus diff --git a/indra/newview/skins/default/xui/it/strings.xml b/indra/newview/skins/default/xui/it/strings.xml index 3049828f46..7690e02692 100644 --- a/indra/newview/skins/default/xui/it/strings.xml +++ b/indra/newview/skins/default/xui/it/strings.xml @@ -5017,7 +5017,7 @@ Consulta la pagina http://status.secondlifegrid.net per determinare se il proble Premium - + Premium Plus diff --git a/indra/newview/skins/default/xui/ja/strings.xml b/indra/newview/skins/default/xui/ja/strings.xml index dcd6e65d34..b4bc36a800 100644 --- a/indra/newview/skins/default/xui/ja/strings.xml +++ b/indra/newview/skins/default/xui/ja/strings.xml @@ -5100,7 +5100,7 @@ www.secondlife.com から最新バージョンをダウンロードしてくだ プレミアム - + プレミアムプラス diff --git a/indra/newview/skins/default/xui/ru/strings.xml b/indra/newview/skins/default/xui/ru/strings.xml index 43a87b2b18..ee2dcfe9cc 100644 --- a/indra/newview/skins/default/xui/ru/strings.xml +++ b/indra/newview/skins/default/xui/ru/strings.xml @@ -5096,7 +5096,7 @@ support@secondlife.com. Премиум - + Премиум Плюс -- cgit v1.2.3