From 0fd4a8b59677e1a85d19308379ab9967345749dc Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sat, 6 Jan 2024 20:52:25 +0800 Subject: Move assignments with vram_megabytes inside scopes There will be a case not having vram_megabytes declared. --- indra/llwindow/llwindowsdl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp index 8ffce862b8..ec8e04424b 100644 --- a/indra/llwindow/llwindowsdl.cpp +++ b/indra/llwindow/llwindowsdl.cpp @@ -681,6 +681,7 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B CGLDestroyRendererInfo(info); } else vram_megabytes = 256; + gGLManager.mVRAM = vram_megabytes; #else PFNGLXQUERYCURRENTRENDERERINTEGERMESAPROC queryInteger; queryInteger = (PFNGLXQUERYCURRENTRENDERERINTEGERMESAPROC) @@ -688,8 +689,8 @@ 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); -# endif // LL_DARWIN gGLManager.mVRAM = vram_megabytes; +# endif // LL_DARWIN if (gGLManager.mVRAM) LL_INFOS() << "Detected " << gGLManager.mVRAM << "MB VRAM." << LL_ENDL; // If VRAM is not detected, that is handled later -- cgit v1.2.3