SetScissorCommand.cs 870 B

12345678910111213141516171819202122232425262728
  1. namespace Ryujinx.Graphics.GAL.Multithreading.Commands
  2. {
  3. struct SetScissorCommand : IGALCommand
  4. {
  5. public CommandType CommandType => CommandType.SetScissor;
  6. private int _index;
  7. private bool _enable;
  8. private int _x;
  9. private int _y;
  10. private int _width;
  11. private int _height;
  12. public void Set(int index, bool enable, int x, int y, int width, int height)
  13. {
  14. _index = index;
  15. _enable = enable;
  16. _x = x;
  17. _y = y;
  18. _width = width;
  19. _height = height;
  20. }
  21. public static void Run(ref SetScissorCommand command, ThreadedRenderer threaded, IRenderer renderer)
  22. {
  23. renderer.Pipeline.SetScissor(command._index, command._enable, command._x, command._y, command._width, command._height);
  24. }
  25. }
  26. }