mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2024-12-27 11:03:04 +00:00
Fix cubemap array length
Fixes crash in Sonic Frontiers
This commit is contained in:
parent
691b0de6e1
commit
d5502b02b1
1 changed files with 8 additions and 1 deletions
|
@ -34,9 +34,16 @@ namespace Ryujinx.Graphics.Metal
|
||||||
descriptor.Depth = (ulong)Info.Depth;
|
descriptor.Depth = (ulong)Info.Depth;
|
||||||
}
|
}
|
||||||
else if (info.Target != Target.Cubemap)
|
else if (info.Target != Target.Cubemap)
|
||||||
|
{
|
||||||
|
if (info.Target == Target.CubemapArray)
|
||||||
|
{
|
||||||
|
descriptor.ArrayLength = (ulong)(Info.Depth / 6);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
descriptor.ArrayLength = (ulong)Info.Depth;
|
descriptor.ArrayLength = (ulong)Info.Depth;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
MTLTextureSwizzleChannels swizzle = GetSwizzle(info, descriptor.PixelFormat);
|
MTLTextureSwizzleChannels swizzle = GetSwizzle(info, descriptor.PixelFormat);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue