summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/Vulkan
diff options
context:
space:
mode:
authorOatmealDome <julian@oatmealdome.me>2021-07-23 08:32:21 -0400
committerOatmealDome <julian@oatmealdome.me>2021-09-20 19:14:41 -0400
commita256c11d2f885e950e68bcd43c34080676171f4a (patch)
tree384274d4f174034d75332620b52be550ce2dcdc5 /Source/Core/VideoBackends/Vulkan
parentaa64f7f14fcf3af9e5e605ffbe70151864b55856 (diff)
DriverDetails: Add broken dual source blending bug to MoltenVK on Intel GPUs
Diffstat (limited to 'Source/Core/VideoBackends/Vulkan')
-rw-r--r--Source/Core/VideoBackends/Vulkan/VKPipeline.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/Core/VideoBackends/Vulkan/VKPipeline.cpp b/Source/Core/VideoBackends/Vulkan/VKPipeline.cpp
index 04c325cb7b..716f7be530 100644
--- a/Source/Core/VideoBackends/Vulkan/VKPipeline.cpp
+++ b/Source/Core/VideoBackends/Vulkan/VKPipeline.cpp
@@ -14,6 +14,8 @@
#include "VideoBackends/Vulkan/VKVertexFormat.h"
#include "VideoBackends/Vulkan/VulkanContext.h"
+#include "VideoCommon/DriverDetails.h"
+
namespace Vulkan
{
VKPipeline::VKPipeline(VkPipeline pipeline, VkPipelineLayout pipeline_layout,
@@ -137,7 +139,11 @@ static VkPipelineColorBlendAttachmentState GetVulkanAttachmentBlendState(const B
vk_state.colorBlendOp = state.subtract ? VK_BLEND_OP_REVERSE_SUBTRACT : VK_BLEND_OP_ADD;
vk_state.alphaBlendOp = state.subtractAlpha ? VK_BLEND_OP_REVERSE_SUBTRACT : VK_BLEND_OP_ADD;
- if (state.usedualsrc && g_ActiveConfig.backend_info.bSupportsDualSourceBlend)
+ bool use_dual_source =
+ state.usedualsrc && g_ActiveConfig.backend_info.bSupportsDualSourceBlend &&
+ (!DriverDetails::HasBug(DriverDetails::BUG_BROKEN_DUAL_SOURCE_BLENDING) || state.dstalpha);
+
+ if (use_dual_source)
{
static constexpr std::array<VkBlendFactor, 8> src_factors = {
{VK_BLEND_FACTOR_ZERO, VK_BLEND_FACTOR_ONE, VK_BLEND_FACTOR_DST_COLOR,