diff --git a/src/Cafe/HW/Latte/Renderer/Metal/LatteTextureMtl.cpp b/src/Cafe/HW/Latte/Renderer/Metal/LatteTextureMtl.cpp index 03cd9285..d8c52d4d 100644 --- a/src/Cafe/HW/Latte/Renderer/Metal/LatteTextureMtl.cpp +++ b/src/Cafe/HW/Latte/Renderer/Metal/LatteTextureMtl.cpp @@ -27,15 +27,12 @@ LatteTextureMtl::LatteTextureMtl(class MetalRenderer* mtlRenderer, Latte::E_DIM effectiveBaseHeight = std::max(1, effectiveBaseHeight); effectiveBaseDepth = std::max(1, effectiveBaseDepth); - desc->setWidth(effectiveBaseWidth); - desc->setHeight(effectiveBaseHeight); - desc->setMipmapLevelCount(mipLevels); - MTL::TextureType textureType; switch (dim) { case Latte::E_DIM::DIM_1D: textureType = MTL::TextureType1D; + effectiveBaseHeight = 1; break; case Latte::E_DIM::DIM_2D: case Latte::E_DIM::DIM_2D_MSAA: @@ -59,6 +56,10 @@ LatteTextureMtl::LatteTextureMtl(class MetalRenderer* mtlRenderer, Latte::E_DIM } desc->setTextureType(textureType); + desc->setWidth(effectiveBaseWidth); + desc->setHeight(effectiveBaseHeight); + desc->setMipmapLevelCount(mipLevels); + if (textureType == MTL::TextureType3D) { desc->setDepth(effectiveBaseDepth);