only set array length for texture arrays

This commit is contained in:
Samuliak 2024-11-20 19:30:30 +01:00
parent fda2f40640
commit 9095035532
No known key found for this signature in database

View File

@ -64,15 +64,11 @@ LatteTextureMtl::LatteTextureMtl(class MetalRenderer* mtlRenderer, Latte::E_DIM
{ {
desc->setDepth(effectiveBaseDepth); desc->setDepth(effectiveBaseDepth);
} }
else if (textureType == MTL::TextureTypeCube)
{
// Do nothing
}
else if (textureType == MTL::TextureTypeCubeArray) else if (textureType == MTL::TextureTypeCubeArray)
{ {
desc->setArrayLength(effectiveBaseDepth / 6); desc->setArrayLength(effectiveBaseDepth / 6);
} }
else else if (textureType == MTL::TextureType2DArray)
{ {
desc->setArrayLength(effectiveBaseDepth); desc->setArrayLength(effectiveBaseDepth);
} }