Skip to content

Commit

Permalink
Bug 1554251 - Enable WebRender on nightly for AMD hardware with Linux…
Browse files Browse the repository at this point in the history
… and Mesa drivers. r=jrmuizel

Differential Revision: https://phabricator.services.mozilla.com/D32506
  • Loading branch information
aosmond committed May 27, 2019
1 parent 5b11cf9 commit 25e3944
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
1 change: 1 addition & 0 deletions widget/GfxDriverInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@ const nsAString& GfxDriverInfo::GetDriverVendor(DriverVendor id) {
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, "");
}
Expand Down
2 changes: 2 additions & 0 deletions widget/GfxDriverInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ enum DriverVendor {
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
};
Expand Down
18 changes: 16 additions & 2 deletions widget/GfxInfoX11.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -341,11 +341,20 @@ const nsTArray<GfxDriverInfo>& GfxInfo::GetGfxDriverInfo() {
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", "");
Expand All @@ -360,6 +369,11 @@ bool GfxInfo::DoesDriverVendorMatch(const nsAString& aBlocklistVendor,
nsCaseInsensitiveStringComparator())) {
return true;
}
if (!mIsMesa &&
aBlocklistVendor.Equals(GfxDriverInfo::GetDriverVendor(DriverNonMesaAll),
nsCaseInsensitiveStringComparator())) {
return true;
}
return GfxInfoBase::DoesDriverVendorMatch(aBlocklistVendor, aDriverVendor);
}

Expand Down

0 comments on commit 25e3944

Please sign in to comment.