From 5dc7ef9ed1f92ac8e1f41af6538013614ab11281 Mon Sep 17 00:00:00 2001 From: lightningterror <18107717+lightningterror@users.noreply.github.com> Date: Thu, 29 Oct 2020 23:08:45 +0100 Subject: [PATCH] gsdx-hw: EmulateBlending -> add [[fallthrough]] attribute to switch cases. --- plugins/GSdx/Renderers/DX11/GSRendererDX11.cpp | 2 +- plugins/GSdx/Renderers/OpenGL/GSRendererOGL.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/GSdx/Renderers/DX11/GSRendererDX11.cpp b/plugins/GSdx/Renderers/DX11/GSRendererDX11.cpp index 4745b5dab7..87da1423cf 100644 --- a/plugins/GSdx/Renderers/DX11/GSRendererDX11.cpp +++ b/plugins/GSdx/Renderers/DX11/GSRendererDX11.cpp @@ -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; } diff --git a/plugins/GSdx/Renderers/OpenGL/GSRendererOGL.cpp b/plugins/GSdx/Renderers/OpenGL/GSRendererOGL.cpp index 25c39549b2..42c4f491bd 100644 --- a/plugins/GSdx/Renderers/OpenGL/GSRendererOGL.cpp +++ b/plugins/GSdx/Renderers/OpenGL/GSRendererOGL.cpp @@ -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*/; }