Bug 1093863 - Blacklist D3D on dual Intel/AMD not advertised as such in the registry. r=jrmuizel, a=lmandel
authorBenoit Jacob <bjacob@mozilla.com>
Wed, 05 Nov 2014 17:43:33 -0500
changeset 225955 c8d99c0a36d9
parent 225954 d8080081d33a
child 225957 4cd1151d9de0
push id4083
push userryanvm@gmail.com
push date2014-11-06 00:59 +0000
treeherdermozilla-beta@c8d99c0a36d9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel, lmandel
bugs1093863
milestone34.0
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
@@ -1531,16 +1531,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;