summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2024-01-06 20:52:25 +0800
committerErik Kundiman <erik@megapahit.org>2024-01-06 20:52:25 +0800
commit0fd4a8b59677e1a85d19308379ab9967345749dc (patch)
treeee83fb0a56263656dfa935a680175c28dcdfc509 /indra
parentc89a6d51dffb99c1c81bcbfee9d99380f286ddeb (diff)
Move assignments with vram_megabytes inside scopes
There will be a case not having vram_megabytes declared.
Diffstat (limited to 'indra')
-rw-r--r--indra/llwindow/llwindowsdl.cpp3
1 files changed, 2 insertions, 1 deletions
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