Bug 1554251 - Enable WebRender on nightly for AMD hardware with Linux and Mesa drivers. r=jrmuizel
authorAndrew Osmond <aosmond@mozilla.com>
Fri, 24 May 2019 13:15:58 -0400
changeset 475670 cb677c177529541d4bbdd2c98f33bd605de749fd
parent 475669 1e50992f413317d69190830a556daea79d98fed3
child 475671 29c76bc4b5901f6fd331435e6db5ff47bcde04bb
push id36071
push userrgurzau@mozilla.com
push dateMon, 27 May 2019 21:53:12 +0000
treeherdermozilla-central@29c76bc4b590 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel
bugs1554251
milestone69.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 1554251 - Enable WebRender on nightly for AMD hardware with Linux and Mesa drivers. r=jrmuizel Differential Revision: https://phabricator.services.mozilla.com/D32506
widget/GfxDriverInfo.cpp
widget/GfxDriverInfo.h
widget/GfxInfoX11.cpp
--- a/widget/GfxDriverInfo.cpp
+++ b/widget/GfxDriverInfo.cpp
@@ -409,14 +409,15 @@ const nsAString& GfxDriverInfo::GetDrive
 
   switch (id) {
     DECLARE_DRIVER_VENDOR_ID(DriverVendorAll, "");
     DECLARE_DRIVER_VENDOR_ID(DriverMesaAll, "mesa/all");
     DECLARE_DRIVER_VENDOR_ID(DriverMesaLLVMPipe, "mesa/llvmpipe");
     DECLARE_DRIVER_VENDOR_ID(DriverMesaSoftPipe, "mesa/softpipe");
     DECLARE_DRIVER_VENDOR_ID(DriverMesaSWRast, "mesa/swrast");
     DECLARE_DRIVER_VENDOR_ID(DriverMesaUnknown, "mesa/unknown");
+    DECLARE_DRIVER_VENDOR_ID(DriverNonMesaAll, "non-mesa/all");
     // Suppress a warning.
     DECLARE_DRIVER_VENDOR_ID(DriverVendorMax, "");
   }
 
   return *sDriverVendors[id];
 }
--- a/widget/GfxDriverInfo.h
+++ b/widget/GfxDriverInfo.h
@@ -140,16 +140,18 @@ enum DriverVendor {
   // Note that the following list of Mesa drivers is not comprehensive; we pull
   // the DRI driver at runtime. These drivers are provided for convenience when
   // populating the local blocklist.
   DriverMesaLLVMPipe,
   DriverMesaSoftPipe,
   DriverMesaSWRast,
   // A generic ID to be provided when we can't determine the DRI driver on Mesa.
   DriverMesaUnknown,
+  // Wildcard for all non-Mesa drivers.
+  DriverNonMesaAll,
 
   DriverVendorMax
 };
 
 /* Array of devices to match, or an empty array for all devices */
 typedef nsTArray<nsString> GfxDeviceFamily;
 
 struct GfxDriverInfo {
--- a/widget/GfxInfoX11.cpp
+++ b/widget/GfxInfoX11.cpp
@@ -336,35 +336,49 @@ const nsTArray<GfxDriverInfo>& GfxInfo::
     APPEND_TO_DRIVER_BLOCKLIST(
         OperatingSystem::Linux,
         (nsAString&)GfxDriverInfo::GetDeviceVendor(VendorNVIDIA),
         (nsAString&)GfxDriverInfo::GetDriverVendor(DriverVendorAll),
         GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_WEBRENDER,
         nsIGfxInfo::FEATURE_BLOCKED_DEVICE, DRIVER_COMPARISON_IGNORED,
         V(0, 0, 0, 0), "FEATURE_FAILURE_WEBRENDER_NO_LINUX_NVIDIA", "");
 
-    // Disable on all ATI devices for now.
+    // ATI Mesa baseline, chosen arbitrarily.
     APPEND_TO_DRIVER_BLOCKLIST(
         OperatingSystem::Linux,
         (nsAString&)GfxDriverInfo::GetDeviceVendor(VendorATI),
-        (nsAString&)GfxDriverInfo::GetDriverVendor(DriverVendorAll),
+        (nsAString&)GfxDriverInfo::GetDriverVendor(DriverMesaAll),
+        GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_WEBRENDER,
+        nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, DRIVER_LESS_THAN,
+        V(18, 0, 0, 0), "FEATURE_FAILURE_WEBRENDER_OLD_MESA", "Mesa 18.0.0.0");
+
+    // Disable on all ATI devices not using Mesa for now.
+    APPEND_TO_DRIVER_BLOCKLIST(
+        OperatingSystem::Linux,
+        (nsAString&)GfxDriverInfo::GetDeviceVendor(VendorATI),
+        (nsAString&)GfxDriverInfo::GetDriverVendor(DriverNonMesaAll),
         GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_WEBRENDER,
         nsIGfxInfo::FEATURE_BLOCKED_DEVICE, DRIVER_COMPARISON_IGNORED,
         V(0, 0, 0, 0), "FEATURE_FAILURE_WEBRENDER_NO_LINUX_ATI", "");
   }
   return *sDriverInfo;
 }
 
 bool GfxInfo::DoesDriverVendorMatch(const nsAString& aBlocklistVendor,
                                     const nsAString& aDriverVendor) {
   if (mIsMesa &&
       aBlocklistVendor.Equals(GfxDriverInfo::GetDriverVendor(DriverMesaAll),
                               nsCaseInsensitiveStringComparator())) {
     return true;
   }
+  if (!mIsMesa &&
+      aBlocklistVendor.Equals(GfxDriverInfo::GetDriverVendor(DriverNonMesaAll),
+                              nsCaseInsensitiveStringComparator())) {
+    return true;
+  }
   return GfxInfoBase::DoesDriverVendorMatch(aBlocklistVendor, aDriverVendor);
 }
 
 nsresult GfxInfo::GetFeatureStatusImpl(
     int32_t aFeature, int32_t* aStatus, nsAString& aSuggestedDriverVersion,
     const nsTArray<GfxDriverInfo>& aDriverInfo, nsACString& aFailureId,
     OperatingSystem* aOS /* = nullptr */)