don't bind null vertex buffers

This commit is contained in:
Samuliak 2024-05-19 13:25:52 +02:00 committed by Isaac Marovitz
parent ccce85e1bb
commit 0444e43654

View file

@ -565,12 +565,15 @@ namespace Ryujinx.Graphics.Metal
for (int i = 0; i < bufferDescriptors.Length; i++) for (int i = 0; i < bufferDescriptors.Length; i++)
{ {
buffers.Add(new BufferInfo if (bufferDescriptors[i].Buffer.Handle.ToIntPtr() != IntPtr.Zero)
{ {
Handle = bufferDescriptors[i].Buffer.Handle.ToIntPtr(), buffers.Add(new BufferInfo
Offset = bufferDescriptors[i].Buffer.Offset, {
Index = i Handle = bufferDescriptors[i].Buffer.Handle.ToIntPtr(),
}); Offset = bufferDescriptors[i].Buffer.Offset,
Index = i
});
}
} }
SetBuffers(renderCommandEncoder, buffers); SetBuffers(renderCommandEncoder, buffers);