From 14d2c77f910aad77b408eef130d8212430e7202a Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Sat, 18 Dec 2021 06:52:28 +0100 Subject: [PATCH] Vulkan: implement Logical Operations. --- src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp | 4 ++-- src/video_core/vulkan_common/vulkan_device.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp b/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp index 0c175c557..7fe735e75 100644 --- a/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp +++ b/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp @@ -748,8 +748,8 @@ void GraphicsPipeline::MakePipeline(VkRenderPass render_pass) { .sType = VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO, .pNext = nullptr, .flags = 0, - .logicOpEnable = VK_FALSE, - .logicOp = VK_LOGIC_OP_COPY, + .logicOpEnable = key.state.logic_op_enable != 0, + .logicOp = static_cast(key.state.logic_op.Value()), .attachmentCount = static_cast(cb_attachments.size()), .pAttachments = cb_attachments.data(), .blendConstants = {}, diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index 38410eee4..2413e72ba 100644 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp @@ -271,7 +271,7 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR .tessellationShader = true, .sampleRateShading = true, .dualSrcBlend = true, - .logicOp = false, + .logicOp = true, .multiDrawIndirect = false, .drawIndirectFirstInstance = false, .depthClamp = true,