Bug 1614798 - Refactor the blocklist rules to hide more of the boilerplate. r=jrmuizel

We would like to get to a world where we compare/store enums instead of
strings, and this is a step towards.

Differential Revision: https://phabricator.services.mozilla.com/D62503

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Andrew Osmond 2020-02-13 22:39:10 +00:00
Родитель e869934731
Коммит db39fa490d
8 изменённых файлов: 709 добавлений и 719 удалений

Просмотреть файл

@ -12,24 +12,29 @@ using namespace mozilla::widget;
int32_t GfxDriverInfo::allFeatures = 0;
uint64_t GfxDriverInfo::allDriverVersions = ~(uint64_t(0));
GfxDeviceFamily* const GfxDriverInfo::allDevices = nullptr;
GfxDeviceFamily* GfxDriverInfo::sDeviceFamilies[DeviceFamilyMax];
nsAString* GfxDriverInfo::sDesktopEnvironment[DesktopMax];
nsAString* GfxDriverInfo::sWindowProtocol[WindowingMax];
nsAString* GfxDriverInfo::sDeviceVendors[DeviceVendorMax];
nsAString* GfxDriverInfo::sDriverVendors[DriverVendorMax];
GfxDeviceFamily*
GfxDriverInfo::sDeviceFamilies[static_cast<size_t>(DeviceFamily::Max)];
nsAString* GfxDriverInfo::sDesktopEnvironment[static_cast<size_t>(
DesktopEnvironment::Max)];
nsAString*
GfxDriverInfo::sWindowProtocol[static_cast<size_t>(WindowProtocol::Max)];
nsAString*
GfxDriverInfo::sDeviceVendors[static_cast<size_t>(DeviceVendor::Max)];
nsAString*
GfxDriverInfo::sDriverVendors[static_cast<size_t>(DriverVendor::Max)];
GfxDriverInfo::GfxDriverInfo()
: mOperatingSystem(OperatingSystem::Unknown),
mOperatingSystemVersion(0),
mScreen(ScreenSizeStatus::All),
mBattery(BatteryStatus::All),
mDesktopEnvironment(GfxDriverInfo::GetDesktopEnvironment(DesktopAll)),
mWindowProtocol(GfxDriverInfo::GetWindowProtocol(WindowingAll)),
mAdapterVendor(GfxDriverInfo::GetDeviceVendor(VendorAll)),
mDriverVendor(GfxDriverInfo::GetDriverVendor(DriverVendorAll)),
mDevices(allDevices),
mDesktopEnvironment(
GfxDriverInfo::GetDesktopEnvironment(DesktopEnvironment::All)),
mWindowProtocol(GfxDriverInfo::GetWindowProtocol(WindowProtocol::All)),
mAdapterVendor(GfxDriverInfo::GetDeviceVendor(DeviceFamily::All)),
mDriverVendor(GfxDriverInfo::GetDriverVendor(DriverVendor::All)),
mDevices(GfxDriverInfo::GetDeviceFamily(DeviceFamily::All)),
mDeleteDevices(false),
mFeature(allFeatures),
mFeatureStatus(nsIGfxInfo::FEATURE_STATUS_OK),
@ -87,8 +92,9 @@ GfxDriverInfo::GfxDriverInfo(const GfxDriverInfo& aOrig)
// If we're managing the lifetime of the device family, we have to make a
// copy of the original's device family.
if (aOrig.mDeleteDevices && aOrig.mDevices) {
mDevices = new GfxDeviceFamily;
*mDevices = *aOrig.mDevices;
GfxDeviceFamily* devices = new GfxDeviceFamily;
*devices = *aOrig.mDevices;
mDevices = devices;
} else {
mDevices = aOrig.mDevices;
}
@ -144,44 +150,60 @@ nsresult GfxDeviceFamily::Contains(nsAString& aDeviceId) const {
#define APPEND_RANGE(start, end) deviceFamily->AppendRange(start, end)
const GfxDeviceFamily* GfxDriverInfo::GetDeviceFamily(DeviceFamily id) {
if (id >= DeviceFamilyMax) {
if (id >= DeviceFamily::Max) {
MOZ_ASSERT_UNREACHABLE("DeviceFamily id is out of range");
return nullptr;
}
// If it already exists, we must have processed it once, so return it now.
if (sDeviceFamilies[id]) {
return sDeviceFamilies[id];
// All of these have no specific device ID filtering.
switch (id) {
case DeviceFamily::All:
case DeviceFamily::IntelAll:
case DeviceFamily::NvidiaAll:
case DeviceFamily::AtiAll:
case DeviceFamily::AmdAll:
case DeviceFamily::MicrosoftAll:
case DeviceFamily::ParallelsAll:
case DeviceFamily::QualcommAll:
return nullptr;
default:
break;
}
sDeviceFamilies[id] = new GfxDeviceFamily;
GfxDeviceFamily* deviceFamily = sDeviceFamilies[id];
// If it already exists, we must have processed it once, so return it now.
auto idx = static_cast<size_t>(id);
if (sDeviceFamilies[idx]) {
return sDeviceFamilies[idx];
}
sDeviceFamilies[idx] = new GfxDeviceFamily;
GfxDeviceFamily* deviceFamily = sDeviceFamilies[idx];
switch (id) {
case IntelGMA500:
case DeviceFamily::IntelGMA500:
APPEND_DEVICE(0x8108); /* IntelGMA500_1 */
APPEND_DEVICE(0x8109); /* IntelGMA500_2 */
break;
case IntelGMA900:
case DeviceFamily::IntelGMA900:
APPEND_DEVICE(0x2582); /* IntelGMA900_1 */
APPEND_DEVICE(0x2782); /* IntelGMA900_2 */
APPEND_DEVICE(0x2592); /* IntelGMA900_3 */
APPEND_DEVICE(0x2792); /* IntelGMA900_4 */
break;
case IntelGMA950:
case DeviceFamily::IntelGMA950:
APPEND_DEVICE(0x2772); /* Intel945G_1 */
APPEND_DEVICE(0x2776); /* Intel945G_2 */
APPEND_DEVICE(0x27a2); /* Intel945_1 */
APPEND_DEVICE(0x27a6); /* Intel945_2 */
APPEND_DEVICE(0x27ae); /* Intel945_3 */
break;
case IntelGMA3150:
case DeviceFamily::IntelGMA3150:
APPEND_DEVICE(0xa001); /* IntelGMA3150_Nettop_1 */
APPEND_DEVICE(0xa002); /* IntelGMA3150_Nettop_2 */
APPEND_DEVICE(0xa011); /* IntelGMA3150_Netbook_1 */
APPEND_DEVICE(0xa012); /* IntelGMA3150_Netbook_2 */
break;
case IntelGMAX3000:
case DeviceFamily::IntelGMAX3000:
APPEND_DEVICE(0x2972); /* Intel946GZ_1 */
APPEND_DEVICE(0x2973); /* Intel946GZ_2 */
APPEND_DEVICE(0x2982); /* IntelG35_1 */
@ -201,7 +223,7 @@ const GfxDeviceFamily* GfxDriverInfo::GetDeviceFamily(DeviceFamily id) {
APPEND_DEVICE(0x2a12); /* IntelGM965_1 */
APPEND_DEVICE(0x2a13); /* IntelGM965_2 */
break;
case IntelGMAX4500HD:
case DeviceFamily::IntelGMAX4500HD:
APPEND_DEVICE(0x2a42); /* IntelGMA4500MHD_1 */
APPEND_DEVICE(0x2a43); /* IntelGMA4500MHD_2 */
APPEND_DEVICE(0x2e42); /* IntelB43_1 */
@ -215,7 +237,7 @@ const GfxDeviceFamily* GfxDriverInfo::GetDeviceFamily(DeviceFamily id) {
APPEND_DEVICE(0x2e12); /* IntelQ45_1 */
APPEND_DEVICE(0x2e13); /* IntelQ45_2 */
break;
case IntelHDGraphicsToIvyBridge:
case DeviceFamily::IntelHDGraphicsToIvyBridge:
APPEND_DEVICE(0x015A); /* IntelIvyBridge_GT1_1 (HD Graphics) */
// clang-format off
APPEND_DEVICE(0x0152); /* IntelIvyBridge_GT1_2 (HD Graphics 2500, desktop) */
@ -224,7 +246,7 @@ const GfxDeviceFamily* GfxDriverInfo::GetDeviceFamily(DeviceFamily id) {
APPEND_DEVICE(0x016A); /* IntelIvyBridge_GT2_3 (HD Graphics P4000, workstation) */
// clang-format on
[[fallthrough]];
case IntelHDGraphicsToSandyBridge:
case DeviceFamily::IntelHDGraphicsToSandyBridge:
APPEND_DEVICE(0x0042); /* IntelHDGraphics */
APPEND_DEVICE(0x0046); /* IntelMobileHDGraphics */
APPEND_DEVICE(0x0102); /* IntelSandyBridge_1 */
@ -235,7 +257,7 @@ const GfxDeviceFamily* GfxDriverInfo::GetDeviceFamily(DeviceFamily id) {
APPEND_DEVICE(0x0126); /* IntelSandyBridge_6 */
APPEND_DEVICE(0x010a); /* IntelSandyBridge_7 */
break;
case IntelHDGraphicsToHaswell:
case DeviceFamily::IntelHDGraphicsToHaswell:
APPEND_DEVICE(0x0402); /* IntelHaswell_GT1_1 */
APPEND_DEVICE(0x0406); /* IntelHaswell_GT1_2 */
APPEND_DEVICE(0x040A); /* IntelHaswell_GT1_3 */
@ -272,16 +294,16 @@ const GfxDeviceFamily* GfxDriverInfo::GetDeviceFamily(DeviceFamily id) {
APPEND_DEVICE(0x0D2B); /* IntelHaswell_GT3e_4 */
APPEND_DEVICE(0x0D2E); /* IntelHaswell_GT3e_5 */
break;
case IntelHD3000:
case DeviceFamily::IntelHD3000:
APPEND_DEVICE(0x0126);
break;
case IntelHD520:
case DeviceFamily::IntelHD520:
APPEND_DEVICE(0x1916);
break;
case IntelMobileHDGraphics:
case DeviceFamily::IntelMobileHDGraphics:
APPEND_DEVICE(0x0046); /* IntelMobileHDGraphics */
break;
case NvidiaBlockD3D9Layers:
case DeviceFamily::NvidiaBlockD3D9Layers:
// Glitches whilst scrolling (see bugs 612007, 644787, 645872)
APPEND_DEVICE(0x00f3); /* NV43 [GeForce 6200 (TM)] */
APPEND_DEVICE(0x0146); /* NV43 [Geforce Go 6600TE/6200TE (TM)] */
@ -304,7 +326,7 @@ const GfxDeviceFamily* GfxDriverInfo::GetDeviceFamily(DeviceFamily id) {
APPEND_DEVICE(0x03d2); /* C61 [GeForce 6100 nForce 400 (TM)] */
APPEND_DEVICE(0x03d5); /* C61 [GeForce 6100 nForce 420 (TM)] */
break;
case RadeonX1000:
case DeviceFamily::RadeonX1000:
// This list is from the ATIRadeonX1000.kext Info.plist
APPEND_DEVICE(0x7187);
APPEND_DEVICE(0x7210);
@ -318,7 +340,7 @@ const GfxDeviceFamily* GfxDriverInfo::GetDeviceFamily(DeviceFamily id) {
APPEND_DEVICE(0x7249);
APPEND_DEVICE(0x7291);
break;
case RadeonCaicos:
case DeviceFamily::AmdRadeonCaicos:
APPEND_DEVICE(0x6766);
APPEND_DEVICE(0x6767);
APPEND_DEVICE(0x6768);
@ -329,16 +351,16 @@ const GfxDeviceFamily* GfxDriverInfo::GetDeviceFamily(DeviceFamily id) {
APPEND_DEVICE(0x6779);
APPEND_DEVICE(0x677b);
break;
case Geforce7300GT:
case DeviceFamily::Geforce7300GT:
APPEND_DEVICE(0x0393);
break;
case Nvidia310M:
case DeviceFamily::Nvidia310M:
APPEND_DEVICE(0x0A70);
break;
case Nvidia8800GTS:
case DeviceFamily::Nvidia8800GTS:
APPEND_DEVICE(0x0193);
break;
case Bug1137716:
case DeviceFamily::Bug1137716:
APPEND_DEVICE(0x0a29);
APPEND_DEVICE(0x0a2b);
APPEND_DEVICE(0x0a2d);
@ -374,14 +396,14 @@ const GfxDeviceFamily* GfxDriverInfo::GetDeviceFamily(DeviceFamily id) {
APPEND_DEVICE(0x1054);
APPEND_DEVICE(0x1055);
break;
case Bug1116812:
case DeviceFamily::Bug1116812:
APPEND_DEVICE(0x2e32);
APPEND_DEVICE(0x2a02);
break;
case Bug1155608:
case DeviceFamily::Bug1155608:
APPEND_DEVICE(0x2e22); /* IntelG45_1 */
break;
case Bug1447141:
case DeviceFamily::Bug1447141:
APPEND_DEVICE(0x9991);
APPEND_DEVICE(0x9993);
APPEND_DEVICE(0x9996);
@ -389,13 +411,13 @@ const GfxDeviceFamily* GfxDriverInfo::GetDeviceFamily(DeviceFamily id) {
APPEND_DEVICE(0x9901);
APPEND_DEVICE(0x990b);
break;
case Bug1207665:
case DeviceFamily::Bug1207665:
APPEND_DEVICE(0xa001); /* Intel Media Accelerator 3150 */
APPEND_DEVICE(0xa002);
APPEND_DEVICE(0xa011);
APPEND_DEVICE(0xa012);
break;
case NvidiaBlockWebRender:
case DeviceFamily::NvidiaBlockWebRender:
/* GT218 */
APPEND_DEVICE(0x0a60);
APPEND_DEVICE(0x0a62);
@ -429,10 +451,10 @@ const GfxDeviceFamily* GfxDriverInfo::GetDeviceFamily(DeviceFamily id) {
/* GT218GLM */
APPEND_DEVICE(0x0a7c);
break;
case NvidiaRolloutWebRender:
case DeviceFamily::NvidiaRolloutWebRender:
APPEND_RANGE(0x06c0, INT32_MAX);
break;
case IntelRolloutWebRender:
case DeviceFamily::IntelRolloutWebRender:
// skylake gt2+
APPEND_DEVICE(0x1912);
APPEND_DEVICE(0x1913);
@ -515,7 +537,7 @@ const GfxDeviceFamily* GfxDriverInfo::GetDeviceFamily(DeviceFamily id) {
APPEND_DEVICE(0x0a1b);
APPEND_DEVICE(0x0a1e);
break;
case AtiRolloutWebRender:
case DeviceFamily::AtiRolloutWebRender:
APPEND_RANGE(0x6600, 0x66af);
APPEND_RANGE(0x6700, 0x671f);
APPEND_RANGE(0x6780, 0x683f);
@ -527,7 +549,15 @@ const GfxDeviceFamily* GfxDriverInfo::GetDeviceFamily(DeviceFamily id) {
APPEND_RANGE(0x9900, 0x99ff);
break;
// This should never happen, but we get a warning if we don't handle this.
default:
case DeviceFamily::Max:
case DeviceFamily::All:
case DeviceFamily::IntelAll:
case DeviceFamily::NvidiaAll:
case DeviceFamily::AtiAll:
case DeviceFamily::AmdAll:
case DeviceFamily::MicrosoftAll:
case DeviceFamily::ParallelsAll:
case DeviceFamily::QualcommAll:
NS_WARNING("Invalid DeviceFamily id");
break;
}
@ -537,137 +567,207 @@ const GfxDeviceFamily* GfxDriverInfo::GetDeviceFamily(DeviceFamily id) {
// Macro for assigning a desktop environment to a string.
#define DECLARE_DESKTOP_ENVIRONMENT_ID(name, desktopEnvId) \
case name: \
sDesktopEnvironment[id]->AssignLiteral(desktopEnvId); \
case DesktopEnvironment::name: \
sDesktopEnvironment[idx]->AssignLiteral(desktopEnvId); \
break;
const nsAString& GfxDriverInfo::GetDesktopEnvironment(DesktopEnvironment id) {
if (id >= DesktopMax) {
if (id >= DesktopEnvironment::Max) {
MOZ_ASSERT_UNREACHABLE("DesktopEnvironment id is out of range");
id = DesktopAll;
id = DesktopEnvironment::All;
}
if (sDesktopEnvironment[id]) {
return *sDesktopEnvironment[id];
auto idx = static_cast<size_t>(id);
if (sDesktopEnvironment[idx]) {
return *sDesktopEnvironment[idx];
}
sDesktopEnvironment[id] = new nsString();
sDesktopEnvironment[idx] = new nsString();
switch (id) {
DECLARE_DESKTOP_ENVIRONMENT_ID(DesktopGNOME, "gnome");
DECLARE_DESKTOP_ENVIRONMENT_ID(DesktopKDE, "kde");
DECLARE_DESKTOP_ENVIRONMENT_ID(DesktopXFCE, "xfce");
DECLARE_DESKTOP_ENVIRONMENT_ID(DesktopCinnamon, "cinnamon");
DECLARE_DESKTOP_ENVIRONMENT_ID(DesktopEnlightenment, "enlightment");
DECLARE_DESKTOP_ENVIRONMENT_ID(DesktopLXDE, "lxde");
DECLARE_DESKTOP_ENVIRONMENT_ID(DesktopOpenbox, "openbox");
DECLARE_DESKTOP_ENVIRONMENT_ID(DesktopI3, "i3");
DECLARE_DESKTOP_ENVIRONMENT_ID(DesktopMate, "mate");
DECLARE_DESKTOP_ENVIRONMENT_ID(DesktopUnity, "unity");
DECLARE_DESKTOP_ENVIRONMENT_ID(DesktopPantheon, "pantheon");
DECLARE_DESKTOP_ENVIRONMENT_ID(DesktopLXQT, "lxqt");
DECLARE_DESKTOP_ENVIRONMENT_ID(DesktopDeepin, "deepin");
DECLARE_DESKTOP_ENVIRONMENT_ID(DesktopUnknown, "unknown");
default: // Suppress a warning.
DECLARE_DESKTOP_ENVIRONMENT_ID(DesktopAll, "");
DECLARE_DESKTOP_ENVIRONMENT_ID(GNOME, "gnome");
DECLARE_DESKTOP_ENVIRONMENT_ID(KDE, "kde");
DECLARE_DESKTOP_ENVIRONMENT_ID(XFCE, "xfce");
DECLARE_DESKTOP_ENVIRONMENT_ID(Cinnamon, "cinnamon");
DECLARE_DESKTOP_ENVIRONMENT_ID(Enlightenment, "enlightment");
DECLARE_DESKTOP_ENVIRONMENT_ID(LXDE, "lxde");
DECLARE_DESKTOP_ENVIRONMENT_ID(Openbox, "openbox");
DECLARE_DESKTOP_ENVIRONMENT_ID(i3, "i3");
DECLARE_DESKTOP_ENVIRONMENT_ID(Mate, "mate");
DECLARE_DESKTOP_ENVIRONMENT_ID(Unity, "unity");
DECLARE_DESKTOP_ENVIRONMENT_ID(Pantheon, "pantheon");
DECLARE_DESKTOP_ENVIRONMENT_ID(LXQT, "lxqt");
DECLARE_DESKTOP_ENVIRONMENT_ID(Deepin, "deepin");
DECLARE_DESKTOP_ENVIRONMENT_ID(Unknown, "unknown");
case DesktopEnvironment::Max: // Suppress a warning.
DECLARE_DESKTOP_ENVIRONMENT_ID(All, "");
}
return *sDesktopEnvironment[id];
return *sDesktopEnvironment[idx];
}
// Macro for assigning a window protocol id to a string.
#define DECLARE_WINDOW_PROTOCOL_ID(name, windowProtocolId) \
case name: \
sWindowProtocol[id]->AssignLiteral(windowProtocolId); \
case WindowProtocol::name: \
sWindowProtocol[idx]->AssignLiteral(windowProtocolId); \
break;
const nsAString& GfxDriverInfo::GetWindowProtocol(WindowProtocol id) {
if (id >= WindowingMax) {
if (id >= WindowProtocol::Max) {
MOZ_ASSERT_UNREACHABLE("WindowProtocol id is out of range");
id = WindowingAll;
id = WindowProtocol::All;
}
if (sWindowProtocol[id]) {
return *sWindowProtocol[id];
auto idx = static_cast<size_t>(id);
if (sWindowProtocol[idx]) {
return *sWindowProtocol[idx];
}
sWindowProtocol[id] = new nsString();
sWindowProtocol[idx] = new nsString();
switch (id) {
DECLARE_WINDOW_PROTOCOL_ID(WindowingX11, "x11");
DECLARE_WINDOW_PROTOCOL_ID(WindowingWayland, "wayland");
DECLARE_WINDOW_PROTOCOL_ID(WindowingWaylandDRM, "wayland/drm");
DECLARE_WINDOW_PROTOCOL_ID(WindowingWaylandAll, "wayland/all");
default: // Suppress a warning.
DECLARE_WINDOW_PROTOCOL_ID(WindowingAll, "");
DECLARE_WINDOW_PROTOCOL_ID(X11, "x11");
DECLARE_WINDOW_PROTOCOL_ID(Wayland, "wayland");
DECLARE_WINDOW_PROTOCOL_ID(WaylandDRM, "wayland/drm");
DECLARE_WINDOW_PROTOCOL_ID(WaylandAll, "wayland/all");
case WindowProtocol::Max: // Suppress a warning.
DECLARE_WINDOW_PROTOCOL_ID(All, "");
}
return *sWindowProtocol[id];
return *sWindowProtocol[idx];
}
// Macro for assigning a device vendor id to a string.
#define DECLARE_VENDOR_ID(name, deviceId) \
case name: \
sDeviceVendors[id]->AssignLiteral(deviceId); \
#define DECLARE_VENDOR_ID(name, deviceId) \
case DeviceVendor::name: \
sDeviceVendors[idx]->AssignLiteral(deviceId); \
break;
const nsAString& GfxDriverInfo::GetDeviceVendor(DeviceVendor id) {
if (id >= DeviceVendorMax) {
const nsAString& GfxDriverInfo::GetDeviceVendor(DeviceFamily id) {
if (id >= DeviceFamily::Max) {
MOZ_ASSERT_UNREACHABLE("DeviceVendor id is out of range");
id = VendorAll;
id = DeviceFamily::All;
}
if (sDeviceVendors[id]) {
return *sDeviceVendors[id];
DeviceVendor vendor = DeviceVendor::All;
switch (id) {
case DeviceFamily::IntelAll:
case DeviceFamily::IntelGMA500:
case DeviceFamily::IntelGMA900:
case DeviceFamily::IntelGMA950:
case DeviceFamily::IntelGMA3150:
case DeviceFamily::IntelGMAX3000:
case DeviceFamily::IntelGMAX4500HD:
case DeviceFamily::IntelHDGraphicsToIvyBridge:
case DeviceFamily::IntelHDGraphicsToSandyBridge:
case DeviceFamily::IntelHDGraphicsToHaswell:
case DeviceFamily::IntelHD3000:
case DeviceFamily::IntelHD520:
case DeviceFamily::IntelMobileHDGraphics:
case DeviceFamily::IntelRolloutWebRender:
case DeviceFamily::Bug1116812:
case DeviceFamily::Bug1155608:
case DeviceFamily::Bug1207665:
vendor = DeviceVendor::Intel;
break;
case DeviceFamily::NvidiaAll:
case DeviceFamily::NvidiaBlockD3D9Layers:
case DeviceFamily::NvidiaBlockWebRender:
case DeviceFamily::NvidiaRolloutWebRender:
case DeviceFamily::Geforce7300GT:
case DeviceFamily::Nvidia310M:
case DeviceFamily::Nvidia8800GTS:
case DeviceFamily::Bug1137716:
vendor = DeviceVendor::NVIDIA;
break;
case DeviceFamily::AtiAll:
case DeviceFamily::RadeonX1000:
case DeviceFamily::Bug1447141:
case DeviceFamily::AtiRolloutWebRender:
vendor = DeviceVendor::ATI;
break;
case DeviceFamily::AmdAll:
case DeviceFamily::AmdRadeonCaicos:
vendor = DeviceVendor::AMD;
break;
case DeviceFamily::MicrosoftAll:
vendor = DeviceVendor::Microsoft;
break;
case DeviceFamily::ParallelsAll:
vendor = DeviceVendor::Parallels;
break;
case DeviceFamily::QualcommAll:
// Choose an arbitrary Qualcomm PCI VENdor ID for now.
// TODO: This should be "QCOM" when Windows device ID parsing is reworked.
vendor = DeviceVendor::Qualcomm;
break;
case DeviceFamily::All:
case DeviceFamily::Max:
break;
}
sDeviceVendors[id] = new nsString();
return GetDeviceVendor(vendor);
}
const nsAString& GfxDriverInfo::GetDeviceVendor(DeviceVendor id) {
if (id >= DeviceVendor::Max) {
MOZ_ASSERT_UNREACHABLE("DeviceVendor id is out of range");
id = DeviceVendor::All;
}
auto idx = static_cast<size_t>(id);
if (sDeviceVendors[idx]) {
return *sDeviceVendors[idx];
}
sDeviceVendors[idx] = new nsString();
switch (id) {
DECLARE_VENDOR_ID(VendorIntel, "0x8086");
DECLARE_VENDOR_ID(VendorNVIDIA, "0x10de");
DECLARE_VENDOR_ID(VendorAMD, "0x1022");
DECLARE_VENDOR_ID(VendorATI, "0x1002");
DECLARE_VENDOR_ID(VendorMicrosoft, "0x1414");
DECLARE_VENDOR_ID(VendorParallels, "0x1ab8");
DECLARE_VENDOR_ID(Intel, "0x8086");
DECLARE_VENDOR_ID(NVIDIA, "0x10de");
DECLARE_VENDOR_ID(AMD, "0x1022");
DECLARE_VENDOR_ID(ATI, "0x1002");
DECLARE_VENDOR_ID(Microsoft, "0x1414");
DECLARE_VENDOR_ID(Parallels, "0x1ab8");
// Choose an arbitrary Qualcomm PCI VENdor ID for now.
// TODO: This should be "QCOM" when Windows device ID parsing is reworked.
DECLARE_VENDOR_ID(VendorQualcomm, "0x5143");
default: // Suppress a warning.
DECLARE_VENDOR_ID(VendorAll, "");
DECLARE_VENDOR_ID(Qualcomm, "0x5143");
case DeviceVendor::Max: // Suppress a warning.
DECLARE_VENDOR_ID(All, "");
}
return *sDeviceVendors[id];
return *sDeviceVendors[idx];
}
// Macro for assigning a driver vendor id to a string.
#define DECLARE_DRIVER_VENDOR_ID(name, driverVendorId) \
case name: \
sDriverVendors[id]->AssignLiteral(driverVendorId); \
#define DECLARE_DRIVER_VENDOR_ID(name, driverVendorId) \
case DriverVendor::name: \
sDriverVendors[idx]->AssignLiteral(driverVendorId); \
break;
const nsAString& GfxDriverInfo::GetDriverVendor(DriverVendor id) {
if (id >= DriverVendorMax) {
if (id >= DriverVendor::Max) {
MOZ_ASSERT_UNREACHABLE("DriverVendor id is out of range");
id = DriverVendorAll;
id = DriverVendor::All;
}
if (sDriverVendors[id]) {
return *sDriverVendors[id];
auto idx = static_cast<size_t>(id);
if (sDriverVendors[idx]) {
return *sDriverVendors[idx];
}
sDriverVendors[id] = new nsString();
sDriverVendors[idx] = new nsString();
switch (id) {
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");
default: // Suppress a warning.
DECLARE_DRIVER_VENDOR_ID(DriverVendorAll, "");
DECLARE_DRIVER_VENDOR_ID(MesaAll, "mesa/all");
DECLARE_DRIVER_VENDOR_ID(MesaLLVMPipe, "mesa/llvmpipe");
DECLARE_DRIVER_VENDOR_ID(MesaSoftPipe, "mesa/softpipe");
DECLARE_DRIVER_VENDOR_ID(MesaSWRast, "mesa/swrast");
DECLARE_DRIVER_VENDOR_ID(MesaUnknown, "mesa/unknown");
DECLARE_DRIVER_VENDOR_ID(NonMesaAll, "non-mesa/all");
case DriverVendor::Max: // Suppress a warning.
DECLARE_DRIVER_VENDOR_ID(All, "");
}
return *sDriverVendors[id];
return *sDriverVendors[idx];
}

Просмотреть файл

@ -13,115 +13,111 @@
// only on specific platforms (e.g. desktop environment and driver vendor
// for Linux.)
#define APPEND_TO_DRIVER_BLOCKLIST(os, vendor, devices, feature, \
featureStatus, driverComparator, \
driverVersion, ruleId, suggestedVersion) \
#define APPEND_TO_DRIVER_BLOCKLIST_EXT( \
os, screen, battery, desktopEnv, windowProtocol, driverVendor, devices, \
feature, featureStatus, driverComparator, driverVersion, ruleId, \
suggestedVersion) \
sDriverInfo->AppendElement(GfxDriverInfo( \
os, ScreenSizeStatus::All, BatteryStatus::All, \
(nsAString&)GfxDriverInfo::GetDesktopEnvironment(DesktopAll), \
(nsAString&)GfxDriverInfo::GetWindowProtocol(WindowingAll), vendor, \
(nsAString&)GfxDriverInfo::GetDriverVendor(DriverVendorAll), devices, \
feature, featureStatus, driverComparator, driverVersion, ruleId, \
os, screen, battery, \
(nsAString&)GfxDriverInfo::GetDesktopEnvironment(desktopEnv), \
(nsAString&)GfxDriverInfo::GetWindowProtocol(windowProtocol), \
(nsAString&)GfxDriverInfo::GetDeviceVendor(devices), \
(nsAString&)GfxDriverInfo::GetDriverVendor(driverVendor), \
(GfxDeviceFamily*)GfxDriverInfo::GetDeviceFamily(devices), feature, \
featureStatus, driverComparator, driverVersion, ruleId, \
suggestedVersion))
#define APPEND_TO_DRIVER_BLOCKLIST_EXT( \
os, screen, battery, desktopEnv, windowProtocol, vendor, driverVendor, \
devices, feature, featureStatus, driverComparator, driverVersion, ruleId, \
suggestedVersion) \
sDriverInfo->AppendElement(GfxDriverInfo( \
os, screen, battery, desktopEnv, windowProtocol, vendor, driverVendor, \
devices, feature, featureStatus, driverComparator, driverVersion, \
ruleId, suggestedVersion))
#define APPEND_TO_DRIVER_BLOCKLIST(os, devices, feature, featureStatus, \
driverComparator, driverVersion, ruleId, \
suggestedVersion) \
APPEND_TO_DRIVER_BLOCKLIST_EXT( \
os, ScreenSizeStatus::All, BatteryStatus::All, DesktopEnvironment::All, \
WindowProtocol::All, DriverVendor::All, devices, feature, featureStatus, \
driverComparator, driverVersion, ruleId, suggestedVersion)
#define APPEND_TO_DRIVER_BLOCKLIST2(os, vendor, devices, feature, \
featureStatus, driverComparator, \
driverVersion, ruleId) \
#define APPEND_TO_DRIVER_BLOCKLIST2_EXT( \
os, screen, battery, desktopEnv, windowProtocol, driverVendor, devices, \
feature, featureStatus, driverComparator, driverVersion, ruleId) \
sDriverInfo->AppendElement(GfxDriverInfo( \
os, ScreenSizeStatus::All, BatteryStatus::All, \
(nsAString&)GfxDriverInfo::GetDesktopEnvironment(DesktopAll), \
(nsAString&)GfxDriverInfo::GetWindowProtocol(WindowingAll), vendor, \
(nsAString&)GfxDriverInfo::GetDriverVendor(DriverVendorAll), devices, \
feature, featureStatus, driverComparator, driverVersion, ruleId))
os, screen, battery, \
(nsAString&)GfxDriverInfo::GetDesktopEnvironment(desktopEnv), \
(nsAString&)GfxDriverInfo::GetWindowProtocol(windowProtocol), \
(nsAString&)GfxDriverInfo::GetDeviceVendor(devices), \
(nsAString&)GfxDriverInfo::GetDriverVendor(driverVendor), \
(GfxDeviceFamily*)GfxDriverInfo::GetDeviceFamily(devices), feature, \
featureStatus, driverComparator, driverVersion, ruleId))
#define APPEND_TO_DRIVER_BLOCKLIST2_EXT( \
os, screen, battery, desktopEnv, windowProtocol, vendor, driverVendor, \
devices, feature, featureStatus, driverComparator, driverVersion, ruleId) \
sDriverInfo->AppendElement( \
GfxDriverInfo(os, screen, battery, desktopEnv, windowProtocol, vendor, \
driverVendor, devices, feature, featureStatus, \
driverComparator, driverVersion, ruleId))
#define APPEND_TO_DRIVER_BLOCKLIST2(os, devices, feature, featureStatus, \
driverComparator, driverVersion, ruleId) \
APPEND_TO_DRIVER_BLOCKLIST2_EXT( \
os, ScreenSizeStatus::All, BatteryStatus::All, DesktopEnvironment::All, \
WindowProtocol::All, DriverVendor::All, devices, feature, featureStatus, \
driverComparator, driverVersion, ruleId)
#define APPEND_TO_DRIVER_BLOCKLIST_RANGE( \
os, vendor, devices, feature, featureStatus, driverComparator, \
driverVersion, driverVersionMax, ruleId, suggestedVersion) \
do { \
MOZ_ASSERT((driverComparator) == DRIVER_BETWEEN_EXCLUSIVE || \
(driverComparator) == DRIVER_BETWEEN_INCLUSIVE || \
(driverComparator) == DRIVER_BETWEEN_INCLUSIVE_START); \
GfxDriverInfo info( \
os, ScreenSizeStatus::All, BatteryStatus::All, \
(nsAString&)GfxDriverInfo::GetDesktopEnvironment(DesktopAll), \
(nsAString&)GfxDriverInfo::GetWindowProtocol(WindowingAll), vendor, \
(nsAString&)GfxDriverInfo::GetDriverVendor(DriverVendorAll), devices, \
feature, featureStatus, driverComparator, driverVersion, ruleId, \
suggestedVersion); \
info.mDriverVersionMax = driverVersionMax; \
sDriverInfo->AppendElement(info); \
#define APPEND_TO_DRIVER_BLOCKLIST_RANGE_EXT( \
os, screen, battery, desktopEnv, windowProtocol, driverVendor, devices, \
feature, featureStatus, driverComparator, driverVersion, driverVersionMax, \
ruleId, suggestedVersion) \
do { \
MOZ_ASSERT((driverComparator) == DRIVER_BETWEEN_EXCLUSIVE || \
(driverComparator) == DRIVER_BETWEEN_INCLUSIVE || \
(driverComparator) == DRIVER_BETWEEN_INCLUSIVE_START); \
GfxDriverInfo info( \
os, screen, battery, \
(nsAString&)GfxDriverInfo::GetDesktopEnvironment(desktopEnv), \
(nsAString&)GfxDriverInfo::GetWindowProtocol(windowProtocol), \
(nsAString&)GfxDriverInfo::GetDeviceVendor(devices), \
(nsAString&)GfxDriverInfo::GetDriverVendor(driverVendor), \
(GfxDeviceFamily*)GfxDriverInfo::GetDeviceFamily(devices), feature, \
featureStatus, driverComparator, driverVersion, ruleId, \
suggestedVersion); \
info.mDriverVersionMax = driverVersionMax; \
sDriverInfo->AppendElement(info); \
} while (false)
#define APPEND_TO_DRIVER_BLOCKLIST_RANGE_EXT( \
os, screen, battery, desktopEnv, windowProtocol, vendor, driverVendor, \
devices, feature, featureStatus, driverComparator, driverVersion, \
driverVersionMax, ruleId, suggestedVersion) \
do { \
MOZ_ASSERT((driverComparator) == DRIVER_BETWEEN_EXCLUSIVE || \
(driverComparator) == DRIVER_BETWEEN_INCLUSIVE || \
(driverComparator) == DRIVER_BETWEEN_INCLUSIVE_START); \
GfxDriverInfo info(os, desktopEnv, windowProtocol, vendor, driverVendor, \
devices, feature, featureStatus, driverComparator, \
driverVersion, ruleId, suggestedVersion); \
info.mDriverVersionMax = driverVersionMax; \
sDriverInfo->AppendElement(info); \
#define APPEND_TO_DRIVER_BLOCKLIST_RANGE( \
os, devices, feature, featureStatus, driverComparator, driverVersion, \
driverVersionMax, ruleId, suggestedVersion) \
APPEND_TO_DRIVER_BLOCKLIST_RANGE_EXT( \
os, ScreenSizeStatus::All, BatteryStatus::All, DesktopEnvironment::All, \
WindowProtocol::All, DriverVendor::All, devices, feature, featureStatus, \
driverComparator, driverVersion, driverVersionMax, ruleId, \
suggestedVersion)
#define APPEND_TO_DRIVER_BLOCKLIST_RANGE_GPU2_EXT( \
os, screen, battery, desktopEnv, windowProtocol, driverVendor, devices, \
feature, featureStatus, driverComparator, driverVersion, driverVersionMax, \
ruleId, suggestedVersion) \
do { \
MOZ_ASSERT((driverComparator) == DRIVER_BETWEEN_EXCLUSIVE || \
(driverComparator) == DRIVER_BETWEEN_INCLUSIVE || \
(driverComparator) == DRIVER_BETWEEN_INCLUSIVE_START); \
GfxDriverInfo info( \
os, screen, battery, \
(nsAString&)GfxDriverInfo::GetDesktopEnvironment(desktopEnv), \
(nsAString&)GfxDriverInfo::GetWindowProtocol(windowProtocol), \
(nsAString&)GfxDriverInfo::GetDeviceVendor(devices), \
(nsAString&)GfxDriverInfo::GetDriverVendor(driverVendor), \
(GfxDeviceFamily*)GfxDriverInfo::GetDeviceFamily(devices), feature, \
featureStatus, driverComparator, driverVersion, ruleId, \
suggestedVersion, false, true); \
info.mDriverVersionMax = driverVersionMax; \
sDriverInfo->AppendElement(info); \
} while (false)
#define APPEND_TO_DRIVER_BLOCKLIST_RANGE_GPU2( \
os, vendor, devices, feature, featureStatus, driverComparator, \
driverVersion, driverVersionMax, ruleId, suggestedVersion) \
do { \
MOZ_ASSERT((driverComparator) == DRIVER_BETWEEN_EXCLUSIVE || \
(driverComparator) == DRIVER_BETWEEN_INCLUSIVE || \
(driverComparator) == DRIVER_BETWEEN_INCLUSIVE_START); \
GfxDriverInfo info( \
os, ScreenSizeStatus::All, BatteryStatus::All, \
(nsAString&)GfxDriverInfo::GetDesktopEnvironment(DesktopAll), \
(nsAString&)GfxDriverInfo::GetWindowProtocol(WindowingAll), vendor, \
(nsAString&)GfxDriverInfo::GetDriverVendor(DriverVendorAll), devices, \
feature, featureStatus, driverComparator, driverVersion, ruleId, \
suggestedVersion, false, true); \
info.mDriverVersionMax = driverVersionMax; \
sDriverInfo->AppendElement(info); \
} while (false)
#define APPEND_TO_DRIVER_BLOCKLIST_RANGE_GPU2_EXT( \
os, screen, battery, desktopEnv, windowProtocol, vendor, driverVendor, \
devices, feature, featureStatus, driverComparator, driverVersion, \
driverVersionMax, ruleId, suggestedVersion) \
do { \
MOZ_ASSERT((driverComparator) == DRIVER_BETWEEN_EXCLUSIVE || \
(driverComparator) == DRIVER_BETWEEN_INCLUSIVE || \
(driverComparator) == DRIVER_BETWEEN_INCLUSIVE_START); \
GfxDriverInfo info(os, screen, battery, desktopEnv, windowProtocol, \
vendor, driverVendor, devices, feature, featureStatus, \
driverComparator, driverVersion, ruleId, \
suggestedVersion, false, true); \
info.mDriverVersionMax = driverVersionMax; \
sDriverInfo->AppendElement(info); \
} while (false)
#define APPEND_TO_DRIVER_BLOCKLIST_RANGE_GPU2( \
os, devices, feature, featureStatus, driverComparator, driverVersion, \
driverVersionMax, ruleId, suggestedVersion) \
APPEND_TO_DRIVER_BLOCKLIST_RANGE_GPU2_EXT( \
os, ScreenSizeStatus::All, BatteryStatus::All, DesktopEnvironment::All, \
WindowProtocol::All, DriverVendor::All, devices, feature, featureStatus, \
driverComparator, driverVersion, driverVersionMax, ruleId, \
suggestedVersion)
namespace mozilla {
namespace widget {
enum class OperatingSystem {
enum class OperatingSystem : uint8_t {
Unknown,
Windows,
WindowsXP,
@ -164,7 +160,15 @@ enum VersionComparisonOp {
DRIVER_COMPARISON_IGNORED
};
enum DeviceFamily {
enum class DeviceFamily : uint8_t {
All,
IntelAll,
NvidiaAll,
AtiAll,
AmdAll,
MicrosoftAll,
ParallelsAll,
QualcommAll,
IntelGMA500,
IntelGMA900,
IntelGMA950,
@ -179,7 +183,7 @@ enum DeviceFamily {
IntelMobileHDGraphics,
NvidiaBlockD3D9Layers,
RadeonX1000,
RadeonCaicos,
AmdRadeonCaicos,
Geforce7300GT,
Nvidia310M,
Nvidia8800GTS,
@ -192,67 +196,68 @@ enum DeviceFamily {
NvidiaRolloutWebRender,
IntelRolloutWebRender,
AtiRolloutWebRender,
DeviceFamilyMax
Max
};
enum DeviceVendor : uint8_t {
VendorAll, // There is an assumption that this is the first enum
VendorIntel,
VendorNVIDIA,
VendorAMD,
VendorATI,
VendorMicrosoft,
VendorParallels,
VendorQualcomm,
enum class DeviceVendor : uint8_t {
All, // There is an assumption that this is the first enum
Intel,
NVIDIA,
AMD,
ATI,
Microsoft,
Parallels,
Qualcomm,
DeviceVendorMax
Max
};
enum DriverVendor : uint8_t {
DriverVendorAll, // There is an assumption that this is the first enum
All, // There is an assumption that this is the first enum
// Wildcard for all Mesa drivers.
DriverMesaAll,
MesaAll,
// 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,
MesaLLVMPipe,
MesaSoftPipe,
MesaSWRast,
// A generic ID to be provided when we can't determine the DRI driver on Mesa.
DriverMesaUnknown,
MesaUnknown,
// Wildcard for all non-Mesa drivers.
DriverNonMesaAll,
NonMesaAll,
DriverVendorMax
Max
};
enum DesktopEnvironment : uint8_t {
DesktopAll, // There is an assumption that this is the first enum
DesktopGNOME,
DesktopKDE,
DesktopXFCE,
DesktopCinnamon,
DesktopEnlightenment,
DesktopLXDE,
DesktopOpenbox,
DesktopI3,
DesktopMate,
DesktopUnity,
DesktopPantheon,
DesktopLXQT,
DesktopDeepin,
DesktopUnknown,
DesktopMax
enum class DesktopEnvironment : uint8_t {
All, // There is an assumption that this is the first enum
GNOME,
KDE,
XFCE,
Cinnamon,
Enlightenment,
LXDE,
Openbox,
i3,
Mate,
Unity,
Pantheon,
LXQT,
Deepin,
Unknown,
Max
};
enum WindowProtocol : uint8_t {
WindowingAll, // There is an assumption that this is the first enum
WindowingX11,
WindowingWayland,
WindowingWaylandDRM,
enum class WindowProtocol : uint8_t {
All, // There is an assumption that this is the first enum
X11,
Wayland,
WaylandDRM,
// Wildcard for all Wayland variants.
WindowingWaylandAll,
WindowingMax
WaylandAll,
Max
};
enum class BatteryStatus : uint8_t { All, Present, None };
@ -314,8 +319,7 @@ struct GfxDriverInfo {
nsString mAdapterVendor;
nsString mDriverVendor;
static GfxDeviceFamily* const allDevices;
GfxDeviceFamily* mDevices;
const GfxDeviceFamily* mDevices;
// Whether the mDevices array should be deleted when this structure is
// deallocated. False by default.
@ -339,19 +343,22 @@ struct GfxDriverInfo {
nsCString mRuleId;
static const GfxDeviceFamily* GetDeviceFamily(DeviceFamily id);
static GfxDeviceFamily* sDeviceFamilies[DeviceFamilyMax];
static GfxDeviceFamily*
sDeviceFamilies[static_cast<size_t>(DeviceFamily::Max)];
static const nsAString& GetDesktopEnvironment(DesktopEnvironment id);
static nsAString* sDesktopEnvironment[DesktopMax];
static nsAString*
sDesktopEnvironment[static_cast<size_t>(DesktopEnvironment::Max)];
static const nsAString& GetWindowProtocol(WindowProtocol id);
static nsAString* sWindowProtocol[WindowingMax];
static nsAString* sWindowProtocol[static_cast<size_t>(WindowProtocol::Max)];
static const nsAString& GetDeviceVendor(DeviceVendor id);
static nsAString* sDeviceVendors[DeviceVendorMax];
static const nsAString& GetDeviceVendor(DeviceFamily id);
static nsAString* sDeviceVendors[static_cast<size_t>(DeviceVendor::Max)];
static const nsAString& GetDriverVendor(DriverVendor id);
static nsAString* sDriverVendors[DriverVendorMax];
static nsAString* sDriverVendors[static_cast<size_t>(DriverVendor::Max)];
nsString mModel, mHardware, mProduct, mManufacturer;

Просмотреть файл

@ -939,8 +939,7 @@ int32_t GfxInfoBase::FindBlocklistedDeviceInList(
continue;
}
if (info[i].mDevices != GfxDriverInfo::allDevices &&
!info[i].mDevices->IsEmpty()) {
if (info[i].mDevices && !info[i].mDevices->IsEmpty()) {
nsresult rv = info[i].mDevices->Contains(adapterDeviceID[infoIndex]);
if (rv == NS_ERROR_NOT_AVAILABLE) {
// Not found
@ -1048,7 +1047,7 @@ int32_t GfxInfoBase::FindBlocklistedDeviceInList(
(aFeature == nsIGfxInfo::FEATURE_DIRECT2D)) {
if (!adapterInfoFailed[1]) {
nsAString& nvVendorID =
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorNVIDIA);
(nsAString&)GfxDriverInfo::GetDeviceVendor(DeviceVendor::NVIDIA);
const nsString nv310mDeviceId = NS_LITERAL_STRING("0x0A70");
if (nvVendorID.Equals(adapterVendorID[1],
nsCaseInsensitiveStringComparator()) &&
@ -1091,7 +1090,7 @@ bool GfxInfoBase::DoesDesktopEnvironmentMatch(
return aBlocklistDesktop.Equals(aDesktopEnv,
nsCaseInsensitiveStringComparator()) ||
aBlocklistDesktop.Equals(
GfxDriverInfo::GetDesktopEnvironment(DesktopAll),
GfxDriverInfo::GetDesktopEnvironment(DesktopEnvironment::All),
nsCaseInsensitiveStringComparator());
}
@ -1101,7 +1100,7 @@ bool GfxInfoBase::DoesWindowProtocolMatch(
return aBlocklistWindowProtocol.Equals(aWindowProtocol,
nsCaseInsensitiveStringComparator()) ||
aBlocklistWindowProtocol.Equals(
GfxDriverInfo::GetWindowProtocol(WindowingAll),
GfxDriverInfo::GetWindowProtocol(WindowProtocol::All),
nsCaseInsensitiveStringComparator());
}
@ -1109,8 +1108,9 @@ bool GfxInfoBase::DoesVendorMatch(const nsAString& aBlocklistVendor,
const nsAString& aAdapterVendor) {
return aBlocklistVendor.Equals(aAdapterVendor,
nsCaseInsensitiveStringComparator()) ||
aBlocklistVendor.Equals(GfxDriverInfo::GetDeviceVendor(VendorAll),
nsCaseInsensitiveStringComparator());
aBlocklistVendor.Equals(
GfxDriverInfo::GetDeviceVendor(DeviceVendor::All),
nsCaseInsensitiveStringComparator());
}
bool GfxInfoBase::DoesDriverVendorMatch(const nsAString& aBlocklistVendor,
@ -1118,7 +1118,7 @@ bool GfxInfoBase::DoesDriverVendorMatch(const nsAString& aBlocklistVendor,
return aBlocklistVendor.Equals(aDriverVendor,
nsCaseInsensitiveStringComparator()) ||
aBlocklistVendor.Equals(
GfxDriverInfo::GetDriverVendor(DriverVendorAll),
GfxDriverInfo::GetDriverVendor(DriverVendor::All),
nsCaseInsensitiveStringComparator());
}

Просмотреть файл

@ -251,18 +251,20 @@ void GfxInfo::GetData() {
// forcing software rasterization on a DRI-accelerated X server by using
// LIBGL_ALWAYS_SOFTWARE or a similar restriction.
if (strcasestr(glRenderer.get(), "llvmpipe")) {
CopyUTF16toUTF8(GfxDriverInfo::GetDriverVendor(DriverMesaLLVMPipe),
mDriverVendor);
CopyUTF16toUTF8(
GfxDriverInfo::GetDriverVendor(DriverVendor::MesaLLVMPipe),
mDriverVendor);
mIsAccelerated = false;
} else if (strcasestr(glRenderer.get(), "softpipe")) {
CopyUTF16toUTF8(GfxDriverInfo::GetDriverVendor(DriverMesaSoftPipe),
mDriverVendor);
CopyUTF16toUTF8(
GfxDriverInfo::GetDriverVendor(DriverVendor::MesaSoftPipe),
mDriverVendor);
mIsAccelerated = false;
} else if (strcasestr(glRenderer.get(), "software rasterizer") ||
!mIsAccelerated) {
// Fallback to reporting swrast if GLX_MESA_query_renderer tells us
// we're using an unaccelerated context.
CopyUTF16toUTF8(GfxDriverInfo::GetDriverVendor(DriverMesaSWRast),
CopyUTF16toUTF8(GfxDriverInfo::GetDriverVendor(DriverVendor::MesaSWRast),
mDriverVendor);
mIsAccelerated = false;
} else if (!driDriver.IsEmpty()) {
@ -270,7 +272,7 @@ void GfxInfo::GetData() {
} else {
// Some other mesa configuration where we couldn't get enough info.
NS_WARNING("Failed to detect Mesa driver being used!");
CopyUTF16toUTF8(GfxDriverInfo::GetDriverVendor(DriverMesaUnknown),
CopyUTF16toUTF8(GfxDriverInfo::GetDriverVendor(DriverVendor::MesaUnknown),
mDriverVendor);
}
@ -288,11 +290,13 @@ void GfxInfo::GetData() {
"Failed to get Mesa device ID! GLX_MESA_query_renderer unsupported?");
}
} else if (glVendor.EqualsLiteral("NVIDIA Corporation")) {
CopyUTF16toUTF8(GfxDriverInfo::GetDeviceVendor(VendorNVIDIA), mVendorId);
CopyUTF16toUTF8(GfxDriverInfo::GetDeviceVendor(DeviceVendor::NVIDIA),
mVendorId);
mDriverVendor.AssignLiteral("nvidia/unknown");
// TODO: Use NV-CONTROL X11 extension to query Device ID and VRAM.
} else if (glVendor.EqualsLiteral("ATI Technologies Inc.")) {
CopyUTF16toUTF8(GfxDriverInfo::GetDeviceVendor(VendorATI), mVendorId);
CopyUTF16toUTF8(GfxDriverInfo::GetDeviceVendor(DeviceVendor::ATI),
mVendorId);
mDriverVendor.AssignLiteral("ati/unknown");
// TODO: Look into ways to find the device ID on FGLRX.
} else {
@ -352,65 +356,82 @@ void GfxInfo::GetData() {
}
if (currentDesktop.find("gnome") != std::string::npos) {
CopyUTF16toUTF8(GfxDriverInfo::GetDesktopEnvironment(DesktopGNOME),
mDesktopEnvironment);
} else if (currentDesktop.find("kde") != std::string::npos) {
CopyUTF16toUTF8(GfxDriverInfo::GetDesktopEnvironment(DesktopKDE),
mDesktopEnvironment);
} else if (currentDesktop.find("xfce") != std::string::npos) {
CopyUTF16toUTF8(GfxDriverInfo::GetDesktopEnvironment(DesktopXFCE),
mDesktopEnvironment);
} else if (currentDesktop.find("cinnamon") != std::string::npos) {
CopyUTF16toUTF8(GfxDriverInfo::GetDesktopEnvironment(DesktopCinnamon),
mDesktopEnvironment);
} else if (currentDesktop.find("enlightenment") != std::string::npos) {
CopyUTF16toUTF8(
GfxDriverInfo::GetDesktopEnvironment(DesktopEnlightenment),
GfxDriverInfo::GetDesktopEnvironment(DesktopEnvironment::GNOME),
mDesktopEnvironment);
} else if (currentDesktop.find("kde") != std::string::npos) {
CopyUTF16toUTF8(
GfxDriverInfo::GetDesktopEnvironment(DesktopEnvironment::KDE),
mDesktopEnvironment);
} else if (currentDesktop.find("xfce") != std::string::npos) {
CopyUTF16toUTF8(
GfxDriverInfo::GetDesktopEnvironment(DesktopEnvironment::XFCE),
mDesktopEnvironment);
} else if (currentDesktop.find("cinnamon") != std::string::npos) {
CopyUTF16toUTF8(
GfxDriverInfo::GetDesktopEnvironment(DesktopEnvironment::Cinnamon),
mDesktopEnvironment);
} else if (currentDesktop.find("enlightenment") != std::string::npos) {
CopyUTF16toUTF8(GfxDriverInfo::GetDesktopEnvironment(
DesktopEnvironment::Enlightenment),
mDesktopEnvironment);
} else if (currentDesktop.find("lxde") != std::string::npos ||
currentDesktop.find("lubuntu") != std::string::npos) {
CopyUTF16toUTF8(GfxDriverInfo::GetDesktopEnvironment(DesktopLXDE),
mDesktopEnvironment);
CopyUTF16toUTF8(
GfxDriverInfo::GetDesktopEnvironment(DesktopEnvironment::LXDE),
mDesktopEnvironment);
} else if (currentDesktop.find("openbox") != std::string::npos) {
CopyUTF16toUTF8(GfxDriverInfo::GetDesktopEnvironment(DesktopOpenbox),
mDesktopEnvironment);
CopyUTF16toUTF8(
GfxDriverInfo::GetDesktopEnvironment(DesktopEnvironment::Openbox),
mDesktopEnvironment);
} else if (currentDesktop.find("i3") != std::string::npos) {
CopyUTF16toUTF8(GfxDriverInfo::GetDesktopEnvironment(DesktopI3),
mDesktopEnvironment);
CopyUTF16toUTF8(
GfxDriverInfo::GetDesktopEnvironment(DesktopEnvironment::i3),
mDesktopEnvironment);
} else if (currentDesktop.find("mate") != std::string::npos) {
CopyUTF16toUTF8(GfxDriverInfo::GetDesktopEnvironment(DesktopMate),
mDesktopEnvironment);
CopyUTF16toUTF8(
GfxDriverInfo::GetDesktopEnvironment(DesktopEnvironment::Mate),
mDesktopEnvironment);
} else if (currentDesktop.find("unity") != std::string::npos) {
CopyUTF16toUTF8(GfxDriverInfo::GetDesktopEnvironment(DesktopUnity),
mDesktopEnvironment);
CopyUTF16toUTF8(
GfxDriverInfo::GetDesktopEnvironment(DesktopEnvironment::Unity),
mDesktopEnvironment);
} else if (currentDesktop.find("pantheon") != std::string::npos) {
CopyUTF16toUTF8(GfxDriverInfo::GetDesktopEnvironment(DesktopPantheon),
mDesktopEnvironment);
CopyUTF16toUTF8(
GfxDriverInfo::GetDesktopEnvironment(DesktopEnvironment::Pantheon),
mDesktopEnvironment);
} else if (currentDesktop.find("lxqt") != std::string::npos) {
CopyUTF16toUTF8(GfxDriverInfo::GetDesktopEnvironment(DesktopLXQT),
mDesktopEnvironment);
CopyUTF16toUTF8(
GfxDriverInfo::GetDesktopEnvironment(DesktopEnvironment::LXQT),
mDesktopEnvironment);
} else if (currentDesktop.find("deepin") != std::string::npos) {
CopyUTF16toUTF8(GfxDriverInfo::GetDesktopEnvironment(DesktopDeepin),
mDesktopEnvironment);
CopyUTF16toUTF8(
GfxDriverInfo::GetDesktopEnvironment(DesktopEnvironment::Deepin),
mDesktopEnvironment);
}
}
if (mDesktopEnvironment.IsEmpty()) {
if (getenv("GNOME_DESKTOP_SESSION_ID")) {
CopyUTF16toUTF8(GfxDriverInfo::GetDesktopEnvironment(DesktopGNOME),
mDesktopEnvironment);
CopyUTF16toUTF8(
GfxDriverInfo::GetDesktopEnvironment(DesktopEnvironment::GNOME),
mDesktopEnvironment);
} else if (getenv("KDE_FULL_SESSION")) {
CopyUTF16toUTF8(GfxDriverInfo::GetDesktopEnvironment(DesktopKDE),
mDesktopEnvironment);
CopyUTF16toUTF8(
GfxDriverInfo::GetDesktopEnvironment(DesktopEnvironment::KDE),
mDesktopEnvironment);
} else if (getenv("MATE_DESKTOP_SESSION_ID")) {
CopyUTF16toUTF8(GfxDriverInfo::GetDesktopEnvironment(DesktopMate),
mDesktopEnvironment);
CopyUTF16toUTF8(
GfxDriverInfo::GetDesktopEnvironment(DesktopEnvironment::Mate),
mDesktopEnvironment);
} else if (getenv("LXQT_SESSION_CONFIG")) {
CopyUTF16toUTF8(GfxDriverInfo::GetDesktopEnvironment(DesktopLXQT),
mDesktopEnvironment);
CopyUTF16toUTF8(
GfxDriverInfo::GetDesktopEnvironment(DesktopEnvironment::LXQT),
mDesktopEnvironment);
} else {
CopyUTF16toUTF8(GfxDriverInfo::GetDesktopEnvironment(DesktopUnknown),
mDesktopEnvironment);
CopyUTF16toUTF8(
GfxDriverInfo::GetDesktopEnvironment(DesktopEnvironment::Unknown),
mDesktopEnvironment);
}
}
@ -423,85 +444,65 @@ const nsTArray<GfxDriverInfo>& GfxInfo::GetGfxDriverInfo() {
// to query device IDs backing a GL context for blacklisting.
APPEND_TO_DRIVER_BLOCKLIST_EXT(
OperatingSystem::Linux, ScreenSizeStatus::All, BatteryStatus::All,
(nsAString&)GfxDriverInfo::GetDesktopEnvironment(DesktopAll),
(nsAString&)GfxDriverInfo::GetWindowProtocol(WindowingAll),
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorAll),
(nsAString&)GfxDriverInfo::GetDriverVendor(DriverMesaAll),
GfxDriverInfo::allDevices, GfxDriverInfo::allFeatures,
DesktopEnvironment::All, WindowProtocol::All, DriverVendor::MesaAll,
DeviceFamily::All, GfxDriverInfo::allFeatures,
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, DRIVER_LESS_THAN,
V(10, 0, 0, 0), "FEATURE_FAILURE_OLD_MESA", "Mesa 10.0");
// NVIDIA baseline (ported from old blocklist)
APPEND_TO_DRIVER_BLOCKLIST_EXT(
OperatingSystem::Linux, ScreenSizeStatus::All, BatteryStatus::All,
(nsAString&)GfxDriverInfo::GetDesktopEnvironment(DesktopAll),
(nsAString&)GfxDriverInfo::GetWindowProtocol(WindowingAll),
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorNVIDIA),
(nsAString&)GfxDriverInfo::GetDriverVendor(DriverNonMesaAll),
GfxDriverInfo::allDevices, GfxDriverInfo::allFeatures,
DesktopEnvironment::All, WindowProtocol::All, DriverVendor::NonMesaAll,
DeviceFamily::NvidiaAll, GfxDriverInfo::allFeatures,
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, DRIVER_LESS_THAN,
V(257, 21, 0, 0), "FEATURE_FAILURE_OLD_NVIDIA", "NVIDIA 257.21");
// fglrx baseline (chosen arbitrarily as 2013-07-22 release).
APPEND_TO_DRIVER_BLOCKLIST(
OperatingSystem::Linux,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorATI),
GfxDriverInfo::allDevices, GfxDriverInfo::allFeatures,
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, DRIVER_LESS_THAN,
V(13, 15, 100, 1), "FEATURE_FAILURE_OLD_FGLRX", "fglrx 13.15.100.1");
OperatingSystem::Linux, DeviceFamily::AtiAll,
GfxDriverInfo::allFeatures, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION,
DRIVER_LESS_THAN, V(13, 15, 100, 1), "FEATURE_FAILURE_OLD_FGLRX",
"fglrx 13.15.100.1");
////////////////////////////////////
// FEATURE_WEBRENDER
// Intel Mesa baseline, chosen arbitrarily.
APPEND_TO_DRIVER_BLOCKLIST(
OperatingSystem::Linux,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorIntel),
GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_WEBRENDER,
OperatingSystem::Linux, DeviceFamily::IntelAll,
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");
// Nvidia Mesa baseline, see bug 1563859.
APPEND_TO_DRIVER_BLOCKLIST_EXT(
OperatingSystem::Linux, ScreenSizeStatus::All, BatteryStatus::All,
(nsAString&)GfxDriverInfo::GetDesktopEnvironment(DesktopAll),
(nsAString&)GfxDriverInfo::GetWindowProtocol(WindowingAll),
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorNVIDIA),
(nsAString&)GfxDriverInfo::GetDriverVendor(DriverMesaAll),
GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_WEBRENDER,
DesktopEnvironment::All, WindowProtocol::All, DriverVendor::MesaAll,
DeviceFamily::NvidiaAll, nsIGfxInfo::FEATURE_WEBRENDER,
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, DRIVER_LESS_THAN,
V(18, 2, 0, 0), "FEATURE_FAILURE_WEBRENDER_OLD_MESA", "Mesa 18.2.0.0");
// Disable on all Nvidia devices not using Mesa for now.
APPEND_TO_DRIVER_BLOCKLIST_EXT(
OperatingSystem::Linux, ScreenSizeStatus::All, BatteryStatus::All,
(nsAString&)GfxDriverInfo::GetDesktopEnvironment(DesktopAll),
(nsAString&)GfxDriverInfo::GetWindowProtocol(WindowingAll),
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorNVIDIA),
(nsAString&)GfxDriverInfo::GetDriverVendor(DriverNonMesaAll),
GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_WEBRENDER,
DesktopEnvironment::All, WindowProtocol::All, DriverVendor::NonMesaAll,
DeviceFamily::NvidiaAll, nsIGfxInfo::FEATURE_WEBRENDER,
nsIGfxInfo::FEATURE_BLOCKED_DEVICE, DRIVER_COMPARISON_IGNORED,
V(0, 0, 0, 0), "FEATURE_FAILURE_WEBRENDER_NO_LINUX_NVIDIA", "");
// ATI Mesa baseline, chosen arbitrarily.
APPEND_TO_DRIVER_BLOCKLIST_EXT(
OperatingSystem::Linux, ScreenSizeStatus::All, BatteryStatus::All,
(nsAString&)GfxDriverInfo::GetDesktopEnvironment(DesktopAll),
(nsAString&)GfxDriverInfo::GetWindowProtocol(WindowingAll),
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorATI),
(nsAString&)GfxDriverInfo::GetDriverVendor(DriverMesaAll),
GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_WEBRENDER,
DesktopEnvironment::All, WindowProtocol::All, DriverVendor::MesaAll,
DeviceFamily::AtiAll, 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_EXT(
OperatingSystem::Linux, ScreenSizeStatus::All, BatteryStatus::All,
(nsAString&)GfxDriverInfo::GetDesktopEnvironment(DesktopAll),
(nsAString&)GfxDriverInfo::GetWindowProtocol(WindowingAll),
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorATI),
(nsAString&)GfxDriverInfo::GetDriverVendor(DriverNonMesaAll),
GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_WEBRENDER,
DesktopEnvironment::All, WindowProtocol::All, DriverVendor::NonMesaAll,
DeviceFamily::AtiAll, nsIGfxInfo::FEATURE_WEBRENDER,
nsIGfxInfo::FEATURE_BLOCKED_DEVICE, DRIVER_COMPARISON_IGNORED,
V(0, 0, 0, 0), "FEATURE_FAILURE_WEBRENDER_NO_LINUX_ATI", "");
}
@ -510,9 +511,10 @@ const nsTArray<GfxDriverInfo>& GfxInfo::GetGfxDriverInfo() {
bool GfxInfo::DoesWindowProtocolMatch(const nsAString& aBlocklistWindowProtocol,
const nsAString& aWindowProtocol) {
if (mIsWayland && aBlocklistWindowProtocol.Equals(
GfxDriverInfo::GetWindowProtocol(WindowingWaylandAll),
nsCaseInsensitiveStringComparator())) {
if (mIsWayland &&
aBlocklistWindowProtocol.Equals(
GfxDriverInfo::GetWindowProtocol(WindowProtocol::WaylandAll),
nsCaseInsensitiveStringComparator())) {
return true;
}
return GfxInfoBase::DoesWindowProtocolMatch(aBlocklistWindowProtocol,
@ -521,14 +523,14 @@ bool GfxInfo::DoesWindowProtocolMatch(const nsAString& aBlocklistWindowProtocol,
bool GfxInfo::DoesDriverVendorMatch(const nsAString& aBlocklistVendor,
const nsAString& aDriverVendor) {
if (mIsMesa &&
aBlocklistVendor.Equals(GfxDriverInfo::GetDriverVendor(DriverMesaAll),
nsCaseInsensitiveStringComparator())) {
if (mIsMesa && aBlocklistVendor.Equals(
GfxDriverInfo::GetDriverVendor(DriverVendor::MesaAll),
nsCaseInsensitiveStringComparator())) {
return true;
}
if (!mIsMesa &&
aBlocklistVendor.Equals(GfxDriverInfo::GetDriverVendor(DriverNonMesaAll),
nsCaseInsensitiveStringComparator())) {
if (!mIsMesa && aBlocklistVendor.Equals(
GfxDriverInfo::GetDriverVendor(DriverVendor::NonMesaAll),
nsCaseInsensitiveStringComparator())) {
return true;
}
return GfxInfoBase::DoesDriverVendorMatch(aBlocklistVendor, aDriverVendor);
@ -606,14 +608,16 @@ GfxInfo::GetWindowProtocol(nsAString& aWindowProtocol) {
GetData();
if (mIsWayland) {
if (mIsWaylandDRM) {
aWindowProtocol = GfxDriverInfo::GetWindowProtocol(WindowingWaylandDRM);
aWindowProtocol =
GfxDriverInfo::GetWindowProtocol(WindowProtocol::WaylandDRM);
} else {
aWindowProtocol = GfxDriverInfo::GetWindowProtocol(WindowingWayland);
aWindowProtocol =
GfxDriverInfo::GetWindowProtocol(WindowProtocol::Wayland);
}
return NS_OK;
}
aWindowProtocol = GfxDriverInfo::GetWindowProtocol(WindowingX11);
aWindowProtocol = GfxDriverInfo::GetWindowProtocol(WindowProtocol::X11);
return NS_OK;
}

Просмотреть файл

@ -376,11 +376,10 @@ void GfxInfo::AddCrashReportAnnotations() {
const nsTArray<GfxDriverInfo>& GfxInfo::GetGfxDriverInfo() {
if (sDriverInfo->IsEmpty()) {
APPEND_TO_DRIVER_BLOCKLIST2(
OperatingSystem::Android,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorAll),
GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_OPENGL_LAYERS,
nsIGfxInfo::FEATURE_STATUS_OK, DRIVER_COMPARISON_IGNORED,
GfxDriverInfo::allDriverVersions, "FEATURE_OK_FORCE_OPENGL");
OperatingSystem::Android, DeviceFamily::All,
nsIGfxInfo::FEATURE_OPENGL_LAYERS, nsIGfxInfo::FEATURE_STATUS_OK,
DRIVER_COMPARISON_IGNORED, GfxDriverInfo::allDriverVersions,
"FEATURE_OK_FORCE_OPENGL");
}
return *sDriverInfo;

Просмотреть файл

@ -282,27 +282,22 @@ void GfxInfo::AddCrashReportAnnotations() {
}
// We don't support checking driver versions on Mac.
#define IMPLEMENT_MAC_DRIVER_BLOCKLIST(os, vendor, device, features, blockOn, ruleId) \
APPEND_TO_DRIVER_BLOCKLIST(os, vendor, device, features, blockOn, DRIVER_COMPARISON_IGNORED, \
#define IMPLEMENT_MAC_DRIVER_BLOCKLIST(os, device, features, blockOn, ruleId) \
APPEND_TO_DRIVER_BLOCKLIST(os, device, features, blockOn, DRIVER_COMPARISON_IGNORED, \
V(0, 0, 0, 0), ruleId, "")
const nsTArray<GfxDriverInfo>& GfxInfo::GetGfxDriverInfo() {
if (!sDriverInfo->Length()) {
IMPLEMENT_MAC_DRIVER_BLOCKLIST(
OperatingSystem::OSX, (nsAString&)GfxDriverInfo::GetDeviceVendor(VendorATI),
(GfxDeviceFamily*)GfxDriverInfo::GetDeviceFamily(RadeonX1000),
nsIGfxInfo::FEATURE_OPENGL_LAYERS, nsIGfxInfo::FEATURE_BLOCKED_DEVICE,
"FEATURE_FAILURE_MAC_RADEONX1000_NO_TEXTURE2D");
OperatingSystem::OSX, DeviceFamily::RadeonX1000, nsIGfxInfo::FEATURE_OPENGL_LAYERS,
nsIGfxInfo::FEATURE_BLOCKED_DEVICE, "FEATURE_FAILURE_MAC_RADEONX1000_NO_TEXTURE2D");
IMPLEMENT_MAC_DRIVER_BLOCKLIST(
OperatingSystem::OSX, (nsAString&)GfxDriverInfo::GetDeviceVendor(VendorNVIDIA),
(GfxDeviceFamily*)GfxDriverInfo::GetDeviceFamily(Geforce7300GT),
nsIGfxInfo::FEATURE_WEBGL_OPENGL, nsIGfxInfo::FEATURE_BLOCKED_DEVICE,
"FEATURE_FAILURE_MAC_7300_NO_WEBGL");
IMPLEMENT_MAC_DRIVER_BLOCKLIST(
OperatingSystem::OSX, (nsAString&)GfxDriverInfo::GetDeviceVendor(VendorIntel),
(GfxDeviceFamily*)GfxDriverInfo::GetDeviceFamily(IntelHDGraphicsToIvyBridge),
nsIGfxInfo::FEATURE_GL_SWIZZLE, nsIGfxInfo::FEATURE_BLOCKED_DEVICE,
"FEATURE_FAILURE_MAC_INTELHD4000_NO_SWIZZLE");
OperatingSystem::OSX, DeviceFamily::Geforce7300GT, nsIGfxInfo::FEATURE_WEBGL_OPENGL,
nsIGfxInfo::FEATURE_BLOCKED_DEVICE, "FEATURE_FAILURE_MAC_7300_NO_WEBGL");
IMPLEMENT_MAC_DRIVER_BLOCKLIST(OperatingSystem::OSX, DeviceFamily::IntelHDGraphicsToIvyBridge,
nsIGfxInfo::FEATURE_GL_SWIZZLE,
nsIGfxInfo::FEATURE_BLOCKED_DEVICE,
"FEATURE_FAILURE_MAC_INTELHD4000_NO_SWIZZLE");
}
return *sDriverInfo;
}

Просмотреть файл

@ -114,11 +114,9 @@ GfxInfo::GetIsGPU2Active(bool* aIsGPU2Active) { return NS_ERROR_FAILURE; }
const nsTArray<GfxDriverInfo>& GfxInfo::GetGfxDriverInfo() {
if (sDriverInfo->IsEmpty()) {
APPEND_TO_DRIVER_BLOCKLIST2(
OperatingSystem::Ios,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorAll),
GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_OPENGL_LAYERS,
nsIGfxInfo::FEATURE_STATUS_OK, DRIVER_COMPARISON_IGNORED,
GfxDriverInfo::allDriverVersions);
OperatingSystem::Ios, DeviceFamily::All,
nsIGfxInfo::FEATURE_OPENGL_LAYERS, nsIGfxInfo::FEATURE_STATUS_OK,
DRIVER_COMPARISON_IGNORED, GfxDriverInfo::allDriverVersions);
}
return *sDriverInfo;

Просмотреть файл

@ -746,7 +746,7 @@ nsresult GfxInfo::Init() {
mHasDriverVersionMismatch = false;
if (mAdapterVendorID[mActiveGPUIndex] ==
GfxDriverInfo::GetDeviceVendor(VendorIntel)) {
GfxDriverInfo::GetDeviceVendor(DeviceVendor::Intel)) {
// we've had big crashers (bugs 590373 and 595364) apparently correlated
// with bad Intel driver installations where the DriverVersion reported
// by the registry was not the version of the DLL.
@ -1113,7 +1113,7 @@ void GfxInfo::AddCrashReportAnnotations() {
nsAutoCString note;
// TODO: We should probably convert this into a proper annotation
if (vendorID == GfxDriverInfo::GetDeviceVendor(VendorAll)) {
if (vendorID == GfxDriverInfo::GetDeviceVendor(DeviceVendor::All)) {
/* if we didn't find a valid vendorID lets append the mDeviceID string to
* try to find out why */
LossyAppendUTF16toASCII(mDeviceID[mActiveGPUIndex], note);
@ -1237,26 +1237,20 @@ const nsTArray<GfxDriverInfo>& GfxInfo::GetGfxDriverInfo() {
* to crash on shutdown.
*/
APPEND_TO_DRIVER_BLOCKLIST(
OperatingSystem::Windows7,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorNVIDIA),
GfxDriverInfo::allDevices, GfxDriverInfo::allFeatures,
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, DRIVER_LESS_THAN_OR_EQUAL,
V(8, 15, 11, 8745), "FEATURE_FAILURE_NV_W7_15",
"nVidia driver > 187.45");
OperatingSystem::Windows7, DeviceFamily::NvidiaAll,
GfxDriverInfo::allFeatures, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION,
DRIVER_LESS_THAN_OR_EQUAL, V(8, 15, 11, 8745),
"FEATURE_FAILURE_NV_W7_15", "nVidia driver > 187.45");
APPEND_TO_DRIVER_BLOCKLIST_RANGE(
OperatingSystem::Windows7,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorNVIDIA),
GfxDriverInfo::allDevices, GfxDriverInfo::allFeatures,
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION,
OperatingSystem::Windows7, DeviceFamily::NvidiaAll,
GfxDriverInfo::allFeatures, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION,
DRIVER_BETWEEN_INCLUSIVE_START, V(8, 16, 10, 0000), V(8, 16, 11, 8745),
"FEATURE_FAILURE_NV_W7_16", "nVidia driver > 187.45");
// Telemetry doesn't show any driver in this range so it might not even be
// required.
APPEND_TO_DRIVER_BLOCKLIST_RANGE(
OperatingSystem::Windows7,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorNVIDIA),
GfxDriverInfo::allDevices, GfxDriverInfo::allFeatures,
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION,
OperatingSystem::Windows7, DeviceFamily::NvidiaAll,
GfxDriverInfo::allFeatures, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION,
DRIVER_BETWEEN_INCLUSIVE_START, V(8, 17, 10, 0000), V(8, 17, 11, 8745),
"FEATURE_FAILURE_NV_W7_17", "nVidia driver > 187.45");
@ -1264,33 +1258,25 @@ const nsTArray<GfxDriverInfo>& GfxInfo::GetGfxDriverInfo() {
* AMD/ATI entries. 8.56.1.15 is the driver that shipped with Windows 7 RTM
*/
APPEND_TO_DRIVER_BLOCKLIST(
OperatingSystem::Windows,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorATI),
GfxDriverInfo::allDevices, GfxDriverInfo::allFeatures,
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, DRIVER_LESS_THAN,
V(8, 56, 1, 15), "FEATURE_FAILURE_AMD1", "8.56.1.15");
OperatingSystem::Windows, DeviceFamily::AtiAll,
GfxDriverInfo::allFeatures, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION,
DRIVER_LESS_THAN, V(8, 56, 1, 15), "FEATURE_FAILURE_AMD1", "8.56.1.15");
APPEND_TO_DRIVER_BLOCKLIST(
OperatingSystem::Windows,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorAMD),
GfxDriverInfo::allDevices, GfxDriverInfo::allFeatures,
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, DRIVER_LESS_THAN,
V(8, 56, 1, 15), "FEATURE_FAILURE_AMD2", "8.56.1.15");
OperatingSystem::Windows, DeviceFamily::AmdAll,
GfxDriverInfo::allFeatures, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION,
DRIVER_LESS_THAN, V(8, 56, 1, 15), "FEATURE_FAILURE_AMD2", "8.56.1.15");
// Bug 1099252
APPEND_TO_DRIVER_BLOCKLIST2(
OperatingSystem::Windows7,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorATI),
GfxDriverInfo::allDevices, GfxDriverInfo::allFeatures,
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, DRIVER_EQUAL,
V(8, 832, 0, 0), "FEATURE_FAILURE_BUG_1099252");
OperatingSystem::Windows7, DeviceFamily::AtiAll,
GfxDriverInfo::allFeatures, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION,
DRIVER_EQUAL, V(8, 832, 0, 0), "FEATURE_FAILURE_BUG_1099252");
// Bug 1118695
APPEND_TO_DRIVER_BLOCKLIST2(
OperatingSystem::Windows7,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorATI),
GfxDriverInfo::allDevices, GfxDriverInfo::allFeatures,
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, DRIVER_EQUAL,
V(8, 783, 2, 2000), "FEATURE_FAILURE_BUG_1118695");
OperatingSystem::Windows7, DeviceFamily::AtiAll,
GfxDriverInfo::allFeatures, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION,
DRIVER_EQUAL, V(8, 783, 2, 2000), "FEATURE_FAILURE_BUG_1118695");
// Bug 1587155
//
@ -1301,33 +1287,28 @@ const nsTArray<GfxDriverInfo>& GfxInfo::GetGfxDriverInfo() {
// gpu use with this particular (very old) driver, restricted
// to Win10 since we only have reports from that platform.
APPEND_TO_DRIVER_BLOCKLIST2(
OperatingSystem::Windows10,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorAMD),
GfxDriverInfo::allDevices, GfxDriverInfo::allFeatures,
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, DRIVER_EQUAL,
V(22, 19, 162, 4), "FEATURE_FAILURE_BUG_1587155");
OperatingSystem::Windows10, DeviceFamily::AmdAll,
GfxDriverInfo::allFeatures, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION,
DRIVER_EQUAL, V(22, 19, 162, 4), "FEATURE_FAILURE_BUG_1587155");
// Bug 1198815
APPEND_TO_DRIVER_BLOCKLIST_RANGE(
OperatingSystem::Windows,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorATI),
GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING,
OperatingSystem::Windows, DeviceFamily::AtiAll,
nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING,
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, DRIVER_BETWEEN_INCLUSIVE,
V(15, 200, 0, 0), V(15, 200, 1062, 1004), "FEATURE_FAILURE_BUG_1198815",
"15.200.0.0-15.200.1062.1004");
// Bug 1267970
APPEND_TO_DRIVER_BLOCKLIST_RANGE(
OperatingSystem::Windows10,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorATI),
GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING,
OperatingSystem::Windows10, DeviceFamily::AtiAll,
nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING,
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, DRIVER_BETWEEN_INCLUSIVE,
V(15, 200, 0, 0), V(15, 301, 2301, 1002), "FEATURE_FAILURE_BUG_1267970",
"15.200.0.0-15.301.2301.1002");
APPEND_TO_DRIVER_BLOCKLIST_RANGE(
OperatingSystem::Windows10,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorATI),
GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING,
OperatingSystem::Windows10, DeviceFamily::AtiAll,
nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING,
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, DRIVER_BETWEEN_INCLUSIVE,
V(16, 100, 0, 0), V(16, 300, 2311, 0), "FEATURE_FAILURE_BUG_1267970",
"16.100.0.0-16.300.2311.0");
@ -1336,17 +1317,13 @@ const nsTArray<GfxDriverInfo>& GfxInfo::GetGfxDriverInfo() {
* Bug 783517 - crashes in AMD driver on Windows 8
*/
APPEND_TO_DRIVER_BLOCKLIST_RANGE(
OperatingSystem::Windows8,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorATI),
GfxDriverInfo::allDevices, GfxDriverInfo::allFeatures,
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION,
OperatingSystem::Windows8, DeviceFamily::AtiAll,
GfxDriverInfo::allFeatures, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION,
DRIVER_BETWEEN_INCLUSIVE_START, V(8, 982, 0, 0), V(8, 983, 0, 0),
"FEATURE_FAILURE_BUG_783517_AMD", "!= 8.982.*.*");
APPEND_TO_DRIVER_BLOCKLIST_RANGE(
OperatingSystem::Windows8,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorAMD),
GfxDriverInfo::allDevices, GfxDriverInfo::allFeatures,
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION,
OperatingSystem::Windows8, DeviceFamily::AmdAll,
GfxDriverInfo::allFeatures, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION,
DRIVER_BETWEEN_INCLUSIVE_START, V(8, 982, 0, 0), V(8, 983, 0, 0),
"FEATURE_FAILURE_BUG_783517_ATI", "!= 8.982.*.*");
@ -1354,9 +1331,7 @@ const nsTArray<GfxDriverInfo>& GfxInfo::GetGfxDriverInfo() {
* Bug 1599981 - crashes in AMD driver on Windows 10
*/
APPEND_TO_DRIVER_BLOCKLIST2(
OperatingSystem::Windows10,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorAMD),
(GfxDeviceFamily*)GfxDriverInfo::GetDeviceFamily(RadeonCaicos),
OperatingSystem::Windows10, DeviceFamily::AmdRadeonCaicos,
nsIGfxInfo::FEATURE_DIRECT3D_11_LAYERS,
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, DRIVER_LESS_THAN,
V(15, 301, 1901, 0), "FEATURE_FAILURE_BUG_1599981");
@ -1368,17 +1343,15 @@ const nsTArray<GfxDriverInfo>& GfxInfo::GetGfxDriverInfo() {
* + many complaints about incorrect rendering
*/
APPEND_TO_DRIVER_BLOCKLIST2(
OperatingSystem::Windows,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorATI),
GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_OPENGL_LAYERS,
nsIGfxInfo::FEATURE_DISCOURAGED, DRIVER_LESS_THAN,
GfxDriverInfo::allDriverVersions, "FEATURE_FAILURE_OGL_ATI_DIS");
OperatingSystem::Windows, DeviceFamily::AtiAll,
nsIGfxInfo::FEATURE_OPENGL_LAYERS, nsIGfxInfo::FEATURE_DISCOURAGED,
DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions,
"FEATURE_FAILURE_OGL_ATI_DIS");
APPEND_TO_DRIVER_BLOCKLIST2(
OperatingSystem::Windows,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorAMD),
GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_OPENGL_LAYERS,
nsIGfxInfo::FEATURE_DISCOURAGED, DRIVER_LESS_THAN,
GfxDriverInfo::allDriverVersions, "FEATURE_FAILURE_OGL_AMD_DIS");
OperatingSystem::Windows, DeviceFamily::AmdAll,
nsIGfxInfo::FEATURE_OPENGL_LAYERS, nsIGfxInfo::FEATURE_DISCOURAGED,
DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions,
"FEATURE_FAILURE_OGL_AMD_DIS");
/*
* Intel entries
@ -1388,37 +1361,34 @@ const nsTArray<GfxDriverInfo>& GfxInfo::GetGfxDriverInfo() {
* be particularly relevant anymore.
*/
#define IMPLEMENT_INTEL_DRIVER_BLOCKLIST(winVer, devFamily, driverVer, ruleId) \
APPEND_TO_DRIVER_BLOCKLIST2( \
winVer, (nsAString&)GfxDriverInfo::GetDeviceVendor(VendorIntel), \
(GfxDeviceFamily*)GfxDriverInfo::GetDeviceFamily(devFamily), \
GfxDriverInfo::allFeatures, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, \
DRIVER_LESS_THAN, driverVer, ruleId)
APPEND_TO_DRIVER_BLOCKLIST2(winVer, devFamily, GfxDriverInfo::allFeatures, \
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, \
DRIVER_LESS_THAN, driverVer, ruleId)
#define IMPLEMENT_INTEL_DRIVER_BLOCKLIST_D2D(winVer, devFamily, driverVer, \
ruleId) \
APPEND_TO_DRIVER_BLOCKLIST2( \
winVer, (nsAString&)GfxDriverInfo::GetDeviceVendor(VendorIntel), \
(GfxDeviceFamily*)GfxDriverInfo::GetDeviceFamily(devFamily), \
nsIGfxInfo::FEATURE_DIRECT2D, \
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, DRIVER_BUILD_ID_LESS_THAN, \
driverVer, ruleId)
#define IMPLEMENT_INTEL_DRIVER_BLOCKLIST_D2D(winVer, devFamily, driverVer, \
ruleId) \
APPEND_TO_DRIVER_BLOCKLIST2(winVer, devFamily, nsIGfxInfo::FEATURE_DIRECT2D, \
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, \
DRIVER_BUILD_ID_LESS_THAN, driverVer, ruleId)
IMPLEMENT_INTEL_DRIVER_BLOCKLIST_D2D(OperatingSystem::Windows7, IntelGMA500,
2026, "FEATURE_FAILURE_594877_7");
IMPLEMENT_INTEL_DRIVER_BLOCKLIST_D2D(OperatingSystem::Windows7, IntelGMA900,
GfxDriverInfo::allDriverVersions,
"FEATURE_FAILURE_594877_8");
IMPLEMENT_INTEL_DRIVER_BLOCKLIST_D2D(OperatingSystem::Windows7, IntelGMA950,
1930, "FEATURE_FAILURE_594877_9");
IMPLEMENT_INTEL_DRIVER_BLOCKLIST_D2D(OperatingSystem::Windows7,
IntelGMA3150, 2117,
DeviceFamily::IntelGMA500, 2026,
"FEATURE_FAILURE_594877_7");
IMPLEMENT_INTEL_DRIVER_BLOCKLIST_D2D(
OperatingSystem::Windows7, DeviceFamily::IntelGMA900,
GfxDriverInfo::allDriverVersions, "FEATURE_FAILURE_594877_8");
IMPLEMENT_INTEL_DRIVER_BLOCKLIST_D2D(OperatingSystem::Windows7,
DeviceFamily::IntelGMA950, 1930,
"FEATURE_FAILURE_594877_9");
IMPLEMENT_INTEL_DRIVER_BLOCKLIST_D2D(OperatingSystem::Windows7,
DeviceFamily::IntelGMA3150, 2117,
"FEATURE_FAILURE_594877_10");
IMPLEMENT_INTEL_DRIVER_BLOCKLIST_D2D(OperatingSystem::Windows7,
IntelGMAX3000, 1930,
DeviceFamily::IntelGMAX3000, 1930,
"FEATURE_FAILURE_594877_11");
IMPLEMENT_INTEL_DRIVER_BLOCKLIST_D2D(OperatingSystem::Windows7,
IntelHDGraphicsToSandyBridge, 2202,
"FEATURE_FAILURE_594877_12");
IMPLEMENT_INTEL_DRIVER_BLOCKLIST_D2D(
OperatingSystem::Windows7, DeviceFamily::IntelHDGraphicsToSandyBridge,
2202, "FEATURE_FAILURE_594877_12");
/* Disable Direct2D on Intel GMAX4500 devices because of rendering
* corruption discovered in bug 1180379. These seems to affect even the most
@ -1426,68 +1396,58 @@ const nsTArray<GfxDriverInfo>& GfxInfo::GetGfxDriverInfo() {
* though we've only confirmed the issue on the G45
*/
APPEND_TO_DRIVER_BLOCKLIST2(
OperatingSystem::Windows,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorIntel),
(GfxDeviceFamily*)GfxDriverInfo::GetDeviceFamily(IntelGMAX4500HD),
OperatingSystem::Windows, DeviceFamily::IntelGMAX4500HD,
nsIGfxInfo::FEATURE_DIRECT2D, nsIGfxInfo::FEATURE_BLOCKED_DEVICE,
DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions,
"FEATURE_FAILURE_1180379");
IMPLEMENT_INTEL_DRIVER_BLOCKLIST(OperatingSystem::Windows7, IntelGMA500,
V(5, 0, 0, 2026),
"FEATURE_FAILURE_INTEL_16");
IMPLEMENT_INTEL_DRIVER_BLOCKLIST(OperatingSystem::Windows7, IntelGMA900,
GfxDriverInfo::allDriverVersions,
"FEATURE_FAILURE_INTEL_17");
IMPLEMENT_INTEL_DRIVER_BLOCKLIST(OperatingSystem::Windows7, IntelGMA950,
V(8, 15, 10, 1930),
"FEATURE_FAILURE_INTEL_18");
IMPLEMENT_INTEL_DRIVER_BLOCKLIST(OperatingSystem::Windows7, IntelGMA3150,
V(8, 14, 10, 1972),
"FEATURE_FAILURE_INTEL_19");
IMPLEMENT_INTEL_DRIVER_BLOCKLIST(OperatingSystem::Windows7, IntelGMAX3000,
V(7, 15, 10, 1666),
"FEATURE_FAILURE_INTEL_20");
IMPLEMENT_INTEL_DRIVER_BLOCKLIST(OperatingSystem::Windows7, IntelGMAX4500HD,
V(7, 15, 10, 1666),
"FEATURE_FAILURE_INTEL_21");
IMPLEMENT_INTEL_DRIVER_BLOCKLIST(
OperatingSystem::Windows7, IntelHDGraphicsToSandyBridge,
OperatingSystem::Windows7, DeviceFamily::IntelGMA500, V(5, 0, 0, 2026),
"FEATURE_FAILURE_INTEL_16");
IMPLEMENT_INTEL_DRIVER_BLOCKLIST(
OperatingSystem::Windows7, DeviceFamily::IntelGMA900,
GfxDriverInfo::allDriverVersions, "FEATURE_FAILURE_INTEL_17");
IMPLEMENT_INTEL_DRIVER_BLOCKLIST(
OperatingSystem::Windows7, DeviceFamily::IntelGMA950,
V(8, 15, 10, 1930), "FEATURE_FAILURE_INTEL_18");
IMPLEMENT_INTEL_DRIVER_BLOCKLIST(
OperatingSystem::Windows7, DeviceFamily::IntelGMA3150,
V(8, 14, 10, 1972), "FEATURE_FAILURE_INTEL_19");
IMPLEMENT_INTEL_DRIVER_BLOCKLIST(
OperatingSystem::Windows7, DeviceFamily::IntelGMAX3000,
V(7, 15, 10, 1666), "FEATURE_FAILURE_INTEL_20");
IMPLEMENT_INTEL_DRIVER_BLOCKLIST(
OperatingSystem::Windows7, DeviceFamily::IntelGMAX4500HD,
V(7, 15, 10, 1666), "FEATURE_FAILURE_INTEL_21");
IMPLEMENT_INTEL_DRIVER_BLOCKLIST(
OperatingSystem::Windows7, DeviceFamily::IntelHDGraphicsToSandyBridge,
V(7, 15, 10, 1666), "FEATURE_FAILURE_INTEL_22");
// Bug 1074378
APPEND_TO_DRIVER_BLOCKLIST(
OperatingSystem::Windows7,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorIntel),
(GfxDeviceFamily*)GfxDriverInfo::GetDeviceFamily(IntelGMAX4500HD),
OperatingSystem::Windows7, DeviceFamily::IntelGMAX4500HD,
GfxDriverInfo::allFeatures, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION,
DRIVER_EQUAL, V(8, 15, 10, 1749), "FEATURE_FAILURE_BUG_1074378_1",
"8.15.10.2342");
APPEND_TO_DRIVER_BLOCKLIST(
OperatingSystem::Windows7,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorIntel),
(GfxDeviceFamily*)GfxDriverInfo::GetDeviceFamily(
IntelHDGraphicsToSandyBridge),
OperatingSystem::Windows7, DeviceFamily::IntelHDGraphicsToSandyBridge,
GfxDriverInfo::allFeatures, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION,
DRIVER_EQUAL, V(8, 15, 10, 1749), "FEATURE_FAILURE_BUG_1074378_2",
"8.15.10.2342");
/* OpenGL on any Intel hardware is discouraged */
APPEND_TO_DRIVER_BLOCKLIST2(
OperatingSystem::Windows,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorIntel),
GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_OPENGL_LAYERS,
nsIGfxInfo::FEATURE_DISCOURAGED, DRIVER_LESS_THAN,
GfxDriverInfo::allDriverVersions, "FEATURE_FAILURE_INTEL_OGL_DIS");
OperatingSystem::Windows, DeviceFamily::IntelAll,
nsIGfxInfo::FEATURE_OPENGL_LAYERS, nsIGfxInfo::FEATURE_DISCOURAGED,
DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions,
"FEATURE_FAILURE_INTEL_OGL_DIS");
/**
* Disable acceleration on Intel HD 3000 for graphics drivers
* <= 8.15.10.2321. See bug 1018278 and bug 1060736.
*/
APPEND_TO_DRIVER_BLOCKLIST(
OperatingSystem::Windows,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorIntel),
(GfxDeviceFamily*)GfxDriverInfo::GetDeviceFamily(IntelHD3000),
OperatingSystem::Windows, DeviceFamily::IntelHD3000,
GfxDriverInfo::allFeatures, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION,
DRIVER_BUILD_ID_LESS_THAN_OR_EQUAL, 2321, "FEATURE_FAILURE_BUG_1018278",
"X.X.X.2342");
@ -1496,23 +1456,18 @@ const nsTArray<GfxDriverInfo>& GfxInfo::GetGfxDriverInfo() {
* Disable D2D on Win7 on Intel Haswell for graphics drivers build id <=
* 4578. See bug 1432610
*/
APPEND_TO_DRIVER_BLOCKLIST2(
OperatingSystem::Windows7,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorIntel),
(GfxDeviceFamily*)GfxDriverInfo::GetDeviceFamily(
IntelHDGraphicsToHaswell),
nsIGfxInfo::FEATURE_DIRECT2D,
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION,
DRIVER_BUILD_ID_LESS_THAN_OR_EQUAL, 4578,
"FEATURE_FAILURE_BUG_1432610");
APPEND_TO_DRIVER_BLOCKLIST2(OperatingSystem::Windows7,
DeviceFamily::IntelHDGraphicsToHaswell,
nsIGfxInfo::FEATURE_DIRECT2D,
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION,
DRIVER_BUILD_ID_LESS_THAN_OR_EQUAL, 4578,
"FEATURE_FAILURE_BUG_1432610");
/* Disable D2D on Win7 on Intel HD Graphics on driver <= 8.15.10.2302
* See bug 806786
*/
APPEND_TO_DRIVER_BLOCKLIST2(
OperatingSystem::Windows7,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorIntel),
(GfxDeviceFamily*)GfxDriverInfo::GetDeviceFamily(IntelMobileHDGraphics),
OperatingSystem::Windows7, DeviceFamily::IntelMobileHDGraphics,
nsIGfxInfo::FEATURE_DIRECT2D,
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, DRIVER_LESS_THAN_OR_EQUAL,
V(8, 15, 10, 2302), "FEATURE_FAILURE_BUG_806786");
@ -1521,9 +1476,7 @@ const nsTArray<GfxDriverInfo>& GfxInfo::GetGfxDriverInfo() {
* See bug 804144 and 863683
*/
APPEND_TO_DRIVER_BLOCKLIST2(
OperatingSystem::Windows8,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorIntel),
(GfxDeviceFamily*)GfxDriverInfo::GetDeviceFamily(IntelMobileHDGraphics),
OperatingSystem::Windows8, DeviceFamily::IntelMobileHDGraphics,
nsIGfxInfo::FEATURE_DIRECT2D,
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, DRIVER_LESS_THAN_OR_EQUAL,
V(8, 15, 10, 2302), "FEATURE_FAILURE_BUG_804144");
@ -1532,10 +1485,7 @@ const nsTArray<GfxDriverInfo>& GfxInfo::GetGfxDriverInfo() {
* See bug 1433790
*/
APPEND_TO_DRIVER_BLOCKLIST2(
OperatingSystem::Windows7,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorIntel),
(GfxDeviceFamily*)GfxDriverInfo::GetDeviceFamily(
IntelHDGraphicsToSandyBridge),
OperatingSystem::Windows7, DeviceFamily::IntelHDGraphicsToSandyBridge,
nsIGfxInfo::FEATURE_DIRECT2D,
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, DRIVER_EQUAL,
V(8, 15, 10, 2418), "FEATURE_FAILURE_BUG_1433790");
@ -1544,9 +1494,7 @@ const nsTArray<GfxDriverInfo>& GfxInfo::GetGfxDriverInfo() {
* X3100, for causing device resets. See bug 1116812.
*/
APPEND_TO_DRIVER_BLOCKLIST2(
OperatingSystem::Windows,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorIntel),
(GfxDeviceFamily*)GfxDriverInfo::GetDeviceFamily(Bug1116812),
OperatingSystem::Windows, DeviceFamily::Bug1116812,
nsIGfxInfo::FEATURE_DIRECT3D_11_LAYERS,
nsIGfxInfo::FEATURE_BLOCKED_DEVICE, DRIVER_LESS_THAN,
GfxDriverInfo::allDriverVersions, "FEATURE_FAILURE_BUG_1116812");
@ -1556,24 +1504,19 @@ const nsTArray<GfxDriverInfo>& GfxInfo::GetGfxDriverInfo() {
* accidentally use WARP.
*/
APPEND_TO_DRIVER_BLOCKLIST2(
OperatingSystem::Windows,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorIntel),
(GfxDeviceFamily*)GfxDriverInfo::GetDeviceFamily(Bug1207665),
OperatingSystem::Windows, DeviceFamily::Bug1207665,
nsIGfxInfo::FEATURE_DIRECT3D_11_LAYERS,
nsIGfxInfo::FEATURE_BLOCKED_DEVICE, DRIVER_LESS_THAN,
GfxDriverInfo::allDriverVersions, "FEATURE_FAILURE_BUG_1207665_1");
APPEND_TO_DRIVER_BLOCKLIST2(
OperatingSystem::Windows,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorIntel),
(GfxDeviceFamily*)GfxDriverInfo::GetDeviceFamily(Bug1207665),
OperatingSystem::Windows, DeviceFamily::Bug1207665,
nsIGfxInfo::FEATURE_DIRECT2D, nsIGfxInfo::FEATURE_BLOCKED_DEVICE,
DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions,
"FEATURE_FAILURE_BUG_1207665_2");
APPEND_TO_DRIVER_BLOCKLIST2(
OperatingSystem::Windows10,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorQualcomm),
GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_DIRECT2D,
OperatingSystem::Windows10, DeviceFamily::QualcommAll,
nsIGfxInfo::FEATURE_DIRECT2D,
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, DRIVER_LESS_THAN,
GfxDriverInfo::allDriverVersions, "FEATURE_FAILURE_QUALCOMM");
@ -1582,9 +1525,8 @@ const nsTArray<GfxDriverInfo>& GfxInfo::GetGfxDriverInfo() {
// cause BSOD's and output suprious green frames while decoding video.
// Bug 1592826 expands the blacklist.
APPEND_TO_DRIVER_BLOCKLIST2(
OperatingSystem::Windows10,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorQualcomm),
GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING,
OperatingSystem::Windows10, DeviceFamily::QualcommAll,
nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING,
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, DRIVER_LESS_THAN_OR_EQUAL,
V(25, 18, 10440, 0), "FEATURE_FAILURE_BUG_1592826");
@ -1592,16 +1534,14 @@ const nsTArray<GfxDriverInfo>& GfxInfo::GetGfxDriverInfo() {
* See bug 984488
*/
APPEND_TO_DRIVER_BLOCKLIST_RANGE(
OperatingSystem::Windows,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorATI),
GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_DIRECT2D,
OperatingSystem::Windows, DeviceFamily::AtiAll,
nsIGfxInfo::FEATURE_DIRECT2D,
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION,
DRIVER_BETWEEN_INCLUSIVE_START, V(14, 1, 0, 0), V(14, 2, 0, 0),
"FEATURE_FAILURE_BUG_984488_1", "ATI Catalyst 14.6+");
APPEND_TO_DRIVER_BLOCKLIST_RANGE(
OperatingSystem::Windows,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorAMD),
GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_DIRECT2D,
OperatingSystem::Windows, DeviceFamily::AmdAll,
nsIGfxInfo::FEATURE_DIRECT2D,
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION,
DRIVER_BETWEEN_INCLUSIVE_START, V(14, 1, 0, 0), V(14, 2, 0, 0),
"FEATURE_FAILURE_BUG_984488_2", "ATI Catalyst 14.6+");
@ -1610,76 +1550,63 @@ const nsTArray<GfxDriverInfo>& GfxInfo::GetGfxDriverInfo() {
* whilst scrolling. See bugs: 612007, 644787 & 645872.
*/
APPEND_TO_DRIVER_BLOCKLIST2(
OperatingSystem::Windows,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorNVIDIA),
(GfxDeviceFamily*)GfxDriverInfo::GetDeviceFamily(NvidiaBlockD3D9Layers),
OperatingSystem::Windows, DeviceFamily::NvidiaBlockD3D9Layers,
nsIGfxInfo::FEATURE_DIRECT3D_9_LAYERS,
nsIGfxInfo::FEATURE_BLOCKED_DEVICE, DRIVER_LESS_THAN,
GfxDriverInfo::allDriverVersions, "FEATURE_FAILURE_BUG_612007");
/* Microsoft RemoteFX; blocked less than 6.2.0.0 */
APPEND_TO_DRIVER_BLOCKLIST(
OperatingSystem::Windows,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorMicrosoft),
GfxDriverInfo::allDevices, GfxDriverInfo::allFeatures,
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, DRIVER_LESS_THAN,
V(6, 2, 0, 0), "< 6.2.0.0", "FEATURE_FAILURE_REMOTE_FX");
OperatingSystem::Windows, DeviceFamily::MicrosoftAll,
GfxDriverInfo::allFeatures, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION,
DRIVER_LESS_THAN, V(6, 2, 0, 0), "< 6.2.0.0",
"FEATURE_FAILURE_REMOTE_FX");
/* Bug 1008759: Optimus (NVidia) crash. Disable D2D on NV 310M. */
APPEND_TO_DRIVER_BLOCKLIST2(
OperatingSystem::Windows,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorNVIDIA),
(GfxDeviceFamily*)GfxDriverInfo::GetDeviceFamily(Nvidia310M),
OperatingSystem::Windows, DeviceFamily::Nvidia310M,
nsIGfxInfo::FEATURE_DIRECT2D, nsIGfxInfo::FEATURE_BLOCKED_DEVICE,
DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions,
"FEATURE_FAILURE_BUG_1008759");
/* Bug 1139503: DXVA crashes with ATI cards on windows 10. */
APPEND_TO_DRIVER_BLOCKLIST2(
OperatingSystem::Windows10,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorATI),
GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING,
OperatingSystem::Windows10, DeviceFamily::AtiAll,
nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING,
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, DRIVER_EQUAL,
V(15, 200, 1006, 0), "FEATURE_FAILURE_BUG_1139503");
/* Bug 1213107: D3D9 crashes with ATI cards on Windows 7. */
APPEND_TO_DRIVER_BLOCKLIST_RANGE(
OperatingSystem::Windows7,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorATI),
GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING,
OperatingSystem::Windows7, DeviceFamily::AtiAll,
nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING,
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, DRIVER_BETWEEN_INCLUSIVE,
V(8, 861, 0, 0), V(8, 862, 6, 5000), "FEATURE_FAILURE_BUG_1213107_1",
"Radeon driver > 8.862.6.5000");
APPEND_TO_DRIVER_BLOCKLIST_RANGE(
OperatingSystem::Windows7,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorATI),
GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_WEBGL_ANGLE,
OperatingSystem::Windows7, DeviceFamily::AtiAll,
nsIGfxInfo::FEATURE_WEBGL_ANGLE,
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, DRIVER_BETWEEN_INCLUSIVE,
V(8, 861, 0, 0), V(8, 862, 6, 5000), "FEATURE_FAILURE_BUG_1213107_2",
"Radeon driver > 8.862.6.5000");
/* This may not be needed at all */
APPEND_TO_DRIVER_BLOCKLIST2(
OperatingSystem::Windows7,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorIntel),
(GfxDeviceFamily*)GfxDriverInfo::GetDeviceFamily(Bug1155608),
OperatingSystem::Windows7, DeviceFamily::Bug1155608,
nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING,
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, DRIVER_LESS_THAN,
V(8, 15, 10, 2869), "FEATURE_FAILURE_INTEL_W7_HW_DECODING");
/* Bug 1203199/1092166: DXVA startup crashes on some intel drivers. */
APPEND_TO_DRIVER_BLOCKLIST(
OperatingSystem::Windows,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorIntel),
GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING,
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION,
DRIVER_BUILD_ID_LESS_THAN_OR_EQUAL, 2849,
"FEATURE_FAILURE_BUG_1203199_1", "Intel driver > X.X.X.2849");
APPEND_TO_DRIVER_BLOCKLIST(OperatingSystem::Windows, DeviceFamily::IntelAll,
nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING,
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION,
DRIVER_BUILD_ID_LESS_THAN_OR_EQUAL, 2849,
"FEATURE_FAILURE_BUG_1203199_1",
"Intel driver > X.X.X.2849");
APPEND_TO_DRIVER_BLOCKLIST2(
OperatingSystem::Windows,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorNVIDIA),
(GfxDeviceFamily*)GfxDriverInfo::GetDeviceFamily(Nvidia8800GTS),
OperatingSystem::Windows, DeviceFamily::Nvidia8800GTS,
nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING,
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, DRIVER_EQUAL,
V(9, 18, 13, 4052), "FEATURE_FAILURE_BUG_1203199_2");
@ -1687,9 +1614,7 @@ const nsTArray<GfxDriverInfo>& GfxInfo::GetGfxDriverInfo() {
/* Bug 1137716: XXX this should really check for the matching Intel piece as
* well. Unfortunately, we don't have the infrastructure to do that */
APPEND_TO_DRIVER_BLOCKLIST_RANGE_GPU2(
OperatingSystem::Windows7,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorNVIDIA),
(GfxDeviceFamily*)GfxDriverInfo::GetDeviceFamily(Bug1137716),
OperatingSystem::Windows7, DeviceFamily::Bug1137716,
GfxDriverInfo::allFeatures, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION,
DRIVER_BETWEEN_INCLUSIVE, V(8, 17, 12, 5730), V(8, 17, 12, 6901),
"FEATURE_FAILURE_BUG_1137716", "Nvidia driver > 8.17.12.6901");
@ -1697,47 +1622,37 @@ const nsTArray<GfxDriverInfo>& GfxInfo::GetGfxDriverInfo() {
/* Bug 1153381: WebGL issues with D3D11 ANGLE on Intel. These may be fixed
* by an ANGLE update. */
APPEND_TO_DRIVER_BLOCKLIST2(
OperatingSystem::Windows,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorIntel),
(GfxDeviceFamily*)GfxDriverInfo::GetDeviceFamily(IntelGMAX4500HD),
OperatingSystem::Windows, DeviceFamily::IntelGMAX4500HD,
nsIGfxInfo::FEATURE_DIRECT3D_11_ANGLE,
nsIGfxInfo::FEATURE_BLOCKED_DEVICE, DRIVER_LESS_THAN,
GfxDriverInfo::allDriverVersions, "FEATURE_FAILURE_BUG_1153381");
/* Bug 1336710: Crash in rx::Blit9::initialize. */
APPEND_TO_DRIVER_BLOCKLIST2(
OperatingSystem::WindowsXP,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorIntel),
(GfxDeviceFamily*)GfxDriverInfo::GetDeviceFamily(IntelGMAX4500HD),
OperatingSystem::WindowsXP, DeviceFamily::IntelGMAX4500HD,
nsIGfxInfo::FEATURE_WEBGL_ANGLE, nsIGfxInfo::FEATURE_BLOCKED_DEVICE,
DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions,
"FEATURE_FAILURE_BUG_1336710");
APPEND_TO_DRIVER_BLOCKLIST2(
OperatingSystem::WindowsXP,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorIntel),
(GfxDeviceFamily*)GfxDriverInfo::GetDeviceFamily(
IntelHDGraphicsToSandyBridge),
OperatingSystem::WindowsXP, DeviceFamily::IntelHDGraphicsToSandyBridge,
nsIGfxInfo::FEATURE_WEBGL_ANGLE, nsIGfxInfo::FEATURE_BLOCKED_DEVICE,
DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions,
"FEATURE_FAILURE_BUG_1336710");
/* Bug 1304360: Graphical artifacts with D3D9 on Windows 7. */
APPEND_TO_DRIVER_BLOCKLIST2(
OperatingSystem::Windows7,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorIntel),
(GfxDeviceFamily*)GfxDriverInfo::GetDeviceFamily(IntelGMAX3000),
nsIGfxInfo::FEATURE_DIRECT3D_9_LAYERS,
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION,
DRIVER_BUILD_ID_LESS_THAN_OR_EQUAL, 1749,
"FEATURE_FAILURE_INTEL_W7_D3D9_LAYERS");
APPEND_TO_DRIVER_BLOCKLIST2(OperatingSystem::Windows7,
DeviceFamily::IntelGMAX3000,
nsIGfxInfo::FEATURE_DIRECT3D_9_LAYERS,
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION,
DRIVER_BUILD_ID_LESS_THAN_OR_EQUAL, 1749,
"FEATURE_FAILURE_INTEL_W7_D3D9_LAYERS");
#if defined(_M_X64)
if (DetectBrokenAVX()) {
APPEND_TO_DRIVER_BLOCKLIST2(
OperatingSystem::Windows7,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorIntel),
GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_DIRECT3D_11_LAYERS,
OperatingSystem::Windows7, DeviceFamily::IntelAll,
nsIGfxInfo::FEATURE_DIRECT3D_11_LAYERS,
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, DRIVER_LESS_THAN,
GfxDriverInfo::allDriverVersions, "FEATURE_FAILURE_BUG_1403353");
}
@ -1748,36 +1663,29 @@ const nsTArray<GfxDriverInfo>& GfxInfo::GetGfxDriverInfo() {
// Older than 5-15-2016
APPEND_TO_DRIVER_BLOCKLIST2(
OperatingSystem::Windows,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorAMD),
GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_WEBGL_OPENGL,
nsIGfxInfo::FEATURE_DISCOURAGED, DRIVER_LESS_THAN,
V(16, 200, 1010, 1002), "WEBGL_NATIVE_GL_OLD_AMD");
OperatingSystem::Windows, DeviceFamily::AmdAll,
nsIGfxInfo::FEATURE_WEBGL_OPENGL, nsIGfxInfo::FEATURE_DISCOURAGED,
DRIVER_LESS_THAN, V(16, 200, 1010, 1002), "WEBGL_NATIVE_GL_OLD_AMD");
// Older than 11-18-2015
APPEND_TO_DRIVER_BLOCKLIST2(
OperatingSystem::Windows,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorIntel),
GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_WEBGL_OPENGL,
nsIGfxInfo::FEATURE_DISCOURAGED, DRIVER_BUILD_ID_LESS_THAN, 4331,
"WEBGL_NATIVE_GL_OLD_INTEL");
OperatingSystem::Windows, DeviceFamily::IntelAll,
nsIGfxInfo::FEATURE_WEBGL_OPENGL, nsIGfxInfo::FEATURE_DISCOURAGED,
DRIVER_BUILD_ID_LESS_THAN, 4331, "WEBGL_NATIVE_GL_OLD_INTEL");
// Older than 2-23-2016
APPEND_TO_DRIVER_BLOCKLIST2(
OperatingSystem::Windows,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorNVIDIA),
GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_WEBGL_OPENGL,
nsIGfxInfo::FEATURE_DISCOURAGED, DRIVER_LESS_THAN, V(10, 18, 13, 6200),
"WEBGL_NATIVE_GL_OLD_NVIDIA");
OperatingSystem::Windows, DeviceFamily::NvidiaAll,
nsIGfxInfo::FEATURE_WEBGL_OPENGL, nsIGfxInfo::FEATURE_DISCOURAGED,
DRIVER_LESS_THAN, V(10, 18, 13, 6200), "WEBGL_NATIVE_GL_OLD_NVIDIA");
////////////////////////////////////
// FEATURE_DX_INTEROP2
// All AMD.
APPEND_TO_DRIVER_BLOCKLIST2(
OperatingSystem::Windows,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorAMD),
GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_DX_INTEROP2,
OperatingSystem::Windows, DeviceFamily::AmdAll,
nsIGfxInfo::FEATURE_DX_INTEROP2,
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, DRIVER_LESS_THAN,
GfxDriverInfo::allDriverVersions, "DX_INTEROP2_AMD_CRASH");
@ -1786,54 +1694,41 @@ const nsTArray<GfxDriverInfo>& GfxInfo::GetGfxDriverInfo() {
// bug 1359416
APPEND_TO_DRIVER_BLOCKLIST2(
OperatingSystem::Windows,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorIntel),
(GfxDeviceFamily*)GfxDriverInfo::GetDeviceFamily(
IntelHDGraphicsToSandyBridge),
OperatingSystem::Windows, DeviceFamily::IntelHDGraphicsToSandyBridge,
nsIGfxInfo::FEATURE_D3D11_KEYED_MUTEX,
nsIGfxInfo::FEATURE_BLOCKED_DEVICE, DRIVER_LESS_THAN,
GfxDriverInfo::allDriverVersions, "FEATURE_FAILURE_BUG_1359416");
// bug 1419264
APPEND_TO_DRIVER_BLOCKLIST_RANGE(
OperatingSystem::Windows7,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorNVIDIA),
GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_ADVANCED_LAYERS,
OperatingSystem::Windows7, DeviceFamily::NvidiaAll,
nsIGfxInfo::FEATURE_ADVANCED_LAYERS,
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, DRIVER_BETWEEN_INCLUSIVE,
V(23, 21, 13, 8569), V(23, 21, 13, 9135), "FEATURE_FAILURE_BUG_1419264",
"Windows 10");
// Bug 1447141, for causing device creation crashes.
APPEND_TO_DRIVER_BLOCKLIST2(
OperatingSystem::Windows7,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorATI),
(GfxDeviceFamily*)GfxDriverInfo::GetDeviceFamily(Bug1447141),
OperatingSystem::Windows7, DeviceFamily::Bug1447141,
GfxDriverInfo::allFeatures, nsIGfxInfo::FEATURE_BLOCKED_DEVICE,
DRIVER_EQUAL, V(15, 201, 2201, 0), "FEATURE_FAILURE_BUG_1447141_1");
APPEND_TO_DRIVER_BLOCKLIST2(
OperatingSystem::Windows7,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorATI),
(GfxDeviceFamily*)GfxDriverInfo::GetDeviceFamily(Bug1447141),
OperatingSystem::Windows7, DeviceFamily::Bug1447141,
GfxDriverInfo::allFeatures, nsIGfxInfo::FEATURE_BLOCKED_DEVICE,
DRIVER_EQUAL, V(15, 201, 1701, 0), "FEATURE_FAILURE_BUG_1447141_1");
// bug 1457758
APPEND_TO_DRIVER_BLOCKLIST2(
OperatingSystem::Windows,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorNVIDIA),
GfxDriverInfo::allDevices, GfxDriverInfo::allFeatures,
nsIGfxInfo::FEATURE_BLOCKED_DEVICE, DRIVER_EQUAL, V(24, 21, 13, 9731),
"FEATURE_FAILURE_BUG_1457758");
OperatingSystem::Windows, DeviceFamily::NvidiaAll,
GfxDriverInfo::allFeatures, nsIGfxInfo::FEATURE_BLOCKED_DEVICE,
DRIVER_EQUAL, V(24, 21, 13, 9731), "FEATURE_FAILURE_BUG_1457758");
////////////////////////////////////
// FEATURE_DX_NV12
// Bug 1437334
APPEND_TO_DRIVER_BLOCKLIST2(
OperatingSystem::Windows,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorIntel),
(GfxDeviceFamily*)GfxDriverInfo::GetDeviceFamily(
IntelHDGraphicsToSandyBridge),
OperatingSystem::Windows, DeviceFamily::IntelHDGraphicsToSandyBridge,
nsIGfxInfo::FEATURE_DX_NV12, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION,
DRIVER_BUILD_ID_LESS_THAN_OR_EQUAL, 4459,
"FEATURE_BLOCKED_DRIVER_VERSION");
@ -1842,11 +1737,10 @@ const nsTArray<GfxDriverInfo>& GfxInfo::GetGfxDriverInfo() {
// FEATURE_DX_P010
APPEND_TO_DRIVER_BLOCKLIST2(
OperatingSystem::Windows,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorNVIDIA),
GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_DX_P010,
nsIGfxInfo::FEATURE_BLOCKED_DEVICE, DRIVER_LESS_THAN,
GfxDriverInfo::allDriverVersions, "FEATURE_UNQUALIFIED_P010_NVIDIA");
OperatingSystem::Windows, DeviceFamily::NvidiaAll,
nsIGfxInfo::FEATURE_DX_P010, nsIGfxInfo::FEATURE_BLOCKED_DEVICE,
DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions,
"FEATURE_UNQUALIFIED_P010_NVIDIA");
////////////////////////////////////
// FEATURE_WEBRENDER
@ -1855,34 +1749,26 @@ const nsTArray<GfxDriverInfo>& GfxInfo::GetGfxDriverInfo() {
// check for the WEBRENDER_QUALIFIED feature. However we also want to block
// some specific Nvidia cards for being too low-powered, so we do that here.
APPEND_TO_DRIVER_BLOCKLIST2(
OperatingSystem::Windows10,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorNVIDIA),
(GfxDeviceFamily*)GfxDriverInfo::GetDeviceFamily(NvidiaBlockWebRender),
OperatingSystem::Windows10, DeviceFamily::NvidiaBlockWebRender,
nsIGfxInfo::FEATURE_WEBRENDER, nsIGfxInfo::FEATURE_BLOCKED_DEVICE,
DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions,
"FEATURE_UNQUALIFIED_WEBRENDER_NVIDIA_BLOCKED");
// Block all windows versions other than windows 10
APPEND_TO_DRIVER_BLOCKLIST2(
OperatingSystem::Windows7,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorAll),
GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_WEBRENDER,
nsIGfxInfo::FEATURE_BLOCKED_DEVICE, DRIVER_LESS_THAN,
GfxDriverInfo::allDriverVersions,
OperatingSystem::Windows7, DeviceFamily::All,
nsIGfxInfo::FEATURE_WEBRENDER, nsIGfxInfo::FEATURE_BLOCKED_DEVICE,
DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions,
"FEATURE_UNQUALIFIED_WEBRENDER_WINDOWS_7");
APPEND_TO_DRIVER_BLOCKLIST2(
OperatingSystem::Windows8,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorAll),
GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_WEBRENDER,
nsIGfxInfo::FEATURE_BLOCKED_DEVICE, DRIVER_LESS_THAN,
GfxDriverInfo::allDriverVersions,
OperatingSystem::Windows8, DeviceFamily::All,
nsIGfxInfo::FEATURE_WEBRENDER, nsIGfxInfo::FEATURE_BLOCKED_DEVICE,
DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions,
"FEATURE_UNQUALIFIED_WEBRENDER_WINDOWS_8");
APPEND_TO_DRIVER_BLOCKLIST2(
OperatingSystem::Windows8_1,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorAll),
GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_WEBRENDER,
nsIGfxInfo::FEATURE_BLOCKED_DEVICE, DRIVER_LESS_THAN,
GfxDriverInfo::allDriverVersions,
OperatingSystem::Windows8_1, DeviceFamily::All,
nsIGfxInfo::FEATURE_WEBRENDER, nsIGfxInfo::FEATURE_BLOCKED_DEVICE,
DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions,
"FEATURE_UNQUALIFIED_WEBRENDER_WINDOWS_8_1");
// Bug 1525084 - Window jumps with certain Intel drivers
@ -1891,34 +1777,30 @@ const nsTArray<GfxDriverInfo>& GfxInfo::GetGfxDriverInfo() {
// earlier to minimize the probability of missing a particular driver.
#ifdef NIGHTLY_BUILD
APPEND_TO_DRIVER_BLOCKLIST_RANGE(
OperatingSystem::Windows,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorIntel),
GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_WEBRENDER,
OperatingSystem::Windows, DeviceFamily::IntelAll,
nsIGfxInfo::FEATURE_WEBRENDER,
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, DRIVER_BETWEEN_INCLUSIVE,
V(10, 18, 15, 4256), V(10, 18, 15, 4281),
"FEATURE_FAILURE_WEBRENDER_INTEL_BAD_DRIVER",
"Intel driver >= 21.20.16.4590");
APPEND_TO_DRIVER_BLOCKLIST_RANGE(
OperatingSystem::Windows,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorIntel),
GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_WEBRENDER,
OperatingSystem::Windows, DeviceFamily::IntelAll,
nsIGfxInfo::FEATURE_WEBRENDER,
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, DRIVER_BETWEEN_INCLUSIVE,
V(20, 19, 15, 4285), V(20, 19, 15, 4835),
"FEATURE_FAILURE_WEBRENDER_INTEL_BAD_DRIVER",
"Intel driver >= 21.20.16.4590");
APPEND_TO_DRIVER_BLOCKLIST_RANGE(
OperatingSystem::Windows,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorIntel),
GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_WEBRENDER,
OperatingSystem::Windows, DeviceFamily::IntelAll,
nsIGfxInfo::FEATURE_WEBRENDER,
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, DRIVER_BETWEEN_INCLUSIVE,
V(21, 20, 16, 4471), V(21, 20, 16, 4565),
"FEATURE_FAILURE_WEBRENDER_INTEL_BAD_DRIVER",
"Intel driver >= 21.20.16.4590");
#else
APPEND_TO_DRIVER_BLOCKLIST2(
OperatingSystem::Windows,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorIntel),
GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_WEBRENDER,
OperatingSystem::Windows, DeviceFamily::IntelAll,
nsIGfxInfo::FEATURE_WEBRENDER,
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, DRIVER_LESS_THAN,
V(21, 20, 16, 4590), "Intel driver >= 21.20.16.4590");
#endif
@ -1927,9 +1809,7 @@ const nsTArray<GfxDriverInfo>& GfxInfo::GetGfxDriverInfo() {
// FEATURE_WEBRENDER_COMPOSITOR
APPEND_TO_DRIVER_BLOCKLIST2(
OperatingSystem::Windows10,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorIntel),
(GfxDeviceFamily*)GfxDriverInfo::GetDeviceFamily(IntelHD520),
OperatingSystem::Windows10, DeviceFamily::IntelHD520,
nsIGfxInfo::FEATURE_WEBRENDER_COMPOSITOR,
nsIGfxInfo::FEATURE_BLOCKED_DEVICE, DRIVER_LESS_THAN_OR_EQUAL,
V(25, 20, 100, 6472), "FEATURE_FAILURE_BUG_1602511");
@ -1965,20 +1845,27 @@ nsresult GfxInfo::GetFeatureStatusImpl(
}
if (OnlyAllowFeatureOnWhitelistedVendor(aFeature) &&
!adapterVendorID.Equals(GfxDriverInfo::GetDeviceVendor(VendorIntel),
nsCaseInsensitiveStringComparator()) &&
!adapterVendorID.Equals(GfxDriverInfo::GetDeviceVendor(VendorNVIDIA),
nsCaseInsensitiveStringComparator()) &&
!adapterVendorID.Equals(GfxDriverInfo::GetDeviceVendor(VendorAMD),
nsCaseInsensitiveStringComparator()) &&
!adapterVendorID.Equals(GfxDriverInfo::GetDeviceVendor(VendorATI),
nsCaseInsensitiveStringComparator()) &&
!adapterVendorID.Equals(GfxDriverInfo::GetDeviceVendor(VendorMicrosoft),
nsCaseInsensitiveStringComparator()) &&
!adapterVendorID.Equals(GfxDriverInfo::GetDeviceVendor(VendorParallels),
nsCaseInsensitiveStringComparator()) &&
!adapterVendorID.Equals(GfxDriverInfo::GetDeviceVendor(VendorQualcomm),
nsCaseInsensitiveStringComparator()) &&
!adapterVendorID.Equals(
GfxDriverInfo::GetDeviceVendor(DeviceVendor::Intel),
nsCaseInsensitiveStringComparator()) &&
!adapterVendorID.Equals(
GfxDriverInfo::GetDeviceVendor(DeviceVendor::NVIDIA),
nsCaseInsensitiveStringComparator()) &&
!adapterVendorID.Equals(
GfxDriverInfo::GetDeviceVendor(DeviceVendor::AMD),
nsCaseInsensitiveStringComparator()) &&
!adapterVendorID.Equals(
GfxDriverInfo::GetDeviceVendor(DeviceVendor::ATI),
nsCaseInsensitiveStringComparator()) &&
!adapterVendorID.Equals(
GfxDriverInfo::GetDeviceVendor(DeviceVendor::Microsoft),
nsCaseInsensitiveStringComparator()) &&
!adapterVendorID.Equals(
GfxDriverInfo::GetDeviceVendor(DeviceVendor::Parallels),
nsCaseInsensitiveStringComparator()) &&
!adapterVendorID.Equals(
GfxDriverInfo::GetDeviceVendor(DeviceVendor::Qualcomm),
nsCaseInsensitiveStringComparator()) &&
// FIXME - these special hex values are currently used in xpcshell tests
// introduced by bug 625160 patch 8/8. Maybe these tests need to be
// adjusted now that we're only whitelisting intel/ati/nvidia.