aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.GAL/Multithreading/Commands/SetScissorsCommand.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Graphics.GAL/Multithreading/Commands/SetScissorsCommand.cs')
-rw-r--r--Ryujinx.Graphics.GAL/Multithreading/Commands/SetScissorsCommand.cs22
1 files changed, 22 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.GAL/Multithreading/Commands/SetScissorsCommand.cs b/Ryujinx.Graphics.GAL/Multithreading/Commands/SetScissorsCommand.cs
new file mode 100644
index 00000000..6966df6d
--- /dev/null
+++ b/Ryujinx.Graphics.GAL/Multithreading/Commands/SetScissorsCommand.cs
@@ -0,0 +1,22 @@
+using Ryujinx.Graphics.GAL.Multithreading.Model;
+
+namespace Ryujinx.Graphics.GAL.Multithreading.Commands
+{
+ struct SetScissorsCommand : IGALCommand
+ {
+ public CommandType CommandType => CommandType.SetScissor;
+ private SpanRef<Rectangle<int>> _scissors;
+
+ public void Set(SpanRef<Rectangle<int>> scissors)
+ {
+ _scissors = scissors;
+ }
+
+ public static void Run(ref SetScissorsCommand command, ThreadedRenderer threaded, IRenderer renderer)
+ {
+ renderer.Pipeline.SetScissors(command._scissors.Get(threaded));
+
+ command._scissors.Dispose(threaded);
+ }
+ }
+}