Only use dual source when actually needed.

Does generate a few more shaders but hopefully isn't a problem, should get rid of most of the slowdown in most games.
This commit is contained in:
Henrik Rydgard committed 2013-12-16 23:44:28 +01:00
1 parent a9a15d5196
commit f8312716f3
1 file changed
+5 -5
+5 -5
View File
@@ -128,15 +128,15 @@ ReplaceAlphaType ReplaceAlphaWithStencil() {
return REPLACE_ALPHA_NO;
}
if (gl_extensions.ARB_blend_func_extended) {
return REPLACE_ALPHA_DUALSOURCE;
}
if (gstate.isAlphaBlendEnabled()) {
if (nonAlphaSrcFactors[gstate.getBlendFuncA()] && nonAlphaDestFactors[gstate.getBlendFuncB()]) {
return REPLACE_ALPHA_YES;
} else {
return REPLACE_ALPHA_NO;
if (gl_extensions.ARB_blend_func_extended) {
return REPLACE_ALPHA_DUALSOURCE;
} else {
return REPLACE_ALPHA_NO;
}
}
}