Ver Fonte

Metal: Fixed 3d texture create (#3507)

attilaz há 2 semanas atrás
pai
commit
8a60697cfd
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      src/renderer_mtl.mm

+ 2 - 2
src/renderer_mtl.mm

@@ -3174,8 +3174,6 @@ BX_PRAGMA_DIAGNOSTIC_POP();
 				m_ptrStencil = s_renderMtl->m_device.newTextureWithDescriptor(desc);
 				m_ptrStencil = s_renderMtl->m_device.newTextureWithDescriptor(desc);
 			}
 			}
 
 
-			MTL_RELEASE(desc, 0);
-
 			uint8_t* temp = NULL;
 			uint8_t* temp = NULL;
 			if (convert)
 			if (convert)
 			{
 			{
@@ -3252,6 +3250,8 @@ BX_PRAGMA_DIAGNOSTIC_POP();
 					depth  >>= 1;
 					depth  >>= 1;
 				}
 				}
 			}
 			}
+			
+			MTL_RELEASE(desc, 0);
 
 
 			if (NULL != temp)
 			if (NULL != temp)
 			{
 			{