SH-2516 Fix: Full Bright Geometry Rendering Increases Rapidly, Destroying Frame Rate. By Bao Linden

This commit is contained in:
CobraElDiablo
2011-12-09 11:50:26 +00:00
committed by Siana Gearz
parent 23b97efb69
commit aad10c9b8d

View File

@@ -3207,6 +3207,12 @@ void LLViewerLODTexture::processTextureStats()
S32 current_discard = getDiscardLevel();
if (sDesiredDiscardBias > 0.0f && mBoostLevel < LLViewerTexture::BOOST_SCULPTED && current_discard >= 0)
{
// SH-2516 fix.
if(desired_discard_bias_max <= sDesiredDiscardBias && !mForceToSaveRawImage)
{
//needs to release texture memory urgently
scaleDown() ;
}
// Limit the amount of GL memory bound each frame
if ( BYTES_TO_MEGA_BYTES(sBoundTextureMemoryInBytes) > sMaxBoundTextureMemInMegaBytes * texmem_middle_bound_scale &&
(!getBoundRecently() || mDesiredDiscardLevel >= mCachedRawDiscardLevel))
@@ -3218,7 +3224,6 @@ void LLViewerLODTexture::processTextureStats()
(!getBoundRecently() || mDesiredDiscardLevel >= mCachedRawDiscardLevel))
{
scaleDown() ;
}
}
}