diff --git a/dom/canvas/WebGLContext.cpp b/dom/canvas/WebGLContext.cpp index 7061ae0d4f024..514566a123042 100644 --- a/dom/canvas/WebGLContext.cpp +++ b/dom/canvas/WebGLContext.cpp @@ -433,7 +433,9 @@ static bool IsFeatureInBlacklist(const nsCOMPtr& gfxInfo, int32_t feature) { int32_t status; - if (!NS_SUCCEEDED(gfxUtils::ThreadSafeGetFeatureStatus(gfxInfo, feature, &status))) + nsCString discardFailureId; + if (!NS_SUCCEEDED(gfxUtils::ThreadSafeGetFeatureStatus(gfxInfo, feature, + discardFailureId, &status))) return false; return status != nsIGfxInfo::FEATURE_STATUS_OK; @@ -444,28 +446,34 @@ HasAcceleratedLayers(const nsCOMPtr& gfxInfo) { int32_t status; + nsCString discardFailureId; gfxUtils::ThreadSafeGetFeatureStatus(gfxInfo, nsIGfxInfo::FEATURE_DIRECT3D_9_LAYERS, + discardFailureId, &status); if (status) return true; gfxUtils::ThreadSafeGetFeatureStatus(gfxInfo, nsIGfxInfo::FEATURE_DIRECT3D_10_LAYERS, + discardFailureId, &status); if (status) return true; gfxUtils::ThreadSafeGetFeatureStatus(gfxInfo, nsIGfxInfo::FEATURE_DIRECT3D_10_1_LAYERS, + discardFailureId, &status); if (status) return true; gfxUtils::ThreadSafeGetFeatureStatus(gfxInfo, nsIGfxInfo::FEATURE_DIRECT3D_11_LAYERS, + discardFailureId, &status); if (status) return true; gfxUtils::ThreadSafeGetFeatureStatus(gfxInfo, nsIGfxInfo::FEATURE_OPENGL_LAYERS, + discardFailureId, &status); if (status) return true; diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp index 32b890c93548e..5c5ad3e265552 100644 --- a/dom/ipc/ContentParent.cpp +++ b/dom/ipc/ContentParent.cpp @@ -4971,6 +4971,7 @@ ContentParent::RecvRecordingDeviceEvents(const nsString& aRecordingStatus, bool ContentParent::RecvGetGraphicsFeatureStatus(const int32_t& aFeature, int32_t* aStatus, + nsCString* aFailureId, bool* aSuccess) { nsCOMPtr gfxInfo = services::GetGfxInfo(); @@ -4979,7 +4980,7 @@ ContentParent::RecvGetGraphicsFeatureStatus(const int32_t& aFeature, return true; } - *aSuccess = NS_SUCCEEDED(gfxInfo->GetFeatureStatus(aFeature, aStatus)); + *aSuccess = NS_SUCCEEDED(gfxInfo->GetFeatureStatus(aFeature, *aFailureId, aStatus)); return true; } diff --git a/dom/ipc/ContentParent.h b/dom/ipc/ContentParent.h index e02247fc56b06..fce4d0fed3bd7 100644 --- a/dom/ipc/ContentParent.h +++ b/dom/ipc/ContentParent.h @@ -1043,6 +1043,7 @@ class ContentParent final : public PContentParent virtual bool RecvGetGraphicsFeatureStatus(const int32_t& aFeature, int32_t* aStatus, + nsCString* aFailureId, bool* aSuccess) override; virtual bool RecvGraphicsError(const nsCString& aError) override; diff --git a/dom/ipc/PContent.ipdl b/dom/ipc/PContent.ipdl index cd8bf5d2c9564..ef68dacce654f 100644 --- a/dom/ipc/PContent.ipdl +++ b/dom/ipc/PContent.ipdl @@ -998,7 +998,8 @@ parent: bool isAudio, bool isVideo); - sync GetGraphicsFeatureStatus(int32_t aFeature) returns (int32_t aStatus, bool aSuccess); + sync GetGraphicsFeatureStatus(int32_t aFeature) returns (int32_t aStatus, nsCString aFailureCode, + bool aSuccess); // Graphics errors async GraphicsError(nsCString aError); diff --git a/dom/media/android/AndroidMediaPluginHost.cpp b/dom/media/android/AndroidMediaPluginHost.cpp index 9c7406d5231c7..fbe5ad1b633ee 100644 --- a/dom/media/android/AndroidMediaPluginHost.cpp +++ b/dom/media/android/AndroidMediaPluginHost.cpp @@ -114,7 +114,8 @@ static bool IsOmxSupported() nsCOMPtr gfxInfo = services::GetGfxInfo(); if (gfxInfo) { int32_t status; - if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_STAGEFRIGHT, &status))) { + nsCString discardFailure; + if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_STAGEFRIGHT, discardFailure, &status))) { if (status != nsIGfxInfo::FEATURE_STATUS_OK) { NS_WARNING("XXX stagefright blacklisted\n"); return false; diff --git a/dom/media/platforms/android/AndroidDecoderModule.cpp b/dom/media/platforms/android/AndroidDecoderModule.cpp index 0e3b46acb1eda..83fd7ad4f9913 100644 --- a/dom/media/platforms/android/AndroidDecoderModule.cpp +++ b/dom/media/platforms/android/AndroidDecoderModule.cpp @@ -73,7 +73,8 @@ GetFeatureStatus(int32_t aFeature) { nsCOMPtr gfxInfo = services::GetGfxInfo(); int32_t status = nsIGfxInfo::FEATURE_STATUS_UNKNOWN; - if (!gfxInfo || NS_FAILED(gfxInfo->GetFeatureStatus(aFeature, &status))) { + nsCString discardFailureId; + if (!gfxInfo || NS_FAILED(gfxInfo->GetFeatureStatus(aFeature, discardFailureId, &status))) { return false; } return status == nsIGfxInfo::FEATURE_STATUS_OK; diff --git a/gfx/gl/GLLibraryEGL.cpp b/gfx/gl/GLLibraryEGL.cpp index 142501902fe7c..54d935dd0ccdf 100644 --- a/gfx/gl/GLLibraryEGL.cpp +++ b/gfx/gl/GLLibraryEGL.cpp @@ -143,8 +143,10 @@ static bool IsAccelAngleSupported(const nsCOMPtr& gfxInfo) { int32_t angleSupport; + nsCString discardFailureId; gfxUtils::ThreadSafeGetFeatureStatus(gfxInfo, nsIGfxInfo::FEATURE_WEBGL_ANGLE, + discardFailureId, &angleSupport); return (angleSupport == nsIGfxInfo::FEATURE_STATUS_OK); } diff --git a/gfx/src/DriverCrashGuard.cpp b/gfx/src/DriverCrashGuard.cpp index fe358d36da69a..73e96a55f28b5 100644 --- a/gfx/src/DriverCrashGuard.cpp +++ b/gfx/src/DriverCrashGuard.cpp @@ -298,7 +298,8 @@ DriverCrashGuard::FeatureEnabled(int aFeature, bool aDefault) return aDefault; } int32_t status; - if (!NS_SUCCEEDED(mGfxInfo->GetFeatureStatus(aFeature, &status))) { + nsCString discardFailureId; + if (!NS_SUCCEEDED(mGfxInfo->GetFeatureStatus(aFeature, discardFailureId, &status))) { return false; } return status == nsIGfxInfo::FEATURE_STATUS_OK; diff --git a/gfx/thebes/gfxPlatform.cpp b/gfx/thebes/gfxPlatform.cpp index 472594049b2a1..0c22a3c9a67ea 100644 --- a/gfx/thebes/gfxPlatform.cpp +++ b/gfx/thebes/gfxPlatform.cpp @@ -1243,8 +1243,10 @@ bool gfxPlatform::UseAcceleratedCanvas() if (mPreferredCanvasBackend == BackendType::SKIA && gfxPrefs::CanvasAzureAccelerated()) { nsCOMPtr gfxInfo = do_GetService("@mozilla.org/gfx/info;1"); int32_t status; + nsCString discardFailureId; return !gfxInfo || (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_CANVAS2D_ACCELERATION, + discardFailureId, &status)) && status == nsIGfxInfo::FEATURE_STATUS_OK); } @@ -2074,19 +2076,20 @@ InitLayersAccelerationPrefs() sPrefBrowserTabsRemoteAutostart = BrowserTabsRemoteAutostart(); nsCOMPtr gfxInfo = services::GetGfxInfo(); + nsCString discardFailureId; int32_t status; #ifdef XP_WIN if (gfxPrefs::LayersAccelerationForceEnabled()) { sLayersSupportsD3D9 = true; sLayersSupportsD3D11 = true; } else if (!gfxPrefs::LayersAccelerationDisabled() && gfxInfo) { - if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_DIRECT3D_9_LAYERS, &status))) { + if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_DIRECT3D_9_LAYERS, discardFailureId, &status))) { if (status == nsIGfxInfo::FEATURE_STATUS_OK) { MOZ_ASSERT(!sPrefBrowserTabsRemoteAutostart || IsVistaOrLater()); sLayersSupportsD3D9 = true; } } - if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_DIRECT3D_11_LAYERS, &status))) { + if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_DIRECT3D_11_LAYERS, discardFailureId, &status))) { if (status == nsIGfxInfo::FEATURE_STATUS_OK) { sLayersSupportsD3D11 = true; } @@ -2095,7 +2098,7 @@ InitLayersAccelerationPrefs() // Always support D3D11 when WARP is allowed. sLayersSupportsD3D11 = true; } - if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_DIRECT3D_11_ANGLE, &status))) { + if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_DIRECT3D_11_ANGLE, discardFailureId, &status))) { if (status == nsIGfxInfo::FEATURE_STATUS_OK) { gANGLESupportsD3D11 = true; } @@ -2108,7 +2111,7 @@ InitLayersAccelerationPrefs() Preferences::GetBool("media.windows-media-foundation.use-dxva", true) && #endif NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING, - &status))) { + discardFailureId, &status))) { if (status == nsIGfxInfo::FEATURE_STATUS_OK || gfxPrefs::HardwareVideoDecodingForceEnabled()) { sLayersSupportsHardwareVideoDecoding = true; } @@ -2351,7 +2354,8 @@ AllowOpenGL(bool* aWhitelisted) gfxInfo->GetData(); int32_t status; - if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_OPENGL_LAYERS, &status))) { + nsCString discardFailureId; + if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_OPENGL_LAYERS, discardFailureId, &status))) { if (status == nsIGfxInfo::FEATURE_STATUS_OK) { *aWhitelisted = true; return true; diff --git a/gfx/thebes/gfxUtils.cpp b/gfx/thebes/gfxUtils.cpp index 22e5798a3bc0c..ec65febd5f08a 100644 --- a/gfx/thebes/gfxUtils.cpp +++ b/gfx/thebes/gfxUtils.cpp @@ -1500,11 +1500,13 @@ class GetFeatureStatusRunnable final : public dom::workers::WorkerMainThreadRunn GetFeatureStatusRunnable(dom::workers::WorkerPrivate* workerPrivate, const nsCOMPtr& gfxInfo, int32_t feature, + nsACString& failureId, int32_t* status) : WorkerMainThreadRunnable(workerPrivate) , mGfxInfo(gfxInfo) , mFeature(feature) , mStatus(status) + , mFailureId(failureId) , mNSResult(NS_OK) { } @@ -1512,7 +1514,7 @@ class GetFeatureStatusRunnable final : public dom::workers::WorkerMainThreadRunn bool MainThreadRun() override { if (mGfxInfo) { - mNSResult = mGfxInfo->GetFeatureStatus(mFeature, mStatus); + mNSResult = mGfxInfo->GetFeatureStatus(mFeature, mFailureId, mStatus); } return true; } @@ -1529,18 +1531,22 @@ class GetFeatureStatusRunnable final : public dom::workers::WorkerMainThreadRunn nsCOMPtr mGfxInfo; int32_t mFeature; int32_t* mStatus; + nsACString& mFailureId; nsresult mNSResult; }; /* static */ nsresult gfxUtils::ThreadSafeGetFeatureStatus(const nsCOMPtr& gfxInfo, - int32_t feature, int32_t* status) + int32_t feature, nsACString& failureId, + int32_t* status) { if (!NS_IsMainThread()) { dom::workers::WorkerPrivate* workerPrivate = dom::workers::GetCurrentThreadWorkerPrivate(); + RefPtr runnable = - new GetFeatureStatusRunnable(workerPrivate, gfxInfo, feature, status); + new GetFeatureStatusRunnable(workerPrivate, gfxInfo, feature, failureId, + status); ErrorResult rv; runnable->Dispatch(rv); @@ -1554,7 +1560,7 @@ gfxUtils::ThreadSafeGetFeatureStatus(const nsCOMPtr& gfxInfo, return runnable->GetNSResult(); } - return gfxInfo->GetFeatureStatus(feature, status); + return gfxInfo->GetFeatureStatus(feature, failureId, status); } /* static */ bool diff --git a/gfx/thebes/gfxUtils.h b/gfx/thebes/gfxUtils.h index 3665e41f3924a..2beb946f2a191 100644 --- a/gfx/thebes/gfxUtils.h +++ b/gfx/thebes/gfxUtils.h @@ -291,6 +291,7 @@ class gfxUtils { static nsresult ThreadSafeGetFeatureStatus(const nsCOMPtr& gfxInfo, int32_t feature, + nsACString& failureId, int32_t* status); /** diff --git a/gfx/thebes/gfxWindowsPlatform.cpp b/gfx/thebes/gfxWindowsPlatform.cpp index 1162bc50cbc28..20793c12bebe8 100755 --- a/gfx/thebes/gfxWindowsPlatform.cpp +++ b/gfx/thebes/gfxWindowsPlatform.cpp @@ -1966,7 +1966,8 @@ gfxWindowsPlatform::CheckD3D11Support(bool* aCanUseHardware) if (nsCOMPtr gfxInfo = services::GetGfxInfo()) { int32_t status; - if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_DIRECT3D_11_LAYERS, &status))) { + nsCString discardFailureId; + if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_DIRECT3D_11_LAYERS, discardFailureId, &status))) { if (status != nsIGfxInfo::FEATURE_STATUS_OK) { if (CanUseWARP()) { *aCanUseHardware = false; @@ -2445,7 +2446,8 @@ IsD2DBlacklisted() nsCOMPtr gfxInfo = services::GetGfxInfo(); if (gfxInfo) { int32_t status; - if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_DIRECT2D, &status))) { + nsCString discardFailureId; + if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_DIRECT2D, discardFailureId, &status))) { if (status != nsIGfxInfo::FEATURE_STATUS_OK) { return true; } diff --git a/media/webrtc/signaling/src/peerconnection/MediaPipelineFactory.cpp b/media/webrtc/signaling/src/peerconnection/MediaPipelineFactory.cpp index bf16b5ac67189..315e18e74dd64 100644 --- a/media/webrtc/signaling/src/peerconnection/MediaPipelineFactory.cpp +++ b/media/webrtc/signaling/src/peerconnection/MediaPipelineFactory.cpp @@ -933,7 +933,8 @@ MediaPipelineFactory::EnsureExternalCodec(VideoSessionConduit& aConduit, nsCOMPtr gfxInfo = do_GetService("@mozilla.org/gfx/info;1"); if (gfxInfo) { int32_t status; - if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_WEBRTC_HW_ACCELERATION_ENCODE, &status))) { + nsCString discardFailureId; + if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_WEBRTC_HW_ACCELERATION_ENCODE, discardFailureId, &status))) { if (status != nsIGfxInfo::FEATURE_STATUS_OK) { NS_WARNING("VP8 encoder hardware is not whitelisted: disabling.\n"); } else { @@ -958,7 +959,8 @@ MediaPipelineFactory::EnsureExternalCodec(VideoSessionConduit& aConduit, nsCOMPtr gfxInfo = do_GetService("@mozilla.org/gfx/info;1"); if (gfxInfo) { int32_t status; - if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_WEBRTC_HW_ACCELERATION_DECODE, &status))) { + nsCString discardFailureId; + if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_WEBRTC_HW_ACCELERATION_DECODE, discardFailureId, &status))) { if (status != nsIGfxInfo::FEATURE_STATUS_OK) { NS_WARNING("VP8 decoder hardware is not whitelisted: disabling.\n"); } else { diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/test_gfxBlacklist.xml b/toolkit/mozapps/extensions/test/xpcshell/data/test_gfxBlacklist.xml index 78b9ca5907e00..44661907033f5 100644 --- a/toolkit/mozapps/extensions/test/xpcshell/data/test_gfxBlacklist.xml +++ b/toolkit/mozapps/extensions/test/xpcshell/data/test_gfxBlacklist.xml @@ -2,7 +2,7 @@ - + WINNT 6.1 0xabcd @@ -28,7 +28,7 @@ 8.52.322.2202 LESS_THAN - + WINNT 6.1 0xabab diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/test_gfxBlacklist_AllOS.xml b/toolkit/mozapps/extensions/test/xpcshell/data/test_gfxBlacklist_AllOS.xml index 7494591b2602d..c8d75a64b0a43 100755 --- a/toolkit/mozapps/extensions/test/xpcshell/data/test_gfxBlacklist_AllOS.xml +++ b/toolkit/mozapps/extensions/test/xpcshell/data/test_gfxBlacklist_AllOS.xml @@ -3,7 +3,7 @@ - + All 0xabcd @@ -16,7 +16,7 @@ BLOCKED_DRIVER_VERSION - + All 0xabcd @@ -68,7 +68,7 @@ BLOCKED_DRIVER_VERSION - + All 0xabcd diff --git a/toolkit/mozapps/extensions/test/xpcshell/test_gfxBlacklist_Version.js b/toolkit/mozapps/extensions/test/xpcshell/test_gfxBlacklist_Version.js index 88b63933e5f5d..49206d18575c0 100755 --- a/toolkit/mozapps/extensions/test/xpcshell/test_gfxBlacklist_Version.js +++ b/toolkit/mozapps/extensions/test/xpcshell/test_gfxBlacklist_Version.js @@ -73,53 +73,60 @@ function run_test() { function checkBlacklist() { + var failureId = {}; var status; - status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT2D); + status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT2D, failureId); do_check_eq(status, Ci.nsIGfxInfo.FEATURE_BLOCKED_DRIVER_VERSION); + do_check_eq(failureId.value, "FEATURE_FAILURE_DL_BLACKLIST_g1"); - status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT3D_9_LAYERS); + status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT3D_9_LAYERS, failureId); do_check_eq(status, Ci.nsIGfxInfo.FEATURE_BLOCKED_DRIVER_VERSION); + do_check_eq(failureId.value, "FEATURE_FAILURE_DL_BLACKLIST_g2"); - status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT3D_10_LAYERS); + status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT3D_10_LAYERS, failureId); do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK); + do_check_eq(failureId.value, ""); - status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT3D_10_1_LAYERS); + status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT3D_10_1_LAYERS, failureId); do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK); + do_check_eq(failureId.value, ""); // These four pass on Linux independent of the blocklist XML file as the // try machines don't have support. status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_OPENGL_LAYERS); do_check_eq(status, Ci.nsIGfxInfo.FEATURE_BLOCKED_DRIVER_VERSION); - status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_WEBGL_OPENGL); + status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_WEBGL_OPENGL, failureId); do_check_eq(status, Ci.nsIGfxInfo.FEATURE_BLOCKED_DRIVER_VERSION); + do_check_eq(failureId.value, "FEATURE_FAILURE_DL_BLACKLIST_g11"); - status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_WEBGL_ANGLE); + status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_WEBGL_ANGLE, failureId); do_check_eq(status, Ci.nsIGfxInfo.FEATURE_BLOCKED_DRIVER_VERSION); + do_check_eq(failureId.value, "FEATURE_FAILURE_DL_BLACKLIST_NO_ID"); - status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_WEBGL_MSAA); + status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_WEBGL_MSAA, failureId); do_check_eq(status, Ci.nsIGfxInfo.FEATURE_BLOCKED_DRIVER_VERSION); - status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_STAGEFRIGHT); + status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_STAGEFRIGHT, failureId); do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK); - status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_WEBRTC_HW_ACCELERATION); + status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_WEBRTC_HW_ACCELERATION, failureId); do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK); - status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_WEBRTC_HW_ACCELERATION_ENCODE); + status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_WEBRTC_HW_ACCELERATION_ENCODE, failureId); do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK); - status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_WEBRTC_HW_ACCELERATION_DECODE); + status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_WEBRTC_HW_ACCELERATION_DECODE, failureId); do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK); - status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT3D_11_LAYERS); + status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT3D_11_LAYERS, failureId); do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK); - status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_HARDWARE_VIDEO_DECODING); + status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_HARDWARE_VIDEO_DECODING, failureId); do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK); - status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT3D_11_ANGLE); + status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT3D_11_ANGLE, failureId); do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK); gTestserver.stop(do_test_finished); diff --git a/widget/GfxDriverInfo.cpp b/widget/GfxDriverInfo.cpp index 9f8813bafae3a..327a56631e87b 100644 --- a/widget/GfxDriverInfo.cpp +++ b/widget/GfxDriverInfo.cpp @@ -29,6 +29,7 @@ GfxDriverInfo::GfxDriverInfo() mDriverVersion(0), mDriverVersionMax(0), mSuggestedVersion(nullptr), + mRuleId(nullptr), mGpu2(false) {} @@ -37,6 +38,7 @@ GfxDriverInfo::GfxDriverInfo(OperatingSystem os, nsAString& vendor, int32_t feature, int32_t featureStatus, VersionComparisonOp op, uint64_t driverVersion, + const char *ruleId, const char *suggestedVersion /* = nullptr */, bool ownDevices /* = false */, bool gpu2 /* = false */) @@ -51,6 +53,7 @@ GfxDriverInfo::GfxDriverInfo(OperatingSystem os, nsAString& vendor, mDriverVersion(driverVersion), mDriverVersionMax(0), mSuggestedVersion(suggestedVersion), + mRuleId(ruleId), mGpu2(gpu2) {} @@ -64,6 +67,7 @@ GfxDriverInfo::GfxDriverInfo(const GfxDriverInfo& aOrig) mDriverVersion(aOrig.mDriverVersion), mDriverVersionMax(aOrig.mDriverVersionMax), mSuggestedVersion(aOrig.mSuggestedVersion), + mRuleId(aOrig.mRuleId), mGpu2(aOrig.mGpu2) { // If we're managing the lifetime of the device family, we have to make a diff --git a/widget/GfxDriverInfo.h b/widget/GfxDriverInfo.h index 59f19cbed39b3..91f9f39a80d23 100644 --- a/widget/GfxDriverInfo.h +++ b/widget/GfxDriverInfo.h @@ -9,27 +9,27 @@ #include "nsString.h" // Macros for adding a blocklist item to the static list. -#define APPEND_TO_DRIVER_BLOCKLIST(os, vendor, devices, feature, featureStatus, driverComparator, driverVersion, suggestedVersion) \ - mDriverInfo->AppendElement(GfxDriverInfo(os, vendor, devices, feature, featureStatus, driverComparator, driverVersion, suggestedVersion)) -#define APPEND_TO_DRIVER_BLOCKLIST2(os, vendor, devices, feature, featureStatus, driverComparator, driverVersion) \ - mDriverInfo->AppendElement(GfxDriverInfo(os, vendor, devices, feature, featureStatus, driverComparator, driverVersion)) +#define APPEND_TO_DRIVER_BLOCKLIST(os, vendor, devices, feature, featureStatus, driverComparator, driverVersion, ruleId, suggestedVersion) \ + mDriverInfo->AppendElement(GfxDriverInfo(os, vendor, devices, feature, featureStatus, driverComparator, driverVersion, ruleId, suggestedVersion)) +#define APPEND_TO_DRIVER_BLOCKLIST2(os, vendor, devices, feature, featureStatus, driverComparator, driverVersion, ruleId) \ + mDriverInfo->AppendElement(GfxDriverInfo(os, vendor, devices, feature, featureStatus, driverComparator, driverVersion, ruleId)) -#define APPEND_TO_DRIVER_BLOCKLIST_RANGE(os, vendor, devices, feature, featureStatus, driverComparator, driverVersion, driverVersionMax, suggestedVersion) \ +#define APPEND_TO_DRIVER_BLOCKLIST_RANGE(os, vendor, devices, feature, featureStatus, driverComparator, driverVersion, driverVersionMax, ruleId, suggestedVersion) \ do { \ MOZ_ASSERT(driverComparator == DRIVER_BETWEEN_EXCLUSIVE || \ driverComparator == DRIVER_BETWEEN_INCLUSIVE || \ driverComparator == DRIVER_BETWEEN_INCLUSIVE_START); \ - GfxDriverInfo info(os, vendor, devices, feature, featureStatus, driverComparator, driverVersion, suggestedVersion); \ + GfxDriverInfo info(os, vendor, devices, feature, featureStatus, driverComparator, driverVersion, ruleId, suggestedVersion); \ info.mDriverVersionMax = driverVersionMax; \ mDriverInfo->AppendElement(info); \ } while (false) -#define APPEND_TO_DRIVER_BLOCKLIST_RANGE_GPU2(os, vendor, devices, feature, featureStatus, driverComparator, driverVersion, driverVersionMax, suggestedVersion) \ +#define APPEND_TO_DRIVER_BLOCKLIST_RANGE_GPU2(os, vendor, devices, feature, featureStatus, driverComparator, driverVersion, driverVersionMax, ruleId, suggestedVersion) \ do { \ MOZ_ASSERT(driverComparator == DRIVER_BETWEEN_EXCLUSIVE || \ driverComparator == DRIVER_BETWEEN_INCLUSIVE || \ driverComparator == DRIVER_BETWEEN_INCLUSIVE_START); \ - GfxDriverInfo info(os, vendor, devices, feature, featureStatus, driverComparator, driverVersion, suggestedVersion, false, true); \ + GfxDriverInfo info(os, vendor, devices, feature, featureStatus, driverComparator, driverVersion, ruleId, suggestedVersion, false, true); \ info.mDriverVersionMax = driverVersionMax; \ mDriverInfo->AppendElement(info); \ } while (false) @@ -115,7 +115,8 @@ struct GfxDriverInfo // array, and it will be deleted when this GfxDriverInfo is destroyed. GfxDriverInfo(OperatingSystem os, nsAString& vendor, GfxDeviceFamily* devices, int32_t feature, int32_t featureStatus, VersionComparisonOp op, - uint64_t driverVersion, const char *suggestedVersion = nullptr, + uint64_t driverVersion, const char *ruleId, + const char *suggestedVersion = nullptr, bool ownDevices = false, bool gpu2 = false); GfxDriverInfo(); @@ -149,6 +150,7 @@ struct GfxDriverInfo static uint64_t allDriverVersions; const char *mSuggestedVersion; + nsCString mRuleId; static const GfxDeviceFamily* GetDeviceFamily(DeviceFamily id); static GfxDeviceFamily* mDeviceFamilies[DeviceFamilyMax]; diff --git a/widget/GfxInfoBase.cpp b/widget/GfxInfoBase.cpp index 46bd861afb8c9..7a27a81f1c284 100644 --- a/widget/GfxInfoBase.cpp +++ b/widget/GfxInfoBase.cpp @@ -171,24 +171,42 @@ GetPrefNameForFeature(int32_t aFeature) // Returns the value of the pref for the relevant feature in aValue. // If the pref doesn't exist, aValue is not touched, and returns false. static bool -GetPrefValueForFeature(int32_t aFeature, int32_t& aValue) +GetPrefValueForFeature(int32_t aFeature, int32_t& aValue, nsACString& aFailureId) { const char *prefname = GetPrefNameForFeature(aFeature); if (!prefname) return false; aValue = nsIGfxInfo::FEATURE_STATUS_UNKNOWN; - return NS_SUCCEEDED(Preferences::GetInt(prefname, &aValue)); + if (!NS_SUCCEEDED(Preferences::GetInt(prefname, &aValue))) { + return false; + } + + nsCString failureprefname(prefname); + failureprefname += ".failureid"; + nsAdoptingCString failureValue = Preferences::GetCString(failureprefname.get()); + if (failureValue) { + aFailureId = failureValue.get(); + } else { + aFailureId = "FEATURE_FAILURE_BLACKLIST_PREF"; + } + + return true; } static void -SetPrefValueForFeature(int32_t aFeature, int32_t aValue) +SetPrefValueForFeature(int32_t aFeature, int32_t aValue, const nsACString& aFailureId) { const char *prefname = GetPrefNameForFeature(aFeature); if (!prefname) return; Preferences::SetInt(prefname, aValue); + if (!aFailureId.IsEmpty()) { + nsCString failureprefname(prefname); + failureprefname += ".failureid"; + Preferences::SetCString(failureprefname.get(), aFailureId); + } } static void @@ -618,6 +636,15 @@ BlacklistEntryToDriverInfo(nsIDOMNode* aBlacklistEntry, BlacklistNodeToTextValue(dataNode, dataValue); aDriverInfo.mHardware = dataValue; } + if (BlacklistAttrToTextValue(element, + NS_LITERAL_STRING("blockID"), + dataValue) && !dataValue.IsEmpty()) { + nsCString blockIdStr = NS_LITERAL_CSTRING("FEATURE_FAILURE_DL_BLACKLIST_") + + NS_ConvertUTF16toUTF8(dataValue); + aDriverInfo.mRuleId = blockIdStr.get(); + } else { + aDriverInfo.mRuleId = NS_LITERAL_CSTRING("FEATURE_FAILURE_DL_BLACKLIST_NO_ID"); + } // We explicitly ignore unknown elements. @@ -696,12 +723,13 @@ GfxInfoBase::Init() } NS_IMETHODIMP -GfxInfoBase::GetFeatureStatus(int32_t aFeature, int32_t* aStatus) +GfxInfoBase::GetFeatureStatus(int32_t aFeature, nsACString& aFailureId, int32_t* aStatus) { int32_t blocklistAll = gfxPrefs::BlocklistAll(); if (blocklistAll > 0) { gfxCriticalErrorOnce(gfxCriticalError::DefaultOptions(false)) << "Forcing blocklisting all features"; *aStatus = FEATURE_BLOCKED_DEVICE; + aFailureId = "FEATURE_FAILURE_BLOCK_ALL"; return NS_OK; } else if (blocklistAll < 0) { gfxCriticalErrorOnce(gfxCriticalError::DefaultOptions(false)) << "Ignoring any feature blocklisting."; @@ -709,26 +737,31 @@ GfxInfoBase::GetFeatureStatus(int32_t aFeature, int32_t* aStatus) return NS_OK; } - if (GetPrefValueForFeature(aFeature, *aStatus)) + if (GetPrefValueForFeature(aFeature, *aStatus, aFailureId)) { return NS_OK; + } if (XRE_IsContentProcess()) { // Delegate to the parent process. mozilla::dom::ContentChild* cc = mozilla::dom::ContentChild::GetSingleton(); bool success; - cc->SendGetGraphicsFeatureStatus(aFeature, aStatus, &success); + nsCString remoteFailureId; + cc->SendGetGraphicsFeatureStatus(aFeature, aStatus, &remoteFailureId, &success); + aFailureId = remoteFailureId; return success ? NS_OK : NS_ERROR_FAILURE; } nsString version; nsTArray driverInfo; - return GetFeatureStatusImpl(aFeature, aStatus, version, driverInfo); + nsresult rv = GetFeatureStatusImpl(aFeature, aStatus, version, driverInfo, aFailureId); + return rv; } int32_t GfxInfoBase::FindBlocklistedDeviceInList(const nsTArray& info, nsAString& aSuggestedVersion, int32_t aFeature, + nsACString& aFailureId, OperatingSystem os) { int32_t status = nsIGfxInfo::FEATURE_STATUS_UNKNOWN; @@ -858,6 +891,11 @@ GfxInfoBase::FindBlocklistedDeviceInList(const nsTArray& info, info[i].mFeature == aFeature) { status = info[i].mFeatureStatus; + if (!info[i].mRuleId.IsEmpty()) { + aFailureId = info[i].mRuleId.get(); + } else { + aFailureId = "FEATURE_FAILURE_DL_BLACKLIST_NO_ID"; + } break; } } @@ -881,6 +919,7 @@ GfxInfoBase::FindBlocklistedDeviceInList(const nsTArray& info, if (nvVendorID.Equals(adapterVendorID2, nsCaseInsensitiveStringComparator()) && nv310mDeviceId.Equals(adapterDeviceID2, nsCaseInsensitiveStringComparator())) { status = nsIGfxInfo::FEATURE_BLOCKED_DEVICE; + aFailureId = "FEATURE_FAILURE_D2D_NV310M_BLOCK"; } } } @@ -910,6 +949,7 @@ GfxInfoBase::GetFeatureStatusImpl(int32_t aFeature, int32_t* aStatus, nsAString& aSuggestedVersion, const nsTArray& aDriverInfo, + nsACString& aFailureId, OperatingSystem* aOS /* = nullptr */) { if (aFeature <= 0) { @@ -936,6 +976,7 @@ GfxInfoBase::GetFeatureStatusImpl(int32_t aFeature, NS_FAILED(GetAdapterDeviceID(adapterDeviceID)) || NS_FAILED(GetAdapterDriverVersion(adapterDriverVersionString))) { + aFailureId = "FEATURE_FAILURE_CANT_RESOLVE_ADAPTER"; return NS_OK; } @@ -945,12 +986,12 @@ GfxInfoBase::GetFeatureStatusImpl(int32_t aFeature, // can back out our static block without doing a release). int32_t status; if (aDriverInfo.Length()) { - status = FindBlocklistedDeviceInList(aDriverInfo, aSuggestedVersion, aFeature, os); + status = FindBlocklistedDeviceInList(aDriverInfo, aSuggestedVersion, aFeature, aFailureId, os); } else { if (!mDriverInfo) { mDriverInfo = new nsTArray(); } - status = FindBlocklistedDeviceInList(GetGfxDriverInfo(), aSuggestedVersion, aFeature, os); + status = FindBlocklistedDeviceInList(GetGfxDriverInfo(), aSuggestedVersion, aFeature, aFailureId, os); } // It's now done being processed. It's safe to set the status to STATUS_OK. @@ -974,8 +1015,9 @@ GfxInfoBase::GetFeatureSuggestedDriverVersion(int32_t aFeature, } int32_t status; + nsCString discardFailureId; nsTArray driverInfo; - return GetFeatureStatusImpl(aFeature, &status, aVersion, driverInfo); + return GetFeatureStatusImpl(aFeature, &status, aVersion, driverInfo, discardFailureId); } @@ -1016,10 +1058,12 @@ GfxInfoBase::EvaluateDownloadedBlacklist(nsTArray& aDriverInfo) int i = 0; while (features[i]) { int32_t status; + nsCString failureId; nsAutoString suggestedVersion; if (NS_SUCCEEDED(GetFeatureStatusImpl(features[i], &status, suggestedVersion, - aDriverInfo))) { + aDriverInfo, + failureId))) { switch (status) { default: case nsIGfxInfo::FEATURE_STATUS_OK: @@ -1038,7 +1082,7 @@ GfxInfoBase::EvaluateDownloadedBlacklist(nsTArray& aDriverInfo) case nsIGfxInfo::FEATURE_BLOCKED_DEVICE: case nsIGfxInfo::FEATURE_DISCOURAGED: case nsIGfxInfo::FEATURE_BLOCKED_OS_VERSION: - SetPrefValueForFeature(features[i], status); + SetPrefValueForFeature(features[i], status, failureId); break; } } diff --git a/widget/GfxInfoBase.h b/widget/GfxInfoBase.h index 7f112db47f4ac..1629fddb4f8ab 100644 --- a/widget/GfxInfoBase.h +++ b/widget/GfxInfoBase.h @@ -45,7 +45,7 @@ class GfxInfoBase : public nsIGfxInfo, // using GfxInfoBase::GetFeatureSuggestedDriverVersion; // using GfxInfoBase::GetWebGLParameter; // to import the relevant methods into their namespace. - NS_IMETHOD GetFeatureStatus(int32_t aFeature, int32_t *_retval) override; + NS_IMETHOD GetFeatureStatus(int32_t aFeature, nsACString& aFailureId, int32_t *_retval) override; NS_IMETHOD GetFeatureSuggestedDriverVersion(int32_t aFeature, nsAString & _retval) override; NS_IMETHOD GetWebGLParameter(const nsAString & aParam, nsAString & _retval) override; @@ -93,6 +93,7 @@ class GfxInfoBase : public nsIGfxInfo, virtual nsresult GetFeatureStatusImpl(int32_t aFeature, int32_t* aStatus, nsAString& aSuggestedDriverVersion, const nsTArray& aDriverInfo, + nsACString& aFailureId, OperatingSystem* aOS = nullptr); // Gets the driver info table. Used by GfxInfoBase to check for general cases @@ -111,6 +112,7 @@ class GfxInfoBase : public nsIGfxInfo, virtual int32_t FindBlocklistedDeviceInList(const nsTArray& aDriverInfo, nsAString& aSuggestedVersion, int32_t aFeature, + nsACString &aFailureId, OperatingSystem os); void EvaluateDownloadedBlacklist(nsTArray& aDriverInfo); diff --git a/widget/GfxInfoX11.cpp b/widget/GfxInfoX11.cpp index b37ba461d3ee4..3cdca1f05a7c2 100644 --- a/widget/GfxInfoX11.cpp +++ b/widget/GfxInfoX11.cpp @@ -271,10 +271,11 @@ GfxInfo::GetGfxDriverInfo() } nsresult -GfxInfo::GetFeatureStatusImpl(int32_t aFeature, - int32_t *aStatus, - nsAString & aSuggestedDriverVersion, - const nsTArray& aDriverInfo, +GfxInfo::GetFeatureStatusImpl(int32_t aFeature, + int32_t *aStatus, + nsAString & aSuggestedDriverVersion, + const nsTArray& aDriverInfo, + nsACString& aFailureId, OperatingSystem* aOS /* = nullptr */) { @@ -292,6 +293,7 @@ GfxInfo::GetFeatureStatusImpl(int32_t aFeature, // We better block them, rather than rely on them to fail gracefully, because they don't! // see bug 696636 *aStatus = nsIGfxInfo::FEATURE_BLOCKED_DEVICE; + aFailureId = "FEATURE_FAILURE_OPENGL_1"; return NS_OK; } @@ -305,6 +307,7 @@ GfxInfo::GetFeatureStatusImpl(int32_t aFeature, // Disable OpenGL layers when we don't have texture_from_pixmap because it regresses performance. if (aFeature == nsIGfxInfo::FEATURE_OPENGL_LAYERS && !mHasTextureFromPixmap) { *aStatus = nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION; + aFailureId = "FEATURE_FAILURE_NO_PIXMAP"; aSuggestedDriverVersion.AssignLiteral(""); return NS_OK; } @@ -325,24 +328,29 @@ GfxInfo::GetFeatureStatusImpl(int32_t aFeature, if (mIsMesa) { if (mIsNouveau && version(mMajorVersion, mMinorVersion) < version(8,0)) { *aStatus = nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION; + aFailureId = "FEATURE_FAILURE_MESA_1"; aSuggestedDriverVersion.AssignLiteral("Mesa 8.0"); } else if (version(mMajorVersion, mMinorVersion, mRevisionVersion) < version(7,10,3)) { *aStatus = nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION; + aFailureId = "FEATURE_FAILURE_MESA_2"; aSuggestedDriverVersion.AssignLiteral("Mesa 7.10.3"); } else if (mIsOldSwrast) { *aStatus = nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION; + aFailureId = "FEATURE_FAILURE_SW_RAST"; } else if (mIsLlvmpipe && version(mMajorVersion, mMinorVersion) < version(9, 1)) { // bug 791905, Mesa bug 57733, fixed in Mesa 9.1 according to // https://bugs.freedesktop.org/show_bug.cgi?id=57733#c3 *aStatus = nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION; + aFailureId = "FEATURE_FAILURE_MESA_3"; } else if (aFeature == nsIGfxInfo::FEATURE_WEBGL_MSAA) { if (mIsIntel && version(mMajorVersion, mMinorVersion) < version(8,1)) { *aStatus = nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION; + aFailureId = "FEATURE_FAILURE_MESA_4"; aSuggestedDriverVersion.AssignLiteral("Mesa 8.1"); } } @@ -350,6 +358,7 @@ GfxInfo::GetFeatureStatusImpl(int32_t aFeature, } else if (mIsNVIDIA) { if (version(mMajorVersion, mMinorVersion, mRevisionVersion) < version(257,21)) { *aStatus = nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION; + aFailureId = "FEATURE_FAILURE_OLD_NV"; aSuggestedDriverVersion.AssignLiteral("NVIDIA 257.21"); } } else if (mIsFGLRX) { @@ -357,6 +366,7 @@ GfxInfo::GetFeatureStatusImpl(int32_t aFeature, // by requiring OpenGL 3, we effectively require recent drivers. if (version(mMajorVersion, mMinorVersion, mRevisionVersion) < version(3, 0)) { *aStatus = nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION; + aFailureId = "FEATURE_FAILURE_OLD_FGLRX"; aSuggestedDriverVersion.AssignLiteral(""); } // Bug 724640: FGLRX + Linux 2.6.32 is a crashy combo @@ -365,6 +375,7 @@ GfxInfo::GetFeatureStatusImpl(int32_t aFeature, mOSRelease.Find("2.6.32") != -1; if (unknownOS || badOS) { *aStatus = nsIGfxInfo::FEATURE_BLOCKED_OS_VERSION; + aFailureId = "FEATURE_FAILURE_OLD_OS"; } } else { // like on windows, let's block unknown vendors. Think of virtual machines. @@ -374,7 +385,7 @@ GfxInfo::GetFeatureStatusImpl(int32_t aFeature, } } - return GfxInfoBase::GetFeatureStatusImpl(aFeature, aStatus, aSuggestedDriverVersion, aDriverInfo, &os); + return GfxInfoBase::GetFeatureStatusImpl(aFeature, aStatus, aSuggestedDriverVersion, aDriverInfo, aFailureId, &os); } diff --git a/widget/GfxInfoX11.h b/widget/GfxInfoX11.h index 545f0736a1f30..0fd036f46b218 100644 --- a/widget/GfxInfoX11.h +++ b/widget/GfxInfoX11.h @@ -56,10 +56,11 @@ class GfxInfo final : public GfxInfoBase protected: ~GfxInfo() {} - virtual nsresult GetFeatureStatusImpl(int32_t aFeature, - int32_t *aStatus, - nsAString & aSuggestedDriverVersion, - const nsTArray& aDriverInfo, + virtual nsresult GetFeatureStatusImpl(int32_t aFeature, + int32_t *aStatus, + nsAString & aSuggestedDriverVersion, + const nsTArray& aDriverInfo, + nsACString& aFailureId, OperatingSystem* aOS = nullptr) override; virtual const nsTArray& GetGfxDriverInfo() override; diff --git a/widget/android/GfxInfo.cpp b/widget/android/GfxInfo.cpp index c3d94960dc59b..273fa59b1efcc 100644 --- a/widget/android/GfxInfo.cpp +++ b/widget/android/GfxInfo.cpp @@ -373,7 +373,8 @@ GfxInfo::GetGfxDriverInfo() APPEND_TO_DRIVER_BLOCKLIST2( DRIVER_OS_ALL, (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorAll), GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_OPENGL_LAYERS, nsIGfxInfo::FEATURE_STATUS_OK, - DRIVER_COMPARISON_IGNORED, GfxDriverInfo::allDriverVersions ); + DRIVER_COMPARISON_IGNORED, GfxDriverInfo::allDriverVersions, + "FEATURE_OK_FORCE_OPENGL" ); } return *mDriverInfo; @@ -382,8 +383,9 @@ GfxInfo::GetGfxDriverInfo() nsresult GfxInfo::GetFeatureStatusImpl(int32_t aFeature, int32_t *aStatus, - nsAString & aSuggestedDriverVersion, + nsAString &aSuggestedDriverVersion, const nsTArray& aDriverInfo, + nsACString &aFailureId, OperatingSystem* aOS /* = nullptr */) { NS_ENSURE_ARG_POINTER(aStatus); @@ -412,7 +414,12 @@ GfxInfo::GetFeatureStatusImpl(int32_t aFeature, if (aDriverInfo.IsEmpty()) { if (aFeature == nsIGfxInfo::FEATURE_CANVAS2D_ACCELERATION) { // It's slower than software due to not having a compositing fast path - *aStatus = (mSDKVersion >= 11) ? nsIGfxInfo::FEATURE_STATUS_OK : nsIGfxInfo::FEATURE_BLOCKED_OS_VERSION; + if (mSDKVersion >= 11) { + *aStatus = nsIGfxInfo::FEATURE_STATUS_OK; + } else { + *aStatus = nsIGfxInfo::FEATURE_BLOCKED_OS_VERSION; + aFailureId = "FEATURE_FAILURE_CANVAS_2D_SDK"; + } return NS_OK; } @@ -421,11 +428,13 @@ GfxInfo::GetFeatureStatusImpl(int32_t aFeature, mGLStrings->Renderer().Find("Adreno 205") != -1) { *aStatus = nsIGfxInfo::FEATURE_BLOCKED_DEVICE; + aFailureId = "FEATURE_FAILURE_ADRENO_20x"; return NS_OK; } if (mHardware.EqualsLiteral("ville")) { *aStatus = nsIGfxInfo::FEATURE_BLOCKED_DEVICE; + aFailureId = "FEATURE_FAILURE_VILLE"; return NS_OK; } } @@ -443,6 +452,7 @@ GfxInfo::GetFeatureStatusImpl(int32_t aFeature, cHardware.EqualsLiteral("rk30board")) { *aStatus = nsIGfxInfo::FEATURE_BLOCKED_DEVICE; + aFailureId = "FEATURE_FAILURE_STAGE_HW"; return NS_OK; } @@ -456,6 +466,7 @@ GfxInfo::GetFeatureStatusImpl(int32_t aFeature, if (!isWhitelisted) { *aStatus = nsIGfxInfo::FEATURE_BLOCKED_DEVICE; + aFailureId = "FEATURE_FAILURE_OLD_ANDROID"; return NS_OK; } } @@ -498,6 +509,7 @@ GfxInfo::GetFeatureStatusImpl(int32_t aFeature, if (!isWhitelisted) { *aStatus = nsIGfxInfo::FEATURE_BLOCKED_DEVICE; + aFailureId = "FEATURE_FAILURE_OLD_ANDROID_2"; return NS_OK; } } @@ -511,12 +523,14 @@ GfxInfo::GetFeatureStatusImpl(int32_t aFeature, if (!isWhitelisted) { *aStatus = nsIGfxInfo::FEATURE_BLOCKED_DEVICE; + aFailureId = "FEATURE_FAILURE_SAMSUNG"; return NS_OK; } } else if (CompareVersions(mOSVersion.get(), "4.0.0") < 0) { *aStatus = nsIGfxInfo::FEATURE_BLOCKED_OS_VERSION; + aFailureId = "FEATURE_FAILURE_OLD_ANDROID_4"; return NS_OK; } else if (CompareVersions(mOSVersion.get(), "4.1.0") < 0) @@ -542,6 +556,7 @@ GfxInfo::GetFeatureStatusImpl(int32_t aFeature, if (!isWhitelisted) { *aStatus = nsIGfxInfo::FEATURE_BLOCKED_DEVICE; + aFailureId = "FEATURE_FAILURE_4_1_HW"; return NS_OK; } } @@ -563,6 +578,7 @@ GfxInfo::GetFeatureStatusImpl(int32_t aFeature, if (isBlocklisted) { *aStatus = nsIGfxInfo::FEATURE_BLOCKED_DEVICE; + aFailureId = "FEATURE_FAILURE_4_2_HW"; return NS_OK; } } @@ -571,6 +587,7 @@ GfxInfo::GetFeatureStatusImpl(int32_t aFeature, // Blocklist all Sony devices if (cManufacturer.Find("Sony", true) != -1) { *aStatus = nsIGfxInfo::FEATURE_BLOCKED_DEVICE; + aFailureId = "FEATURE_FAILURE_4_3_SONY"; return NS_OK; } } @@ -579,12 +596,14 @@ GfxInfo::GetFeatureStatusImpl(int32_t aFeature, if (aFeature == FEATURE_WEBRTC_HW_ACCELERATION_ENCODE) { if (mozilla::AndroidBridge::Bridge()) { *aStatus = mozilla::AndroidBridge::Bridge()->GetHWEncoderCapability() ? nsIGfxInfo::FEATURE_STATUS_OK : nsIGfxInfo::FEATURE_BLOCKED_DEVICE; + aFailureId = "FEATURE_FAILURE_WEBRTC_ENCODE"; return NS_OK; } } if (aFeature == FEATURE_WEBRTC_HW_ACCELERATION_DECODE) { if (mozilla::AndroidBridge::Bridge()) { *aStatus = mozilla::AndroidBridge::Bridge()->GetHWDecoderCapability() ? nsIGfxInfo::FEATURE_STATUS_OK : nsIGfxInfo::FEATURE_BLOCKED_DEVICE; + aFailureId = "FEATURE_FAILURE_WEBRTC_DECODE"; return NS_OK; } } @@ -595,13 +614,17 @@ GfxInfo::GetFeatureStatusImpl(int32_t aFeature, // GIFV crash, see bug 1232911. model.Equals("GT-N8013", nsCaseInsensitiveCStringComparator()); - *aStatus = isBlocked ? nsIGfxInfo::FEATURE_BLOCKED_DEVICE - : nsIGfxInfo::FEATURE_STATUS_OK; + if (isBlocked) { + *aStatus = nsIGfxInfo::FEATURE_BLOCKED_DEVICE; + aFailureId = "FEATURE_FAILURE_VPx"; + } else { + *aStatus = nsIGfxInfo::FEATURE_STATUS_OK; + } return NS_OK; } } - return GfxInfoBase::GetFeatureStatusImpl(aFeature, aStatus, aSuggestedDriverVersion, aDriverInfo, &os); + return GfxInfoBase::GetFeatureStatusImpl(aFeature, aStatus, aSuggestedDriverVersion, aDriverInfo, aFailureId, &os); } #ifdef DEBUG diff --git a/widget/android/GfxInfo.h b/widget/android/GfxInfo.h index e05be34b4952f..a3b06099b90c9 100644 --- a/widget/android/GfxInfo.h +++ b/widget/android/GfxInfo.h @@ -73,6 +73,7 @@ class GfxInfo : public GfxInfoBase int32_t *aStatus, nsAString & aSuggestedDriverVersion, const nsTArray& aDriverInfo, + nsACString &aFailureId, OperatingSystem* aOS = nullptr) override; virtual const nsTArray& GetGfxDriverInfo() override; diff --git a/widget/cocoa/GfxInfo.h b/widget/cocoa/GfxInfo.h index bcfe550adbeba..05bdad158b06b 100644 --- a/widget/cocoa/GfxInfo.h +++ b/widget/cocoa/GfxInfo.h @@ -63,10 +63,11 @@ class GfxInfo : public GfxInfoBase virtual ~GfxInfo() {} - virtual nsresult GetFeatureStatusImpl(int32_t aFeature, - int32_t *aStatus, - nsAString & aSuggestedDriverVersion, + virtual nsresult GetFeatureStatusImpl(int32_t aFeature, + int32_t *aStatus, + nsAString & aSuggestedDriverVersion, const nsTArray& aDriverInfo, + nsACString &aFailureId, OperatingSystem* aOS = nullptr) override; virtual const nsTArray& GetGfxDriverInfo() override; diff --git a/widget/cocoa/GfxInfo.mm b/widget/cocoa/GfxInfo.mm index bcebf3330a1a3..2b92ccbe49c57 100644 --- a/widget/cocoa/GfxInfo.mm +++ b/widget/cocoa/GfxInfo.mm @@ -301,9 +301,9 @@ static uint32_t IntValueOfCFData(CFDataRef d) } // We don't support checking driver versions on Mac. -#define IMPLEMENT_MAC_DRIVER_BLOCKLIST(os, vendor, device, features, blockOn) \ +#define IMPLEMENT_MAC_DRIVER_BLOCKLIST(os, vendor, device, features, blockOn, ruleId) \ APPEND_TO_DRIVER_BLOCKLIST(os, vendor, device, features, blockOn, \ - DRIVER_COMPARISON_IGNORED, V(0,0,0,0), "") + DRIVER_COMPARISON_IGNORED, V(0,0,0,0), ruleId, "") const nsTArray& @@ -312,22 +312,23 @@ static uint32_t IntValueOfCFData(CFDataRef d) if (!mDriverInfo->Length()) { IMPLEMENT_MAC_DRIVER_BLOCKLIST(DRIVER_OS_ALL, (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorATI), GfxDriverInfo::allDevices, - nsIGfxInfo::FEATURE_WEBGL_MSAA, nsIGfxInfo::FEATURE_BLOCKED_OS_VERSION); + nsIGfxInfo::FEATURE_WEBGL_MSAA, nsIGfxInfo::FEATURE_BLOCKED_OS_VERSION, "FEATURE_FAILURE_MAC_ATI_NO_MSAA"); IMPLEMENT_MAC_DRIVER_BLOCKLIST(DRIVER_OS_ALL, (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorATI), (GfxDeviceFamily*) GfxDriverInfo::GetDeviceFamily(RadeonX1000), - nsIGfxInfo::FEATURE_OPENGL_LAYERS, nsIGfxInfo::FEATURE_BLOCKED_DEVICE); + nsIGfxInfo::FEATURE_OPENGL_LAYERS, nsIGfxInfo::FEATURE_BLOCKED_DEVICE, "FEATURE_FAILURE_MAC_RADEONX1000_NO_TEXTURE2D"); IMPLEMENT_MAC_DRIVER_BLOCKLIST(DRIVER_OS_ALL, - (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorNVIDIA), (GfxDeviceFamily*) GfxDriverInfo::GetDeviceFamily(Geforce7300GT), - nsIGfxInfo::FEATURE_WEBGL_OPENGL, nsIGfxInfo::FEATURE_BLOCKED_DEVICE); + (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorNVIDIA), (GfxDeviceFamily*) GfxDriverInfo::GetDeviceFamily(Geforce7300GT), + nsIGfxInfo::FEATURE_WEBGL_OPENGL, nsIGfxInfo::FEATURE_BLOCKED_DEVICE, "FEATURE_FAILURE_MAC_7300_NO_WEBGL"); } return *mDriverInfo; } nsresult -GfxInfo::GetFeatureStatusImpl(int32_t aFeature, +GfxInfo::GetFeatureStatusImpl(int32_t aFeature, int32_t* aStatus, nsAString& aSuggestedDriverVersion, const nsTArray& aDriverInfo, + nsACString& aFailureId, OperatingSystem* aOS /* = nullptr */) { NS_ENSURE_ARG_POINTER(aStatus); @@ -342,7 +343,7 @@ static uint32_t IntValueOfCFData(CFDataRef d) if (aFeature == nsIGfxInfo::FEATURE_WEBGL_MSAA) { // Blacklist all ATI cards on OSX, except for // 0x6760 and 0x9488 - if (mAdapterVendorID.Equals(GfxDriverInfo::GetDeviceVendor(VendorATI), nsCaseInsensitiveStringComparator()) && + if (mAdapterVendorID.Equals(GfxDriverInfo::GetDeviceVendor(VendorATI), nsCaseInsensitiveStringComparator()) && (mAdapterDeviceID.LowerCaseEqualsLiteral("0x6760") || mAdapterDeviceID.LowerCaseEqualsLiteral("0x9488"))) { *aStatus = nsIGfxInfo::FEATURE_STATUS_OK; @@ -350,12 +351,17 @@ static uint32_t IntValueOfCFData(CFDataRef d) } } else if (aFeature == nsIGfxInfo::FEATURE_CANVAS2D_ACCELERATION) { // See bug 1249659 - *aStatus = (os > DRIVER_OS_OS_X_10_7) ? nsIGfxInfo::FEATURE_STATUS_OK : nsIGfxInfo::FEATURE_BLOCKED_OS_VERSION; + if (os > DRIVER_OS_OS_X_10_7) { + *aStatus = nsIGfxInfo::FEATURE_STATUS_OK; + } else { + *aStatus = nsIGfxInfo::FEATURE_BLOCKED_OS_VERSION; + aFailureId = "FEATURE_FAILURE_CANVAS_OSX_VERSION"; + } return NS_OK; } } - return GfxInfoBase::GetFeatureStatusImpl(aFeature, aStatus, aSuggestedDriverVersion, aDriverInfo, &os); + return GfxInfoBase::GetFeatureStatusImpl(aFeature, aStatus, aSuggestedDriverVersion, aDriverInfo, aFailureId, &os); } nsresult diff --git a/widget/nsIGfxInfo.idl b/widget/nsIGfxInfo.idl index f882dabf384ee..df596695f5e51 100644 --- a/widget/nsIGfxInfo.idl +++ b/widget/nsIGfxInfo.idl @@ -134,9 +134,11 @@ interface nsIGfxInfo : nsISupports const long FEATURE_BLOCKED_MISMATCHED_VERSION = 7; /** - * Ask about a feature, and return the status of that feature + * Ask about a feature, and return the status of that feature. + * If the feature is not ok then aFailureId will give a unique failure Id + * otherwise it will be empty. */ - long getFeatureStatus(in long aFeature); + long getFeatureStatus(in long aFeature, [optional] out ACString aFailureId); /* * Ask about a feature, return the minimum driver version required for it if its status is diff --git a/widget/windows/GfxInfo.cpp b/widget/windows/GfxInfo.cpp index aeebeb935fad0..ab467d9e13f22 100644 --- a/widget/windows/GfxInfo.cpp +++ b/widget/windows/GfxInfo.cpp @@ -831,15 +831,15 @@ GfxInfo::GetGfxDriverInfo() APPEND_TO_DRIVER_BLOCKLIST( DRIVER_OS_WINDOWS_XP, (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorNVIDIA), GfxDriverInfo::allDevices, GfxDriverInfo::allFeatures, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, - DRIVER_LESS_THAN, V(6,14,11,8265), "182.65" ); + DRIVER_LESS_THAN, V(6,14,11,8265), "FEATURE_FAILURE_NV_XP", "182.65" ); APPEND_TO_DRIVER_BLOCKLIST( DRIVER_OS_WINDOWS_VISTA, (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorNVIDIA), GfxDriverInfo::allDevices, GfxDriverInfo::allFeatures, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, - DRIVER_LESS_THAN, V(8,17,11,8265), "182.65" ); + DRIVER_LESS_THAN, V(8,17,11,8265), "FEATURE_FAILURE_NV_VISTA", "182.65" ); APPEND_TO_DRIVER_BLOCKLIST( DRIVER_OS_WINDOWS_7, (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorNVIDIA), GfxDriverInfo::allDevices, GfxDriverInfo::allFeatures, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, - DRIVER_LESS_THAN, V(8,17,11,8265), "182.65" ); + DRIVER_LESS_THAN, V(8,17,11,8265), "FEATURE_FAILURE_NV_W7", "182.65" ); /* * AMD/ATI entries @@ -847,23 +847,23 @@ GfxInfo::GetGfxDriverInfo() APPEND_TO_DRIVER_BLOCKLIST( DRIVER_OS_ALL, (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorATI), GfxDriverInfo::allDevices, GfxDriverInfo::allFeatures, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, - DRIVER_LESS_THAN, V(8,62,0,0), "9.6" ); + DRIVER_LESS_THAN, V(8,62,0,0), "FEATURE_FAILURE_AMD1", "9.6" ); APPEND_TO_DRIVER_BLOCKLIST( DRIVER_OS_ALL, (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorAMD), GfxDriverInfo::allDevices, GfxDriverInfo::allFeatures, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, - DRIVER_LESS_THAN, V(8,62,0,0), "9.6" ); + DRIVER_LESS_THAN, V(8,62,0,0), "FEATURE_FAILURE_AMD2", "9.6" ); // Bug 1099252 APPEND_TO_DRIVER_BLOCKLIST2( DRIVER_OS_WINDOWS_7, (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorATI), GfxDriverInfo::allDevices, GfxDriverInfo::allFeatures, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, - DRIVER_EQUAL, V(8,832,0,0)); + DRIVER_EQUAL, V(8,832,0,0), "FEATURE_FAILURE_BUG_1099252"); // Bug 1118695 APPEND_TO_DRIVER_BLOCKLIST2( DRIVER_OS_WINDOWS_7, (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorATI), GfxDriverInfo::allDevices, GfxDriverInfo::allFeatures, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, - DRIVER_EQUAL, V(8,783,2,2000)); + DRIVER_EQUAL, V(8,783,2,2000), "FEATURE_FAILURE_BUG_1118695"); /* * Bug 783517 - crashes in AMD driver on Windows 8 @@ -871,11 +871,13 @@ GfxInfo::GetGfxDriverInfo() APPEND_TO_DRIVER_BLOCKLIST_RANGE( DRIVER_OS_WINDOWS_8, (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorATI), GfxDriverInfo::allDevices, GfxDriverInfo::allFeatures, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, - DRIVER_BETWEEN_INCLUSIVE_START, V(8,982,0,0), V(8,983,0,0), "!= 8.982.*.*" ); + DRIVER_BETWEEN_INCLUSIVE_START, V(8,982,0,0), V(8,983,0,0), + "FEATURE_FAILURE_BUG_783517_AMD", "!= 8.982.*.*" ); APPEND_TO_DRIVER_BLOCKLIST_RANGE( DRIVER_OS_WINDOWS_8, (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorAMD), GfxDriverInfo::allDevices, GfxDriverInfo::allFeatures, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, - DRIVER_BETWEEN_INCLUSIVE_START, V(8,982,0,0), V(8,983,0,0), "!= 8.982.*.*" ); + DRIVER_BETWEEN_INCLUSIVE_START, V(8,982,0,0), V(8,983,0,0), + "FEATURE_FAILURE_BUG_783517_ATI", "!= 8.982.*.*" ); /* OpenGL on any ATI/AMD hardware is discouraged * See: @@ -886,19 +888,19 @@ GfxInfo::GetGfxDriverInfo() APPEND_TO_DRIVER_BLOCKLIST2( DRIVER_OS_ALL, (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorATI), GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_OPENGL_LAYERS, nsIGfxInfo::FEATURE_DISCOURAGED, - DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions ); + DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions, "FEATURE_FAILURE_OGL_ATI_DIS" ); APPEND_TO_DRIVER_BLOCKLIST2( DRIVER_OS_ALL, (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorATI), GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_WEBGL_OPENGL, nsIGfxInfo::FEATURE_DISCOURAGED, - DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions ); + DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions, "FEATURE_FAILURE_WEBGL_ATI_DIS" ); APPEND_TO_DRIVER_BLOCKLIST2( DRIVER_OS_ALL, (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorAMD), GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_OPENGL_LAYERS, nsIGfxInfo::FEATURE_DISCOURAGED, - DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions ); + DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions, "FEATURE_FAILURE_OGL_AMD_DIS" ); APPEND_TO_DRIVER_BLOCKLIST2( DRIVER_OS_ALL, (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorAMD), GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_WEBGL_OPENGL, nsIGfxInfo::FEATURE_DISCOURAGED, - DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions ); + DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions, "FEATURE_FAILURE_WEBGL_AMD_DIS" ); /* * Intel entries @@ -907,31 +909,31 @@ GfxInfo::GetGfxDriverInfo() /* The driver versions used here come from bug 594877. They might not * be particularly relevant anymore. */ - #define IMPLEMENT_INTEL_DRIVER_BLOCKLIST(winVer, devFamily, driverVer) \ + #define IMPLEMENT_INTEL_DRIVER_BLOCKLIST(winVer, devFamily, driverVer, ruleId) \ APPEND_TO_DRIVER_BLOCKLIST2( winVer, \ (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorIntel), (GfxDeviceFamily*) GfxDriverInfo::GetDeviceFamily(devFamily), \ GfxDriverInfo::allFeatures, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, \ - DRIVER_LESS_THAN, driverVer ) + DRIVER_LESS_THAN, driverVer, ruleId ) - #define IMPLEMENT_INTEL_DRIVER_BLOCKLIST_D2D(winVer, devFamily, driverVer) \ + #define IMPLEMENT_INTEL_DRIVER_BLOCKLIST_D2D(winVer, devFamily, driverVer, ruleId) \ APPEND_TO_DRIVER_BLOCKLIST2( winVer, \ (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorIntel), (GfxDeviceFamily*) GfxDriverInfo::GetDeviceFamily(devFamily), \ nsIGfxInfo::FEATURE_DIRECT2D, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, \ - DRIVER_LESS_THAN, driverVer ) - - IMPLEMENT_INTEL_DRIVER_BLOCKLIST_D2D(DRIVER_OS_WINDOWS_VISTA, IntelGMA500, V(7,14,10,1006)); - IMPLEMENT_INTEL_DRIVER_BLOCKLIST_D2D(DRIVER_OS_WINDOWS_VISTA, IntelGMA900, GfxDriverInfo::allDriverVersions); - IMPLEMENT_INTEL_DRIVER_BLOCKLIST_D2D(DRIVER_OS_WINDOWS_VISTA, IntelGMA950, V(7,14,10,1504)); - IMPLEMENT_INTEL_DRIVER_BLOCKLIST_D2D(DRIVER_OS_WINDOWS_VISTA, IntelGMA3150, V(7,14,10,2124)); - IMPLEMENT_INTEL_DRIVER_BLOCKLIST_D2D(DRIVER_OS_WINDOWS_VISTA, IntelGMAX3000, V(7,15,10,1666)); - IMPLEMENT_INTEL_DRIVER_BLOCKLIST_D2D(DRIVER_OS_WINDOWS_VISTA, IntelHDGraphicsToSandyBridge, V(8,15,10,2202)); - - IMPLEMENT_INTEL_DRIVER_BLOCKLIST_D2D(DRIVER_OS_WINDOWS_7, IntelGMA500, V(5,0,0,2026)); - IMPLEMENT_INTEL_DRIVER_BLOCKLIST_D2D(DRIVER_OS_WINDOWS_7, IntelGMA900, GfxDriverInfo::allDriverVersions); - IMPLEMENT_INTEL_DRIVER_BLOCKLIST_D2D(DRIVER_OS_WINDOWS_7, IntelGMA950, V(8,15,10,1930)); - IMPLEMENT_INTEL_DRIVER_BLOCKLIST_D2D(DRIVER_OS_WINDOWS_7, IntelGMA3150, V(8,14,10,2117)); - IMPLEMENT_INTEL_DRIVER_BLOCKLIST_D2D(DRIVER_OS_WINDOWS_7, IntelGMAX3000, V(8,15,10,1930)); - IMPLEMENT_INTEL_DRIVER_BLOCKLIST_D2D(DRIVER_OS_WINDOWS_7, IntelHDGraphicsToSandyBridge, V(8,15,10,2202)); + DRIVER_LESS_THAN, driverVer, ruleId ) + + IMPLEMENT_INTEL_DRIVER_BLOCKLIST_D2D(DRIVER_OS_WINDOWS_VISTA, IntelGMA500, V(7,14,10,1006), "FEATURE_FAILURE_594877_1"); + IMPLEMENT_INTEL_DRIVER_BLOCKLIST_D2D(DRIVER_OS_WINDOWS_VISTA, IntelGMA900, GfxDriverInfo::allDriverVersions, "FEATURE_FAILURE_594877_2"); + IMPLEMENT_INTEL_DRIVER_BLOCKLIST_D2D(DRIVER_OS_WINDOWS_VISTA, IntelGMA950, V(7,14,10,1504), "FEATURE_FAILURE_594877_3"); + IMPLEMENT_INTEL_DRIVER_BLOCKLIST_D2D(DRIVER_OS_WINDOWS_VISTA, IntelGMA3150, V(7,14,10,2124), "FEATURE_FAILURE_594877_4"); + IMPLEMENT_INTEL_DRIVER_BLOCKLIST_D2D(DRIVER_OS_WINDOWS_VISTA, IntelGMAX3000, V(7,15,10,1666), "FEATURE_FAILURE_594877_5"); + IMPLEMENT_INTEL_DRIVER_BLOCKLIST_D2D(DRIVER_OS_WINDOWS_VISTA, IntelHDGraphicsToSandyBridge, V(8,15,10,2202), "FEATURE_FAILURE_594877_6"); + + IMPLEMENT_INTEL_DRIVER_BLOCKLIST_D2D(DRIVER_OS_WINDOWS_7, IntelGMA500, V(5,0,0,2026), "FEATURE_FAILURE_594877_7"); + IMPLEMENT_INTEL_DRIVER_BLOCKLIST_D2D(DRIVER_OS_WINDOWS_7, IntelGMA900, GfxDriverInfo::allDriverVersions, "FEATURE_FAILURE_594877_8"); + IMPLEMENT_INTEL_DRIVER_BLOCKLIST_D2D(DRIVER_OS_WINDOWS_7, IntelGMA950, V(8,15,10,1930), "FEATURE_FAILURE_594877_9"); + IMPLEMENT_INTEL_DRIVER_BLOCKLIST_D2D(DRIVER_OS_WINDOWS_7, IntelGMA3150, V(8,14,10,2117), "FEATURE_FAILURE_594877_10"); + IMPLEMENT_INTEL_DRIVER_BLOCKLIST_D2D(DRIVER_OS_WINDOWS_7, IntelGMAX3000, V(8,15,10,1930), "FEATURE_FAILURE_594877_11"); + IMPLEMENT_INTEL_DRIVER_BLOCKLIST_D2D(DRIVER_OS_WINDOWS_7, IntelHDGraphicsToSandyBridge, V(8,15,10,2202), "FEATURE_FAILURE_594877_12"); /* Disable Direct2D on Intel GMAX4500 devices because of rendering corruption discovered * in bug 1180379. These seems to affect even the most recent drivers. We're black listing @@ -940,15 +942,15 @@ GfxInfo::GetGfxDriverInfo() APPEND_TO_DRIVER_BLOCKLIST2(DRIVER_OS_ALL, (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorIntel), (GfxDeviceFamily*) GfxDriverInfo::GetDeviceFamily(IntelGMAX4500HD), nsIGfxInfo::FEATURE_DIRECT2D, nsIGfxInfo::FEATURE_BLOCKED_DEVICE, - DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions); + DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions, "FEATURE_FAILURE_1180379"); - IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_XP, IntelGMA500, V(3,0,20,3200)); - IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_XP, IntelGMA900, V(6,14,10,4764)); - IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_XP, IntelGMA950, V(6,14,10,4926)); - IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_XP, IntelGMA3150, V(6,14,10,5134)); - IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_XP, IntelGMAX3000, V(6,14,10,5218)); - IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_XP, IntelGMAX4500HD, V(6,14,10,4969)); - IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_XP, IntelHDGraphicsToSandyBridge, V(6,14,10,4969)); + IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_XP, IntelGMA500, V(3,0,20,3200), "FEATURE_FAILURE_INTEL_1"); + IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_XP, IntelGMA900, V(6,14,10,4764), "FEATURE_FAILURE_INTEL_2"); + IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_XP, IntelGMA950, V(6,14,10,4926), "FEATURE_FAILURE_INTEL_3"); + IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_XP, IntelGMA3150, V(6,14,10,5134), "FEATURE_FAILURE_INTEL_4"); + IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_XP, IntelGMAX3000, V(6,14,10,5218), "FEATURE_FAILURE_INTEL_5"); + IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_XP, IntelGMAX4500HD, V(6,14,10,4969), "FEATURE_FAILURE_INTEL_6"); + IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_XP, IntelHDGraphicsToSandyBridge, V(6,14,10,4969), "FEATURE_FAILURE_INTEL_7"); // StrechRect seems to suffer from precision issues which leads to artifacting // during content drawing starting with at least version 6.14.10.5082 @@ -957,45 +959,45 @@ GfxInfo::GetGfxDriverInfo() const_cast(GfxDriverInfo::GetDeviceVendor(VendorIntel)), const_cast(GfxDriverInfo::GetDeviceFamily(IntelGMAX4500HD)), GfxDriverInfo::allFeatures, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, - DRIVER_BETWEEN_EXCLUSIVE, V(6,14,10,5076), V(6,14,10,5218), "6.14.10.5218"); - - IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_VISTA, IntelGMA500, V(3,0,20,3200)); - IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_VISTA, IntelGMA900, GfxDriverInfo::allDriverVersions); - IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_VISTA, IntelGMA950, V(7,14,10,1504)); - IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_VISTA, IntelGMA3150, V(7,14,10,1910)); - IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_VISTA, IntelGMAX3000, V(7,15,10,1666)); - IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_VISTA, IntelGMAX4500HD, V(7,15,10,1666)); - IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_VISTA, IntelHDGraphicsToSandyBridge, V(7,15,10,1666)); - - IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_7, IntelGMA500, V(5,0,0,2026)); - IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_7, IntelGMA900, GfxDriverInfo::allDriverVersions); - IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_7, IntelGMA950, V(8,15,10,1930)); - IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_7, IntelGMA3150, V(8,14,10,1972)); - IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_7, IntelGMAX3000, V(7,15,10,1666)); - IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_7, IntelGMAX4500HD, V(7,15,10,1666)); - IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_7, IntelHDGraphicsToSandyBridge, V(7,15,10,1666)); + DRIVER_BETWEEN_EXCLUSIVE, V(6,14,10,5076), V(6,14,10,5218), "6.14.10.5218", "FEATURE_FAILURE_INTEL_8"); + + IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_VISTA, IntelGMA500, V(3,0,20,3200), "FEATURE_FAILURE_INTEL_9"); + IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_VISTA, IntelGMA900, GfxDriverInfo::allDriverVersions, "FEATURE_FAILURE_INTEL_10"); + IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_VISTA, IntelGMA950, V(7,14,10,1504), "FEATURE_FAILURE_INTEL_11"); + IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_VISTA, IntelGMA3150, V(7,14,10,1910), "FEATURE_FAILURE_INTEL_12"); + IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_VISTA, IntelGMAX3000, V(7,15,10,1666), "FEATURE_FAILURE_INTEL_13"); + IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_VISTA, IntelGMAX4500HD, V(7,15,10,1666), "FEATURE_FAILURE_INTEL_14"); + IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_VISTA, IntelHDGraphicsToSandyBridge, V(7,15,10,1666), "FEATURE_FAILURE_INTEL_15"); + + IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_7, IntelGMA500, V(5,0,0,2026), "FEATURE_FAILURE_INTEL_16"); + IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_7, IntelGMA900, GfxDriverInfo::allDriverVersions, "FEATURE_FAILURE_INTEL_17"); + IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_7, IntelGMA950, V(8,15,10,1930), "FEATURE_FAILURE_INTEL_18"); + IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_7, IntelGMA3150, V(8,14,10,1972), "FEATURE_FAILURE_INTEL_19"); + IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_7, IntelGMAX3000, V(7,15,10,1666), "FEATURE_FAILURE_INTEL_20"); + IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_7, IntelGMAX4500HD, V(7,15,10,1666), "FEATURE_FAILURE_INTEL_21"); + IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_7, IntelHDGraphicsToSandyBridge, V(7,15,10,1666), "FEATURE_FAILURE_INTEL_22"); // Bug 1074378 APPEND_TO_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_7, (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorIntel), (GfxDeviceFamily*) GfxDriverInfo::GetDeviceFamily(IntelGMAX4500HD), GfxDriverInfo::allFeatures, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, - DRIVER_EQUAL, V(8,15,10,1749), "8.15.10.2342"); + DRIVER_EQUAL, V(8,15,10,1749), "8.15.10.2342", "FEATURE_FAILURE_BUG_1074378_1"); APPEND_TO_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_7, (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorIntel), (GfxDeviceFamily*) GfxDriverInfo::GetDeviceFamily(IntelHDGraphicsToSandyBridge), GfxDriverInfo::allFeatures, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, - DRIVER_EQUAL, V(8,15,10,1749), "8.15.10.2342"); + DRIVER_EQUAL, V(8,15,10,1749), "8.15.10.2342", "FEATURE_FAILURE_BUG_1074378_2"); /* OpenGL on any Intel hardware is discouraged */ APPEND_TO_DRIVER_BLOCKLIST2( DRIVER_OS_ALL, (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorIntel), GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_OPENGL_LAYERS, nsIGfxInfo::FEATURE_DISCOURAGED, - DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions ); + DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions, "FEATURE_FAILURE_INTEL_OGL_DIS" ); APPEND_TO_DRIVER_BLOCKLIST2( DRIVER_OS_ALL, (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorIntel), GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_WEBGL_OPENGL, nsIGfxInfo::FEATURE_DISCOURAGED, - DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions ); + DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions, "FEATURE_FAILURE_INTEL_WEBGL_DIS" ); /** * Disable acceleration on Intel HD 3000 for graphics drivers <= 8.15.10.2321. @@ -1004,7 +1006,7 @@ GfxInfo::GetGfxDriverInfo() APPEND_TO_DRIVER_BLOCKLIST( DRIVER_OS_ALL, (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorIntel), (GfxDeviceFamily*) GfxDriverInfo::GetDeviceFamily(IntelHD3000), GfxDriverInfo::allFeatures, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, - DRIVER_LESS_THAN_OR_EQUAL, V(8,15,10,2321), "8.15.10.2342" ); + DRIVER_LESS_THAN_OR_EQUAL, V(8,15,10,2321), "8.15.10.2342", "FEATURE_FAILURE_BUG_1018278" ); /* Disable D2D on Win7 on Intel HD Graphics on driver <= 8.15.10.2302 * See bug 806786 @@ -1012,7 +1014,7 @@ GfxInfo::GetGfxDriverInfo() APPEND_TO_DRIVER_BLOCKLIST2( DRIVER_OS_WINDOWS_7, (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorIntel), (GfxDeviceFamily*) GfxDriverInfo::GetDeviceFamily(IntelMobileHDGraphics), nsIGfxInfo::FEATURE_DIRECT2D, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, - DRIVER_LESS_THAN_OR_EQUAL, V(8,15,10,2302) ); + DRIVER_LESS_THAN_OR_EQUAL, V(8,15,10,2302), "FEATURE_FAILURE_BUG_806786" ); /* Disable D2D on Win8 on Intel HD Graphics on driver <= 8.15.10.2302 * See bug 804144 and 863683 @@ -1020,7 +1022,7 @@ GfxInfo::GetGfxDriverInfo() APPEND_TO_DRIVER_BLOCKLIST2( DRIVER_OS_WINDOWS_8, (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorIntel), (GfxDeviceFamily*) GfxDriverInfo::GetDeviceFamily(IntelMobileHDGraphics), nsIGfxInfo::FEATURE_DIRECT2D, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, - DRIVER_LESS_THAN_OR_EQUAL, V(8,15,10,2302) ); + DRIVER_LESS_THAN_OR_EQUAL, V(8,15,10,2302), "FEATURE_FAILURE_BUG_804144" ); /* Disable D3D11 layers on Intel G41 express graphics and Intel GM965, Intel X3100, for causing device resets. * See bug 1116812. @@ -1028,7 +1030,7 @@ GfxInfo::GetGfxDriverInfo() APPEND_TO_DRIVER_BLOCKLIST2(DRIVER_OS_ALL, (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorIntel), (GfxDeviceFamily*) GfxDriverInfo::GetDeviceFamily(Bug1116812), nsIGfxInfo::FEATURE_DIRECT3D_11_LAYERS, nsIGfxInfo::FEATURE_BLOCKED_DEVICE, - DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions ); + DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions, "FEATURE_FAILURE_BUG_1116812" ); /* Disable D3D11 layers on Intel GMA 3150 for failing to allocate a shared handle for textures. * See bug 1207665. Additionally block D2D so we don't accidentally use WARP. @@ -1036,11 +1038,11 @@ GfxInfo::GetGfxDriverInfo() APPEND_TO_DRIVER_BLOCKLIST2(DRIVER_OS_ALL, (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorIntel), (GfxDeviceFamily*) GfxDriverInfo::GetDeviceFamily(Bug1207665), nsIGfxInfo::FEATURE_DIRECT3D_11_LAYERS, nsIGfxInfo::FEATURE_BLOCKED_DEVICE, - DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions ); + DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions, "FEATURE_FAILURE_BUG_1207665_1" ); APPEND_TO_DRIVER_BLOCKLIST2(DRIVER_OS_ALL, (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorIntel), (GfxDeviceFamily*) GfxDriverInfo::GetDeviceFamily(Bug1207665), nsIGfxInfo::FEATURE_DIRECT2D, nsIGfxInfo::FEATURE_BLOCKED_DEVICE, - DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions ); + DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions, "FEATURE_FAILURE_BUG_1207665_2" ); /* Disable D2D on AMD Catalyst 14.4 until 14.6 * See bug 984488 @@ -1048,11 +1050,11 @@ GfxInfo::GetGfxDriverInfo() APPEND_TO_DRIVER_BLOCKLIST_RANGE( DRIVER_OS_ALL, (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorATI), GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_DIRECT2D, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, - DRIVER_BETWEEN_INCLUSIVE_START, V(14,1,0,0), V(14,2,0,0), "ATI Catalyst 14.6+"); + DRIVER_BETWEEN_INCLUSIVE_START, V(14,1,0,0), V(14,2,0,0), "FEATURE_FAILURE_BUG_984488_1", "ATI Catalyst 14.6+"); APPEND_TO_DRIVER_BLOCKLIST_RANGE( DRIVER_OS_ALL, (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorAMD), GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_DIRECT2D, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, - DRIVER_BETWEEN_INCLUSIVE_START, V(14,1,0,0), V(14,2,0,0), "ATI Catalyst 14.6+"); + DRIVER_BETWEEN_INCLUSIVE_START, V(14,1,0,0), V(14,2,0,0), "FEATURE_FAILURE_BUG_984488_2", "ATI Catalyst 14.6+"); /* Disable D3D9 layers on NVIDIA 6100/6150/6200 series due to glitches * whilst scrolling. See bugs: 612007, 644787 & 645872. @@ -1060,71 +1062,71 @@ GfxInfo::GetGfxDriverInfo() APPEND_TO_DRIVER_BLOCKLIST2( DRIVER_OS_ALL, (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorNVIDIA), (GfxDeviceFamily*) GfxDriverInfo::GetDeviceFamily(NvidiaBlockD3D9Layers), nsIGfxInfo::FEATURE_DIRECT3D_9_LAYERS, nsIGfxInfo::FEATURE_BLOCKED_DEVICE, - DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions ); + DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions, "FEATURE_FAILURE_BUG_612007" ); /* Microsoft RemoteFX; blocked less than 6.2.0.0 */ APPEND_TO_DRIVER_BLOCKLIST( DRIVER_OS_ALL, (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorMicrosoft), GfxDriverInfo::allDevices, GfxDriverInfo::allFeatures, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, - DRIVER_LESS_THAN, V(6,2,0,0), "< 6.2.0.0" ); + DRIVER_LESS_THAN, V(6,2,0,0), "< 6.2.0.0", "FEATURE_FAILURE_REMOTE_FX" ); /* Bug 1008759: Optimus (NVidia) crash. Disable D2D on NV 310M. */ APPEND_TO_DRIVER_BLOCKLIST2(DRIVER_OS_ALL, (nsAString&)GfxDriverInfo::GetDeviceVendor(VendorNVIDIA), (GfxDeviceFamily*)GfxDriverInfo::GetDeviceFamily(Nvidia310M), nsIGfxInfo::FEATURE_DIRECT2D, nsIGfxInfo::FEATURE_BLOCKED_DEVICE, - DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions); + DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions, "FEATURE_FAILURE_BUG_1008759"); /* Bug 1151721: Black video on youtube, block DXVA for all older intel cards. */ APPEND_TO_DRIVER_BLOCKLIST2(DRIVER_OS_ALL, (nsAString&)GfxDriverInfo::GetDeviceVendor(VendorATI), (GfxDeviceFamily*)GfxDriverInfo::GetDeviceFamily(AMDRadeonHD5800), nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING, nsIGfxInfo::FEATURE_BLOCKED_DEVICE, - DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions); + DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions, "FEATURE_FAILURE_BUG_1151721"); /* Bug 1139503: DXVA crashes with ATI cards on windows 10. */ APPEND_TO_DRIVER_BLOCKLIST2(DRIVER_OS_WINDOWS_10, (nsAString&)GfxDriverInfo::GetDeviceVendor(VendorATI), GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, - DRIVER_EQUAL, V(15,200,1006,0)); + DRIVER_EQUAL, V(15,200,1006,0), "FEATURE_FAILURE_BUG_1139503"); /* Bug 1213107: D3D9 crashes with ATI cards on Windows 7. */ APPEND_TO_DRIVER_BLOCKLIST_RANGE(DRIVER_OS_WINDOWS_7, (nsAString&)GfxDriverInfo::GetDeviceVendor(VendorATI), GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, - DRIVER_BETWEEN_INCLUSIVE, V(8,861,0,0), V(8,862,6,5000), "Radeon driver > 8.862.6.5000"); + DRIVER_BETWEEN_INCLUSIVE, V(8,861,0,0), V(8,862,6,5000), "FEATURE_FAILURE_BUG_1213107_1", "Radeon driver > 8.862.6.5000"); APPEND_TO_DRIVER_BLOCKLIST_RANGE(DRIVER_OS_WINDOWS_7, (nsAString&)GfxDriverInfo::GetDeviceVendor(VendorATI), GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_WEBGL_ANGLE, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, - DRIVER_BETWEEN_INCLUSIVE, V(8,861,0,0), V(8,862,6,5000), "Radeon driver > 8.862.6.5000"); + DRIVER_BETWEEN_INCLUSIVE, V(8,861,0,0), V(8,862,6,5000), "FEATURE_FAILURE_BUG_1213107_2", "Radeon driver > 8.862.6.5000"); /* This may not be needed at all */ APPEND_TO_DRIVER_BLOCKLIST2(DRIVER_OS_WINDOWS_7, (nsAString&)GfxDriverInfo::GetDeviceVendor(VendorIntel), (GfxDeviceFamily*)GfxDriverInfo::GetDeviceFamily(Bug1155608), nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, - DRIVER_LESS_THAN, V(8,15,10,2869)); + DRIVER_LESS_THAN, V(8,15,10,2869), "FEATURE_FAILURE_INTEL_W7_HW_DECODING"); /* Bug 1203199/1092166: DXVA startup crashes on some intel drivers. */ APPEND_TO_DRIVER_BLOCKLIST_RANGE(DRIVER_OS_ALL, (nsAString&)GfxDriverInfo::GetDeviceVendor(VendorIntel), GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, - DRIVER_BETWEEN_INCLUSIVE, V(9,17,10,0), V(9,17,10,2849), "Intel driver > 9.17.10.2849"); + DRIVER_BETWEEN_INCLUSIVE, V(9,17,10,0), V(9,17,10,2849), "FEATURE_FAILURE_BUG_1203199_1", "Intel driver > 9.17.10.2849"); APPEND_TO_DRIVER_BLOCKLIST2(DRIVER_OS_ALL, (nsAString&)GfxDriverInfo::GetDeviceVendor(VendorNVIDIA), (GfxDeviceFamily*)GfxDriverInfo::GetDeviceFamily(Nvidia8800GTS), nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, - DRIVER_EQUAL, V(9,18,13,4052)); + DRIVER_EQUAL, V(9,18,13,4052), "FEATURE_FAILURE_BUG_1203199_2"); /* Bug 1137716: XXX this should really check for the matching Intel piece as well. * Unfortunately, we don't have the infrastructure to do that */ APPEND_TO_DRIVER_BLOCKLIST_RANGE_GPU2(DRIVER_OS_WINDOWS_7, (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorNVIDIA), (GfxDeviceFamily*)GfxDriverInfo::GetDeviceFamily(Bug1137716), GfxDriverInfo::allFeatures, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, - DRIVER_BETWEEN_INCLUSIVE, V(8,17,12,5730), V(8,17,12,6901), "Nvidia driver > 8.17.12.6901"); + DRIVER_BETWEEN_INCLUSIVE, V(8,17,12,5730), V(8,17,12,6901), "FEATURE_FAILURE_BUG_1137716", "Nvidia driver > 8.17.12.6901"); /* Bug 1153381: WebGL issues with D3D11 ANGLE on Intel. These may be fixed by an ANGLE update. */ APPEND_TO_DRIVER_BLOCKLIST2(DRIVER_OS_ALL, (nsAString&)GfxDriverInfo::GetDeviceVendor(VendorIntel), (GfxDeviceFamily*)GfxDriverInfo::GetDeviceFamily(IntelGMAX4500HD), nsIGfxInfo::FEATURE_DIRECT3D_11_ANGLE, nsIGfxInfo::FEATURE_BLOCKED_DEVICE, - DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions); + DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions, "FEATURE_FAILURE_BUG_1153381"); } return *mDriverInfo; @@ -1132,9 +1134,10 @@ GfxInfo::GetGfxDriverInfo() nsresult GfxInfo::GetFeatureStatusImpl(int32_t aFeature, - int32_t *aStatus, - nsAString & aSuggestedDriverVersion, + int32_t *aStatus, + nsAString & aSuggestedDriverVersion, const nsTArray& aDriverInfo, + nsACString& aFailureId, OperatingSystem* aOS /* = nullptr */) { NS_ENSURE_ARG_POINTER(aStatus); @@ -1153,6 +1156,7 @@ GfxInfo::GetFeatureStatusImpl(int32_t aFeature, NS_FAILED(GetAdapterDeviceID(adapterDeviceID)) || NS_FAILED(GetAdapterDriverVersion(adapterDriverVersionString))) { + aFailureId = "FEATURE_FAILURE_GET_ADAPTER"; return NS_ERROR_FAILURE; } @@ -1170,11 +1174,13 @@ GfxInfo::GetFeatureStatusImpl(int32_t aFeature, !adapterVendorID.LowerCaseEqualsLiteral("0xdcdc")) { *aStatus = FEATURE_BLOCKED_DEVICE; + aFailureId = "FEATURE_FAILURE_TEST"; return NS_OK; } uint64_t driverVersion; if (!ParseDriverVersion(adapterDriverVersionString, &driverVersion)) { + aFailureId = "FEATURE_FAILURE_PARSE_DRIVER"; return NS_ERROR_FAILURE; } @@ -1201,7 +1207,7 @@ GfxInfo::GetFeatureStatusImpl(int32_t aFeature, } } - return GfxInfoBase::GetFeatureStatusImpl(aFeature, aStatus, aSuggestedDriverVersion, aDriverInfo, &os); + return GfxInfoBase::GetFeatureStatusImpl(aFeature, aStatus, aSuggestedDriverVersion, aDriverInfo, aFailureId, &os); } nsresult diff --git a/widget/windows/GfxInfo.h b/widget/windows/GfxInfo.h index a5ccad0a324c4..c7aa859a6e83f 100644 --- a/widget/windows/GfxInfo.h +++ b/widget/windows/GfxInfo.h @@ -59,10 +59,11 @@ class GfxInfo : public GfxInfoBase protected: - virtual nsresult GetFeatureStatusImpl(int32_t aFeature, - int32_t *aStatus, - nsAString & aSuggestedDriverVersion, - const nsTArray& aDriverInfo, + virtual nsresult GetFeatureStatusImpl(int32_t aFeature, + int32_t *aStatus, + nsAString & aSuggestedDriverVersion, + const nsTArray& aDriverInfo, + nsACString& aFailureId, OperatingSystem* aOS = nullptr) override; virtual const nsTArray& GetGfxDriverInfo() override; diff --git a/widget/windows/nsWindow.cpp b/widget/windows/nsWindow.cpp index e8ccf77194a9b..ae4b6d9d5ba67 100644 --- a/widget/windows/nsWindow.cpp +++ b/widget/windows/nsWindow.cpp @@ -6850,7 +6850,9 @@ nsWindow::HasBogusPopupsDropShadowOnMultiMonitor() { nsCOMPtr gfxInfo = services::GetGfxInfo(); if (gfxInfo) { int32_t status; - if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_DIRECT3D_9_LAYERS, &status))) { + nsCString discardFailureId; + if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_DIRECT3D_9_LAYERS, + discardFailureId, &status))) { if (status == nsIGfxInfo::FEATURE_STATUS_OK || gfxPrefs::LayersAccelerationForceEnabled()) {