SetScissorsCommand.cs
1 using Ryujinx.Graphics.GAL.Multithreading.Model; 2 3 namespace Ryujinx.Graphics.GAL.Multithreading.Commands 4 { 5 struct SetScissorsCommand : IGALCommand, IGALCommand<SetScissorsCommand> 6 { 7 public readonly CommandType CommandType => CommandType.SetScissor; 8 private SpanRef<Rectangle<int>> _scissors; 9 10 public void Set(SpanRef<Rectangle<int>> scissors) 11 { 12 _scissors = scissors; 13 } 14 15 public static void Run(ref SetScissorsCommand command, ThreadedRenderer threaded, IRenderer renderer) 16 { 17 renderer.Pipeline.SetScissors(command._scissors.Get(threaded)); 18 19 command._scissors.Dispose(threaded); 20 } 21 } 22 }