SetScissorsCommand.cs 655 B

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