From 2cf6b5052dc9b17005e7e6742196d5d2620ea1ea Mon Sep 17 00:00:00 2001 From: lightningterror <18107717+lightningterror@users.noreply.github.com> Date: Thu, 20 Jan 2022 10:06:22 +0100 Subject: [PATCH] GS-hw: Enable sw blend when prims don't overlap on basic blend with fbmask. FBMASK already reads the fb so let's allow it to run sw blending since there will be no cost, only if fbmask is already running. --- pcsx2/GS/Renderers/HW/GSRendererNew.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pcsx2/GS/Renderers/HW/GSRendererNew.cpp b/pcsx2/GS/Renderers/HW/GSRendererNew.cpp index 80b0b6a81f..e48ea10005 100644 --- a/pcsx2/GS/Renderers/HW/GSRendererNew.cpp +++ b/pcsx2/GS/Renderers/HW/GSRendererNew.cpp @@ -588,6 +588,9 @@ void GSRendererNew::EmulateBlending(bool& DATE_PRIMID, bool& DATE_BARRIER) } else { + // FBMASK already reads the fb so it is safe to enable sw blend when there is no overlap. + const bool fbmask_no_overlap = !accumulation_blend && m_conf.require_one_barrier + && m_conf.ps.fbmask && m_prim_overlap == PRIM_OVERLAP_NO; switch (GSConfig.AccurateBlendingUnit) { case AccBlendLevel::Ultra: @@ -601,7 +604,7 @@ void GSRendererNew::EmulateBlending(bool& DATE_PRIMID, bool& DATE_BARRIER) [[fallthrough]]; case AccBlendLevel::Medium: case AccBlendLevel::Basic: - sw_blending |= accumulation_blend || blend_non_recursive; + sw_blending |= accumulation_blend || blend_non_recursive || fbmask_no_overlap; [[fallthrough]]; case AccBlendLevel::Minimum: break;