From 029f179719907d674f89e39577c37e82e654b59d Mon Sep 17 00:00:00 2001 From: Dave Houlton Date: Tue, 20 Apr 2021 10:49:33 -0600 Subject: DRTVWR-528 remove wrapper code for RAD telemetry library --- indra/newview/llappviewer.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 06d513ad70..5de4871c65 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -90,7 +90,6 @@ #include "llsdutil_math.h" #include "lllocationhistory.h" #include "llfasttimerview.h" -#include "lltelemetry.h" #include "llvector4a.h" #include "llviewermenufile.h" #include "llvoicechannel.h" @@ -1627,8 +1626,6 @@ bool LLAppViewer::doFrame() LL_INFOS() << "Exiting main_loop" << LL_ENDL; } - LLPROFILE_UPDATE(); - return ! LLApp::isRunning(); } -- cgit v1.2.3 From 9b5b2eac82b1f423daec463b3d55d0f3d3979bbc Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 14 Sep 2021 22:43:17 +0300 Subject: SL-15993 Disabling transparent water should not disable advanced lighting --- indra/newview/llappviewer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 79f1cc0e8f..f68717ef9f 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -610,7 +610,7 @@ static void settings_modify() LLRenderTarget::sUseFBO = gSavedSettings.getBOOL("RenderDeferred"); LLPipeline::sRenderTransparentWater = gSavedSettings.getBOOL("RenderTransparentWater"); LLPipeline::sRenderBump = gSavedSettings.getBOOL("RenderObjectBump"); - LLPipeline::sRenderDeferred = LLPipeline::sRenderTransparentWater && LLPipeline::sRenderBump && gSavedSettings.getBOOL("RenderDeferred"); + LLPipeline::sRenderDeferred = LLPipeline::sRenderBump && gSavedSettings.getBOOL("RenderDeferred"); LLVOSurfacePatch::sLODFactor = gSavedSettings.getF32("RenderTerrainLODFactor"); LLVOSurfacePatch::sLODFactor *= LLVOSurfacePatch::sLODFactor; //square lod factor to get exponential range of [1,4] gDebugGL = gSavedSettings.getBOOL("RenderDebugGL") || gDebugSession; -- cgit v1.2.3 From 7ce17542d46ff7cb6b88d33d4cad5ba4808c6c58 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 12 Nov 2021 17:34:13 +0200 Subject: DRTVWR-528 Reverting multiple commits due to moving them into D546 branch This reverts commits 9b5b2eac82b1f423daec463b3d55d0f3d3979bbc SL-15933 53c0144dd272470172591b967a84beaa4019b728 SL-11687 492ea7c3a03d5ef0d3679b873a44c08baaced0f1 SL-16056 b854eceee3a867d64b20de18d6b7ce91b33abed0 SL-15391 921c3f5f69c90b5924d2f4bbbd32455f8c9c8173 SL-13561 639acb6ff7495a6840d437dd8473172ec03e200a SL-15333 --- indra/newview/llappviewer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 4a33563f3f..87f22a98c1 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -610,7 +610,7 @@ static void settings_modify() LLRenderTarget::sUseFBO = gSavedSettings.getBOOL("RenderDeferred"); LLPipeline::sRenderTransparentWater = gSavedSettings.getBOOL("RenderTransparentWater"); LLPipeline::sRenderBump = gSavedSettings.getBOOL("RenderObjectBump"); - LLPipeline::sRenderDeferred = LLPipeline::sRenderBump && gSavedSettings.getBOOL("RenderDeferred"); + LLPipeline::sRenderDeferred = LLPipeline::sRenderTransparentWater && LLPipeline::sRenderBump && gSavedSettings.getBOOL("RenderDeferred"); LLVOSurfacePatch::sLODFactor = gSavedSettings.getF32("RenderTerrainLODFactor"); LLVOSurfacePatch::sLODFactor *= LLVOSurfacePatch::sLODFactor; //square lod factor to get exponential range of [1,4] gDebugGL = gSavedSettings.getBOOL("RenderDebugGL") || gDebugSession; -- cgit v1.2.3 From b6841d75c2f259c84d5ab6b012bd2ae37d985451 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 15 Apr 2022 19:02:07 -0500 Subject: SL-17219 WIP - Texture pipeline overhaul --- indra/newview/llappviewer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 61fc693b99..7625547dd9 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3227,7 +3227,7 @@ LLSD LLAppViewer::getViewerInfo() const info["LOD_FACTOR"] = gSavedSettings.getF32("RenderVolumeLODFactor"); info["RENDER_QUALITY"] = (F32)gSavedSettings.getU32("RenderQualityPerformance"); info["GPU_SHADERS"] = gSavedSettings.getBOOL("RenderDeferred") ? "Enabled" : "Disabled"; - info["TEXTURE_MEMORY"] = gSavedSettings.getS32("TextureMemory"); + info["TEXTURE_MEMORY"] = gGLManager.mVRAM; #if LL_DARWIN info["HIDPI"] = gHiDPISupport; -- cgit v1.2.3 From 93260cfeff2382dd1ffeecaef208d37bf21c2a01 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Wed, 4 May 2022 16:07:50 +0000 Subject: SL-17283 LLReflectionMapManager prototype. Remove snapshot code related overhead from reflection map renders. Add parallax correction and support for multiple reflection maps. --- indra/newview/llappviewer.cpp | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index a63203f3cb..9748579760 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1512,22 +1512,23 @@ bool LLAppViewer::doFrame() // Render scene. // *TODO: Should we run display() even during gHeadlessClient? DK 2011-02-18 - if (!LLApp::isExiting() && !gHeadlessClient && gViewerWindow) - { - LL_PROFILE_ZONE_NAMED_CATEGORY_APP( "df Display" ) - pingMainloopTimeout("Main:Display"); - gGLActive = TRUE; + if (!LLApp::isExiting() && !gHeadlessClient && gViewerWindow) + { + LL_PROFILE_ZONE_NAMED_CATEGORY_APP("df Display"); + pingMainloopTimeout("Main:Display"); + gGLActive = TRUE; - display(); + display(); - { - LL_PROFILE_ZONE_NAMED_CATEGORY_APP( "df Snapshot" ) - pingMainloopTimeout("Main:Snapshot"); - LLFloaterSnapshot::update(); // take snapshots - LLFloaterOutfitSnapshot::update(); - gGLActive = FALSE; - } - } + { + LL_PROFILE_ZONE_NAMED_CATEGORY_APP("df Snapshot"); + pingMainloopTimeout("Main:Snapshot"); + gPipeline.mReflectionMapManager.update(); + LLFloaterSnapshot::update(); // take snapshots + LLFloaterOutfitSnapshot::update(); + gGLActive = FALSE; + } + } } { -- cgit v1.2.3 From dfa71e2bb59e81de93f626fada6975ae46b01bb6 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 31 May 2022 11:57:15 -0500 Subject: SL-17490 Only update a subset of textures each frame and remove dead debug code. --- indra/newview/llappviewer.cpp | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index e9bf6bf4e5..a172308d2a 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -103,7 +103,6 @@ #include "lldiskcache.h" #include "llvopartgroup.h" #include "llweb.h" -#include "llfloatertexturefetchdebugger.h" #include "llspellcheck.h" #include "llscenemonitor.h" #include "llavatarrenderinfoaccountant.h" @@ -1627,21 +1626,9 @@ bool LLAppViewer::doFrame() LLLFSThread::sLocal->pause(); } - //texture fetching debugger - if(LLTextureFetchDebugger::isEnabled()) - { - LL_PROFILE_ZONE_NAMED_CATEGORY_APP( "df tex_fetch_debugger_instance" ) - LLFloaterTextureFetchDebugger* tex_fetch_debugger_instance = - LLFloaterReg::findTypedInstance("tex_fetch_debugger"); - if(tex_fetch_debugger_instance) - { - tex_fetch_debugger_instance->idle() ; - } - } - { LL_PROFILE_ZONE_NAMED_CATEGORY_APP( "df resumeMainloopTimeout" ) - resumeMainloopTimeout(); + resumeMainloopTimeout(); } pingMainloopTimeout("Main:End"); } @@ -4679,10 +4666,6 @@ void LLAppViewer::idle() // // Special case idle if still starting up // - if (LLStartUp::getStartupState() >= STATE_WORLD_INIT) - { - update_texture_time(); - } if (LLStartUp::getStartupState() < STATE_STARTED) { // Skip rest if idle startup returns false (essentially, no world yet) -- cgit v1.2.3 From fc7b5549cb6092194d11b8d87600f21992305c1c Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 31 May 2022 16:54:05 -0500 Subject: SL-17484 Fix for unit tests. Deprecate non-threaded LLQueuedThread and make lllfsthread threaded. --- indra/newview/llappviewer.cpp | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index a172308d2a..d7ed2bb4df 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1680,16 +1680,20 @@ S32 LLAppViewer::updateTextureThreads(F32 max_time) void LLAppViewer::flushLFSIO() { - while (1) - { - S32 pending = LLLFSThread::updateClass(0); - if (!pending) - { - break; - } - LL_INFOS() << "Waiting for pending IO to finish: " << pending << LL_ENDL; - ms_sleep(100); - } + S32 pending = LLLFSThread::updateClass(0); + if (pending > 0) + { + LL_INFOS() << "Waiting for pending IO to finish: " << pending << LL_ENDL; + while (1) + { + pending = LLLFSThread::updateClass(0); + if (!pending) + { + break; + } + ms_sleep(100); + } + } } bool LLAppViewer::cleanup() @@ -2187,7 +2191,7 @@ bool LLAppViewer::initThreads() LLImage::initClass(gSavedSettings.getBOOL("TextureNewByteRange"),gSavedSettings.getS32("TextureReverseByteRange")); - LLLFSThread::initClass(enable_threads && false); + LLLFSThread::initClass(enable_threads && true); // TODO: fix crashes associated with this shutdo // Image decoding LLAppViewer::sImageDecodeThread = new LLImageDecodeThread(enable_threads && true); -- cgit v1.2.3 From 039c6689c9f3e10970d2617a1127c6a48891e619 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 7 Jun 2022 17:27:29 -0500 Subject: SL-17547 Fix for crash on shutdown cleaning up LLLFSThread --- indra/newview/llappviewer.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index d7ed2bb4df..0b80d32ac3 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1850,8 +1850,6 @@ bool LLAppViewer::cleanup() LL_INFOS() << "Cache files removed" << LL_ENDL; - // Wait for any pending LFS IO - flushLFSIO(); LL_INFOS() << "Shutting down Views" << LL_ENDL; // Destroy the UI @@ -2058,6 +2056,7 @@ bool LLAppViewer::cleanup() sTextureFetch->shutDownTextureCacheThread() ; sTextureFetch->shutDownImageDecodeThread() ; + LLLFSThread::sLocal->shutdown(); LL_INFOS() << "Shutting down message system" << LL_ENDL; end_messaging_system(); -- cgit v1.2.3 From 276647789a7080c0d44ec8e4375daf0f42b73f17 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 9 Jun 2022 10:36:13 -0400 Subject: SL-17483: Simplify ThreadPool instantiations. Now that LL::ThreadPool's constructor has subsumed the work of discovering a runtime override width, LLAppViewer::initGeneralThread() can simply pass the compile-time default width instead of redundantly checking ThreadPoolSizes. Also the default ThreadPool capacity has been bumped up to what "General" and "LLImageGL" were requesting, so they need not pass that explicitly or explain in comments why they're doing it. But until we start throwing work at the "General" ThreadPool, configure it down to 1 thread in settings.xml. --- indra/newview/llappviewer.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 3bcd4f9a49..334df4ee20 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2183,14 +2183,7 @@ void LLAppViewer::initGeneralThread() return; } - LLSD poolSizes{ gSavedSettings.getLLSD("ThreadPoolSizes") }; - LLSD sizeSpec{ poolSizes["General"] }; - LLSD::Integer poolSize{ sizeSpec.isInteger() ? sizeSpec.asInteger() : 3 }; - LL_DEBUGS("ThreadPool") << "Instantiating General pool with " - << poolSize << " threads" << LL_ENDL; - // We don't want anyone, especially the main thread, to have to block - // due to this ThreadPool being full. - mGeneralThreadPool = new LL::ThreadPool("General", poolSize, 1024 * 1024); + mGeneralThreadPool = new LL::ThreadPool("General", 3); mGeneralThreadPool->start(); } -- cgit v1.2.3 From 50dca86f64a167fe0db901310d04784b2f0dfa1f Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 9 Jun 2022 12:06:23 -0400 Subject: SL-17483: Recast LLImageDecodeThread as a facade for ThreadPool. Remove all references to LLQueuedThread (but emulate a couple bits of its API such as handle_t and getPending()). Migrate ImageRequest into llimageworker.cpp. It has never been part of LLImageDecodeThread's public API. Remove ImageRequest tests. Remove all references to LLImageDecodeThread::pause(). The idea of pausing another thread is bizarre to me, and LLThreadPool has no such operation. Nor does it have an abortRequest(). --- indra/newview/llappviewer.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index bc38a96ef2..ae0c9d4dd6 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1548,7 +1548,6 @@ bool LLAppViewer::doFrame() { S32 non_interactive_ms_sleep_time = 100; LLAppViewer::getTextureCache()->pause(); - LLAppViewer::getImageDecodeThread()->pause(); ms_sleep(non_interactive_ms_sleep_time); } @@ -1568,7 +1567,6 @@ bool LLAppViewer::doFrame() ms_sleep(milliseconds_to_sleep); // also pause worker threads during this wait period LLAppViewer::getTextureCache()->pause(); - LLAppViewer::getImageDecodeThread()->pause(); } } @@ -1617,7 +1615,6 @@ bool LLAppViewer::doFrame() { LL_PROFILE_ZONE_NAMED_CATEGORY_APP( "df getTextureCache" ) LLAppViewer::getTextureCache()->pause(); - LLAppViewer::getImageDecodeThread()->pause(); LLAppViewer::getTextureFetch()->pause(); } if(!total_io_pending) //pause file threads if nothing to process. @@ -2051,10 +2048,10 @@ bool LLAppViewer::cleanup() sTextureCache->shutdown(); sImageDecodeThread->shutdown(); sPurgeDiskCacheThread->shutdown(); - if (mGeneralThreadPool) - { - mGeneralThreadPool->close(); - } + if (mGeneralThreadPool) + { + mGeneralThreadPool->close(); + } sTextureFetch->shutDownTextureCacheThread() ; sTextureFetch->shutDownImageDecodeThread() ; -- cgit v1.2.3 From e9cd2b320ea2ecaab88e4904f7c81746ea617fea Mon Sep 17 00:00:00 2001 From: Andrey Lihatskiy Date: Tue, 12 Jul 2022 22:03:50 +0300 Subject: Post-merge conflict fix --- indra/newview/llappviewer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index b26b72c2ed..92a5fe5893 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -572,7 +572,7 @@ static void settings_modify() LLRenderTarget::sUseFBO = LLPipeline::sRenderDeferred; LLVOSurfacePatch::sLODFactor = gSavedSettings.getF32("RenderTerrainLODFactor"); LLVOSurfacePatch::sLODFactor *= LLVOSurfacePatch::sLODFactor; //square lod factor to get exponential range of [1,4] - gDebugGL = gSavedSettings.getBOOL("RenderDebugGL") || gDebugSession; + gDebugGL = gDebugGLSession || gDebugSession; gDebugPipeline = gSavedSettings.getBOOL("RenderDebugPipeline"); } -- cgit v1.2.3 From 963566821d95d30856cd028983d929fab89f542a Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Mon, 8 Aug 2022 14:55:15 -0500 Subject: SL-17927 Keep people from shooting themselves in the foot by twiddling deprecated settings. --- indra/newview/llappviewer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index bf67807aea..225a14dee0 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -567,8 +567,8 @@ static void settings_to_globals() static void settings_modify() { LLPipeline::sRenderTransparentWater = gSavedSettings.getBOOL("RenderTransparentWater"); - LLPipeline::sRenderBump = gSavedSettings.getBOOL("RenderObjectBump"); - LLPipeline::sRenderDeferred = LLPipeline::sRenderBump && gSavedSettings.getBOOL("RenderDeferred"); + LLPipeline::sRenderBump = TRUE; // FALSE is deprecated -- gSavedSettings.getBOOL("RenderObjectBump"); + LLPipeline::sRenderDeferred = TRUE; // FALSE is deprecated -- LLPipeline::sRenderBump&& gSavedSettings.getBOOL("RenderDeferred"); LLRenderTarget::sUseFBO = LLPipeline::sRenderDeferred; LLVOSurfacePatch::sLODFactor = gSavedSettings.getF32("RenderTerrainLODFactor"); LLVOSurfacePatch::sLODFactor *= LLVOSurfacePatch::sLODFactor; // square lod factor to get exponential range of [1,4] -- cgit v1.2.3 From 14af7cabdb80e1de0f5cb2c7e299bd61bc3321cc Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 30 Aug 2022 10:32:09 -0500 Subject: SL-17997 Fix for crash on shutdown --- indra/newview/llappviewer.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 55c0b31bf6..1a38f2da91 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2052,7 +2052,6 @@ bool LLAppViewer::cleanup() } sTextureFetch->shutDownTextureCacheThread() ; - sTextureFetch->shutDownImageDecodeThread() ; LLLFSThread::sLocal->shutdown(); LL_INFOS() << "Shutting down message system" << LL_ENDL; @@ -2186,7 +2185,6 @@ bool LLAppViewer::initThreads() LLAppViewer::sImageDecodeThread = new LLImageDecodeThread(enable_threads && true); LLAppViewer::sTextureCache = new LLTextureCache(enable_threads && true); LLAppViewer::sTextureFetch = new LLTextureFetch(LLAppViewer::getTextureCache(), - sImageDecodeThread, enable_threads && true, app_metrics_qa_mode); LLAppViewer::sPurgeDiskCacheThread = new LLPurgeDiskCacheThread(); -- cgit v1.2.3 From c9f893b1003b2d9db01362430dbbfa59a91d4fd7 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Wed, 31 Aug 2022 11:36:00 -0500 Subject: SL-18065 WIP -- Adjust max virtual size to keep debug floater readable. Make assert on shutdown less frequent (still not gone, likely race condition). Fix unrelated assertion in reflection probes. --- indra/newview/llappviewer.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 0e2828332e..6ca35684d9 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2068,8 +2068,12 @@ bool LLAppViewer::cleanup() //MUST happen AFTER SUBSYSTEM_CLEANUP(LLCurl) delete sTextureCache; sTextureCache = NULL; - delete sTextureFetch; - sTextureFetch = NULL; + if (sTextureFetch) + { + sTextureFetch->shutdown(); + delete sTextureFetch; + sTextureFetch = NULL; + } delete sImageDecodeThread; sImageDecodeThread = NULL; delete mFastTimerLogThread; -- cgit v1.2.3 From 2082443220fe344bb027c3acbf50fea0a99159c3 Mon Sep 17 00:00:00 2001 From: Howard Stearns Date: Thu, 1 Sep 2022 10:58:27 -0700 Subject: SL-17967 - Git rid of ARB that is in core --- indra/newview/llappviewer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 0e2828332e..81387ec8b5 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -531,7 +531,7 @@ static void settings_to_globals() LLSurface::setTextureSize(gSavedSettings.getU32("RegionTextureSize")); - LLRender::sGLCoreProfile = gSavedSettings.getBOOL("RenderGLContextCoreProfile"); + LLRender::sGLCoreProfile = TRUE; // Now required, ignoring gSavedSettings.getBOOL("RenderGLContextCoreProfile"); LLRender::sNsightDebugSupport = gSavedSettings.getBOOL("RenderNsightDebugSupport"); LLVertexBuffer::sUseVAO = gSavedSettings.getBOOL("RenderUseVAO"); LLImageGL::sGlobalUseAnisotropic = gSavedSettings.getBOOL("RenderAnisotropic"); -- cgit v1.2.3 From e0c226b04d6f2ac566a9ea5841509f7cdfa98c11 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Thu, 1 Sep 2022 18:06:15 -0500 Subject: SL-18078, SL-18065 -- Experimentally allow uploading of lossless normal maps, fix for crash on shutdown. --- indra/newview/llappviewer.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 6ca35684d9..54f189625e 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2071,6 +2071,7 @@ bool LLAppViewer::cleanup() if (sTextureFetch) { sTextureFetch->shutdown(); + sTextureFetch->waitOnPending(); delete sTextureFetch; sTextureFetch = NULL; } -- cgit v1.2.3 From 1eeee12ecb4753cc4b651e18474bb80de45fcede Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 20 Sep 2022 12:28:45 -0500 Subject: SL-18190 Don't allocate mips for irradiance maps because they're never generated. Disable OpenGL core profile on Intel by default. --- indra/newview/llappviewer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index b72022d008..e874cf02cb 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -531,7 +531,7 @@ static void settings_to_globals() LLSurface::setTextureSize(gSavedSettings.getU32("RegionTextureSize")); - LLRender::sGLCoreProfile = TRUE; // Now required, ignoring gSavedSettings.getBOOL("RenderGLContextCoreProfile"); + LLRender::sGLCoreProfile = gSavedSettings.getBOOL("RenderGLContextCoreProfile"); LLRender::sNsightDebugSupport = gSavedSettings.getBOOL("RenderNsightDebugSupport"); LLVertexBuffer::sUseVAO = gSavedSettings.getBOOL("RenderUseVAO"); LLImageGL::sGlobalUseAnisotropic = gSavedSettings.getBOOL("RenderAnisotropic"); -- cgit v1.2.3 From 80127acfa876bd98e843a67bd17514a2b3f63d49 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Wed, 12 Oct 2022 22:58:25 -0500 Subject: SL-18190 Limit the number of decode threads. --- indra/newview/llappviewer.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index e874cf02cb..8e5a796498 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2190,6 +2190,19 @@ bool LLAppViewer::initThreads() LLLFSThread::initClass(enable_threads && true); // TODO: fix crashes associated with this shutdo + //auto configure thread count + LLSD threadCounts = gSavedSettings.getLLSD("ThreadPoolSizes"); + + // get the number of concurrent threads that can run + S32 cores = std::thread::hardware_concurrency(); + + // The only configurable thread count right now is ImageDecode + // The viewer typically starts around 8 threads not including image decode, + // so try to leave at least one core free + S32 image_decode_count = llclamp(cores - 9, 1, 8); + threadCounts["ImageDecode"] = image_decode_count; + gSavedSettings.setLLSD("ThreadPoolSizes", threadCounts); + // Image decoding LLAppViewer::sImageDecodeThread = new LLImageDecodeThread(enable_threads && true); LLAppViewer::sTextureCache = new LLTextureCache(enable_threads && true); -- cgit v1.2.3 From a2b09df2db69ba8a2e6b587d839d509fbe5abebb Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 14 Oct 2022 15:52:44 -0500 Subject: SL-18293 Fix for broken wireframe mode. --- indra/newview/llappviewer.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 8e5a796498..130de92ade 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -338,9 +338,6 @@ LLFrameTimer gRestoreGLTimer; BOOL gRestoreGL = FALSE; bool gUseWireframe = FALSE; -//use for remember deferred mode in wireframe switch -bool gInitialDeferredModeForWireframe = FALSE; - LLMemoryInfo gSysMemory; U64Bytes gMemoryAllocated(0); // updated in display_stats() in llviewerdisplay.cpp -- cgit v1.2.3 From 76de36c40520445d7ad77f85cd6c601942b97032 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Thu, 10 Nov 2022 13:21:06 -0600 Subject: SL-18602 Integrate queueModify/queueApply/queueUpdate into all the places that used to post to ModifyMaterialParams directly. --- indra/newview/llappviewer.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 66316a18d4..f3f512a6f2 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -107,6 +107,7 @@ #include "llscenemonitor.h" #include "llavatarrenderinfoaccountant.h" #include "lllocalbitmaps.h" +#include "llgltfmateriallist.h" // Linden library includes #include "llavatarnamecache.h" @@ -4705,6 +4706,8 @@ void LLAppViewer::idle() LLDirPickerThread::clearDead(); F32 dt_raw = idle_timer.getElapsedTimeAndResetF32(); + LLGLTFMaterialList::flushUpdates(); + // Service the WorkQueue we use for replies from worker threads. // Use function statics for the timeslice setting so we only have to fetch // and convert MainWorkTime once. -- cgit v1.2.3 From 8d2ac419b22c8c9475f2efb312dd198ac8eb9fb7 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Wed, 16 Nov 2022 14:49:17 -0600 Subject: SL-18154 Profile guided optimizations vs release viewer. Trim some unused abilities and remove some more fast timers. --- indra/newview/llappviewer.cpp | 39 +++++++++++---------------------------- 1 file changed, 11 insertions(+), 28 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index f3f512a6f2..efc2726785 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1311,23 +1311,6 @@ void LLAppViewer::initMaxHeapSize() LLMemory::initMaxHeapSizeGB(max_heap_size_gb); } -static LLTrace::BlockTimerStatHandle FTM_MESSAGES("System Messages"); -static LLTrace::BlockTimerStatHandle FTM_SLEEP1("Sleep1"); -static LLTrace::BlockTimerStatHandle FTM_SLEEP2("Sleep2"); -static LLTrace::BlockTimerStatHandle FTM_YIELD("Yield"); - -static LLTrace::BlockTimerStatHandle FTM_TEXTURE_CACHE("Texture Cache"); -static LLTrace::BlockTimerStatHandle FTM_DECODE("Image Decode"); -static LLTrace::BlockTimerStatHandle FTM_FETCH("Image Fetch"); - -static LLTrace::BlockTimerStatHandle FTM_LFS("LFS Thread"); -static LLTrace::BlockTimerStatHandle FTM_PAUSE_THREADS("Pause Threads"); -static LLTrace::BlockTimerStatHandle FTM_IDLE("Idle"); -static LLTrace::BlockTimerStatHandle FTM_PUMP("Pump"); -static LLTrace::BlockTimerStatHandle FTM_PUMP_SERVICE("Service"); -static LLTrace::BlockTimerStatHandle FTM_SERVICE_CALLBACK("Callback"); -static LLTrace::BlockTimerStatHandle FTM_AGENT_AUTOPILOT("Autopilot"); -static LLTrace::BlockTimerStatHandle FTM_AGENT_UPDATE("Update"); // externally visible timers LLTrace::BlockTimerStatHandle FTM_FRAME("Frame"); @@ -1406,7 +1389,7 @@ bool LLAppViewer::doFrame() if (gViewerWindow) { - LL_RECORD_BLOCK_TIME(FTM_MESSAGES); + LL_PROFILE_ZONE_NAMED_CATEGORY_APP("System Messages"); gViewerWindow->getWindow()->processMiscNativeEvents(); } @@ -1417,7 +1400,7 @@ bool LLAppViewer::doFrame() if (gViewerWindow) { - LL_RECORD_BLOCK_TIME(FTM_MESSAGES); + LL_PROFILE_ZONE_NAMED_CATEGORY_APP("System Messages"); if (!restoreErrorTrap()) { LL_WARNS() << " Someone took over my signal/exception handler (post messagehandling)!" << LL_ENDL; @@ -1480,7 +1463,7 @@ bool LLAppViewer::doFrame() } { - LL_PROFILE_ZONE_NAMED_CATEGORY_APP("df idle"); //LL_RECORD_BLOCK_TIME(FTM_IDLE); + LL_PROFILE_ZONE_NAMED_CATEGORY_APP("df idle"); idle(); } @@ -1541,7 +1524,7 @@ bool LLAppViewer::doFrame() static LLCachedControl yield_time(gSavedSettings, "YieldTime", -1); if(yield_time >= 0) { - LL_RECORD_BLOCK_TIME(FTM_YIELD); + LL_PROFILE_ZONE_NAMED_CATEGORY_APP("Yield"); LL_PROFILE_ZONE_NUM( yield_time ) ms_sleep(yield_time); } @@ -1594,7 +1577,7 @@ bool LLAppViewer::doFrame() work_pending += updateTextureThreads(max_time); { - LL_RECORD_BLOCK_TIME(FTM_LFS); + LL_PROFILE_ZONE_NAMED_CATEGORY_APP("LFS Thread"); io_pending += LLLFSThread::updateClass(1); } @@ -1663,15 +1646,15 @@ S32 LLAppViewer::updateTextureThreads(F32 max_time) { S32 work_pending = 0; { - LL_RECORD_BLOCK_TIME(FTM_TEXTURE_CACHE); + LL_PROFILE_ZONE_NAMED_CATEGORY_APP("Texture Cache"); work_pending += LLAppViewer::getTextureCache()->update(max_time); // unpauses the texture cache thread } { - LL_RECORD_BLOCK_TIME(FTM_DECODE); + LL_PROFILE_ZONE_NAMED_CATEGORY_APP("Image Decode"); work_pending += LLAppViewer::getImageDecodeThread()->update(max_time); // unpauses the image thread } { - LL_RECORD_BLOCK_TIME(FTM_FETCH); + LL_PROFILE_ZONE_NAMED_CATEGORY_APP("Image Fetch"); work_pending += LLAppViewer::getTextureFetch()->update(max_time); // unpauses the texture fetch thread } return work_pending; @@ -4787,7 +4770,7 @@ void LLAppViewer::idle() } { - LL_RECORD_BLOCK_TIME(FTM_AGENT_AUTOPILOT); + LL_PROFILE_ZONE_NAMED_CATEGORY_APP("Autopilot"); // Handle automatic walking towards points gAgentPilot.updateTarget(); gAgent.autoPilot(&yaw); @@ -4803,7 +4786,7 @@ void LLAppViewer::idle() || (agent_force_update_time > (1.0f / (F32) AGENT_FORCE_UPDATES_PER_SECOND)); if (force_update || (agent_update_time > (1.0f / (F32) AGENT_UPDATES_PER_SECOND))) { - LL_PROFILE_ZONE_SCOPED_CATEGORY_NETWORK; //LL_RECORD_BLOCK_TIME(FTM_AGENT_UPDATE); + LL_PROFILE_ZONE_SCOPED_CATEGORY_NETWORK; // Send avatar and camera info mLastAgentControlFlags = gAgent.getControlFlags(); mLastAgentForceUpdate = force_update ? 0 : agent_force_update_time; @@ -4854,7 +4837,7 @@ void LLAppViewer::idle() if (!gDisconnected) { - LL_RECORD_BLOCK_TIME(FTM_NETWORK); + LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY("Network"); //////////////////////////////////////////////// // -- cgit v1.2.3 From 47166eba9e77130835d4a7ba5d116f538b50d375 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Mon, 28 Nov 2022 16:14:31 +0200 Subject: SL-18362 FIXED Login screen is black on Mac --- indra/newview/llappviewer.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index efc2726785..6e0bbb05ee 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -529,7 +529,11 @@ static void settings_to_globals() LLSurface::setTextureSize(gSavedSettings.getU32("RegionTextureSize")); +#if LL_DARWIN + LLRender::sGLCoreProfile = true; +#else LLRender::sGLCoreProfile = gSavedSettings.getBOOL("RenderGLContextCoreProfile"); +#endif LLRender::sNsightDebugSupport = gSavedSettings.getBOOL("RenderNsightDebugSupport"); LLVertexBuffer::sUseVAO = gSavedSettings.getBOOL("RenderUseVAO"); LLImageGL::sGlobalUseAnisotropic = gSavedSettings.getBOOL("RenderAnisotropic"); -- cgit v1.2.3 From 87bb72a47a1fc64b98e498120e332de76e6a9211 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Wed, 30 Nov 2022 13:25:00 -0600 Subject: SL-18154 WIP -- CPU sampling (AMD uProf) profile guided optimizations to reduce CPU usage of background threads. --- indra/newview/llappviewer.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 6e0bbb05ee..dcc12a865b 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2181,6 +2181,12 @@ bool LLAppViewer::initThreads() // get the number of concurrent threads that can run S32 cores = std::thread::hardware_concurrency(); + U32 max_cores = gSavedSettings.getU32("EmulateCoreCount"); + if (max_cores != 0) + { + cores = llmin(cores, (S32) max_cores); + } + // The only configurable thread count right now is ImageDecode // The viewer typically starts around 8 threads not including image decode, // so try to leave at least one core free -- cgit v1.2.3 From 7ceb266604de07ca6743dcd1077b675dea39f1d9 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 3 Nov 2022 23:31:47 +0200 Subject: SL-18565 Built-in bump maps and some environment textures fail to load Due to udp texture fetching no longer being present --- indra/newview/llappviewer.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index cd8f9d2065..584808167e 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1276,7 +1276,6 @@ bool LLAppViewer::init() //LLSimpleton creations LLEnvironment::createInstance(); - LLEnvironment::getInstance()->initSingleton(); LLWorld::createInstance(); LLSelectMgr::createInstance(); LLViewerCamera::createInstance(); -- cgit v1.2.3 From 7bd9d21e19b923096ba2b5ea3cbc8be3e13d7aa0 Mon Sep 17 00:00:00 2001 From: RunitaiLinden Date: Thu, 19 Jan 2023 09:13:45 -0600 Subject: Optimizations, decruft, and intel compatibility pass (#53) SL-18869, SL-18772 Overhaul VBO management, restore occlusion culling, intel compatibility pass, etc --- indra/newview/llappviewer.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index d4d8b985ce..dd4363d2a4 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -535,7 +535,6 @@ static void settings_to_globals() LLRender::sGLCoreProfile = gSavedSettings.getBOOL("RenderGLContextCoreProfile"); #endif LLRender::sNsightDebugSupport = gSavedSettings.getBOOL("RenderNsightDebugSupport"); - LLVertexBuffer::sUseVAO = gSavedSettings.getBOOL("RenderUseVAO"); LLImageGL::sGlobalUseAnisotropic = gSavedSettings.getBOOL("RenderAnisotropic"); LLImageGL::sCompressTextures = gSavedSettings.getBOOL("RenderCompressTextures"); LLVOVolume::sLODFactor = llclamp(gSavedSettings.getF32("RenderVolumeLODFactor"), 0.01f, MAX_LOD_FACTOR); -- cgit v1.2.3 From 6a260bb3f0bc5bf726ad1c3f98e39d3fb9679484 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 20 Feb 2023 22:24:46 +0200 Subject: SL-19108 Rename outfit snapshot floater --- indra/newview/llappviewer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index dc9f7bb403..0f419d8243 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -213,7 +213,7 @@ #include "llcommandlineparser.h" #include "llfloatermemleak.h" #include "llfloaterreg.h" -#include "llfloatersimpleoutfitsnapshot.h" +#include "llfloatersimplesnapshot.h" #include "llfloatersnapshot.h" #include "llsidepanelinventory.h" #include "llatmosphere.h" @@ -1525,7 +1525,7 @@ bool LLAppViewer::doFrame() LL_PROFILE_ZONE_NAMED_CATEGORY_APP( "df Snapshot" ) pingMainloopTimeout("Main:Snapshot"); LLFloaterSnapshot::update(); // take snapshots - LLFloaterSimpleOutfitSnapshot::update(); + LLFloaterSimpleSnapshot::update(); gGLActive = FALSE; } } -- cgit v1.2.3 From bd4b03de8b73ecb888f8e3111bada7c643f7fcfd Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 10 Mar 2023 13:33:36 -0600 Subject: DRTVWR-559 Fix for assert in LLVertexBuffer, incidental decruft. --- indra/newview/llappviewer.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 061feba0a4..7731f37c94 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -572,8 +572,7 @@ static void settings_to_globals() static void settings_modify() { LLPipeline::sRenderTransparentWater = gSavedSettings.getBOOL("RenderTransparentWater"); - LLPipeline::sRenderBump = TRUE; // FALSE is deprecated -- gSavedSettings.getBOOL("RenderObjectBump"); - LLPipeline::sRenderDeferred = TRUE; // FALSE is deprecated -- LLPipeline::sRenderBump&& gSavedSettings.getBOOL("RenderDeferred"); + LLPipeline::sRenderDeferred = TRUE; // FALSE is deprecated LLRenderTarget::sUseFBO = LLPipeline::sRenderDeferred; LLVOSurfacePatch::sLODFactor = gSavedSettings.getF32("RenderTerrainLODFactor"); LLVOSurfacePatch::sLODFactor *= LLVOSurfacePatch::sLODFactor; //square lod factor to get exponential range of [1,4] -- cgit v1.2.3 From 7c831d115b55b96129806353a51a01dcf2bcebba Mon Sep 17 00:00:00 2001 From: RunitaiLinden Date: Mon, 3 Apr 2023 17:22:40 -0500 Subject: SL-18458 Make LLVOCache the one source of truth on most recently received overrides. (#147) --- indra/newview/llappviewer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 12ed123805..b17c78abac 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -4281,7 +4281,7 @@ U32 LLAppViewer::getObjectCacheVersion() { // Viewer object cache version, change if object update // format changes. JC - const U32 INDRA_OBJECT_CACHE_VERSION = 15; + const U32 INDRA_OBJECT_CACHE_VERSION = 16; return INDRA_OBJECT_CACHE_VERSION; } -- cgit v1.2.3 From 10b2ec92ec74176422fa8c6013dee1036eed57c5 Mon Sep 17 00:00:00 2001 From: Brad Linden Date: Thu, 27 Apr 2023 18:02:48 -0700 Subject: More merge cleanup after DRTVWR-559 & DRTVWR-539 merge. (thanks Ansariel) --- indra/newview/llappviewer.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index dc2ffdb26a..b2349e9f74 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1442,6 +1442,8 @@ bool LLAppViewer::doFrame() LL_PROFILE_ZONE_NAMED_CATEGORY_APP("df suspend") // give listeners a chance to run llcoro::suspend(); + // if one of our coroutines threw an uncaught exception, rethrow it now + LLCoros::instance().rethrow(); } } -- cgit v1.2.3 From 8077d33ba05a46ea61914be686816be5b54bae6d Mon Sep 17 00:00:00 2001 From: RunitaiLinden Date: Thu, 11 May 2023 13:20:34 -0500 Subject: SL-19656 Remove LLPerfStats thread and fold into General thread. Hook avatar GPU time into LLPerfStats. Incidental decruft. --- indra/newview/llappviewer.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 6efbaeacf7..c9fc0e2cc8 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -4698,6 +4698,8 @@ void LLAppViewer::idle() LLFrameTimer::updateFrameTime(); LLFrameTimer::updateFrameCount(); LLEventTimer::updateClass(); + LLPerfStats::updateClass(); + // LLApp::stepFrame() performs the above three calls plus mRunner.run(). // Not sure why we don't call stepFrame() here, except that LLRunner seems // completely redundant with LLEventTimer. -- cgit v1.2.3 From e3f9244375e3ddfb96a38afac007f0a5a68d3b46 Mon Sep 17 00:00:00 2001 From: RunitaiLinden Date: Fri, 12 May 2023 18:09:35 -0500 Subject: SL-19710 Fix for deadlock in LLPerfStats. Move General thread initialization to earlier in session (unrelated). --- indra/newview/llappviewer.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index c9fc0e2cc8..ecb5b81abd 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2214,6 +2214,10 @@ bool LLAppViewer::initThreads() LLAppViewer::sTextureFetch = new LLTextureFetch(LLAppViewer::getTextureCache(), enable_threads && true, app_metrics_qa_mode); + + // general task background thread (LLPerfStats, etc) + LLAppViewer::instance()->initGeneralThread(); + LLAppViewer::sPurgeDiskCacheThread = new LLPurgeDiskCacheThread(); if (LLTrace::BlockTimer::sLog || LLTrace::BlockTimer::sMetricLog) @@ -5632,6 +5636,8 @@ void LLAppViewer::pauseMainloopTimeout() void LLAppViewer::pingMainloopTimeout(const std::string& state, F32 secs) { + LL_PROFILE_ZONE_SCOPED_CATEGORY_APP; + if(mMainloopTimeout) { if(secs < 0.0f) -- cgit v1.2.3 From 87bda552688bb38fe255cc7e6069c1be6ac20834 Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Wed, 17 May 2023 19:30:27 -0400 Subject: Add a binary cache for compiled shaders using glProgramBinary (#216) * Add a binary cache for compiled shaders using glProgramBinary * Add additional sanity checking to shader binary save and load, hook up cache clear and menu option * Fix default init of shader cache data struct and clear gl errors before glGetError calls --------- Co-authored-by: RunitaiLinden --- indra/newview/llappviewer.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index dfdf7a1b61..abef25e34f 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -4446,6 +4446,7 @@ void LLAppViewer::purgeCache() LL_INFOS("AppCache") << "Purging Cache and Texture Cache..." << LL_ENDL; LLAppViewer::getTextureCache()->purgeCache(LL_PATH_CACHE); LLVOCache::getInstance()->removeCache(LL_PATH_CACHE); + LLViewerShaderMgr::instance()->clearShaderCache(); std::string browser_cache = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, "cef_cache"); if (LLFile::isdir(browser_cache)) { -- cgit v1.2.3 From 21b67896e9d1d181f39b8e44b9efe2b4c153d22b Mon Sep 17 00:00:00 2001 From: RunitaiLinden Date: Mon, 26 Jun 2023 15:37:18 -0500 Subject: SL-19909 Fix for reflection probes on vehicles blocking mouse clicks. Incidental instrumentation and decruft. --- indra/newview/llappviewer.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index abef25e34f..cf84094aa4 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -4675,7 +4675,6 @@ public: static LLTrace::BlockTimerStatHandle FTM_AUDIO_UPDATE("Update Audio"); static LLTrace::BlockTimerStatHandle FTM_CLEANUP("Cleanup"); static LLTrace::BlockTimerStatHandle FTM_CLEANUP_DRAWABLES("Drawables"); -static LLTrace::BlockTimerStatHandle FTM_CLEANUP_OBJECTS("Objects"); static LLTrace::BlockTimerStatHandle FTM_IDLE_CB("Idle Callbacks"); static LLTrace::BlockTimerStatHandle FTM_LOD_UPDATE("Update LOD"); static LLTrace::BlockTimerStatHandle FTM_OBJECTLIST_UPDATE("Update Objectlist"); @@ -4972,7 +4971,6 @@ void LLAppViewer::idle() { LL_RECORD_BLOCK_TIME(FTM_CLEANUP); { - LL_RECORD_BLOCK_TIME(FTM_CLEANUP_OBJECTS); gObjectList.cleanDeadObjects(); } { -- cgit v1.2.3 From 3c63cc9c55b1193f2876e7523f0b6766f5a8c5ac Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 28 Jun 2023 18:36:51 -0400 Subject: SL-18837: Make LLVersionInfo::getBuild() S64 for GitHub run IDs. --- indra/newview/llappviewer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 8235e4466c..99ace834c2 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3552,7 +3552,7 @@ void LLAppViewer::writeSystemInfo() gDebugInfo["ClientInfo"]["MajorVersion"] = LLVersionInfo::instance().getMajor(); gDebugInfo["ClientInfo"]["MinorVersion"] = LLVersionInfo::instance().getMinor(); gDebugInfo["ClientInfo"]["PatchVersion"] = LLVersionInfo::instance().getPatch(); - gDebugInfo["ClientInfo"]["BuildVersion"] = LLVersionInfo::instance().getBuild(); + gDebugInfo["ClientInfo"]["BuildVersion"] = std::to_string(LLVersionInfo::instance().getBuild()); gDebugInfo["ClientInfo"]["AddressSize"] = LLVersionInfo::instance().getAddressSize(); gDebugInfo["CAFilename"] = gDirUtilp->getCAFile(); @@ -5669,7 +5669,7 @@ void LLAppViewer::handleLoginComplete() gDebugInfo["ClientInfo"]["MajorVersion"] = LLVersionInfo::instance().getMajor(); gDebugInfo["ClientInfo"]["MinorVersion"] = LLVersionInfo::instance().getMinor(); gDebugInfo["ClientInfo"]["PatchVersion"] = LLVersionInfo::instance().getPatch(); - gDebugInfo["ClientInfo"]["BuildVersion"] = LLVersionInfo::instance().getBuild(); + gDebugInfo["ClientInfo"]["BuildVersion"] = std::to_string(LLVersionInfo::instance().getBuild()); LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); if ( parcel && parcel->getMusicURL()[0]) -- cgit v1.2.3 From 4c89ad558688f6dfa8f7216ad7613ed75823b069 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 14 Jul 2023 02:00:16 +0300 Subject: SL-19306 A method of displaying user-customized keybindings in user-visible text --- indra/newview/llappviewer.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 8235e4466c..3d81d4d7ea 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -195,6 +195,7 @@ #include "llhudeffecttrail.h" #include "llvectorperfoptions.h" #include "llslurl.h" +#include "llurlregistry.h" #include "llwatchdog.h" // Included so that constants/settings might be initialized @@ -4447,6 +4448,7 @@ void LLAppViewer::loadKeyBindings() LL_ERRS("InitInfo") << "Unable to open default key bindings from " << key_bindings_file << LL_ENDL; } } + LLUrlRegistry::instance().setKeybindingHandler(&gViewerInput); } void LLAppViewer::purgeCache() -- cgit v1.2.3 From 455bbcf742691b709353aa3c3e35a76d0ff38ee4 Mon Sep 17 00:00:00 2001 From: RunitaiLinden Date: Tue, 29 Aug 2023 16:42:55 -0500 Subject: SL-20229 Add GenericStreamingMessage and use it to receive GLTF material overrides --- indra/newview/llappviewer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 343778fe03..a6e938e54c 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -4138,7 +4138,7 @@ U32 LLAppViewer::getObjectCacheVersion() { // Viewer object cache version, change if object update // format changes. JC - const U32 INDRA_OBJECT_CACHE_VERSION = 16; + const U32 INDRA_OBJECT_CACHE_VERSION = 17; return INDRA_OBJECT_CACHE_VERSION; } -- cgit v1.2.3 From 200696f25c0db21469c64b89799a2dab54d082d9 Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Wed, 30 Aug 2023 16:57:36 +0200 Subject: SL-19664 Crash in LLAppViewer::initStrings - make the error message more informative --- indra/newview/llappviewer.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index a0135fb6e2..ed9bcd9bc6 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2980,7 +2980,10 @@ void LLAppViewer::initStrings() { // initial check to make sure files are there failed gDirUtilp->dumpCurrentDirectories(LLError::LEVEL_WARN); - LL_ERRS() << "Viewer failed to find localization and UI files. Please reinstall viewer from https://secondlife.com/support/downloads/ and contact https://support.secondlife.com if issue persists after reinstall." << LL_ENDL; + LL_ERRS() << "Viewer failed to find localization and UI files" + << " (strings_path_full = '" << strings_path_full << "')." + << " Please reinstall viewer from https://secondlife.com/support/downloads" + << " and contact https://support.secondlife.com if issue persists after reinstall." << LL_ENDL; } LLTransUtil::parseStrings(strings_file, default_trans_args); LLTransUtil::parseLanguageStrings("language_settings.xml"); -- cgit v1.2.3 From a44959c00a8ec4675d40dcd81e217f905f948735 Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Fri, 1 Sep 2023 19:53:05 +0200 Subject: SL-19664 Crash in LLAppViewer::initStrings(2985) - log extended info --- indra/newview/llappviewer.cpp | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index ed9bcd9bc6..ce5430104e 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -36,6 +36,7 @@ #include "llenvironment.h" #include "llerrorcontrol.h" #include "lleventtimer.h" +#include "llfile.h" #include "llviewertexturelist.h" #include "llgroupmgr.h" #include "llagent.h" @@ -2978,10 +2979,31 @@ void LLAppViewer::initStrings() std::string strings_path_full = gDirUtilp->findSkinnedFilenameBaseLang(LLDir::XUI, strings_file); if (strings_path_full.empty() || !LLFile::isfile(strings_path_full)) { + if (strings_path_full.empty()) + { + LL_WARNS() << "The file '" << strings_file << "' is not found" << LL_ENDL; + } + else + { + llstat st; + int rc = LLFile::stat(strings_path_full, &st); + if (rc != 0) + { + LL_WARNS() << "The file '" << strings_path_full << "' failed to get status. Error code: " << rc << LL_ENDL; + } + else if (S_ISDIR(st.st_mode)) + { + LL_WARNS() << "The filename '" << strings_path_full << "' is a directory name" << LL_ENDL; + } + else + { + LL_WARNS() << "The filename '" << strings_path_full << "' doesn't seem to be a regular file name" << LL_ENDL; + } + } + // initial check to make sure files are there failed gDirUtilp->dumpCurrentDirectories(LLError::LEVEL_WARN); - LL_ERRS() << "Viewer failed to find localization and UI files" - << " (strings_path_full = '" << strings_path_full << "')." + LL_ERRS() << "Viewer failed to find localization and UI files." << " Please reinstall viewer from https://secondlife.com/support/downloads" << " and contact https://support.secondlife.com if issue persists after reinstall." << LL_ENDL; } -- cgit v1.2.3 From 117f07e5a4b7882a44681c730dcc0628238cfec6 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 17 Oct 2023 06:33:05 -0400 Subject: SL-18837: Avoid stuffing build number into 32-bit int. Even though LLVersionInfo::getBuild() already returns a 64-bit int, various consumers assumed it could fit into 32 bits. It was especially bad to pass it to a classic C style varargs function. Only on a little-endian CPU, and only because it was the last argument, the damage was limited to truncation -- instead of arbitrary undefined behavior. Where the consumer doesn't support 64-bit ints, pass as string instead. --- indra/newview/llappviewer.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index dec849afa1..5763ebe721 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3209,8 +3209,10 @@ LLSD LLAppViewer::getViewerInfo() const // LLFloaterAbout. LLSD info; auto& versionInfo(LLVersionInfo::instance()); + // With GitHub builds, the build number is too big to fit in a 32-bit int, + // and LLSD doesn't deal with integers wider than int. Use string. info["VIEWER_VERSION"] = llsd::array(versionInfo.getMajor(), versionInfo.getMinor(), - versionInfo.getPatch(), versionInfo.getBuild()); + versionInfo.getPatch(), stringize(versionInfo.getBuild())); info["VIEWER_VERSION_STR"] = versionInfo.getVersion(); info["CHANNEL"] = versionInfo.getChannel(); info["ADDRESS_SIZE"] = ADDRESS_SIZE; -- cgit v1.2.3 From 649bfb52479bf0e72985cdb8752ed93fa5bb0b1e Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Sat, 18 Nov 2023 01:53:26 +0200 Subject: SL-20550 Infinite loop test crashes intantly on MacOS. --- indra/newview/llappviewer.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 8f47aa8863..7ca4926f87 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -5430,9 +5430,18 @@ void LLAppViewer::forceErrorBadMemoryAccess() void LLAppViewer::forceErrorInfiniteLoop() { LL_WARNS() << "Forcing a deliberate infinite loop" << LL_ENDL; + // Loop is intentionally complicated to fool basic loop detection + LLTimer timer_total; + LLTimer timer_expiry; + const S32 report_frequency = 10; + timer_expiry.setTimerExpirySec(report_frequency); while(true) { - ; + if (timer_expiry.hasExpired()) + { + LL_INFOS() << "Infinite loop time : " << timer_total.getElapsedSeconds() << LL_ENDL; + timer_expiry.setTimerExpirySec(report_frequency); + } } return; } -- cgit v1.2.3 From a1fed466f0cc0c08d3cdcba88e02230c94e763b0 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 23 Nov 2023 00:57:46 +0200 Subject: SL-17434 Crash clearing LLEventPumps We actively use event pumps's connections in threads, make sure nothing modifies list of connections during reset. And in case this doesn't fix the issue list affected pump before it crashes to have a better idea of what is going on. --- indra/newview/llappviewer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 5763ebe721..af8bceb7d8 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1736,7 +1736,7 @@ bool LLAppViewer::cleanup() LLNotifications::instance().clear(); // workaround for DEV-35406 crash on shutdown - LLEventPumps::instance().reset(); + LLEventPumps::instance().reset(true); //dump scene loading monitor results if (LLSceneMonitor::instanceExists()) -- cgit v1.2.3 From 422c006e32109890aa3cde23c40f334868187cbf Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Fri, 15 Dec 2023 18:02:55 +0200 Subject: SL-20702 Remove ALM info in About --- indra/newview/llappviewer.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 4a43133ff6..e6a47f1c64 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3328,7 +3328,6 @@ LLSD LLAppViewer::getViewerInfo() const info["NET_BANDWITH"] = gSavedSettings.getF32("ThrottleBandwidthKBPS"); info["LOD_FACTOR"] = gSavedSettings.getF32("RenderVolumeLODFactor"); info["RENDER_QUALITY"] = (F32)gSavedSettings.getU32("RenderQualityPerformance"); - info["GPU_SHADERS"] = gSavedSettings.getBOOL("RenderDeferred") ? "Enabled" : "Disabled"; info["TEXTURE_MEMORY"] = gGLManager.mVRAM; #if LL_DARWIN -- cgit v1.2.3 From ba74152c823563a66729ea0a7fb7cab5bf58980d Mon Sep 17 00:00:00 2001 From: Ansariel Date: Tue, 9 Jan 2024 00:16:52 +0100 Subject: Replace BOOST_FOREACH with standard C++ range-based for-loops --- indra/newview/llappviewer.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 4a43133ff6..b85ae408d4 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -143,7 +143,6 @@ // Third party library includes #include -#include #include #include #include @@ -1207,7 +1206,7 @@ bool LLAppViewer::init() LLSD item(LeapCommand); LeapCommand.append(item); } - BOOST_FOREACH(const std::string& leap, llsd::inArray(LeapCommand)) + for (const std::string& leap : llsd::inArray(LeapCommand)) { LL_INFOS("InitInfo") << "processing --leap \"" << leap << '"' << LL_ENDL; // We don't have any better description of this plugin than the @@ -2357,7 +2356,7 @@ bool LLAppViewer::loadSettingsFromDirectory(const std::string& location_key, LL_ERRS() << "Invalid settings location list" << LL_ENDL; } - BOOST_FOREACH(const SettingsGroup& group, mSettingsLocationList->groups) + for (const SettingsGroup& group : mSettingsLocationList->groups) { // skip settings groups that aren't the one we requested if (group.name() != location_key) continue; @@ -2369,7 +2368,7 @@ bool LLAppViewer::loadSettingsFromDirectory(const std::string& location_key, return false; } - BOOST_FOREACH(const SettingsFile& file, group.files) + for (const SettingsFile& file : group.files) { LL_INFOS("Settings") << "Attempting to load settings for the group " << file.name() << " - from location " << location_key << LL_ENDL; @@ -2433,11 +2432,11 @@ bool LLAppViewer::loadSettingsFromDirectory(const std::string& location_key, std::string LLAppViewer::getSettingsFilename(const std::string& location_key, const std::string& file) { - BOOST_FOREACH(const SettingsGroup& group, mSettingsLocationList->groups) + for (const SettingsGroup& group : mSettingsLocationList->groups) { if (group.name() == location_key) { - BOOST_FOREACH(const SettingsFile& settings_file, group.files) + for (const SettingsFile& settings_file : group.files) { if (settings_file.name() == file) { @@ -3017,7 +3016,7 @@ void LLAppViewer::initStrings() // Now that we've set "[sourceid]", have to go back through // default_trans_args and reinitialize all those other keys because some // of them, in turn, reference "[sourceid]". - BOOST_FOREACH(std::string key, default_trans_args) + for (const std::string& key : default_trans_args) { std::string brackets(key), nobrackets(key); // Invalid to inspect key[0] if key is empty(). But then, the entire -- cgit v1.2.3 From 284a3cbee95a001c9f7f897a7dd6f81a4b974bd1 Mon Sep 17 00:00:00 2001 From: Andrey Lihatskiy Date: Tue, 9 Jan 2024 21:54:22 +0200 Subject: DRTVWR-599 OSX buildfix #3 --- indra/newview/llappviewer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index b85ae408d4..2599b1e4a0 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1206,7 +1206,7 @@ bool LLAppViewer::init() LLSD item(LeapCommand); LeapCommand.append(item); } - for (const std::string& leap : llsd::inArray(LeapCommand)) + for (const auto& leap : llsd::inArray(LeapCommand)) { LL_INFOS("InitInfo") << "processing --leap \"" << leap << '"' << LL_ENDL; // We don't have any better description of this plugin than the -- cgit v1.2.3 From a67dde1f16c144247cff0b765201e64f8f8e75c2 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 16 Jan 2024 02:58:07 +0200 Subject: SL-20783 Fix excessive control messages controlFlagsDirty() gets set every frame as an example if 'w' is held, causing viewer to send updates each frame, which can be excessive --- indra/newview/llappviewer.cpp | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 2599b1e4a0..401476e177 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -4681,16 +4681,23 @@ void LLAppViewer::idle() // When appropriate, update agent location to the simulator. F32 agent_update_time = agent_update_timer.getElapsedTimeF32(); F32 agent_force_update_time = mLastAgentForceUpdate + agent_update_time; - BOOL force_update = gAgent.controlFlagsDirty() - || (mLastAgentControlFlags != gAgent.getControlFlags()) - || (agent_force_update_time > (1.0f / (F32) AGENT_FORCE_UPDATES_PER_SECOND)); - if (force_update || (agent_update_time > (1.0f / (F32) AGENT_UPDATES_PER_SECOND))) + bool timed_out = agent_update_time > (1.0f / (F32)AGENT_UPDATES_PER_SECOND); + BOOL force_send = + // if there is something to send + (gAgent.controlFlagsDirty() && timed_out) + // if something changed + || (mLastAgentControlFlags != gAgent.getControlFlags()) + // keep alive + || (agent_force_update_time > (1.0f / (F32) AGENT_FORCE_UPDATES_PER_SECOND)); + // timing out doesn't warranty that an update will be sent, + // just that it will be checked. + if (force_send || timed_out) { LL_PROFILE_ZONE_SCOPED_CATEGORY_NETWORK; // Send avatar and camera info mLastAgentControlFlags = gAgent.getControlFlags(); - mLastAgentForceUpdate = force_update ? 0 : agent_force_update_time; - send_agent_update(force_update); + mLastAgentForceUpdate = force_send ? 0 : agent_force_update_time; + send_agent_update(force_send); agent_update_timer.reset(); } } -- cgit v1.2.3 From fee2dc981cb15c54cacd63f778f106ff93a85796 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 19 Jan 2024 23:01:06 +0200 Subject: NSException test --- indra/newview/llappviewer.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 08a6c20acf..30fb0be46c 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -5445,6 +5445,13 @@ void LLAppViewer::forceErrorSoftwareException() LLTHROW(LLException("User selected Force Software Exception")); } +void LLAppViewer::forceErrorOSSpecificException() +{ + // Virtual, MacOS only + const std::string exception_text = "User selected Force OS Exception, Not implemented on this OS"; + throw std::runtime_error(exception_text); +} + void LLAppViewer::forceErrorDriverCrash() { LL_WARNS() << "Forcing a deliberate driver crash" << LL_ENDL; -- cgit v1.2.3 From 4a34a1196627c7e9998edde725d5e839f3ef61b9 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Sat, 20 Jan 2024 02:26:51 +0200 Subject: SL-18721 Shutdown fixes 1. After window closes viewer still takes some time to shut down, so added splash screen to not confuse users (and to see if something gets stuck) 2. Having two identical mWindowHandle caused confusion for me, so I split them. It looks like there might have been issues with thread being stuck because thread's handle wasn't cleaned up. 3. Made region clean mCacheMap immediately instead of spending time making copies on shutdown --- indra/newview/llappviewer.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 30fb0be46c..f094170ff5 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1892,6 +1892,9 @@ bool LLAppViewer::cleanup() LL_INFOS() << "ViewerWindow deleted" << LL_ENDL; } + LLSplashScreen::show(); + LLSplashScreen::update(LLTrans::getString("ShuttingDown")); + LL_INFOS() << "Cleaning up Keyboard & Joystick" << LL_ENDL; // viewer UI relies on keyboard so keep it aound until viewer UI isa gone @@ -2170,6 +2173,8 @@ bool LLAppViewer::cleanup() // deleteSingleton() methods. LLSingletonBase::deleteAll(); + LLSplashScreen::hide(); + LL_INFOS() << "Goodbye!" << LL_ENDL; removeDumpDir(); @@ -5059,6 +5064,9 @@ void LLAppViewer::idleShutdown() && gLogoutTimer.getElapsedTimeF32() < SHUTDOWN_UPLOAD_SAVE_TIME && !logoutRequestSent()) { + gViewerWindow->setShowProgress(TRUE); + gViewerWindow->setProgressPercent(100.f); + gViewerWindow->setProgressString(LLTrans::getString("LoggingOut")); return; } -- cgit v1.2.3 From 78ce375dda587cbc86ade15a4d564a469e6db9d3 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 3 Jan 2024 22:57:28 +0200 Subject: SL-17896 Don't crash silently if files are missing or out of memory Under debug LL_ERRS will show a message as well, but release won't show anything and will quit silently so show a notification when applicable. --- indra/newview/llappviewer.cpp | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index e6a47f1c64..a1fecdb981 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -362,7 +362,6 @@ BOOL gRandomizeFramerate = FALSE; BOOL gPeriodicSlowFrame = FALSE; BOOL gCrashOnStartup = FALSE; -BOOL gLLErrorActivated = FALSE; BOOL gLogoutInProgress = FALSE; BOOL gSimulateMemLeak = FALSE; @@ -2253,9 +2252,6 @@ void errorCallback(LLError::ELevel level, const std::string &error_string) OSMessageBox(error_string, LLTrans::getString("MBFatalError"), OSMB_OK); #endif - //Set the ErrorActivated global so we know to create a marker file - gLLErrorActivated = true; - gDebugInfo["FatalMessage"] = error_string; // We're not already crashing -- we simply *intend* to crash. Since we // haven't actually trashed anything yet, we can afford to write the whole @@ -2264,6 +2260,14 @@ void errorCallback(LLError::ELevel level, const std::string &error_string) } } +void errorMSG(const std::string& title_string, const std::string& message_string) +{ + if (!message_string.empty()) + { + OSMessageBox(message_string, title_string.empty() ? LLTrans::getString("MBFatalError") : title_string, OSMB_OK); + } +} + void LLAppViewer::initLoggingAndGetLastDuration() { // @@ -2275,6 +2279,8 @@ void LLAppViewer::initLoggingAndGetLastDuration() LLError::addGenericRecorder(&errorCallback); //LLError::setTimeFunction(getRuntime); + LLError::LLUserWarningMsg::setHandler(errorMSG); + if (mSecondInstance) { @@ -2412,6 +2418,7 @@ bool LLAppViewer::loadSettingsFromDirectory(const std::string& location_key, { // failed to load if(file.required) { + LLError::LLUserWarningMsg::showMissingFiles(); LL_ERRS() << "Error: Cannot load required settings file from: " << full_settings_path << LL_ENDL; return false; } @@ -2510,6 +2517,7 @@ bool LLAppViewer::initConfiguration() if (!success) { LL_WARNS() << "Cannot load default configuration file " << settings_file_list << LL_ENDL; + LLError::LLUserWarningMsg::showMissingFiles(); if (gDirUtilp->fileExists(settings_file_list)) { LL_ERRS() << "Cannot load default configuration file settings_files.xml. " @@ -2533,6 +2541,7 @@ bool LLAppViewer::initConfiguration() if (!mSettingsLocationList->validateBlock()) { + LLError::LLUserWarningMsg::showMissingFiles(); LL_ERRS() << "Invalid settings file list " << settings_file_list << LL_ENDL; } @@ -2967,6 +2976,8 @@ bool LLAppViewer::initConfiguration() LLEventPumps::instance().obtain("LLControlGroup").post(LLSDMap("init", key)); } + LLError::LLUserWarningMsg::setOutOfMemoryStrings(LLTrans::getString("MBOutOfMemoryTitle"), LLTrans::getString("MBOutOfMemoryErr")); + return true; // Config was successful. } @@ -3004,6 +3015,7 @@ void LLAppViewer::initStrings() // initial check to make sure files are there failed gDirUtilp->dumpCurrentDirectories(LLError::LEVEL_WARN); + LLError::LLUserWarningMsg::showMissingFiles(); LL_ERRS() << "Viewer failed to find localization and UI files." << " Please reinstall viewer from https://secondlife.com/support/downloads" << " and contact https://support.secondlife.com if issue persists after reinstall." << LL_ENDL; @@ -4309,6 +4321,7 @@ void LLAppViewer::loadKeyBindings() key_bindings_file = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "key_bindings.xml"); if (!gViewerInput.loadBindingsXML(key_bindings_file)) { + LLError::LLUserWarningMsg::showMissingFiles(); LL_ERRS("InitInfo") << "Unable to open default key bindings from " << key_bindings_file << LL_ENDL; } } @@ -5399,6 +5412,14 @@ void LLAppViewer::forceErrorLLError() LL_ERRS() << "This is a deliberate llerror" << LL_ENDL; } +void LLAppViewer::forceErrorLLErrorMsg() +{ + LLError::LLUserWarningMsg::show("Deliberate error"); + // Note: under debug this will show a message as well, + // but release won't show anything and will quit silently + LL_ERRS() << "This is a deliberate llerror with a message" << LL_ENDL; +} + void LLAppViewer::forceErrorBreakpoint() { LL_WARNS() << "Forcing a deliberate breakpoint" << LL_ENDL; -- cgit v1.2.3