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
parent
25e15f6730
commit
a2b6de90b2
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue