/ src / Ryujinx.Graphics.GAL / Multithreading / Commands / SetRenderTargetColorMasksCommand.cs
SetRenderTargetColorMasksCommand.cs
 1  using Ryujinx.Graphics.GAL.Multithreading.Model;
 2  using System;
 3  
 4  namespace Ryujinx.Graphics.GAL.Multithreading.Commands
 5  {
 6      struct SetRenderTargetColorMasksCommand : IGALCommand, IGALCommand<SetRenderTargetColorMasksCommand>
 7      {
 8          public readonly CommandType CommandType => CommandType.SetRenderTargetColorMasks;
 9          private SpanRef<uint> _componentMask;
10  
11          public void Set(SpanRef<uint> componentMask)
12          {
13              _componentMask = componentMask;
14          }
15  
16          public static void Run(ref SetRenderTargetColorMasksCommand command, ThreadedRenderer threaded, IRenderer renderer)
17          {
18              ReadOnlySpan<uint> componentMask = command._componentMask.Get(threaded);
19              renderer.Pipeline.SetRenderTargetColorMasks(componentMask);
20              command._componentMask.Dispose(threaded);
21          }
22      }
23  }