mirror of
https://github.com/cemu-project/Cemu.git
synced 2024-12-01 13:34:18 +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;
|
textureType = MTL::TextureType3D;
|
||||||
break;
|
break;
|
||||||
case Latte::E_DIM::DIM_CUBEMAP:
|
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;
|
break;
|
||||||
default:
|
default:
|
||||||
cemu_assert_unimplemented();
|
cemu_assert_unimplemented();
|
||||||
@ -55,7 +61,11 @@ LatteTextureMtl::LatteTextureMtl(class MetalRenderer* mtlRenderer, Latte::E_DIM
|
|||||||
{
|
{
|
||||||
desc->setDepth(effectiveBaseDepth);
|
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);
|
desc->setArrayLength(effectiveBaseDepth / 6);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user