Function Prototype

vkGetMemoryMetalHandleEXT

Get a Metal handle for a memory object

To export a Metal handle representing the payload of a Vulkan device memory object, call:

VkResult vkGetMemoryMetalHandleEXT(
    VkDevice device,
    const VkMemoryGetMetalHandleInfoEXT* pGetMetalHandleInfo,
    void** pHandle);
  • device is the logical device that created the device memory being exported.
  • pGetMetalHandleInfo is a pointer to a VkMemoryGetMetalHandleInfoEXT structure containing parameters of the export operation.
  • pHandle will return the Metal handle representing the payload of the device memory object.

Unless the app retains the handle object returned by the call, the lifespan will be the same as the associated VkDeviceMemory.

Valid Usage (Implicit)

VUID-vkGetMemoryMetalHandleEXT-pGetMetalHandleInfo-parameter

pGetMetalHandleInfo must be a valid pointer to a valid VkMemoryGetMetalHandleInfoEXT structure

VUID-vkGetMemoryMetalHandleEXT-pHandle-parameter

pHandle must be a valid pointer to a pointer value