aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.GAL/BlendFactor.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2023-04-05 00:25:19 -0300
committerGitHub <noreply@github.com>2023-04-05 05:25:19 +0200
commitc532118d94dea0bbafff7b92000c1a25cd4e021d (patch)
treee381eb2b7ca638d6c550eae8557da11325d5ba44 /Ryujinx.Graphics.GAL/BlendFactor.cs
parent52d6f2e656c21c3e6693df93a3f09cd2e6a4e40e (diff)
Use index fragment shader output when dual source blend is enabled (#4404)1.1.696
* 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 <Acoustik666@gmail.com>
Diffstat (limited to 'Ryujinx.Graphics.GAL/BlendFactor.cs')
-rw-r--r--Ryujinx.Graphics.GAL/BlendFactor.cs21
1 files changed, 21 insertions, 0 deletions
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