From 847afb9c653f3bb7d0729589cabacb9f4910ccf3 Mon Sep 17 00:00:00 2001
From: andreykproductengine <andreykproductengine@lindenlab.com>
Date: Tue, 16 Apr 2019 18:10:39 +0300
Subject: [PATCH] SL-10344 Fix decode priority

---
 indra/newview/llvlcomposition.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/indra/newview/llvlcomposition.cpp b/indra/newview/llvlcomposition.cpp
index c4430f43089..58f8acb0d13 100644
--- a/indra/newview/llvlcomposition.cpp
+++ b/indra/newview/llvlcomposition.cpp
@@ -99,6 +99,8 @@ void LLVLComposition::setDetailTextureID(S32 corner, const LLUUID& id)
 	{
 		return;
 	}
+	// This is terrain texture, but we are not setting it as BOOST_TERRAIN
+	// since we will be manipulating it later as needed.
 	mDetailTextures[corner] = LLViewerTextureManager::getFetchedTexture(id);
 	mDetailTextures[corner]->setNoDelete() ;
 	mRawImages[corner] = NULL;
@@ -241,6 +243,7 @@ BOOL LLVLComposition::generateComposition()
 			}
 			mDetailTextures[i]->setBoostLevel(LLGLTexture::BOOST_TERRAIN); // in case we are at low detail
 			mDetailTextures[i]->setMinDiscardLevel(ddiscard);
+			mDetailTextures[i]->addTextureStats(BASE_SIZE*BASE_SIZE); // priority
 			return FALSE;
 		}
 	}
-- 
GitLab