mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Use shader blend for min/max when unsupported.
This commit is contained in:
parent
640c58a892
commit
6e751f8092
2 changed files with 11 additions and 6 deletions
|
@ -311,8 +311,17 @@ bool ShouldUseShaderBlending() {
|
|||
GEBlendDstFactor funcB = gstate.getBlendFuncB();
|
||||
GEBlendMode eq = gstate.getBlendEq();
|
||||
|
||||
if (eq == GE_BLENDMODE_ABSDIFF) {
|
||||
switch (eq) {
|
||||
case GE_BLENDMODE_ABSDIFF:
|
||||
return true;
|
||||
|
||||
case GE_BLENDMODE_MIN:
|
||||
case GE_BLENDMODE_MAX:
|
||||
// These don't use the factors.
|
||||
return !gl_extensions.EXT_blend_minmax && !gl_extensions.GLES3;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// This normally involves a blit, so try to skip it.
|
||||
|
|
|
@ -387,11 +387,7 @@ void TransformDrawEngine::ApplyBlendState() {
|
|||
glstate.blendFuncSeparate.set(glBlendFuncA, glBlendFuncB, GL_ZERO, GL_ONE);
|
||||
}
|
||||
|
||||
if (blendFuncEq == GE_BLENDMODE_ABSDIFF) {
|
||||
WARN_LOG_REPORT_ONCE(blendAbsdiff, G3D, "Unsupported absdiff blend mode");
|
||||
}
|
||||
|
||||
if (((blendFuncEq >= GE_BLENDMODE_MIN) && gl_extensions.EXT_blend_minmax) || gl_extensions.GLES3) {
|
||||
if (gl_extensions.EXT_blend_minmax || gl_extensions.GLES3) {
|
||||
glstate.blendEquation.set(eqLookup[blendFuncEq]);
|
||||
} else {
|
||||
glstate.blendEquation.set(eqLookupNoMinMax[blendFuncEq]);
|
||||
|
|
Loading…
Add table
Reference in a new issue