C Specification

To import, or create, a Metal IOSurfaceRef object to underlie a VkImage object, include a VkImportMetalIOSurfaceInfoEXT structure in the pNext chain of the VkImageCreateInfo structure in a vkCreateImage command.

The VkImportMetalIOSurfaceInfoEXT structure is defined as:

// Provided by VK_EXT_metal_objects
typedef struct VkImportMetalIOSurfaceInfoEXT {
    VkStructureType    sType;
    const void*        pNext;
    IOSurfaceRef       ioSurface;
} VkImportMetalIOSurfaceInfoEXT;



If ioSurface is not VK_NULL_HANDLE, it will be used to underlie the VkImage. If ioSurface is VK_NULL_HANDLE, the implementation will create a new IOSurface to underlie the VkImage.

If provided, the app must ensure that the configuration of the IOSurfaceRef object is compatible with the configuration of the VkImage. Failure to do so results in undefined behavior.

Valid Usage (Implicit)
  • VUID-VkImportMetalIOSurfaceInfoEXT-sType-sType

See Also

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 2014-2023 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0