Bug 1093863 - Blacklist D3D on dual Intel/AMD not advertised as such in the registry. r=jrmuizel, a=lmandel GECKO330_2014101104_RELBRANCH FIREFOX_33_0_3_BUILD2 FIREFOX_33_0_3_RELEASE
authorBenoit Jacob <bjacob@mozilla.com>
Wed, 05 Nov 2014 17:43:33 -0500
branchGECKO330_2014101104_RELBRANCH
changeset 218187 983a710b51c4
parent 218186 63daea50bacd
child 218188 358c3b39b5e0
push id573
push userryanvm@gmail.com
push date2014-11-06 04:14 +0000
treeherdermozilla-release@983a710b51c4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel, lmandel
bugs1093863
milestone33.0.3
Bug 1093863 - Blacklist D3D on dual Intel/AMD not advertised as such in the registry. r=jrmuizel, a=lmandel
gfx/thebes/gfxWindowsPlatform.cpp
--- a/gfx/thebes/gfxWindowsPlatform.cpp
+++ b/gfx/thebes/gfxWindowsPlatform.cpp
@@ -1526,16 +1526,31 @@ bool DoesD3D11DeviceWork(ID3D11Device *d
     if (displayLinkModuleVersion <= GFX_DRIVER_VERSION(8,6,1,36484)) {
 #if defined(MOZ_CRASHREPORTER)
       CrashReporter::AppendAppNotesToCrashReport(NS_LITERAL_CSTRING("DisplayLink: too old version\n"));
 #endif
       return false;
     }
   }
 
+  if (GetModuleHandleW(L"atidxx32.dll")) {
+    nsCOMPtr<nsIGfxInfo> gfxInfo = do_GetService("@mozilla.org/gfx/info;1");
+    if (gfxInfo) {
+      nsString vendorID, vendorID2;
+      gfxInfo->GetAdapterVendorID(vendorID);
+      gfxInfo->GetAdapterVendorID2(vendorID2);
+      if (vendorID.EqualsLiteral("0x8086") && vendorID2.IsEmpty()) {
+#if defined(MOZ_CRASHREPORTER)
+        CrashReporter::AppendAppNotesToCrashReport(NS_LITERAL_CSTRING("Unexpected Intel/AMD dual-GPU setup\n"));
+#endif
+        return false;
+      }
+    }
+  }
+
   RefPtr<ID3D11Texture2D> texture;
   D3D11_TEXTURE2D_DESC desc;
   desc.Width = 32;
   desc.Height = 32;
   desc.MipLevels = 1;
   desc.ArraySize = 1;
   desc.Format = DXGI_FORMAT_B8G8R8A8_UNORM;
   desc.SampleDesc.Count = 1;