Fix cubemap array length

Fixes crash in Sonic Frontiers
This commit is contained in:
Isaac Marovitz 2024-09-06 13:33:35 +02:00 committed by Isaac Marovitz
parent 117f1d1a0c
commit 61cfd8e72f
1 changed files with 8 additions and 1 deletions

View File

@ -34,9 +34,16 @@ namespace Ryujinx.Graphics.Metal
descriptor.Depth = (ulong)Info.Depth;
}
else if (info.Target != Target.Cubemap)
{
if (info.Target == Target.CubemapArray)
{
descriptor.ArrayLength = (ulong)(Info.Depth / 6);
}
else
{
descriptor.ArrayLength = (ulong)Info.Depth;
}
}
MTLTextureSwizzleChannels swizzle = GetSwizzle(info, descriptor.PixelFormat);