From 854bc1db6072eeb278ab68dec0640581085b694b Mon Sep 17 00:00:00 2001 From: kd-11 Date: Tue, 19 Jul 2016 19:20:31 +0300 Subject: [PATCH] dx12: simplify constant color blend equation/algorithm checks --- rpcs3/Emu/RSX/D3D12/D3D12PipelineState.cpp | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/rpcs3/Emu/RSX/D3D12/D3D12PipelineState.cpp b/rpcs3/Emu/RSX/D3D12/D3D12PipelineState.cpp index d3b6289424..56736d387d 100644 --- a/rpcs3/Emu/RSX/D3D12/D3D12PipelineState.cpp +++ b/rpcs3/Emu/RSX/D3D12/D3D12PipelineState.cpp @@ -102,21 +102,8 @@ void D3D12GSRender::load_program() else { //All components are alpha. - float constant_color_as_alpha = (BlendColor[0] + BlendColor[1] + BlendColor[2]) / 3.f; + //If an alpha factor refers to constant_color, it only refers to the alpha component, so no need to replace it BlendColor[0] = BlendColor[1] = BlendColor[2] = BlendColor[3]; - - if (sfactor_a == rsx::blend_factor::constant_color || - dfactor_a == rsx::blend_factor::constant_color) - { - //Alpha information is about to be destroyed. Check that no alpha key requires it... - if (sfactor_a == rsx::blend_factor::constant_alpha || - dfactor_a == rsx::blend_factor::constant_alpha) - { - color_blend_possible = false; - } - else - BlendColor[3] = constant_color_as_alpha; - } } }