gsdx-hw: EmulateBlending -> add [[fallthrough]] attribute to switch cases.

This commit is contained in:
lightningterror 2020-10-29 23:08:45 +01:00
parent 8831ed80df
commit 5dc7ef9ed1
2 changed files with 6 additions and 6 deletions

View File

@ -534,7 +534,7 @@ void GSRendererDX11::EmulateBlending()
case ACC_BLEND_MEDIUM_D3D11:
case ACC_BLEND_BASIC_D3D11:
sw_blending |= accumulation_blend || blend_non_recursive;
// fall through
[[fallthrough]];
default: break;
}

View File

@ -493,23 +493,23 @@ void GSRendererOGL::EmulateBlending(bool& DATE_GL42, bool& DATE_GL45)
switch (m_sw_blending) {
case ACC_BLEND_ULTRA:
sw_blending |= true;
// fall through
[[fallthrough]];
case ACC_BLEND_FULL:
if (!m_vt.m_alpha.valid && (ALPHA.C == 0)) GetAlphaMinMax();
sw_blending |= (ALPHA.A != ALPHA.B) && ((ALPHA.C == 0 && m_vt.m_alpha.max > 128) || (ALPHA.C == 2 && ALPHA.FIX > 128u));
// fall through
[[fallthrough]];
case ACC_BLEND_HIGH:
sw_blending |= (ALPHA.C == 1);
// fall through
[[fallthrough]];
case ACC_BLEND_MEDIUM:
// Initial idea was to enable accurate blending for sprite rendering to handle
// correctly post-processing effect. Some games (ZoE) use tons of sprites as particles.
// In order to keep it fast, let's limit it to smaller draw call.
sw_blending |= m_vt.m_primclass == GS_SPRITE_CLASS && m_drawlist.size() < 100;
// fall through
[[fallthrough]];
case ACC_BLEND_BASIC:
sw_blending |= impossible_or_free_blend;
// fall through
[[fallthrough]];
default:
/*sw_blending |= accumulation_blend*/;
}