MAINT-6882 4k monitor with maximized window overwhelms low end GPUs and crashes viewer

meow-7.2.2
pavelkproductengine 2016-11-10 19:44:51 +02:00
parent a283e9b2e1
commit 9bfcda0a51
1 changed files with 3 additions and 4 deletions

View File

@ -488,7 +488,7 @@ bool LLViewerTexture::isMemoryForTextureLow()
LL_RECORD_BLOCK_TIME(FTM_TEXTURE_MEMORY_CHECK);
const S32Megabytes MIN_FREE_TEXTURE_MEMORY(5); //MB
const S32Megabytes MIN_FREE_TEXTURE_MEMORY(20); //MB Changed to 20 MB per MAINT-6882
const S32Megabytes MIN_FREE_MAIN_MEMORY(100); //MB
bool low_mem = false;
@ -511,18 +511,17 @@ bool LLViewerTexture::isMemoryForTextureLow()
}
}
}
#if 0 //ignore nVidia cards
//Enabled this branch per MAINT-6882
else if (gGLManager.mHasNVXMemInfo)
{
S32 free_memory;
glGetIntegerv(GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX, &free_memory);
if(free_memory / 1024 < MIN_FREE_TEXTURE_MEMORY)
if ((S32Megabytes)(free_memory / 1024) < MIN_FREE_TEXTURE_MEMORY)
{
low_mem = true;
}
}
#endif
return low_mem;
}