mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-01-09 08:29:21 +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);
|
effectiveBaseHeight = std::max(1, effectiveBaseHeight);
|
||||||
effectiveBaseDepth = std::max(1, effectiveBaseDepth);
|
effectiveBaseDepth = std::max(1, effectiveBaseDepth);
|
||||||
|
|
||||||
desc->setWidth(effectiveBaseWidth);
|
|
||||||
desc->setHeight(effectiveBaseHeight);
|
|
||||||
desc->setMipmapLevelCount(mipLevels);
|
|
||||||
|
|
||||||
MTL::TextureType textureType;
|
MTL::TextureType textureType;
|
||||||
switch (dim)
|
switch (dim)
|
||||||
{
|
{
|
||||||
case Latte::E_DIM::DIM_1D:
|
case Latte::E_DIM::DIM_1D:
|
||||||
textureType = MTL::TextureType1D;
|
textureType = MTL::TextureType1D;
|
||||||
|
effectiveBaseHeight = 1;
|
||||||
break;
|
break;
|
||||||
case Latte::E_DIM::DIM_2D:
|
case Latte::E_DIM::DIM_2D:
|
||||||
case Latte::E_DIM::DIM_2D_MSAA:
|
case Latte::E_DIM::DIM_2D_MSAA:
|
||||||
@ -59,6 +56,10 @@ LatteTextureMtl::LatteTextureMtl(class MetalRenderer* mtlRenderer, Latte::E_DIM
|
|||||||
}
|
}
|
||||||
desc->setTextureType(textureType);
|
desc->setTextureType(textureType);
|
||||||
|
|
||||||
|
desc->setWidth(effectiveBaseWidth);
|
||||||
|
desc->setHeight(effectiveBaseHeight);
|
||||||
|
desc->setMipmapLevelCount(mipLevels);
|
||||||
|
|
||||||
if (textureType == MTL::TextureType3D)
|
if (textureType == MTL::TextureType3D)
|
||||||
{
|
{
|
||||||
desc->setDepth(effectiveBaseDepth);
|
desc->setDepth(effectiveBaseDepth);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user