Disable dual source blending on AMD vulkan.
authorGreg Daniel <egdaniel@google.com>
Wed, 22 Mar 2017 20:25:53 +0000 (16:25 -0400)
committerSkia Commit-Bot <skia-commit-bot@chromium.org>
Wed, 22 Mar 2017 21:11:04 +0000 (21:11 +0000)
BUG=skia:6405

Change-Id: I63b60135f1562a4ce1f1a37b719aa01fc62d8790
Reviewed-on: https://skia-review.googlesource.com/9984
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
src/gpu/vk/GrVkCaps.cpp

index af2a41d..bf343a9 100644 (file)
@@ -222,6 +222,12 @@ void GrVkCaps::initShaderCaps(const VkPhysicalDeviceProperties& properties, uint
     shaderCaps->fGeometryShaderSupport = SkToBool(featureFlags & kGeometryShader_GrVkFeatureFlag);
 
     shaderCaps->fDualSourceBlendingSupport = SkToBool(featureFlags & kDualSrcBlend_GrVkFeatureFlag);
+    if (kAMD_VkVendor == properties.vendorID) {
+        // Currently DualSourceBlending is not working on AMD. vkCreateGraphicsPipeline fails when
+        // using a draw with dual source. Looking into whether it is driver bug or issue with our
+        // SPIR-V. Bug skia:6405
+        shaderCaps->fDualSourceBlendingSupport = false;
+    }
 
     shaderCaps->fIntegerSupport = true;