summaryrefslogtreecommitdiff
path: root/indra/llrender
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2024-09-04 11:34:44 -0500
committerGitHub <noreply@github.com>2024-09-04 11:34:44 -0500
commitcb9f3dcfe9a55789b757bf5a7d9af3d93710c20f (patch)
tree39ae29d9bf804618466c754cda71518d2b86c9a2 /indra/llrender
parent891219dcef44583070e7487d0b6a4e57ad954667 (diff)
#2482 Low end NVIDIA compatibility pass (#2486)
- Use GL_NVX_gpu_memory_info when available - Disable transparent water on Mid+ and lower - Adjust GPU benchmark to better tell the truth - Texture bias tune up - viewer-private/#277 - Report foreground_time in viewer stats
Diffstat (limited to 'indra/llrender')
-rw-r--r--indra/llrender/llgl.cpp12
-rw-r--r--indra/llrender/llgl.h1
2 files changed, 13 insertions, 0 deletions
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp
index 7959b3bb57..0afe78a30c 100644
--- a/indra/llrender/llgl.cpp
+++ b/indra/llrender/llgl.cpp
@@ -1038,6 +1038,7 @@ 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))
{
@@ -1205,6 +1206,17 @@ bool LLGLManager::initGL()
LL_WARNS("RenderInit") << "VRAM Detected (AMDAssociations):" << mVRAM << LL_ENDL;
}
}
+ else if (mHasNVXGpuMemoryInfo)
+ {
+ GLint mem_kb = 0;
+ glGetIntegerv(GL_GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX, &mem_kb);
+ mVRAM = mem_kb / 1024;
+
+ if (mVRAM != 0)
+ {
+ LL_WARNS("RenderInit") << "VRAM Detected (NVXGpuMemoryInfo):" << mVRAM << LL_ENDL;
+ }
+ }
#endif
#if LL_WINDOWS
diff --git a/indra/llrender/llgl.h b/indra/llrender/llgl.h
index be1c0a532a..cd1ba55b16 100644
--- a/indra/llrender/llgl.h
+++ b/indra/llrender/llgl.h
@@ -97,6 +97,7 @@ public:
// Vendor-specific extensions
bool mHasAMDAssociations = false;
+ bool mHasNVXGpuMemoryInfo = false;
bool mIsAMD;
bool mIsNVIDIA;