1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-12-19 13:12:01 +00:00

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 Isaac Marovitz
parent ca30248d97
commit f58920b944

View file

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