namespace Ryujinx.Graphics.Gpu.State
{
///
/// Vertex buffer attribute state.
///
struct VertexAttribState
{
public uint Attribute;
///
/// Unpacks the index of the vertex buffer this attribute belongs to.
///
/// Vertex buffer index
public int UnpackBufferIndex()
{
return (int)(Attribute & 0x1f);
}
///
/// Unpacks the offset, in bytes, of the attribute on the vertex buffer.
///
/// Attribute offset in bytes
public int UnpackOffset()
{
return (int)((Attribute >> 7) & 0x3fff);
}
///
/// Unpacks the Maxwell attribute format integer.
///
/// Attribute format integer
public uint UnpackFormat()
{
return Attribute & 0x3fe00000;
}
}
}