diff --git a/doc/contributions.txt b/doc/contributions.txt
index 3f77c7d4e55d2f171bf1a473aab4cd3f470e01fc..f2c249c7c1d637958231280dc09b9496a16225fd 100644
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -175,6 +175,7 @@ Ansariel Hiller
 	STORM-1685
 	STORM-1713
 	STORM-1899
+	MAINT-2368
 Aralara Rajal
 Ardy Lay
 	STORM-859
diff --git a/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl b/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl
index 2745d5fd955403c4098dfe4d452ba2282e784580..ff30560adcf96e0b6db02d1243533c57f3790829 100644
--- a/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl
+++ b/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl
@@ -30,18 +30,24 @@ uniform mat4 matrixPalette[64];
 
 mat4 getObjectSkinnedTransform()
 {
-	int i; 
 	
-	vec4 w = fract(weight4);
-	vec4 index = floor(weight4);
-	
-	float scale = 1.0/(w.x+w.y+w.z+w.w);
-	w *= scale;
+	float w0 = fract(weight4.x);
+	float w1 = fract(weight4.y);
+	float w2 = fract(weight4.z);
+	float w3 = fract(weight4.w);
+			
+	int i0 = int(floor(weight4.x));
+	int i1 = int(floor(weight4.y));
+	int i2 = int(floor(weight4.z));
+	int i3 = int(floor(weight4.w));
+
+	//float scale = 1.0/(w.x+w.y+w.z+w.w);
+	//w *= scale;
 	
-	mat4 mat = matrixPalette[int(index.x)]*w.x;
-	mat += matrixPalette[int(index.y)]*w.y;
-	mat += matrixPalette[int(index.z)]*w.z;
-	mat += matrixPalette[int(index.w)]*w.w;
+	mat4 mat = matrixPalette[i0]*w0;
+	mat += matrixPalette[i1]*w1;
+	mat += matrixPalette[i2]*w2;
+	mat += matrixPalette[i3]*w3;
 		
 	return mat;
 }
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 634ff1392ecbbd2b33ca38a596ff673fe34e4670..9a8beb62346679fe4e0b360ad19109ce2bc68bb1 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -1446,10 +1446,10 @@ void LLViewerFetchedTexture::dump()
 // ONLY called from LLViewerFetchedTextureList
 void LLViewerFetchedTexture::destroyTexture() 
 {
-	//if(LLImageGL::sGlobalTextureMemoryInBytes < sMaxDesiredTextureMemInBytes)//not ready to release unused memory.
-	//{
-	//	return ;
-	//}
+	if(LLImageGL::sGlobalTextureMemoryInBytes < sMaxDesiredTextureMemInBytes * 0.95f)//not ready to release unused memory.
+	{
+		return ;
+	}
 	if (mNeedsCreateTexture)//return if in the process of generating a new texture.
 	{
 		return ;