Skip to content
Snippets Groups Projects
Commit 72a5c036 authored by Brad Werth's avatar Brad Werth
Browse files

Bug 1815481: Disable hardware WebRender on Mesa drivers in Virtual Machines. r=rmader, a=dmeehan

We classify anything with 'mesa/vmgfx' as a Virtual Machine driver and
block it for Linux.

Differential Revision: https://phabricator.services.mozilla.com/D179864
parent 8cf575c7
No related branches found
No related tags found
No related merge requests found
......@@ -748,6 +748,7 @@ const nsAString& GfxDriverInfo::GetDriverVendor(DriverVendor id) {
DECLARE_DRIVER_VENDOR_ID(SoftwareMesaAll, "mesa/sw-all");
DECLARE_DRIVER_VENDOR_ID(MesaNonIntelNvidiaAtiAll,
"mesa/non-intel-nvidia-ati-all");
DECLARE_DRIVER_VENDOR_ID(MesaVM, "mesa/vmwgfx");
case DriverVendor::Max: // Suppress a warning.
DECLARE_DRIVER_VENDOR_ID(All, "");
}
......
......@@ -242,6 +242,8 @@ enum DriverVendor : uint8_t {
SoftwareMesaAll,
// Wildcard for all non-Intel/NVIDIA/ATI Mesa drivers.
MesaNonIntelNvidiaAtiAll,
// Running in VM.
MesaVM,
Max
};
......
......@@ -376,6 +376,10 @@ void GfxInfo::GetData() {
CopyUTF16toUTF8(GfxDriverInfo::GetDriverVendor(DriverVendor::MesaSWRast),
mDriverVendor);
mIsAccelerated = false;
} else if (strcasestr(driDriver.get(), "vmwgfx")) {
CopyUTF16toUTF8(GfxDriverInfo::GetDriverVendor(DriverVendor::MesaVM),
mDriverVendor);
mIsAccelerated = false;
} else if (!mIsAccelerated) {
CopyUTF16toUTF8(
GfxDriverInfo::GetDriverVendor(DriverVendor::MesaSWUnknown),
......@@ -845,6 +849,14 @@ const nsTArray<GfxDriverInfo>& GfxInfo::GetGfxDriverInfo() {
V(21, 0, 0, 0), "FEATURE_FAILURE_WEBRENDER_BUG_1635186",
"Mesa 21.0.0.0");
// Bug 1815481 - Disable mesa drivers in virtual machines.
APPEND_TO_DRIVER_BLOCKLIST_EXT(
OperatingSystem::Linux, ScreenSizeStatus::All, BatteryStatus::All,
WindowProtocol::All, DriverVendor::MesaVM, DeviceFamily::All,
nsIGfxInfo::FEATURE_WEBRENDER, nsIGfxInfo::FEATURE_BLOCKED_DEVICE,
DRIVER_COMPARISON_IGNORED, V(0, 0, 0, 0),
"FEATURE_FAILURE_WEBRENDER_MESA_VM", "");
////////////////////////////////////
// FEATURE_WEBRENDER_COMPOSITOR
APPEND_TO_DRIVER_BLOCKLIST(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment