summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTommyTheTerrible <81168766+TommyTheTerrible@users.noreply.github.com>2024-07-13 17:39:09 -0400
committerGitHub <noreply@github.com>2024-07-14 00:39:09 +0300
commit27a2531c5bf375ed208d8fd5764a8797f08ce831 (patch)
treec441ab958d766ba4fd7951d2d93da6cfcb206ccc
parent4bc5c806c7c48a20d31a39e631601fdd04a51dfe (diff)
Fix: Stop textures from being set as inactive if still on a face. (#2017)
Textures were being set to Inactive even if still in scene, causing them to be deleted and re-decoded in a loop.
-rw-r--r--indra/newview/llviewertexturelist.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index e486449b4d..d31c53d000 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -926,6 +926,7 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag
}
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
+ bool onFace = false;
for (U32 i = 0; i < LLRender::NUM_TEXTURE_CHANNELS; ++i)
{
for (S32 fi = 0; fi < imagep->getNumFaces(i); ++fi)
@@ -934,6 +935,7 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag
if (face && face->getViewerObject())
{
+ onFace = true;
F32 radius;
F32 cos_angle_to_view_dir;
bool in_frustum = face->calcPixelArea(cos_angle_to_view_dir, radius);
@@ -1031,7 +1033,8 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag
imagep->getLastReferencedTimer()->reset();
//reset texture state.
- imagep->setInactive();
+ if(!onFace)
+ imagep->setInactive();
}
}