diff options
| author | Jules Blok <jules.blok@gmail.com> | 2016-10-21 21:45:29 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-10-21 21:45:29 +0000 |
| commit | 2536e37ec518c8d0e949ec7780ee0fb53e8b066e (patch) | |
| tree | a94415f080bbe97e7b7704d791a03d240fe282e4 /Source/Core/VideoBackends/Vulkan/Renderer.cpp | |
| parent | 2fc2baf376360ff2384fc8aed618a1ddfeba6ab9 (diff) | |
| parent | ab5054c34e8fc528fc5808d7f8254a6cdd89a376 (diff) | |
Merge pull request #4194 from Armada651/efb-source-format
PixelShaderGen: Add support for RGBA6 EFB format truncation.
Diffstat (limited to 'Source/Core/VideoBackends/Vulkan/Renderer.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/Vulkan/Renderer.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/Core/VideoBackends/Vulkan/Renderer.cpp b/Source/Core/VideoBackends/Vulkan/Renderer.cpp index 77a788ae08..3fac85e340 100644 --- a/Source/Core/VideoBackends/Vulkan/Renderer.cpp +++ b/Source/Core/VideoBackends/Vulkan/Renderer.cpp @@ -1107,8 +1107,8 @@ void Renderer::SetBlendMode(bool force_update) // Our render target always uses an alpha channel, so we need to override the blend functions to // assume a destination alpha of 1 if the render target isn't supposed to have an alpha channel. bool target_has_alpha = bpmem.zcontrol.pixel_format == PEControl::RGBA6_Z24; - bool use_dst_alpha = bpmem.dstalpha.enable && bpmem.blendmode.alphaupdate && target_has_alpha && - g_vulkan_context->SupportsDualSourceBlend(); + bool use_dst_alpha = bpmem.dstalpha.enable && bpmem.blendmode.alphaupdate && target_has_alpha; + bool use_dual_src = g_vulkan_context->SupportsDualSourceBlend(); new_blend_state.blend_enable = VK_TRUE; new_blend_state.blend_op = VK_BLEND_OP_ADD; @@ -1129,11 +1129,11 @@ void Renderer::SetBlendMode(bool force_update) break; case BlendMode::SRCALPHA: new_blend_state.src_blend = - use_dst_alpha ? VK_BLEND_FACTOR_SRC1_ALPHA : VK_BLEND_FACTOR_SRC_ALPHA; + use_dual_src ? VK_BLEND_FACTOR_SRC1_ALPHA : VK_BLEND_FACTOR_SRC_ALPHA; break; case BlendMode::INVSRCALPHA: new_blend_state.src_blend = - use_dst_alpha ? VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA : VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA; + use_dual_src ? VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA : VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA; break; case BlendMode::DSTALPHA: new_blend_state.src_blend = target_has_alpha ? VK_BLEND_FACTOR_DST_ALPHA : VK_BLEND_FACTOR_ONE; @@ -1163,11 +1163,11 @@ void Renderer::SetBlendMode(bool force_update) break; case BlendMode::SRCALPHA: new_blend_state.dst_blend = - use_dst_alpha ? VK_BLEND_FACTOR_SRC1_ALPHA : VK_BLEND_FACTOR_SRC_ALPHA; + use_dual_src ? VK_BLEND_FACTOR_SRC1_ALPHA : VK_BLEND_FACTOR_SRC_ALPHA; break; case BlendMode::INVSRCALPHA: new_blend_state.dst_blend = - use_dst_alpha ? VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA : VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA; + use_dual_src ? VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA : VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA; break; case BlendMode::DSTALPHA: new_blend_state.dst_blend = target_has_alpha ? VK_BLEND_FACTOR_DST_ALPHA : VK_BLEND_FACTOR_ONE; |
