Bug 1165732 - Block WARP when using the built-in VGA driver. r=bas
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Thu, 21 May 2015 12:42:04 -0400
changeset 245002 5f841d4a4a22
parent 245001 7ad1e1216ede
child 245003 20f32599c12e
push id28794
push userkwierso@gmail.com
push date2015-05-21 22:37 +0000
treeherdermozilla-central@3e737d30f842 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbas
bugs1165732
milestone41.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 1165732 - Block WARP when using the built-in VGA driver. r=bas WARP is amazingly slow on the VGA driver on Windows 7. Let's not use it.
gfx/thebes/gfxWindowsPlatform.cpp
--- a/gfx/thebes/gfxWindowsPlatform.cpp
+++ b/gfx/thebes/gfxWindowsPlatform.cpp
@@ -1890,16 +1890,27 @@ gfxWindowsPlatform::InitD3D11Devices()
     if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_DIRECT3D_11_LAYERS, &status))) {
       if (status != nsIGfxInfo::FEATURE_STATUS_OK) {
 
         // It seems like nvdxgiwrap makes a mess of WARP. See bug 1154703 for more.
         if (gfxPrefs::LayersD3D11DisableWARP() || GetModuleHandleA("nvdxgiwrap.dll")) {
           return;
         }
 
+        if (!IsWin8OrLater()) {
+            /* On Windows 7 WARP runs very badly on the builtin vga driver */
+            nsString driver;
+            gfxInfo->GetAdapterDriver(driver);
+            // driver can start with vga or svga so only look for "framebuf..."
+            if (driver.Find("framebuf vga256 vga64k") != kNotFound) {
+                gfxCriticalError(CriticalLog::DefaultOptions(false)) << "Disabling WARP on builtin vga driver";
+                return;
+            }
+        }
+
         useWARP = true;
       }
     }
   }
 
   if (gfxPrefs::LayersD3D11ForceWARP()) {
     useWARP = true;
   }