summaryrefslogtreecommitdiff
path: root/indra/llwindow/llwindowwin32.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llwindow/llwindowwin32.cpp')
-rw-r--r--indra/llwindow/llwindowwin32.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index 25ef1336c8..0b6ee541c0 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -4642,6 +4642,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);
@@ -4738,7 +4744,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)