Support constant attributes (with a value of zero) (#1066)
* Support constant attributes (with a value of zero) * Remove extra line
This commit is contained in:
@@ -532,6 +532,7 @@ namespace Ryujinx.Graphics.Gpu.Engine
|
||||
vertexAttribs[index] = new VertexAttribDescriptor(
|
||||
vertexAttrib.UnpackBufferIndex(),
|
||||
vertexAttrib.UnpackOffset(),
|
||||
vertexAttrib.UnpackIsConstant(),
|
||||
format);
|
||||
}
|
||||
|
||||
|
@@ -16,6 +16,15 @@ namespace Ryujinx.Graphics.Gpu.State
|
||||
return (int)(Attribute & 0x1f);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Unpacks the attribute constant flag.
|
||||
/// </summary>
|
||||
/// <returns>True if the attribute is constant, false otherwise</returns>
|
||||
public bool UnpackIsConstant()
|
||||
{
|
||||
return (Attribute & 0x40) != 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Unpacks the offset, in bytes, of the attribute on the vertex buffer.
|
||||
/// </summary>
|
||||
|
Reference in New Issue
Block a user