mirror of
https://github.com/cemu-project/Cemu.git
synced 2024-12-01 21:44:17 +01:00
make all textures be at least 1x1x1
This commit is contained in:
parent
45737e82d9
commit
c4eb195797
@ -22,6 +22,8 @@ LatteTextureMtl::LatteTextureMtl(class MetalRenderer* mtlRenderer, Latte::E_DIM
|
||||
effectiveBaseHeight = overwriteInfo.height;
|
||||
effectiveBaseDepth = overwriteInfo.depth;
|
||||
}
|
||||
effectiveBaseWidth = std::max(1, effectiveBaseWidth);
|
||||
effectiveBaseHeight = std::max(1, effectiveBaseHeight);
|
||||
effectiveBaseDepth = std::max(1, effectiveBaseDepth);
|
||||
|
||||
desc->setWidth(effectiveBaseWidth);
|
||||
|
@ -61,14 +61,14 @@ MetalRenderer::MetalRenderer()
|
||||
// Null resources
|
||||
MTL::TextureDescriptor* textureDescriptor = MTL::TextureDescriptor::alloc()->init();
|
||||
textureDescriptor->setTextureType(MTL::TextureType1D);
|
||||
textureDescriptor->setWidth(4);
|
||||
textureDescriptor->setWidth(1);
|
||||
m_nullTexture1D = m_device->newTexture(textureDescriptor);
|
||||
#ifdef CEMU_DEBUG_ASSERT
|
||||
m_nullTexture1D->setLabel(GetLabel("Null texture 1D", m_nullTexture1D));
|
||||
#endif
|
||||
|
||||
textureDescriptor->setTextureType(MTL::TextureType2D);
|
||||
textureDescriptor->setHeight(4);
|
||||
textureDescriptor->setHeight(1);
|
||||
m_nullTexture2D = m_device->newTexture(textureDescriptor);
|
||||
#ifdef CEMU_DEBUG_ASSERT
|
||||
m_nullTexture2D->setLabel(GetLabel("Null texture 2D", m_nullTexture2D));
|
||||
|
Loading…
Reference in New Issue
Block a user