Check for null resources before declaring them resident

This commit is contained in:
Isaac Marovitz 2024-09-08 01:29:36 +02:00 committed by Evan Husted
parent fe4c77788f
commit 89c05ac239

View File

@ -292,9 +292,12 @@ namespace Ryujinx.Graphics.Metal
}
foreach (var resource in _currentState.RenderEncoderResources.Resources)
{
if (resource.MtlResource.NativePtr != IntPtr.Zero)
{
renderCommandEncoder.UseResource(resource.MtlResource, resource.ResourceUsage, resource.Stages);
}
}
foreach (var buffer in _currentState.RenderEncoderResources.VertexBuffers)
{