DrawCommand.cs 1012 B

1234567891011121314151617181920212223242526
  1. namespace Ryujinx.Graphics.GAL.Multithreading.Commands
  2. {
  3. struct DrawIndexedCommand : IGALCommand, IGALCommand<DrawIndexedCommand>
  4. {
  5. public CommandType CommandType => CommandType.DrawIndexed;
  6. private int _indexCount;
  7. private int _instanceCount;
  8. private int _firstIndex;
  9. private int _firstVertex;
  10. private int _firstInstance;
  11. public void Set(int indexCount, int instanceCount, int firstIndex, int firstVertex, int firstInstance)
  12. {
  13. _indexCount = indexCount;
  14. _instanceCount = instanceCount;
  15. _firstIndex = firstIndex;
  16. _firstVertex = firstVertex;
  17. _firstInstance = firstInstance;
  18. }
  19. public static void Run(ref DrawIndexedCommand command, ThreadedRenderer threaded, IRenderer renderer)
  20. {
  21. renderer.Pipeline.DrawIndexed(command._indexCount, command._instanceCount, command._firstIndex, command._firstVertex, command._firstInstance);
  22. }
  23. }
  24. }