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.
This commit is contained in:
lightningterror 2022-01-20 10:06:22 +01:00
parent 8cb680f34e
commit 2cf6b5052d
1 changed files with 4 additions and 1 deletions

View File

@ -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;