Bug 1154703. Avoid using WARP if nvdxgiwrapper.dll is around.
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Fri, 24 Apr 2015 17:16:46 -0400
changeset 241277 546210eeaf4ae4c4c50ce617f3de6367894ccb56
parent 241276 a7f8556dca8954da69209bcf4603a17c44482c7a
child 241278 b85a60205e1518ba7ebc616e7c17008bd4433cdd
push id59072
push userjmuizelaar@mozilla.com
push dateMon, 27 Apr 2015 20:44:22 +0000
treeherdermozilla-inbound@546210eeaf4a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1154703
milestone40.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1154703. Avoid using WARP if nvdxgiwrapper.dll is around. It seems to cause trouble and isn't really trustworthy.
gfx/thebes/gfxWindowsPlatform.cpp
--- a/gfx/thebes/gfxWindowsPlatform.cpp
+++ b/gfx/thebes/gfxWindowsPlatform.cpp
@@ -1882,17 +1882,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;
       }
     }
   }