Bug 1352016 - P5. Also check AMD cards with 0x1002 device id. r?mattwoodrow
MozReview-Commit-ID: DjCMDNfsfXe
--- a/dom/media/platforms/wmf/DXVA2Manager.cpp
+++ b/dom/media/platforms/wmf/DXVA2Manager.cpp
@@ -424,17 +424,18 @@ D3D9DXVA2Manager::Init(layers::KnowsComp
D3DADAPTER_IDENTIFIER9 adapter;
hr = d3d9Ex->GetAdapterIdentifier(D3DADAPTER_DEFAULT, 0, &adapter);
if (!SUCCEEDED(hr)) {
aFailureReason = nsPrintfCString(
"IDirect3D9Ex::GetAdapterIdentifier failed with error %X", hr);
return hr;
}
- if (adapter.VendorId == 0x1022 && !gfxPrefs::PDMWMFSkipBlacklist()) {
+ if ((adapter.VendorId == 0x1022 || adapter.VendorId == 0x1002) &&
+ !gfxPrefs::PDMWMFSkipBlacklist()) {
for (const auto& model : sAMDPreUVD4) {
if (adapter.DeviceId == model) {
mIsAMDPreUVD4 = true;
break;
}
}
}
@@ -903,17 +904,18 @@ D3D11DXVA2Manager::InitInternal(layers::
DXGI_ADAPTER_DESC adapterDesc;
hr = adapter->GetDesc(&adapterDesc);
if (!SUCCEEDED(hr)) {
aFailureReason =
nsPrintfCString("IDXGIAdapter::GetDesc failed with code %X", hr);
return hr;
}
- if (adapterDesc.VendorId == 0x1022 && !gfxPrefs::PDMWMFSkipBlacklist()) {
+ if ((adapterDesc.VendorId == 0x1022 || adapterDesc.VendorId == 0x1002) &&
+ !gfxPrefs::PDMWMFSkipBlacklist()) {
for (const auto& model : sAMDPreUVD4) {
if (adapterDesc.DeviceId == model) {
mIsAMDPreUVD4 = true;
break;
}
}
}
@@ -1302,17 +1304,17 @@ DXVA2Manager::IsUnsupportedResolution(co
aFramerate > 45;
}
/* static */ bool
DXVA2Manager::IsNV12Supported(uint32_t aVendorID,
uint32_t aDeviceID,
const nsAString& aDriverVersionString)
{
- if (aVendorID == 0x1022) {
+ if (aVendorID == 0x1022 || aVendorID == 0x1002) {
// AMD
// Block old cards regardless of driver version.
for (const auto& model : sAMDPreUVD4) {
if (aDeviceID == model) {
return false;
}
}
// AMD driver earlier than 21.19.411.0 have bugs in their handling of NV12