From 4f5bbebcd82171ce9033e0617f6dc219497d8f09 Mon Sep 17 00:00:00 2001 From: lightningterror <18107717+lightningterror@users.noreply.github.com> Date: Thu, 20 Jan 2022 10:27:54 +0100 Subject: [PATCH] GS-hw: Move blend mix condition to blend switch case. Cleaner. --- pcsx2/GS/Renderers/HW/GSRendererNew.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/pcsx2/GS/Renderers/HW/GSRendererNew.cpp b/pcsx2/GS/Renderers/HW/GSRendererNew.cpp index d7a6c97a66..b4eba18ad6 100644 --- a/pcsx2/GS/Renderers/HW/GSRendererNew.cpp +++ b/pcsx2/GS/Renderers/HW/GSRendererNew.cpp @@ -581,6 +581,9 @@ void GSRendererNew::EmulateBlending(bool& DATE_PRIMID, bool& DATE_BARRIER) [[fallthrough]]; case AccBlendLevel::Basic: sw_blending |= impossible_or_free_blend; + // Do not run BLEND MIX if sw blending is already present, it's less accurate + blend_mix &= !sw_blending; + sw_blending |= blend_mix; [[fallthrough]]; case AccBlendLevel::Minimum: break; @@ -607,19 +610,15 @@ void GSRendererNew::EmulateBlending(bool& DATE_PRIMID, bool& DATE_BARRIER) // Disable accumulation blend when there is fbmask with no overlap, will be faster. accumulation_blend &= !fbmask_no_overlap; sw_blending |= accumulation_blend || blend_non_recursive || fbmask_no_overlap; + // Do not run BLEND MIX if sw blending is already present, it's less accurate + blend_mix &= !sw_blending; + sw_blending |= blend_mix; [[fallthrough]]; case AccBlendLevel::Minimum: break; } } - // Do not run BLEND MIX if sw blending is already present, it's less accurate - if (GSConfig.AccurateBlendingUnit != AccBlendLevel::Minimum) - { - blend_mix &= !sw_blending; - sw_blending |= blend_mix; - } - // Color clip if (m_env.COLCLAMP.CLAMP == 0) {