From c532118d94dea0bbafff7b92000c1a25cd4e021d Mon Sep 17 00:00:00 2001 From: gdkchan Date: Wed, 5 Apr 2023 00:25:19 -0300 Subject: Use index fragment shader output when dual source blend is enabled (#4404) * Use index fragment shader output when dual source blend is enabled * Shader cache version bump * Actually set DualSourceBlendEnabled to true * Fix XML doc --------- Co-authored-by: Ac_K --- Ryujinx.Graphics.GAL/BlendFactor.cs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'Ryujinx.Graphics.GAL/BlendFactor.cs') diff --git a/Ryujinx.Graphics.GAL/BlendFactor.cs b/Ryujinx.Graphics.GAL/BlendFactor.cs index 135873e9..4149ad51 100644 --- a/Ryujinx.Graphics.GAL/BlendFactor.cs +++ b/Ryujinx.Graphics.GAL/BlendFactor.cs @@ -38,4 +38,25 @@ namespace Ryujinx.Graphics.GAL Src1AlphaGl = 0xc902, OneMinusSrc1AlphaGl = 0xc903 } + + public static class BlendFactorExtensions + { + public static bool IsDualSource(this BlendFactor factor) + { + switch (factor) + { + case BlendFactor.Src1Color: + case BlendFactor.Src1ColorGl: + case BlendFactor.Src1Alpha: + case BlendFactor.Src1AlphaGl: + case BlendFactor.OneMinusSrc1Color: + case BlendFactor.OneMinusSrc1ColorGl: + case BlendFactor.OneMinusSrc1Alpha: + case BlendFactor.OneMinusSrc1AlphaGl: + return true; + } + + return false; + } + } } \ No newline at end of file -- cgit v1.2.3