From 742ecbd4ec80d0405ef34eb2411ef3ea52607c3e Mon Sep 17 00:00:00 2001
From: Mnikolenko Productengine <mnikolenko@productengine.com>
Date: Fri, 2 Sep 2022 12:14:32 +0300
Subject: SL-17823 FIXED Terrain texture does not show in minimap when
 relogging.

---
 indra/newview/llsurfacepatch.cpp  | 2 +-
 indra/newview/llvlcomposition.cpp | 6 ++++++
 2 files changed, 7 insertions(+), 1 deletion(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llsurfacepatch.cpp b/indra/newview/llsurfacepatch.cpp
index aeefcd6fb8..449d3d95c8 100644
--- a/indra/newview/llsurfacepatch.cpp
+++ b/indra/newview/llsurfacepatch.cpp
@@ -714,7 +714,7 @@ BOOL LLSurfacePatch::updateTexture()
 				{
 					mVObjp->dirtyGeom();
 					gPipeline.markGLRebuild(mVObjp);
-					return TRUE;
+					return !mSTexUpdate;
 				}
 			}
 		}
diff --git a/indra/newview/llvlcomposition.cpp b/indra/newview/llvlcomposition.cpp
index 46beac8255..0e6734f6e0 100644
--- a/indra/newview/llvlcomposition.cpp
+++ b/indra/newview/llvlcomposition.cpp
@@ -287,6 +287,12 @@ BOOL LLVLComposition::generateTexture(const F32 x, const F32 y,
 			BOOL delete_raw = (mDetailTextures[i]->reloadRawImage(ddiscard) != NULL) ;
 			if(mDetailTextures[i]->getRawImageLevel() != ddiscard)//raw iamge is not ready, will enter here again later.
 			{
+                if (mDetailTextures[i]->getDecodePriority() <= 0.0f && !mDetailTextures[i]->hasSavedRawImage())
+                {
+                    mDetailTextures[i]->setBoostLevel(LLGLTexture::BOOST_MAP);
+                    mDetailTextures[i]->forceToRefetchTexture(ddiscard);
+                }
+
 				if(delete_raw)
 				{
 					mDetailTextures[i]->destroyRawImage() ;
-- 
cgit v1.2.3