GS-ogl: Don't enable blend_mix if sw blend is already enabled.

Less accurate.
This commit is contained in:
lightningterror 2021-12-07 15:00:38 +01:00
parent 1fb29de082
commit ba1072f470
1 changed files with 8 additions and 2 deletions

View File

@ -492,7 +492,7 @@ void GSRendererOGL::EmulateBlending(bool& DATE_GL42, bool& DATE_GL45)
const bool blend_mix1 = !!(blend_flag & BLEND_MIX1);
const bool blend_mix2 = !!(blend_flag & BLEND_MIX2);
const bool blend_mix3 = !!(blend_flag & BLEND_MIX3);
bool blend_mix = (blend_mix1 || blend_mix2 || blend_mix3)
bool blend_mix = (blend_mix1 || blend_mix2 || blend_mix3)
// Do not enable if As > 128 or F > 128, hw blend clamps to 1
&& !((ALPHA.C == 0 && m_vt.m_alpha.max > 128) || (ALPHA.C == 2 && ALPHA.FIX > 128u));
@ -500,7 +500,6 @@ void GSRendererOGL::EmulateBlending(bool& DATE_GL42, bool& DATE_GL45)
const bool impossible_or_free_blend = (blend_flag & BLEND_A_MAX) // Impossible blending
|| blend_non_recursive // Free sw blending, doesn't require barriers or reading fb
|| accumulation_blend // Mix of hw/sw blending
|| blend_mix // Mix of hw/sw blending
|| (m_prim_overlap == PRIM_OVERLAP_NO) // Blend can be done in a single draw
|| (m_require_full_barrier); // Another effect (for example fbmask) already requires a full barrier
@ -531,6 +530,13 @@ void GSRendererOGL::EmulateBlending(bool& DATE_GL42, bool& DATE_GL45)
/*sw_blending |= accumulation_blend*/;
}
// Do not run BLEND MIX if sw blending is already present, it's less accurate
if (m_sw_blending)
{
blend_mix &= !sw_blending;
sw_blending |= blend_mix;
}
// Color clip
if (m_env.COLCLAMP.CLAMP == 0)
{