Bug 1523823. Enable WebRender by default on modern (CIK, VI, GFX9) desktop AMD hardware. r=kats

This should help increase our WebRender usage so we're more likely to learn
about problems with minimal additional risk.

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Jeff Muizelaar 2019-01-30 14:13:07 +00:00
Родитель c4951880ce
Коммит 1356bd4f68
1 изменённых файлов: 37 добавлений и 17 удалений

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

@ -2657,26 +2657,46 @@ static FeatureState& WebRenderHardwareQualificationStatus(
} else {
nsAutoString adapterVendorID;
gfxInfo->GetAdapterVendorID(adapterVendorID);
if (adapterVendorID != u"0x10de") {
nsAutoString adapterDeviceID;
gfxInfo->GetAdapterDeviceID(adapterDeviceID);
nsresult valid;
int32_t deviceID = adapterDeviceID.ToInteger(&valid, 16);
if (valid != NS_OK) {
featureWebRenderQualified.Disable(
FeatureStatus::Blocked, "Not Nvidia",
NS_LITERAL_CSTRING("FEATURE_FAILURE_NOT_NVIDIA"));
FeatureStatus::Blocked, "Bad device id",
NS_LITERAL_CSTRING("FEATURE_FAILURE_BAD_DEVICE_ID"));
} else {
nsAutoString adapterDeviceID;
gfxInfo->GetAdapterDeviceID(adapterDeviceID);
nsresult valid;
int32_t deviceID = adapterDeviceID.ToInteger(&valid, 16);
if (valid != NS_OK) {
if (adapterVendorID == u"0x10de") {
if (deviceID < 0x6c0) {
// 0x6c0 is the lowest Fermi device id. Unfortunately some Tesla
// devices that don't support D3D 10.1 have higher deviceIDs. They
// will be included, but blocked by ANGLE.
featureWebRenderQualified.Disable(
FeatureStatus::Blocked, "Device too old",
NS_LITERAL_CSTRING("FEATURE_FAILURE_DEVICE_TOO_OLD"));
}
#ifdef NIGHTLY_BUILD
} else if (adapterVendorID == u"0x1002") { // AMD
// AMD deviceIDs are not very well ordered. This
// condition is based off the information in gpu-db
if ((deviceID >= 0x6640 && deviceID < 0x6660) ||
(deviceID >= 0x67a0 && deviceID < 0x6800) ||
(deviceID >= 0x6860 && deviceID < 0x6880) ||
(deviceID >= 0x6900 && deviceID < 0x6a00) ||
(deviceID == 0x7300) ||
(deviceID >= 0x9830 && deviceID < 0x9870)) {
// we have a desktop CIK, VI, or GFX9 device
} else {
featureWebRenderQualified.Disable(
FeatureStatus::Blocked, "Device too old",
NS_LITERAL_CSTRING("FEATURE_FAILURE_DEVICE_TOO_OLD"));
}
#endif
} else {
featureWebRenderQualified.Disable(
FeatureStatus::Blocked, "Bad device id",
NS_LITERAL_CSTRING("FEATURE_FAILURE_BAD_DEVICE_ID"));
} else if (deviceID < 0x6c0) {
// 0x6c0 is the lowest Fermi device id. Unfortunately some Tesla
// devices that don't support D3D 10.1 have higher deviceIDs. They
// will be included, but blocked by ANGLE.
featureWebRenderQualified.Disable(
FeatureStatus::Blocked, "Device too old",
NS_LITERAL_CSTRING("FEATURE_FAILURE_DEVICE_TOO_OLD"));
FeatureStatus::Blocked, "Unsupported vendor",
NS_LITERAL_CSTRING("FEATURE_FAILURE_UNSUPPORTED_VENDOR"));
}
}
}