aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.GAL/Multithreading/Commands/SetAlphaTestCommand.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Graphics.GAL/Multithreading/Commands/SetAlphaTestCommand.cs')
-rw-r--r--Ryujinx.Graphics.GAL/Multithreading/Commands/SetAlphaTestCommand.cs22
1 files changed, 22 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.GAL/Multithreading/Commands/SetAlphaTestCommand.cs b/Ryujinx.Graphics.GAL/Multithreading/Commands/SetAlphaTestCommand.cs
new file mode 100644
index 00000000..89379387
--- /dev/null
+++ b/Ryujinx.Graphics.GAL/Multithreading/Commands/SetAlphaTestCommand.cs
@@ -0,0 +1,22 @@
+namespace Ryujinx.Graphics.GAL.Multithreading.Commands
+{
+ struct SetAlphaTestCommand : IGALCommand
+ {
+ public CommandType CommandType => CommandType.SetAlphaTest;
+ private bool _enable;
+ private float _reference;
+ private CompareOp _op;
+
+ public void Set(bool enable, float reference, CompareOp op)
+ {
+ _enable = enable;
+ _reference = reference;
+ _op = op;
+ }
+
+ public static void Run(ref SetAlphaTestCommand command, ThreadedRenderer threaded, IRenderer renderer)
+ {
+ renderer.Pipeline.SetAlphaTest(command._enable, command._reference, command._op);
+ }
+ }
+}