mirror of https://github.com/Ryujinx/Ryujinx.git
Dont set 0 attributes
This commit is contained in:
parent
bb09ab818c
commit
91c040d649
|
@ -105,15 +105,15 @@ 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++)
|
||||||
{
|
{
|
||||||
// TODO: Format should not be hardcoded
|
if (!vertexAttribs[i].IsZero)
|
||||||
_vertexDescriptor.Attributes.Object((ulong)i).Format = MTLVertexFormat.Float4;
|
{
|
||||||
_vertexDescriptor.Attributes.Object((ulong)i).BufferIndex = (ulong)vertexAttribs[i].BufferIndex;
|
// TODO: Format should not be hardcoded
|
||||||
_vertexDescriptor.Attributes.Object((ulong)i).Offset = (ulong)vertexAttribs[i].Offset;
|
_vertexDescriptor.Attributes.Object((ulong)i).Format = MTLVertexFormat.Float4;
|
||||||
|
_vertexDescriptor.Attributes.Object((ulong)i).BufferIndex = (ulong)vertexAttribs[i].BufferIndex;
|
||||||
|
_vertexDescriptor.Attributes.Object((ulong)i).Offset = (ulong)vertexAttribs[i].Offset;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue