Bug 1170143 - Disable alpha texture sharing for intel driver version 8.15.10.2086 since it crashes. r=jrmuizel
authorMatt Woodrow <mwoodrow@mozilla.com>
Fri, 05 Jun 2015 16:51:19 +1200
changeset 248656 5a82441265b8
parent 248655 48a77f828d59
child 248657 d3a9981cf858
push id28901
push userkwierso@gmail.com
push date2015-06-13 00:17 +0000
treeherdermozilla-central@b7ee8e13145a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel
bugs1170143
milestone41.0a1
Bug 1170143 - Disable alpha texture sharing for intel driver version 8.15.10.2086 since it crashes. r=jrmuizel
gfx/thebes/gfxWindowsPlatform.cpp
--- a/gfx/thebes/gfxWindowsPlatform.cpp
+++ b/gfx/thebes/gfxWindowsPlatform.cpp
@@ -1827,23 +1827,27 @@ bool DoesD3D11TextureSharingWork(ID3D11D
   result = DoesD3D11TextureSharingWorkInternal(device, DXGI_FORMAT_B8G8R8A8_UNORM, D3D11_BIND_RENDER_TARGET | D3D11_BIND_SHADER_RESOURCE);
   return result;
 }
 
 bool DoesD3D11AlphaTextureSharingWork(ID3D11Device *device)
 {
   nsCOMPtr<nsIGfxInfo> gfxInfo = do_GetService("@mozilla.org/gfx/info;1");
   if (gfxInfo) {
-    // Disable texture sharing if we're blocking d2d since that's the only other time we use it
-    // and it might be broken.
-    int32_t status;
-    if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_DIRECT2D, &status))) {
-      if (status != nsIGfxInfo::FEATURE_STATUS_OK) {
-        return false;
-      }
+    // A8 texture sharing crashes on this intel driver version (and no others)
+    // so just avoid using it in that case.
+    nsString adapterVendor;
+    nsString driverVersion;
+    gfxInfo->GetAdapterVendorID(adapterVendor);
+    gfxInfo->GetAdapterDriverVersion(driverVersion);
+
+    nsAString &intelVendorID = (nsAString &)GfxDriverInfo::GetDeviceVendor(VendorIntel);
+    if (adapterVendor.Equals(intelVendorID, nsCaseInsensitiveStringComparator()) &&
+        driverVersion.Equals(NS_LITERAL_STRING("8.15.10.2086"))) {
+      return false;
     }
   }
 
   return DoesD3D11TextureSharingWorkInternal(device, DXGI_FORMAT_A8_UNORM, D3D11_BIND_SHADER_RESOURCE);
 }
 
 void
 gfxWindowsPlatform::InitD3D11Devices()