diff --git a/indra/llwindow/lldxhardware.cpp b/indra/llwindow/lldxhardware.cpp index e7afef63f8..8141cf9bb8 100755 --- a/indra/llwindow/lldxhardware.cpp +++ b/indra/llwindow/lldxhardware.cpp @@ -443,7 +443,10 @@ LLDXDevice *LLDXHardware::findDevice(const std::string &vendor, const std::strin } */ -BOOL LLDXHardware::getInfo(BOOL vram_only) +// FIRE-15891: Add option to disable WMI check in case of problems +//BOOL LLDXHardware::getInfo(BOOL vram_only) +BOOL LLDXHardware::getInfo(BOOL vram_only, bool disable_wmi) +// { LLTimer hw_timer; BOOL ok = FALSE; @@ -525,7 +528,10 @@ BOOL LLDXHardware::getInfo(BOOL vram_only) get_wstring(device_containerp, L"szDeviceID", deviceID, 512); - if (SUCCEEDED(GetVideoMemoryViaWMI(deviceID, &vram))) + // FIRE-15891: Add option to disable WMI check in case of problems + //if (SUCCEEDED(GetVideoMemoryViaWMI(deviceID, &vram))) + if (!disable_wmi && SUCCEEDED(GetVideoMemoryViaWMI(deviceID, &vram))) + // { mVRAM = vram/(1024*1024); } diff --git a/indra/llwindow/lldxhardware.h b/indra/llwindow/lldxhardware.h index 61a32bf0fb..066227819d 100755 --- a/indra/llwindow/lldxhardware.h +++ b/indra/llwindow/lldxhardware.h @@ -86,7 +86,10 @@ public: // Returns TRUE on success. // vram_only TRUE does a "light" probe. - BOOL getInfo(BOOL vram_only); + // FIRE-15891: Add option to disable WMI check in case of problems + //BOOL getInfo(BOOL vram_only); + BOOL getInfo(BOOL vram_only, bool disable_wmi); + // S32 getVRAM() const { return mVRAM; } diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 7796c70e79..7524c2efca 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -23274,6 +23274,17 @@ Change of this parameter will affect the layout of buttons in notification toast Value 1.0 + FSDisableWMIProbing + + Comment + Disables VRAM detection via WMI probing on Windows systems + Persist + 1 + Type + Boolean + Value + 0 + diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp index bb7a7041bd..eaf5cc530f 100644 --- a/indra/newview/llappviewerwin32.cpp +++ b/indra/newview/llappviewerwin32.cpp @@ -660,7 +660,10 @@ bool LLAppViewerWin32::initHardwareTest() LL_DEBUGS("AppInit") << "Attempting to poll DirectX for hardware info" << LL_ENDL; gDXHardware.setWriteDebugFunc(write_debug_dx); - BOOL probe_ok = gDXHardware.getInfo(vram_only); + // FIRE-15891: Add option to disable WMI check in case of problems + //BOOL probe_ok = gDXHardware.getInfo(vram_only); + BOOL probe_ok = gDXHardware.getInfo(vram_only, gSavedSettings.getBOOL("FSDisableWMIProbing")); + // if (!probe_ok && gWarningSettings.getBOOL("AboutDirectX9"))