DrawIndexedCommand.cs 848 B

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