diff options
author | Rye Cogtail <rye@lindenlab.com> | 2024-09-28 23:32:30 -0400 |
---|---|---|
committer | Rye Cogtail <rye@lindenlab.com> | 2024-09-28 23:32:30 -0400 |
commit | ee9366b30dc15426db1316933107525d4678a616 (patch) | |
tree | ab6b1830cd45dbab51e525ac666bf1665fe95c6d /indra/llrender | |
parent | d511ff7365284a4475b1d729cf3448d378c83341 (diff) |
Fix using nvidia extension to get GL memory under linux
Diffstat (limited to 'indra/llrender')
-rw-r--r-- | indra/llrender/llgl.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index 15fb289de3..33f7098c5c 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -1038,7 +1038,6 @@ void LLGLManager::initWGL() GLH_EXT_NAME(wglGetGPUIDsAMD) = (PFNWGLGETGPUIDSAMDPROC)GLH_EXT_GET_PROC_ADDRESS("wglGetGPUIDsAMD"); GLH_EXT_NAME(wglGetGPUInfoAMD) = (PFNWGLGETGPUINFOAMDPROC)GLH_EXT_GET_PROC_ADDRESS("wglGetGPUInfoAMD"); } - mHasNVXGpuMemoryInfo = ExtensionExists("GL_NVX_gpu_memory_info", gGLHExts.mSysExts); if (ExtensionExists("WGL_EXT_swap_control", gGLHExts.mSysExts)) { @@ -1210,8 +1209,10 @@ bool LLGLManager::initGL() { LL_WARNS("RenderInit") << "VRAM Detected (AMDAssociations):" << mVRAM << LL_ENDL; } - } - else if (mHasNVXGpuMemoryInfo) + } else +#endif +#if LL_WINDOWS || LL_LINUX + if (mHasNVXGpuMemoryInfo) { GLint mem_kb = 0; glGetIntegerv(GL_GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX, &mem_kb); @@ -1429,6 +1430,10 @@ void LLGLManager::initExtensions() mHasTransformFeedback = mGLVersion >= 3.99f; mHasDebugOutput = mGLVersion >= 4.29f; +#if LL_WINDOWS || LL_LINUX + mHasNVXGpuMemoryInfo = ExtensionExists("GL_NVX_gpu_memory_info", gGLHExts.mSysExts); +#endif + // Misc glGetIntegerv(GL_MAX_ELEMENTS_VERTICES, (GLint*) &mGLMaxVertexRange); glGetIntegerv(GL_MAX_ELEMENTS_INDICES, (GLint*) &mGLMaxIndexRange); |