/ src / Ryujinx.Graphics.Gpu / Engine / Threed / DrawState.cs
DrawState.cs
 1  using Ryujinx.Graphics.GAL;
 2  using Ryujinx.Graphics.Gpu.Shader;
 3  
 4  namespace Ryujinx.Graphics.Gpu.Engine.Threed
 5  {
 6      /// <summary>
 7      /// Draw state.
 8      /// </summary>
 9      class DrawState
10      {
11          /// <summary>
12          /// First index to be used for the draw on the index buffer.
13          /// </summary>
14          public int FirstIndex;
15  
16          /// <summary>
17          /// Number of indices to be used for the draw on the index buffer.
18          /// </summary>
19          public int IndexCount;
20  
21          /// <summary>
22          /// First vertex used on non-indexed draws. This value is stored somewhere else on indexed draws.
23          /// </summary>
24          public int DrawFirstVertex;
25  
26          /// <summary>
27          /// Vertex count used on non-indexed draws. Indexed draws have a index count instead.
28          /// </summary>
29          public int DrawVertexCount;
30  
31          /// <summary>
32          /// Indicates if the next draw will be a indexed draw.
33          /// </summary>
34          public bool DrawIndexed;
35  
36          /// <summary>
37          /// Indicates if the next draw will be a indirect draw.
38          /// </summary>
39          public bool DrawIndirect;
40  
41          /// <summary>
42          /// Indicates that the draw is using the draw parameters on the 3D engine state, rather than inline parameters submitted with the draw command.
43          /// </summary>
44          public bool DrawUsesEngineState;
45  
46          /// <summary>
47          /// Indicates if any of the currently used vertex shaders reads the instance ID.
48          /// </summary>
49          public bool VsUsesInstanceId;
50  
51          /// <summary>
52          /// Indicates if any of the currently used vertex buffers is instanced.
53          /// </summary>
54          public bool IsAnyVbInstanced;
55  
56          /// <summary>
57          /// Primitive topology for the next draw.
58          /// </summary>
59          public PrimitiveTopology Topology;
60  
61          /// <summary>
62          /// Index buffer data streamer for inline index buffer updates, such as those used in legacy OpenGL.
63          /// </summary>
64          public IbStreamer IbStreamer = new();
65  
66          /// <summary>
67          /// If the vertex shader is emulated on compute, this should be set to the compute program, otherwise it should be null.
68          /// </summary>
69          public ShaderAsCompute VertexAsCompute;
70  
71          /// <summary>
72          /// If a geometry shader exists and is emulated on compute, this should be set to the compute program, otherwise it should be null.
73          /// </summary>
74          public ShaderAsCompute GeometryAsCompute;
75  
76          /// <summary>
77          /// If the vertex shader is emulated on compute, this should be set to the passthrough vertex program, otherwise it should be null.
78          /// </summary>
79          public IProgram VertexPassthrough;
80      }
81  }