From ceb1f8c8cbc41aed49c5ae8d66499057d979b51a Mon Sep 17 00:00:00 2001 From: Jonathan Hamilton Date: Tue, 26 Dec 2017 12:30:22 -0800 Subject: Enable shader_framebuffer_fetch blend path on ubershaders Tested on a linux Intel Skylake integrated graphics with blend_func_extended force-disabled, as it's the only platform I have that doesn't crash with ubershaders and supports fb_fetch --- Source/Core/VideoCommon/PixelShaderManager.cpp | 37 ++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'Source/Core/VideoCommon/PixelShaderManager.cpp') diff --git a/Source/Core/VideoCommon/PixelShaderManager.cpp b/Source/Core/VideoCommon/PixelShaderManager.cpp index 0fa3614bdb..8ada00ef3b 100644 --- a/Source/Core/VideoCommon/PixelShaderManager.cpp +++ b/Source/Core/VideoCommon/PixelShaderManager.cpp @@ -473,6 +473,43 @@ void PixelShaderManager::SetBlendModeChanged() constants.dither = dither; dirty = true; } + BlendingState state = {}; + state.Generate(bpmem); + if (constants.blend_enable != state.blendenable) + { + constants.blend_enable = state.blendenable; + dirty = true; + } + if (constants.blend_src_factor != state.srcfactor) + { + constants.blend_src_factor = state.srcfactor; + dirty = true; + } + if (constants.blend_src_factor_alpha != state.srcfactoralpha) + { + constants.blend_src_factor_alpha = state.srcfactoralpha; + dirty = true; + } + if (constants.blend_dst_factor != state.dstfactor) + { + constants.blend_dst_factor = state.dstfactor; + dirty = true; + } + if (constants.blend_dst_factor_alpha != state.dstfactoralpha) + { + constants.blend_dst_factor_alpha = state.dstfactoralpha; + dirty = true; + } + if (constants.blend_subtract != state.subtract) + { + constants.blend_subtract = state.subtract; + dirty = true; + } + if (constants.blend_subtract_alpha != state.subtractAlpha) + { + constants.blend_subtract_alpha = state.subtractAlpha; + dirty = true; + } s_bDestAlphaDirty = true; } -- cgit v1.2.3