mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-01-07 15:48:15 +01:00
limit height to 1 for 1D textures
This commit is contained in:
parent
8a8037377f
commit
b48656850e
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user