summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2024-08-01 19:55:16 +0300
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2024-08-02 12:21:11 +0300
commit793f5ac3411882a53a49916f031090d1b6c72335 (patch)
treec5bdda6bec78b665f6ebc850cde00941deefee4b
parent0ff2bd1a405e4b7f3af5f815d02124017f23d468 (diff)
Crash at LLViewerTexture::updateClass()
-rw-r--r--indra/newview/llviewertexture.cpp4
-rw-r--r--indra/newview/llviewertexturelist.cpp4
-rw-r--r--indra/newview/llviewertexturelist.h2
3 files changed, 5 insertions, 5 deletions
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 9648a9af18..8faa86876f 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -539,9 +539,9 @@ void LLViewerTexture::updateClass()
LL_WARNS() << "Low system memory detected, emergency downrezzing off screen textures" << LL_ENDL;
sDesiredDiscardBias = llmax(sDesiredDiscardBias, 1.5f);
- for (auto image : gTextureList)
+ for (auto& image : gTextureList)
{
- gTextureList.updateImageDecodePriority(image);
+ gTextureList.updateImageDecodePriority(image, false /*will modify gTextureList otherwise!*/);
}
}
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index 115934282f..865805f9bf 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -904,7 +904,7 @@ void LLViewerTextureList::clearFetchingRequests()
extern bool gCubeSnapshot;
-void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imagep)
+void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imagep, bool flush_images)
{
if (imagep->isInDebug() || imagep->isUnremovable())
{
@@ -993,7 +993,7 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag
// Flush formatted images using a lazy flush
//
S32 num_refs = imagep->getNumRefs();
- if (num_refs == min_refs)
+ if (num_refs == min_refs && flush_images)
{
if (imagep->getLastReferencedTimer()->getElapsedTimeF32() > lazy_flush_timeout)
{
diff --git a/indra/newview/llviewertexturelist.h b/indra/newview/llviewertexturelist.h
index 075f6ae915..b614753b4f 100644
--- a/indra/newview/llviewertexturelist.h
+++ b/indra/newview/llviewertexturelist.h
@@ -148,7 +148,7 @@ public:
// - updates decode priority
// - updates desired discard level
// - cleans up textures that haven't been referenced in awhile
- void updateImageDecodePriority(LLViewerFetchedTexture* imagep);
+ void updateImageDecodePriority(LLViewerFetchedTexture* imagep, bool flush_images = true);
private:
F32 updateImagesCreateTextures(F32 max_time);