From 41fbaed7a69d68651b32062cac0ed5c1d8008bb8 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Thu, 2 May 2024 09:38:29 +0800 Subject: Convert the detected VRAM on NVIDIA & ATI to MBs --- indra/llwindow/llwindowsdl.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'indra/llwindow') diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp index e38186ff39..de09003e0e 100644 --- a/indra/llwindow/llwindowsdl.cpp +++ b/indra/llwindow/llwindowsdl.cpp @@ -690,11 +690,15 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B "glXQueryCurrentRendererIntegerMESA"); unsigned int vram_megabytes = 0; queryInteger(GLX_RENDERER_VIDEO_MEMORY_MESA, &vram_megabytes); - if (!vram_megabytes) + if (!vram_megabytes) { glGetIntegerv(GL_GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX, (int *)&vram_megabytes); - if (!vram_megabytes) + vram_megabytes /= 1024; + } + if (!vram_megabytes) { glGetIntegerv(GL_VBO_FREE_MEMORY_ATI, (int *)&vram_megabytes); + vram_megabytes /= 1024; + } gGLManager.mVRAM = vram_megabytes; # endif // LL_DARWIN -- cgit v1.2.3