From 7aa430f1a51fd793971992b4454540975222b848 Mon Sep 17 00:00:00 2001
From: gdkchan <gab.dark.100@gmail.com>
Date: Sun, 19 Feb 2023 22:37:37 -0300
Subject: Add support for advanced blend (part 1/2) (#2801)

* Add blend microcode registers

* Add advanced blend support using host extension

* Remove debug message

* Use pre-generated table for blend functions

* XML docs

* Rename AdvancedBlendMode to AdvancedBlendOp for consistency

* Remove redundant code

* Fix some advanced blend related issues on Vulkan

* Formatting
---
 .../Commands/SetBlendStateAdvancedCommand.cs           | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 Ryujinx.Graphics.GAL/Multithreading/Commands/SetBlendStateAdvancedCommand.cs

(limited to 'Ryujinx.Graphics.GAL/Multithreading/Commands/SetBlendStateAdvancedCommand.cs')

diff --git a/Ryujinx.Graphics.GAL/Multithreading/Commands/SetBlendStateAdvancedCommand.cs b/Ryujinx.Graphics.GAL/Multithreading/Commands/SetBlendStateAdvancedCommand.cs
new file mode 100644
index 00000000..2ec10a50
--- /dev/null
+++ b/Ryujinx.Graphics.GAL/Multithreading/Commands/SetBlendStateAdvancedCommand.cs
@@ -0,0 +1,18 @@
+namespace Ryujinx.Graphics.GAL.Multithreading.Commands
+{
+    struct SetBlendStateAdvancedCommand : IGALCommand, IGALCommand<SetBlendStateAdvancedCommand>
+    {
+        public CommandType CommandType => CommandType.SetBlendStateAdvanced;
+        private AdvancedBlendDescriptor _blend;
+
+        public void Set(AdvancedBlendDescriptor blend)
+        {
+            _blend = blend;
+        }
+
+        public static void Run(ref SetBlendStateAdvancedCommand command, ThreadedRenderer threaded, IRenderer renderer)
+        {
+            renderer.Pipeline.SetBlendState(command._blend);
+        }
+    }
+}
-- 
cgit v1.2.3-70-g09d2