using Ryujinx.Graphics.GAL;
using Ryujinx.Graphics.Gpu.Shader;
namespace Ryujinx.Graphics.Gpu.Engine.Threed
{
///
/// Draw state.
///
class DrawState
{
///
/// First index to be used for the draw on the index buffer.
///
public int FirstIndex;
///
/// Number of indices to be used for the draw on the index buffer.
///
public int IndexCount;
///
/// First vertex used on non-indexed draws. This value is stored somewhere else on indexed draws.
///
public int DrawFirstVertex;
///
/// Vertex count used on non-indexed draws. Indexed draws have a index count instead.
///
public int DrawVertexCount;
///
/// Indicates if the next draw will be a indexed draw.
///
public bool DrawIndexed;
///
/// Indicates if the next draw will be a indirect draw.
///
public bool DrawIndirect;
///
/// Indicates that the draw is using the draw parameters on the 3D engine state, rather than inline parameters submitted with the draw command.
///
public bool DrawUsesEngineState;
///
/// Indicates if any of the currently used vertex shaders reads the instance ID.
///
public bool VsUsesInstanceId;
///
/// Indicates if any of the currently used vertex buffers is instanced.
///
public bool IsAnyVbInstanced;
///
/// Primitive topology for the next draw.
///
public PrimitiveTopology Topology;
///
/// Index buffer data streamer for inline index buffer updates, such as those used in legacy OpenGL.
///
public IbStreamer IbStreamer = new();
///
/// If the vertex shader is emulated on compute, this should be set to the compute program, otherwise it should be null.
///
public ShaderAsCompute VertexAsCompute;
///
/// If a geometry shader exists and is emulated on compute, this should be set to the compute program, otherwise it should be null.
///
public ShaderAsCompute GeometryAsCompute;
///
/// If the vertex shader is emulated on compute, this should be set to the passthrough vertex program, otherwise it should be null.
///
public IProgram VertexPassthrough;
}
}