[[platformCreateSurface_metal,platformCreateSurface_metal]] === Metal Platform [open,refpage='vkCreateMetalSurfaceEXT',desc='Create a VkSurfaceKHR object for CAMetalLayer',type='protos'] -- To create a sname:VkSurfaceKHR object for a dlink:CAMetalLayer, call: include::{generated}/api/protos/vkCreateMetalSurfaceEXT.txt[] * pname:instance is the instance with which to associate the surface. * pname:pCreateInfo is a pointer to an instance of the slink:VkMetalSurfaceCreateInfoEXT structure containing the parameters affecting the creation of the surface object. * pname:pAllocator is the allocator used for host memory allocated for the surface object when there is no more specific allocator available (see <>). * pname:pSurface points to a sname:VkSurfaceKHR handle in which the created surface object is returned. include::{generated}/validity/protos/vkCreateMetalSurfaceEXT.txt[] -- [open,refpage='VkMetalSurfaceCreateInfoEXT',desc='Structure specifying parameters of a newly created Metal surface object',type='structs'] -- The slink:VkMetalSurfaceCreateInfoEXT structure is defined as: include::{generated}/api/structs/VkMetalSurfaceCreateInfoEXT.txt[] * pname:sType is the type of this structure. * pname:pNext is `NULL` or a pointer to an extension-specific structure. * pname:flags is reserved for future use. * pname:pLayer is a reference to a dlink:CAMetalLayer object that represents a renderable surface. .Valid Usage **** **** include::{generated}/validity/structs/VkMetalSurfaceCreateInfoEXT.txt[] -- [open,refpage='CAMetalLayer',desc='CoreAnimation native layer type for Metal',type='defines'] -- To remove an unnecessary compile-time dependency, an incomplete type definition of dlink:CAMetalLayer is provided in the Vulkan headers: include::{generated}/api/defines/CAMetalLayer.txt[] The actual dlink:CAMetalLayer type is defined in the QuartzCore framework. --