0
0
Fork 0
mirror of https://github.com/GreemDev/Ryujinx.git synced 2024-12-23 01:05:47 +00:00

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 691b0de6e1
commit d5502b02b1

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);