From 991024173e3d048ea3a056c8debb6f92ae7b2da0 Mon Sep 17 00:00:00 2001 From: TellowKrinkle Date: Sun, 12 Jun 2022 21:27:11 -0500 Subject: VideoCommon: Always use fbfetch in ubershaders if available Reduce the number of different pipelines needed. Also works around drivers that break when you combine fbfetch with dual source blending --- Source/Core/VideoCommon/ShaderCache.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'Source/Core/VideoCommon/ShaderCache.cpp') diff --git a/Source/Core/VideoCommon/ShaderCache.cpp b/Source/Core/VideoCommon/ShaderCache.cpp index e4d2115c3b..6049fd29a7 100644 --- a/Source/Core/VideoCommon/ShaderCache.cpp +++ b/Source/Core/VideoCommon/ShaderCache.cpp @@ -743,9 +743,17 @@ static GXUberPipelineUid ApplyDriverBugs(const GXUberPipelineUid& in) { GXUberPipelineUid out; memcpy(&out, &in, sizeof(out)); // Copy padding - if (!g_ActiveConfig.backend_info.bSupportsDualSourceBlend || - (DriverDetails::HasBug(DriverDetails::BUG_BROKEN_DUAL_SOURCE_BLENDING) && - !out.blending_state.RequiresDualSrc())) + if (g_ActiveConfig.backend_info.bSupportsFramebufferFetch) + { + // Always blend in shader + out.blending_state.hex = 0; + out.blending_state.colorupdate = in.blending_state.colorupdate.Value(); + out.blending_state.alphaupdate = in.blending_state.alphaupdate.Value(); + out.ps_uid.GetUidData()->no_dual_src = true; + } + else if (!g_ActiveConfig.backend_info.bSupportsDualSourceBlend || + (DriverDetails::HasBug(DriverDetails::BUG_BROKEN_DUAL_SOURCE_BLENDING) && + !out.blending_state.RequiresDualSrc())) { out.blending_state.usedualsrc = false; out.ps_uid.GetUidData()->no_dual_src = true; -- cgit v1.2.3