mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1120128 - Implement blacklist for DXVA and blacklist AMD Radeon HD 5800. r=Bas
This commit is contained in:
parent
84bfded02f
commit
7e5748ec52
@ -150,7 +150,8 @@ WMFVideoMFTManager::InitializeDXVA()
|
||||
return false;
|
||||
}
|
||||
|
||||
if (gfxWindowsPlatform::GetPlatform()->IsWARP()) {
|
||||
if (gfxWindowsPlatform::GetPlatform()->IsWARP() ||
|
||||
!gfxPlatform::CanUseDXVA()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -111,7 +111,8 @@ WMFReader::InitializeDXVA()
|
||||
return false;
|
||||
}
|
||||
|
||||
if (gfxWindowsPlatform::GetPlatform()->IsWARP()) {
|
||||
if (gfxWindowsPlatform::GetPlatform()->IsWARP() ||
|
||||
!gfxPlatform::CanUseDXVA()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -2164,6 +2164,7 @@ gfxPlatform::OptimalFormatForContent(gfxContentType aContent)
|
||||
*/
|
||||
static bool sLayersSupportsD3D9 = false;
|
||||
static bool sLayersSupportsD3D11 = false;
|
||||
static bool sLayersSupportsDXVA = false;
|
||||
static bool sBufferRotationCheckPref = true;
|
||||
static bool sPrefBrowserTabsRemoteAutostart = false;
|
||||
|
||||
@ -2205,6 +2206,11 @@ InitLayersAccelerationPrefs()
|
||||
// Always support D3D11 when WARP is allowed.
|
||||
sLayersSupportsD3D11 = true;
|
||||
}
|
||||
if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_DXVA, &status))) {
|
||||
if (status == nsIGfxInfo::FEATURE_STATUS_OK) {
|
||||
sLayersSupportsDXVA = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -2231,6 +2237,15 @@ gfxPlatform::CanUseDirect3D11()
|
||||
return sLayersSupportsD3D11;
|
||||
}
|
||||
|
||||
bool
|
||||
gfxPlatform::CanUseDXVA()
|
||||
{
|
||||
// this function is called from the compositor thread, so it is not
|
||||
// safe to init the prefs etc. from here.
|
||||
MOZ_ASSERT(sLayersAccelerationPrefsInitialized);
|
||||
return sLayersSupportsDXVA;
|
||||
}
|
||||
|
||||
bool
|
||||
gfxPlatform::BufferRotationEnabled()
|
||||
{
|
||||
|
@ -481,6 +481,7 @@ public:
|
||||
|
||||
static bool CanUseDirect3D9();
|
||||
static bool CanUseDirect3D11();
|
||||
static bool CanUseDXVA();
|
||||
|
||||
/**
|
||||
* Is it possible to use buffer rotation. Note that these
|
||||
|
@ -214,6 +214,9 @@ const GfxDeviceFamily* GfxDriverInfo::GetDeviceFamily(DeviceFamily id)
|
||||
case Nvidia310M:
|
||||
APPEND_DEVICE(0x0A70);
|
||||
break;
|
||||
case AMDRadeonHD5800:
|
||||
APPEND_DEVICE(0x6899);
|
||||
break;
|
||||
// This should never happen, but we get a warning if we don't handle this.
|
||||
case DeviceFamilyMax:
|
||||
NS_WARNING("Invalid DeviceFamily id");
|
||||
|
@ -73,6 +73,7 @@ enum DeviceFamily {
|
||||
RadeonX1000,
|
||||
Geforce7300GT,
|
||||
Nvidia310M,
|
||||
AMDRadeonHD5800,
|
||||
DeviceFamilyMax
|
||||
};
|
||||
|
||||
|
@ -123,6 +123,9 @@ GetPrefNameForFeature(int32_t aFeature)
|
||||
case nsIGfxInfo::FEATURE_DIRECT3D_11_LAYERS:
|
||||
name = BLACKLIST_PREF_BRANCH "layers.direct3d11";
|
||||
break;
|
||||
case nsIGfxInfo::FEATURE_DXVA:
|
||||
name = BLACKLIST_PREF_BRANCH "dxva";
|
||||
break;
|
||||
case nsIGfxInfo::FEATURE_OPENGL_LAYERS:
|
||||
name = BLACKLIST_PREF_BRANCH "layers.opengl";
|
||||
break;
|
||||
@ -287,6 +290,8 @@ BlacklistFeatureToGfxFeature(const nsAString& aFeature)
|
||||
return nsIGfxInfo::FEATURE_DIRECT3D_10_1_LAYERS;
|
||||
else if (aFeature.EqualsLiteral("DIRECT3D_11_LAYERS"))
|
||||
return nsIGfxInfo::FEATURE_DIRECT3D_11_LAYERS;
|
||||
else if (aFeature.EqualsLiteral("DXVA"))
|
||||
return nsIGfxInfo::FEATURE_DXVA;
|
||||
else if (aFeature.EqualsLiteral("OPENGL_LAYERS"))
|
||||
return nsIGfxInfo::FEATURE_OPENGL_LAYERS;
|
||||
else if (aFeature.EqualsLiteral("WEBGL_OPENGL"))
|
||||
@ -842,6 +847,7 @@ GfxInfoBase::EvaluateDownloadedBlacklist(nsTArray<GfxDriverInfo>& aDriverInfo)
|
||||
nsIGfxInfo::FEATURE_DIRECT3D_10_LAYERS,
|
||||
nsIGfxInfo::FEATURE_DIRECT3D_10_1_LAYERS,
|
||||
nsIGfxInfo::FEATURE_DIRECT3D_11_LAYERS,
|
||||
nsIGfxInfo::FEATURE_DXVA,
|
||||
nsIGfxInfo::FEATURE_OPENGL_LAYERS,
|
||||
nsIGfxInfo::FEATURE_WEBGL_OPENGL,
|
||||
nsIGfxInfo::FEATURE_WEBGL_ANGLE,
|
||||
|
@ -87,6 +87,8 @@ interface nsIGfxInfo : nsISupports
|
||||
const long FEATURE_WEBRTC_HW_ACCELERATION = 10;
|
||||
/* Whether Direct3D 11 is supported for layers. */
|
||||
const long FEATURE_DIRECT3D_11_LAYERS = 11;
|
||||
/* Whether DXVA is supported for video decoding. */
|
||||
const long FEATURE_DXVA = 12;
|
||||
|
||||
/*
|
||||
* A set of return values from GetFeatureStatus
|
||||
|
@ -1034,6 +1034,11 @@ GfxInfo::GetGfxDriverInfo()
|
||||
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorNVIDIA), (GfxDeviceFamily*)GfxDriverInfo::GetDeviceFamily(Nvidia310M),
|
||||
nsIGfxInfo::FEATURE_DIRECT2D, nsIGfxInfo::FEATURE_BLOCKED_DEVICE,
|
||||
DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions);
|
||||
|
||||
APPEND_TO_DRIVER_BLOCKLIST2(DRIVER_OS_ALL,
|
||||
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorATI), (GfxDeviceFamily*)GfxDriverInfo::GetDeviceFamily(AMDRadeonHD5800),
|
||||
nsIGfxInfo::FEATURE_DXVA, nsIGfxInfo::FEATURE_BLOCKED_DEVICE,
|
||||
DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions);
|
||||
}
|
||||
return *mDriverInfo;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user