summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/PixelShaderManager.cpp
diff options
context:
space:
mode:
authorJonathan Hamilton <jtrhamilton@gmail.com>2017-12-26 12:30:22 -0800
committerJonathan Hamilton <jtrhamilton@gmail.com>2018-01-05 09:56:46 -0800
commitceb1f8c8cbc41aed49c5ae8d66499057d979b51a (patch)
tree8c2a1472260254ba826f895a6573bb89c78207cb /Source/Core/VideoCommon/PixelShaderManager.cpp
parent8d68adcaf3442122fff5bb0988c2f06b0128f021 (diff)
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
Diffstat (limited to 'Source/Core/VideoCommon/PixelShaderManager.cpp')
-rw-r--r--Source/Core/VideoCommon/PixelShaderManager.cpp37
1 files changed, 37 insertions, 0 deletions
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;
}