aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.GAL/Multithreading/Commands/SetScissorCommand.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Graphics.GAL/Multithreading/Commands/SetScissorCommand.cs')
-rw-r--r--Ryujinx.Graphics.GAL/Multithreading/Commands/SetScissorCommand.cs28
1 files changed, 28 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.GAL/Multithreading/Commands/SetScissorCommand.cs b/Ryujinx.Graphics.GAL/Multithreading/Commands/SetScissorCommand.cs
new file mode 100644
index 00000000..6c95d096
--- /dev/null
+++ b/Ryujinx.Graphics.GAL/Multithreading/Commands/SetScissorCommand.cs
@@ -0,0 +1,28 @@
+namespace Ryujinx.Graphics.GAL.Multithreading.Commands
+{
+ struct SetScissorCommand : IGALCommand
+ {
+ public CommandType CommandType => CommandType.SetScissor;
+ private int _index;
+ private bool _enable;
+ private int _x;
+ private int _y;
+ private int _width;
+ private int _height;
+
+ public void Set(int index, bool enable, int x, int y, int width, int height)
+ {
+ _index = index;
+ _enable = enable;
+ _x = x;
+ _y = y;
+ _width = width;
+ _height = height;
+ }
+
+ public static void Run(ref SetScissorCommand command, ThreadedRenderer threaded, IRenderer renderer)
+ {
+ renderer.Pipeline.SetScissor(command._index, command._enable, command._x, command._y, command._width, command._height);
+ }
+ }
+}