Updated VRAM reporting logic on Linux

Modified the condition for using NVXMemInfo in LLWindowSDL. Now, it will only use accurate feedback onNVidia if there's no override being used.
meow-7.2.2
Beq 2024-07-19 16:31:49 +01:00
parent 444b554a52
commit 69b405553f
1 changed files with 2 additions and 1 deletions

View File

@ -2691,7 +2691,8 @@ U32 LLWindowSDL::getAvailableVRAMMegabytes()
return gGLManager.mVRAM - (LLImageGL::getTextureBytesAllocated() * total_factor/mb);
*/
LL_PROFILE_ZONE_SCOPED;
if (gGLManager.mHasNVXMemInfo)
// Only use the accurate feedback if we are not using an override
if (gGLManager.mHasNVXMemInfo && gGLManager.mVRAM == gGLManager.mVRAMDetected)
{
S32 available_memory;
glGetIntegerv(GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX, &available_memory);