From 0444e436542fa5e0f9eecb9f350eab256744da93 Mon Sep 17 00:00:00 2001 From: Samuliak Date: Sun, 19 May 2024 13:25:52 +0200 Subject: [PATCH] don't bind null vertex buffers --- src/Ryujinx.Graphics.Metal/EncoderStateManager.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/Ryujinx.Graphics.Metal/EncoderStateManager.cs b/src/Ryujinx.Graphics.Metal/EncoderStateManager.cs index 069c1da63..85d553433 100644 --- a/src/Ryujinx.Graphics.Metal/EncoderStateManager.cs +++ b/src/Ryujinx.Graphics.Metal/EncoderStateManager.cs @@ -565,12 +565,15 @@ namespace Ryujinx.Graphics.Metal 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(), - Offset = bufferDescriptors[i].Buffer.Offset, - Index = i - }); + buffers.Add(new BufferInfo + { + Handle = bufferDescriptors[i].Buffer.Handle.ToIntPtr(), + Offset = bufferDescriptors[i].Buffer.Offset, + Index = i + }); + } } SetBuffers(renderCommandEncoder, buffers);