hrydgard/ppsspp — pull request #6350 by unknownbrackets (2014-06-17 07:26:56+00:00)
Title: Avoid blitting for a bunch of gpu blending modes

This avoids the copy for a ton of blending modes, which should take care of these situations:
http://report.ppsspp.org/logs/kind/622?status=any
(as you can see some were quite bad...)

Specifically:
* Uses GL_ONE/GL_CONSTANT_COLOR for FIXED/FIXED and premultiplies src color in the shader.
* Uses alpha doubling for 1-2*a in addition to 2*a, since GL_ONE_MINUS_SRC_ALPHA will make it work.
* Uses color doubling as long as the src color is not used in the blend. This is safe regardless of the alpha value, actually, since we're not doubling the alpha value.

Additionally, uses the blit/shader for min/max when unsupported. Of course this might be slower on such devices, but it doesn't seem like one or two blits are too bad (as long as it doesn't get out of control), and this should fix effects.

I haven't tested a ton of games but I tested several that triggered these more unique blending modes.

-[Unknown]