Bug 1154703 - Avoid using WARP if nvdxgiwrapper.dll is around. a=sledru
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Fri, 24 Apr 2015 17:16:46 -0400
changeset 260318 348c2ae68d50
parent 260317 f1cd36f7e0e1
child 260319 daaa2c27b89f
child 260384 82fa77932e8c
push id746
push userryanvm@gmail.com
push date2015-04-28 22:47 +0000
treeherdermozilla-release@348c2ae68d50 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssledru
bugs1154703
milestone38.0
Bug 1154703 - Avoid using WARP if nvdxgiwrapper.dll is around. a=sledru It seems to cause trouble and isn't really trustworthy.
gfx/thebes/gfxWindowsPlatform.cpp
--- a/gfx/thebes/gfxWindowsPlatform.cpp
+++ b/gfx/thebes/gfxWindowsPlatform.cpp
@@ -1821,17 +1821,18 @@ gfxWindowsPlatform::InitD3D11Devices()
   bool useWARP = false;
 
   nsCOMPtr<nsIGfxInfo> gfxInfo = do_GetService("@mozilla.org/gfx/info;1");
   if (gfxInfo) {
     int32_t status;
     if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_DIRECT3D_11_LAYERS, &status))) {
       if (status != nsIGfxInfo::FEATURE_STATUS_OK) {
 
-        if (gfxPrefs::LayersD3D11DisableWARP()) {
+        // It seems like nvdxgiwrapper makes a mess of WARP. See bug 1154703 for more.
+        if (gfxPrefs::LayersD3D11DisableWARP() || GetModuleHandleA("nvdxgiwrapper.dll")) {
           return;
         }
 
         useWARP = true;
       }
     }
   }