فهرست منبع

metal - texture array creation bug fix (#1144)

attilaz 8 سال پیش
والد
کامیت
c9ab2af0e2
1فایلهای تغییر یافته به همراه1 افزوده شده و 2 حذف شده
  1. 1 2
      src/renderer_mtl.mm

+ 1 - 2
src/renderer_mtl.mm

@@ -2438,8 +2438,6 @@ namespace bgfx { namespace mtl
 					desc.textureType = MTLTextureType2DArray;
 					m_type = Texture2D;
 				}
-
-				desc.arrayLength = numLayers;
 			}
 			else if (imageContainer.m_cubeMap)
 			{
@@ -2505,6 +2503,7 @@ namespace bgfx { namespace mtl
 			desc.depth  = bx::uint32_max(1,imageContainer.m_depth);
 			desc.mipmapLevelCount = imageContainer.m_numMips;
 			desc.sampleCount      = 1;
+			desc.arrayLength = numLayers;
 
 			if (s_renderMtl->m_iOS9Runtime || s_renderMtl->m_macOS11Runtime)
 			{