Link threshold factor for lowering bias based on total texture memory to the same value when textures will be destroyed so bias will not get stuck in texture intense areas

Thu, 04 Dec 2014 18:27:29 +0100

author
Ansariel
date
Thu, 04 Dec 2014 18:27:29 +0100
changeset 43029
4b0fbd2bf062
parent 43028
c3a86010e36d
child 43030
1a4d1e35b648

Link threshold factor for lowering bias based on total texture memory to the same value when textures will be destroyed so bias will not get stuck in texture intense areas

indra/newview/llviewertexture.cpp file | annotate | diff | revisions
     1.1 --- a/indra/newview/llviewertexture.cpp	Thu Dec 04 00:01:06 2014 +0100
     1.2 +++ b/indra/newview/llviewertexture.cpp	Thu Dec 04 18:27:29 2014 +0100
     1.3 @@ -545,6 +545,10 @@
     1.4  	sMaxTotalTextureMem = gTextureList.getMaxTotalTextureMem();
     1.5  	sMaxDesiredTextureMem = sMaxTotalTextureMem; //in Bytes, by default and when total used texture memory is small.
     1.6  
     1.7 +	// <FS:Ansariel> Link threshold factor for lowering bias based on total texture memory to the same value
     1.8 +	//               textures will be destroyed
     1.9 +	static LLCachedControl<F32> fsDestroyGLTexturesThreshold(gSavedSettings, "FSDestroyGLTexturesThreshold");
    1.10 +
    1.11  	if (sBoundTextureMemory >= sMaxBoundTextureMem ||
    1.12  		sTotalTextureMemory >= sMaxTotalTextureMem)
    1.13  	{
    1.14 @@ -575,7 +579,11 @@
    1.15  	}
    1.16  	else if (sDesiredDiscardBias > 0.0f &&
    1.17  			 sBoundTextureMemory < sMaxBoundTextureMem * texmem_lower_bound_scale &&
    1.18 -			 sTotalTextureMemory < sMaxTotalTextureMem * texmem_lower_bound_scale)
    1.19 +			 // <FS:Ansariel> Link threshold factor for lowering bias based on total texture memory to the same value
    1.20 +			 //               textures will be destroyed
    1.21 +			 //sTotalTextureMemory < sMaxTotalTextureMem * texmem_lower_bound_scale)
    1.22 +			 sTotalTextureMemory < sMaxTotalTextureMem * fsDestroyGLTexturesThreshold())
    1.23 +			 // </FS:Ansariel>
    1.24  	{			 
    1.25  		// If we are using less texture memory than we should,
    1.26  		// scale down the desired discard level

mercurial