diff options
author | Dave Parks <davep@lindenlab.com> | 2024-09-05 12:08:47 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-05 10:08:47 -0700 |
commit | a861e86398e5d3fde9ffb388b2ccfc3624b3a5f7 (patch) | |
tree | 84b8134f9b419f031a19ca83654cf725f0bf7991 /indra | |
parent | d5446b3bcd34ad63b1d120f34c2a4d234262fd38 (diff) |
#2482 Fix for Quadro GPUs claiming to have infinite VRAM (#2511)
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llwindow/llwindowwin32.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index 76abf5eaa2..eaee59d92c 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -4638,6 +4638,12 @@ void LLWindowWin32::LLWindowWin32Thread::checkDXMem() { if (!mGLReady || mGotGLBuffer) { return; } + if ((gGLManager.mHasAMDAssociations || gGLManager.mHasNVXGpuMemoryInfo) && gGLManager.mVRAM != 0) + { // OpenGL already told us the memory budget, don't ask DX + mGotGLBuffer = true; + return; + } + IDXGIFactory4* p_factory = nullptr; HRESULT res = CreateDXGIFactory1(__uuidof(IDXGIFactory4), (void**)&p_factory); @@ -4734,7 +4740,7 @@ void LLWindowWin32::LLWindowWin32Thread::run() { LL_PROFILE_ZONE_SCOPED_CATEGORY_WIN32; - // Check memory budget using DirectX + // Check memory budget using DirectX if OpenGL doesn't have the means to tell us checkDXMem(); if (mWindowHandleThrd != 0) |