diff --git a/gfx/thebes/gfxPlatform.cpp b/gfx/thebes/gfxPlatform.cpp index b4bab12fb073..c6612afb7dbf 100644 --- a/gfx/thebes/gfxPlatform.cpp +++ b/gfx/thebes/gfxPlatform.cpp @@ -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")); } } }