Dont set 0 attributes
This commit is contained in:
parent
8232ce7d72
commit
c58cc76b39
1 changed files with 7 additions and 7 deletions
|
@ -105,10 +105,9 @@ namespace Ryujinx.Graphics.Metal
|
||||||
|
|
||||||
public void UpdateVertexAttributes(ReadOnlySpan<VertexAttribDescriptor> vertexAttribs)
|
public void UpdateVertexAttributes(ReadOnlySpan<VertexAttribDescriptor> vertexAttribs)
|
||||||
{
|
{
|
||||||
// Reset Vertex Descriptor
|
|
||||||
_vertexDescriptor.Reset();
|
|
||||||
|
|
||||||
for (int i = 0; i < vertexAttribs.Length; i++)
|
for (int i = 0; i < vertexAttribs.Length; i++)
|
||||||
|
{
|
||||||
|
if (!vertexAttribs[i].IsZero)
|
||||||
{
|
{
|
||||||
// TODO: Format should not be hardcoded
|
// TODO: Format should not be hardcoded
|
||||||
_vertexDescriptor.Attributes.Object((ulong)i).Format = MTLVertexFormat.Float4;
|
_vertexDescriptor.Attributes.Object((ulong)i).Format = MTLVertexFormat.Float4;
|
||||||
|
@ -116,6 +115,7 @@ namespace Ryujinx.Graphics.Metal
|
||||||
_vertexDescriptor.Attributes.Object((ulong)i).Offset = (ulong)vertexAttribs[i].Offset;
|
_vertexDescriptor.Attributes.Object((ulong)i).Offset = (ulong)vertexAttribs[i].Offset;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void UpdateVertexBuffers(ReadOnlySpan<VertexBufferDescriptor> vertexBuffers)
|
public void UpdateVertexBuffers(ReadOnlySpan<VertexBufferDescriptor> vertexBuffers)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue