From d78a9356d22b23c3d8f9438777b79af6dfb42f28 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Fri, 2 Aug 2019 18:43:28 +1000 Subject: [PATCH] D3D11: Only use integer RTV when logic op is supported+enabled --- Source/Core/VideoBackends/D3D/DXPipeline.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Source/Core/VideoBackends/D3D/DXPipeline.cpp b/Source/Core/VideoBackends/D3D/DXPipeline.cpp index bc48ce061d..c8d3622aaa 100644 --- a/Source/Core/VideoBackends/D3D/DXPipeline.cpp +++ b/Source/Core/VideoBackends/D3D/DXPipeline.cpp @@ -55,10 +55,14 @@ std::unique_ptr DXPipeline::Create(const AbstractPipelineConfig& con vertex_shader->GetByteCode().size()) : nullptr; - return std::make_unique( - input_layout, vertex_shader->GetD3DVertexShader(), - geometry_shader ? geometry_shader->GetD3DGeometryShader() : nullptr, - pixel_shader->GetD3DPixelShader(), rasterizer_state, depth_state, blend_state, - primitive_topology, config.blending_state.logicopenable); + // Only use the integer RTV if logic op is supported, and enabled. + const bool use_logic_op = + config.blending_state.logicopenable && g_ActiveConfig.backend_info.bSupportsLogicOp; + + return std::make_unique(input_layout, vertex_shader->GetD3DVertexShader(), + geometry_shader ? geometry_shader->GetD3DGeometryShader() : + nullptr, + pixel_shader->GetD3DPixelShader(), rasterizer_state, + depth_state, blend_state, primitive_topology, use_logic_op); } } // namespace DX11