diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-09-19 01:29:22 +0300 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-09-19 19:22:48 +0300 |
commit | ea28e97d85707099ef3cadf7f5632224498af401 (patch) | |
tree | 3f5e6517f50a942fb191877202d1ae10744eb72f /indra/llrender | |
parent | ea8d7cb40501af9b31d784da78aaaf7353af58f3 (diff) | |
parent | 9241fb80588304f89c035e9811af96172982a8c2 (diff) |
Merge branch 'main' into marchcat/b-main-sync
# Conflicts:
# indra/newview/llviewertexturelist.cpp
Diffstat (limited to 'indra/llrender')
-rw-r--r-- | indra/llrender/llgl.cpp | 12 | ||||
-rw-r--r-- | indra/llrender/llgl.h | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index 6f1744b042..02996ecc86 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -1034,6 +1034,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)) { @@ -1201,6 +1202,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; |