Adjust the factor for calculating mMaxResidentTexMemInMegaBytes when exceeding 512MB texture memory as it seems to have quite a performance impact otherwise if we have to discard texture details

meow-7.2.2
Ansariel 2015-05-01 21:01:24 +02:00
parent 25e15f6730
commit a2b6de90b2
1 changed files with 12 additions and 1 deletions

View File

@ -1412,16 +1412,27 @@ void LLViewerTextureList::updateMaxResidentTexMem(S32Megabytes mem)
}
//</FS:TS>
mMaxTotalTextureMemInMegaBytes = mMaxResidentTexMemInMegaBytes * 2;
// <FS:Ansariel> Texture memory management
//mMaxTotalTextureMemInMegaBytes = mMaxResidentTexMemInMegaBytes * 2;
#ifndef ND_BUILD64BIT_ARCH
// </FS:Ansariel>
mMaxTotalTextureMemInMegaBytes = mMaxResidentTexMemInMegaBytes * 2;
if (mMaxResidentTexMemInMegaBytes > (S32Megabytes)640)
{
mMaxTotalTextureMemInMegaBytes -= (mMaxResidentTexMemInMegaBytes / 4);
}
// <FS:Ansariel> Texture memory management
mMaxTotalTextureMemInMegaBytes = llclamp(mMaxTotalTextureMemInMegaBytes, (S32Megabytes)0, (S32Megabytes)768);
#else
if (mMaxResidentTexMemInMegaBytes > gMaxVideoRam / 2)
{
mMaxTotalTextureMemInMegaBytes = gMaxVideoRam + (S32Megabytes)(mMaxResidentTexMemInMegaBytes * 0.25f);
}
else
{
mMaxTotalTextureMemInMegaBytes = mMaxResidentTexMemInMegaBytes * 2;
}
#endif
// </FS:Ansariel>