mirror of
https://github.com/cemu-project/Cemu.git
synced 2024-11-29 12:34:17 +01:00
support cubemap arrays
This commit is contained in:
parent
5bc9913bf4
commit
7fb3e1bd1e
@ -42,7 +42,13 @@ LatteTextureMtl::LatteTextureMtl(class MetalRenderer* mtlRenderer, Latte::E_DIM
|
||||
textureType = MTL::TextureType3D;
|
||||
break;
|
||||
case Latte::E_DIM::DIM_CUBEMAP:
|
||||
textureType = MTL::TextureTypeCube; // TODO: check this
|
||||
if (effectiveBaseDepth % 6 != 0)
|
||||
debug_printf("cubemaps must have an array length multiple of 6, length: %u\n", effectiveBaseDepth);
|
||||
|
||||
if (effectiveBaseDepth <= 6)
|
||||
textureType = MTL::TextureTypeCube;
|
||||
else
|
||||
textureType = MTL::TextureTypeCubeArray;
|
||||
break;
|
||||
default:
|
||||
cemu_assert_unimplemented();
|
||||
@ -55,7 +61,11 @@ LatteTextureMtl::LatteTextureMtl(class MetalRenderer* mtlRenderer, Latte::E_DIM
|
||||
{
|
||||
desc->setDepth(effectiveBaseDepth);
|
||||
}
|
||||
else if (textureType == MTL::TextureTypeCube || textureType == MTL::TextureTypeCubeArray)
|
||||
else if (textureType == MTL::TextureTypeCube)
|
||||
{
|
||||
// Do notjing
|
||||
}
|
||||
else if (textureType == MTL::TextureTypeCubeArray)
|
||||
{
|
||||
desc->setArrayLength(effectiveBaseDepth / 6);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user