Skip to content

Commit

Permalink
Backed out 4 changesets (bug 1352016) for gfx crashes in test_Telemet…
Browse files Browse the repository at this point in the history
…ryEnvironment.js a=backout CLOSED TREE

Backed out changeset dd7342e18e67 (bug 1352016)
Backed out changeset ebc7c92e8dc0 (bug 1352016)
Backed out changeset e79e512f803f (bug 1352016)
Backed out changeset 9eed6a69298c (bug 1352016)

MozReview-Commit-ID: CYDuqu0Hmtb
  • Loading branch information
KWierso committed Sep 13, 2017
1 parent 242627a commit ef0bd1c
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 115 deletions.
71 changes: 2 additions & 69 deletions dom/media/platforms/wmf/DXVA2Manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include "DXVA2Manager.h"
#include "D3D9SurfaceImage.h"
#include "DriverCrashGuard.h"
#include "GfxDriverInfo.h"
#include "ImageContainer.h"
#include "MFTDecoder.h"
#include "MediaTelemetryConstants.h"
Expand Down Expand Up @@ -75,39 +74,6 @@ static const DWORD sAMDPreUVD4[] = {
0x999c, 0x999d, 0x99a0, 0x99a2, 0x99a4
};

// List of NVidia Telsa GPU known to have broken NV12 rendering.
static const DWORD sNVIDIABrokenNV12[] = {
0x0191, 0x0193, 0x0194, 0x0197, 0x019d, 0x019e, // G80
0x0400, 0x0401, 0x0402, 0x0403, 0x0404, 0x0405, 0x0406, 0x0407, 0x0408, 0x0409, // G84
0x040a, 0x040b, 0x040c, 0x040d, 0x040e, 0x040f,
0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, 0x0428, 0x0429, // G86
0x042a, 0x042b, 0x042c, 0x042d, 0x042e, 0x042f,
0x0410, 0x0600, 0x0601, 0x0602, 0x0603, 0x0604, 0x0605, 0x0606, 0x0607, 0x0608, // G92
0x0609, 0x060a, 0x060b, 0x060c, 0x060f, 0x0610, 0x0611, 0x0612, 0x0613, 0x0614,
0x0615, 0x0617, 0x0618, 0x0619, 0x061a, 0x061b, 0x061c, 0x061d, 0x061e, 0x061f, // G94
0x0621, 0x0622, 0x0623, 0x0625, 0x0626, 0x0627, 0x0628, 0x062a, 0x062b, 0x062c,
0x062d, 0x062e, 0x0631, 0x0635, 0x0637, 0x0638, 0x063a,
0x0640, 0x0641, 0x0643, 0x0644, 0x0645, 0x0646, 0x0647, 0x0648, 0x0649, 0x064a, // G96
0x064b, 0x064c, 0x0651, 0x0652, 0x0653, 0x0654, 0x0655, 0x0656, 0x0658, 0x0659,
0x065a, 0x065b, 0x065c, 0x065f,
0x06e0, 0x06e1, 0x06e2, 0x06e3, 0x06e4, 0x06e6, 0x06e7, 0x06e8, 0x06e9, 0x06ea, // G98
0x06eb, 0x06ec, 0x06ef, 0x06f1, 0x06f8, 0x06f9, 0x06fa, 0x06fb, 0x06fd, 0x06ff,
0x05e0, 0x05e1, 0x05e2, 0x05e3, 0x05e6, 0x05e7, 0x05e9, 0x05ea, 0x05eb, 0x05ed, // G200
0x05ee, 0x05ef,
0x0840, 0x0844, 0x0845, 0x0846, 0x0847, 0x0848, 0x0849, 0x084a, 0x084b, 0x084c, // MCP77
0x084d, 0x084f,
0x0860, 0x0861, 0x0862, 0x0863, 0x0864, 0x0865, 0x0866, 0x0867, 0x0868, 0x0869, // MCP79
0x086a, 0x086c, 0x086d, 0x086e, 0x086f, 0x0870, 0x0871, 0x0872, 0x0873, 0x0874,
0x0876, 0x087a, 0x087d, 0x087e, 0x087f,
0x0ca0, 0x0ca2, 0x0ca3, 0x0ca2, 0x0ca4, 0x0ca5, 0x0ca7, 0x0ca9, 0x0cac, 0x0caf, // GT215
0x0cb0, 0x0cb1, 0x0cbc,
0x0a20, 0x0a22, 0x0a23, 0x0a26, 0x0a27, 0x0a28, 0x0a29, 0x0a2a, 0x0a2b, 0x0a2c, // GT216
0x0a2d, 0x0a32, 0x0a34, 0x0a35, 0x0a38, 0x0a3c,
0x0a60, 0x0a62, 0x0a63, 0x0a64, 0x0a65, 0x0a66, 0x0a67, 0x0a68, 0x0a69, 0x0a6a, // GT218
0x0a6c, 0x0a6e, 0x0a6f, 0x0a70, 0x0a71, 0x0a72, 0x0a73, 0x0a74, 0x0a75, 0x0a76,
0x0a78, 0x0a7a, 0x0a7c, 0x10c0, 0x10c3, 0x10c5, 0x10d8
};

// The size we use for our synchronization surface.
// 16x16 is the size recommended by Microsoft (in the D3D9ExDXGISharedSurf sample) that works
// best to avoid driver bugs.
Expand Down Expand Up @@ -429,8 +395,7 @@ D3D9DXVA2Manager::Init(layers::KnowsCompositor* aKnowsCompositor,
return hr;
}

if ((adapter.VendorId == 0x1022 || adapter.VendorId == 0x1002) &&
!gfxPrefs::PDMWMFSkipBlacklist()) {
if (adapter.VendorId == 0x1022 && !gfxPrefs::PDMWMFSkipBlacklist()) {
for (const auto& model : sAMDPreUVD4) {
if (adapter.DeviceId == model) {
mIsAMDPreUVD4 = true;
Expand Down Expand Up @@ -909,8 +874,7 @@ D3D11DXVA2Manager::InitInternal(layers::KnowsCompositor* aKnowsCompositor,
return hr;
}

if ((adapterDesc.VendorId == 0x1022 || adapterDesc.VendorId == 0x1002) &&
!gfxPrefs::PDMWMFSkipBlacklist()) {
if (adapterDesc.VendorId == 0x1022 && !gfxPrefs::PDMWMFSkipBlacklist()) {
for (const auto& model : sAMDPreUVD4) {
if (adapterDesc.DeviceId == model) {
mIsAMDPreUVD4 = true;
Expand Down Expand Up @@ -1304,35 +1268,4 @@ DXVA2Manager::IsUnsupportedResolution(const uint32_t& aWidth,
aFramerate > 45;
}

/* static */ bool
DXVA2Manager::IsNV12Supported(uint32_t aVendorID,
uint32_t aDeviceID,
const nsAString& aDriverVersionString)
{
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
// surfaces.
uint64_t driverVersion;
if (widget::ParseDriverVersion(aDriverVersionString, &driverVersion) &&
driverVersion < widget::V(21, 19, 411, 0)) {
return false;
}
} else if (aVendorID == 0x10DE) {
// NVidia
for (const auto& model : sNVIDIABrokenNV12) {
if (aDeviceID == model) {
return false;
}
}
}
return true;
}

} // namespace mozilla
4 changes: 0 additions & 4 deletions dom/media/platforms/wmf/DXVA2Manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,6 @@ class DXVA2Manager
virtual bool CreateDXVA2Decoder(const VideoInfo& aVideoInfo,
nsACString& aFailureReason) = 0;

static bool IsNV12Supported(uint32_t aVendorID,
uint32_t aDeviceID,
const nsAString& aDriverVersionString);

protected:
Mutex mLock;
DXVA2Manager();
Expand Down
1 change: 0 additions & 1 deletion gfx/ipc/GraphicsMessages.ipdlh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ struct D3D11DeviceStatus
uint32_t featureLevel;
DxgiAdapterDesc adapter;
int32_t sequenceNumber;
bool useNV12;
};

struct DevicePrefs
Expand Down
3 changes: 1 addition & 2 deletions gfx/layers/D3D11ShareHandleImage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ bool
D3D11ShareHandleImage::AllocateTexture(D3D11RecycleAllocator* aAllocator, ID3D11Device* aDevice)
{
if (aAllocator) {
if (gfxPrefs::PDMWMFUseNV12Format() &&
gfx::DeviceManagerDx::Get()->CanUseNV12()) {
if (gfxPrefs::PDMWMFUseNV12Format()) {
mTextureClient = aAllocator->CreateOrRecycleClient(gfx::SurfaceFormat::NV12, mSize);
} else {
mTextureClient = aAllocator->CreateOrRecycleClient(gfx::SurfaceFormat::B8G8R8A8, mSize);
Expand Down
17 changes: 0 additions & 17 deletions gfx/thebes/D3D11Checks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "D3D11Checks.h"
#include "DXVA2Manager.h"
#include "gfxConfig.h"
#include "GfxDriverInfo.h"
#include "gfxPrefs.h"
Expand Down Expand Up @@ -410,21 +409,5 @@ D3D11Checks::DoesRemotePresentWork(IDXGIAdapter* adapter)
return SUCCEEDED(hr) && check;
}

/* static */ bool
D3D11Checks::DoesNV12Work(ID3D11Device* device)
{
DXGI_ADAPTER_DESC desc;
PodZero(&desc);
if (!GetDxgiDesc(device, &desc)) {
// Failed to retrieve device information, assume it works
return true;
}

nsCOMPtr<nsIGfxInfo> gfxInfo = services::GetGfxInfo();
nsString version;
gfxInfo->GetAdapterDriverVersion(version);
return DXVA2Manager::IsNV12Supported(desc.VendorId, desc.DeviceId, version);
}

} // namespace gfx
} // namespace mozilla
5 changes: 2 additions & 3 deletions gfx/thebes/D3D11Checks.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,11 @@ struct D3D11Checks
{
static bool DoesRenderTargetViewNeedRecreating(ID3D11Device* aDevice);
static bool DoesDeviceWork();
static bool DoesTextureSharingWork(ID3D11Device* device);
static bool DoesAlphaTextureSharingWork(ID3D11Device* device);
static bool DoesTextureSharingWork(ID3D11Device *device);
static bool DoesAlphaTextureSharingWork(ID3D11Device *device);
static void WarnOnAdapterMismatch(ID3D11Device* device);
static bool GetDxgiDesc(ID3D11Device* device, DXGI_ADAPTER_DESC* out);
static bool DoesRemotePresentWork(IDXGIAdapter* adapter);
static bool DoesNV12Work(ID3D11Device* device);
};

} // namespace gfx
Expand Down
19 changes: 2 additions & 17 deletions gfx/thebes/DeviceManagerDx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,6 @@ DeviceManagerDx::CreateCompositorDevice(FeatureState& d3d11)
}

uint32_t featureLevel = device->GetFeatureLevel();
bool useNV12 = D3D11Checks::DoesNV12Work(device);
{
MutexAutoLock lock(mDeviceLock);
mCompositorDevice = device;
Expand All @@ -406,8 +405,7 @@ DeviceManagerDx::CreateCompositorDevice(FeatureState& d3d11)
textureSharingWorks,
featureLevel,
DxgiAdapterDesc::From(desc),
sequenceNumber,
useNV12));
sequenceNumber));
}
mCompositorDevice->SetExceptionMode(0);
}
Expand Down Expand Up @@ -503,8 +501,6 @@ DeviceManagerDx::CreateWARPCompositorDevice()
PodZero(&nullAdapter);

int featureLevel = device->GetFeatureLevel();

bool useNV12 = D3D11Checks::DoesNV12Work(device);
{
MutexAutoLock lock(mDeviceLock);
mCompositorDevice = device;
Expand All @@ -515,8 +511,7 @@ DeviceManagerDx::CreateWARPCompositorDevice()
textureSharingWorks,
featureLevel,
nullAdapter,
sequenceNumber,
useNV12));
sequenceNumber));
}
mCompositorDevice->SetExceptionMode(0);

Expand Down Expand Up @@ -1006,16 +1001,6 @@ DeviceManagerDx::IsWARP()
return mDeviceStatus->isWARP();
}

bool
DeviceManagerDx::CanUseNV12()
{
MutexAutoLock lock(mDeviceLock);
if (!mDeviceStatus) {
return true;
}
return mDeviceStatus->useNV12();
}

void
DeviceManagerDx::InitializeDirectDraw()
{
Expand Down
1 change: 0 additions & 1 deletion gfx/thebes/DeviceManagerDx.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ class DeviceManagerDx final
unsigned GetCompositorFeatureLevel() const;
bool TextureSharingWorks();
bool IsWARP();
bool CanUseNV12();

// Returns true if we can create a texture with
// D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX and also
Expand Down
1 change: 0 additions & 1 deletion modules/libpref/init/all.js
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,6 @@ pref("media.wmf.vp9.enabled", true);
pref("media.wmf.amd.vp9.enabled", true);
pref("media.wmf.allow-unsupported-resolutions", false);
pref("media.windows-media-foundation.allow-d3d11-dxva", true);
pref("media.windows-media-foundation.use-nv12-format", true);
pref("media.wmf.disable-d3d11-for-dlls", "igd11dxva64.dll: 20.19.15.4463, 20.19.15.4454, 20.19.15.4444, 20.19.15.4416, 20.19.15.4404, 20.19.15.4390, 20.19.15.4380, 20.19.15.4377, 20.19.15.4364, 20.19.15.4360, 20.19.15.4352, 20.19.15.4331, 20.19.15.4326, 20.19.15.4300; igd10iumd32.dll: 20.19.15.4444, 20.19.15.4424, 20.19.15.4409, 20.19.15.4390, 20.19.15.4380, 20.19.15.4360, 10.18.10.4358, 20.19.15.4331, 20.19.15.4312, 20.19.15.4300, 10.18.15.4281, 10.18.15.4279, 10.18.10.4276, 10.18.15.4268, 10.18.15.4256, 10.18.10.4252, 10.18.15.4248, 10.18.14.4112, 10.18.10.3958, 10.18.10.3496, 10.18.10.3431, 10.18.10.3412, 10.18.10.3355, 9.18.10.3234, 9.18.10.3071, 9.18.10.3055, 9.18.10.3006; igd10umd32.dll: 9.17.10.4229, 9.17.10.3040, 9.17.10.2884, 9.17.10.2857, 8.15.10.2274, 8.15.10.2272, 8.15.10.2246, 8.15.10.1840, 8.15.10.1808; igd10umd64.dll: 9.17.10.4229, 9.17.10.2884, 9.17.10.2857, 10.18.10.3496; isonyvideoprocessor.dll: 4.1.2247.8090, 4.1.2153.6200; tosqep.dll: 1.2.15.526, 1.1.12.201, 1.0.11.318, 1.0.11.215, 1.0.10.1224; tosqep64.dll: 1.1.12.201, 1.0.11.215; nvwgf2um.dll: 22.21.13.8253, 22.21.13.8233, 22.21.13.8205, 22.21.13.8189, 22.21.13.8178, 22.21.13.8165, 21.21.13.7892, 21.21.13.7878, 21.21.13.7866, 21.21.13.7849, 21.21.13.7654, 21.21.13.7653, 21.21.13.7633, 21.21.13.7619, 21.21.13.7563, 21.21.13.7306, 21.21.13.7290, 21.21.13.7270, 21.21.13.7254, 21.21.13.6939, 21.21.13.6926, 21.21.13.6909, 21.21.13.4201, 21.21.13.4200, 10.18.13.6881, 10.18.13.6839, 10.18.13.6510, 10.18.13.6472, 10.18.13.6143, 10.18.13.5946, 10.18.13.5923, 10.18.13.5921, 10.18.13.5891, 10.18.13.5887, 10.18.13.5582, 10.18.13.5445, 10.18.13.5382, 10.18.13.5362, 9.18.13.4788, 9.18.13.4752, 9.18.13.4725, 9.18.13.4709, 9.18.13.4195, 9.18.13.4192, 9.18.13.4144, 9.18.13.4052, 9.18.13.3788, 9.18.13.3523, 9.18.13.3235, 9.18.13.3165, 9.18.13.2723, 9.18.13.2702, 9.18.13.1422, 9.18.13.1407, 9.18.13.1106, 9.18.13.546; atidxx32.dll: 21.19.151.3, 21.19.142.257, 21.19.137.514, 21.19.137.1, 21.19.134.1, 21.19.128.7, 21.19.128.4, 20.19.0.32837, 20.19.0.32832, 8.17.10.682, 8.17.10.671, 8.17.10.661, 8.17.10.648, 8.17.10.644, 8.17.10.625, 8.17.10.605, 8.17.10.581, 8.17.10.569, 8.17.10.560, 8.17.10.545, 8.17.10.539, 8.17.10.531, 8.17.10.525, 8.17.10.520, 8.17.10.519, 8.17.10.514, 8.17.10.511, 8.17.10.494, 8.17.10.489, 8.17.10.483, 8.17.10.453, 8.17.10.451, 8.17.10.441, 8.17.10.436, 8.17.10.432, 8.17.10.425, 8.17.10.418, 8.17.10.414, 8.17.10.401, 8.17.10.395, 8.17.10.385, 8.17.10.378, 8.17.10.362, 8.17.10.355, 8.17.10.342, 8.17.10.331, 8.17.10.318, 8.17.10.310, 8.17.10.286, 8.17.10.269, 8.17.10.261, 8.17.10.247, 8.17.10.240, 8.15.10.212; atidxx64.dll: 21.19.151.3, 21.19.142.257, 21.19.137.514, 21.19.137.1, 21.19.134.1, 21.19.128.7, 21.19.128.4, 20.19.0.32832, 8.17.10.682, 8.17.10.661, 8.17.10.644, 8.17.10.625; nvumdshim.dll: 10.18.13.6822");
pref("media.wmf.disable-d3d9-for-dlls", "igdumd64.dll: 8.15.10.2189, 8.15.10.2119, 8.15.10.2104, 8.15.10.2102, 8.771.1.0; atiumd64.dll: 7.14.10.833, 7.14.10.867, 7.14.10.885, 7.14.10.903, 7.14.10.911, 8.14.10.768, 9.14.10.1001, 9.14.10.1017, 9.14.10.1080, 9.14.10.1128, 9.14.10.1162, 9.14.10.1171, 9.14.10.1183, 9.14.10.1197, 9.14.10.945, 9.14.10.972, 9.14.10.984, 9.14.10.996");
pref("media.wmf.deblacklisting-for-telemetry-in-gpu-process", true);
Expand Down

0 comments on commit ef0bd1c

Please sign in to comment.