vkGetMemoryMetalHandleEXT(3)

# vkGetMemoryMetalHandleEXT(3) Manual Page

## Name

vkGetMemoryMetalHandleEXT - Get a Metal handle for a memory object

## C Specification

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

    // Provided by VK_EXT_external_memory_metal
    VkResult vkGetMemoryMetalHandleEXT(
        VkDevice                                    device,
        const VkMemoryGetMetalHandleInfoEXT*        pGetMetalHandleInfo,
        void**                                      pHandle);

## Parameters

- `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.

## Description

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-device-parameter
  `device` must be a valid VkDevice handle

- 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

Return Codes

On success, this command returns

  - VK_SUCCESS

On failure, this command returns

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_TOO_MANY_OBJECTS

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

## See Also

VK_EXT_external_memory_metal, VkDevice, VkMemoryGetMetalHandleInfoEXT

## Document Notes

For more information, see the Vulkan Specification.

This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.

## Copyright

Copyright 2014-2026 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0