DrawState.cs 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. using Ryujinx.Graphics.GAL;
  2. namespace Ryujinx.Graphics.Gpu.Engine.Threed
  3. {
  4. /// <summary>
  5. /// Draw state.
  6. /// </summary>
  7. class DrawState
  8. {
  9. /// <summary>
  10. /// First index to be used for the draw on the index buffer.
  11. /// </summary>
  12. public int FirstIndex;
  13. /// <summary>
  14. /// Number of indices to be used for the draw on the index buffer.
  15. /// </summary>
  16. public int IndexCount;
  17. /// <summary>
  18. /// First vertex used on non-indexed draws. This value is stored somewhere else on indexed draws.
  19. /// </summary>
  20. public int DrawFirstVertex;
  21. /// <summary>
  22. /// Vertex count used on non-indexed draws. Indexed draws have a index count instead.
  23. /// </summary>
  24. public int DrawVertexCount;
  25. /// <summary>
  26. /// Indicates if the next draw will be a indexed draw.
  27. /// </summary>
  28. public bool DrawIndexed;
  29. /// <summary>
  30. /// Indicates if the next draw will be a indirect draw.
  31. /// </summary>
  32. public bool DrawIndirect;
  33. /// <summary>
  34. /// Indicates if any of the currently used vertex shaders reads the instance ID.
  35. /// </summary>
  36. public bool VsUsesInstanceId;
  37. /// <summary>
  38. /// Indicates if any of the currently used vertex buffers is instanced.
  39. /// </summary>
  40. public bool IsAnyVbInstanced;
  41. /// <summary>
  42. /// Indicates that the draw is writing the base vertex, base instance and draw index to Constant Buffer 0.
  43. /// </summary>
  44. public bool HasConstantBufferDrawParameters;
  45. /// <summary>
  46. /// Primitive topology for the next draw.
  47. /// </summary>
  48. public PrimitiveTopology Topology;
  49. /// <summary>
  50. /// Index buffer data streamer for inline index buffer updates, such as those used in legacy OpenGL.
  51. /// </summary>
  52. public IbStreamer IbStreamer = new IbStreamer();
  53. }
  54. }