aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Graphics.GAL/Multithreading/Commands/SetRenderTargetColorMasksCommand.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Ryujinx.Graphics.GAL/Multithreading/Commands/SetRenderTargetColorMasksCommand.cs')
-rw-r--r--src/Ryujinx.Graphics.GAL/Multithreading/Commands/SetRenderTargetColorMasksCommand.cs23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/Ryujinx.Graphics.GAL/Multithreading/Commands/SetRenderTargetColorMasksCommand.cs b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/SetRenderTargetColorMasksCommand.cs
new file mode 100644
index 00000000..c247ff3a
--- /dev/null
+++ b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/SetRenderTargetColorMasksCommand.cs
@@ -0,0 +1,23 @@
+using Ryujinx.Graphics.GAL.Multithreading.Model;
+using System;
+
+namespace Ryujinx.Graphics.GAL.Multithreading.Commands
+{
+ struct SetRenderTargetColorMasksCommand : IGALCommand, IGALCommand<SetRenderTargetColorMasksCommand>
+ {
+ public CommandType CommandType => CommandType.SetRenderTargetColorMasks;
+ private SpanRef<uint> _componentMask;
+
+ public void Set(SpanRef<uint> componentMask)
+ {
+ _componentMask = componentMask;
+ }
+
+ public static void Run(ref SetRenderTargetColorMasksCommand command, ThreadedRenderer threaded, IRenderer renderer)
+ {
+ ReadOnlySpan<uint> componentMask = command._componentMask.Get(threaded);
+ renderer.Pipeline.SetRenderTargetColorMasks(componentMask);
+ command._componentMask.Dispose(threaded);
+ }
+ }
+}