From b84f3ff6b129cd71955bcb1fc885491b7002f87f Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Sun, 10 Nov 2024 12:21:34 +0200 Subject: viewer#2780 Speed up terrain loading on teleport Terrain was arriving and processing too late resulting in issues like "Lower terrain material incorrectly shown momentarily" --- indra/newview/llviewertexturelist.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewertexturelist.cpp') diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 0b79c2d8e0..868dde05db 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -30,6 +30,7 @@ #include "llviewertexturelist.h" +#include "llagent.h" #include "llgl.h" // fot gathering stats from GL #include "llimagegl.h" #include "llimagebmp.h" @@ -815,10 +816,19 @@ void LLViewerTextureList::updateImages(F32 max_time) clearFetchingRequests(); gPipeline.clearRebuildGroups(); cleared = true; + return; } - return; + // ARRIVING is a delay to let things decode, cache and process, + // so process textures like normal despite gTeleportDisplay + if (gAgent.getTeleportState() != LLAgent::TELEPORT_ARRIVING) + { + return; + } + } + else + { + cleared = false; } - cleared = false; LLAppViewer::getTextureFetch()->setTextureBandwidth((F32)LLTrace::get_frame_recording().getPeriodMeanPerSec(LLStatViewer::TEXTURE_NETWORK_DATA_RECEIVED).value()); -- cgit v1.2.3 From 09c60de43c7f6a43607ab9ce3937071d1706830d Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Wed, 12 Feb 2025 17:09:44 +0200 Subject: #3210 Fix for "Texture will be downscaled" log message happening too often --- indra/newview/llviewertexturelist.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llviewertexturelist.cpp') diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 0c186c0ed2..12543089c9 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -1081,7 +1081,8 @@ F32 LLViewerTextureList::updateImagesCreateTextures(F32 max_time) imagep->mCreatePending = false; mCreateTextureList.pop(); - if (imagep->hasGLTexture() && imagep->getDiscardLevel() < imagep->getDesiredDiscardLevel()) + if (imagep->hasGLTexture() && imagep->getDiscardLevel() < imagep->getDesiredDiscardLevel() && + (imagep->getDesiredDiscardLevel() <= MAX_DISCARD_LEVEL)) { // NOTE: this may happen if the desired discard reduces while a decode is in progress and does not // necessarily indicate a problem, but if log occurrences excede that of dsiplay_stats: FPS, -- cgit v1.2.3 From 85c77ee9102d4f70cc566f96b4c2f0b1924234da Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 5 Mar 2025 22:03:41 +0200 Subject: #3611 Decrease TextureScaleMinAreaFactor --- indra/newview/llviewertexturelist.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'indra/newview/llviewertexturelist.cpp') diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index f5bbff144b..b07957a492 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -901,7 +901,7 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag if (imagep->getBoostLevel() < LLViewerFetchedTexture::BOOST_HIGH) // don't bother checking face list for boosted textures { - static LLCachedControl texture_scale_min(gSavedSettings, "TextureScaleMinAreaFactor", 0.04f); + static LLCachedControl texture_scale_min(gSavedSettings, "TextureScaleMinAreaFactor", 0.0095f); static LLCachedControl texture_scale_max(gSavedSettings, "TextureScaleMaxAreaFactor", 25.f); F32 max_vsize = 0.f; @@ -943,8 +943,9 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag // Scale desired texture resolution higher or lower depending on texture scale // - // Minimum usage examples: a 1024x1024 texture with aplhabet, runing string - // shows one letter at a time + // Minimum usage examples: a 1024x1024 texture with aplhabet (texture atlas), + // runing string shows one letter at a time. If texture has ten 100px symbols + // per side, minimal scale is (100/1024)^2 = 0.0095 // // Maximum usage examples: huge chunk of terrain repeats texture // TODO: make this work with the GLTF texture transforms -- cgit v1.2.3 From b8eda5b1154f35093da563d21667e45b6988c700 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 6 Mar 2025 20:01:49 +0200 Subject: #3673 Crash at updateImageDecodePriority --- indra/newview/llviewertexturelist.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llviewertexturelist.cpp') diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index b07957a492..ae723b4068 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -910,7 +910,8 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag U32 face_count = 0; // get adjusted bias based on image resolution - F32 max_discard = F32(imagep->getMaxDiscardLevel()); + LLImageGL* img = imagep->getGLTexture(); + F32 max_discard = F32(img ? img->getMaxDiscardLevel() : MAX_DISCARD_LEVEL); F32 bias = llclamp(max_discard - 2.f, 1.f, LLViewerTexture::sDesiredDiscardBias); // convert bias into a vsize scaler -- cgit v1.2.3