C Specification

To export a Metal MTLTexture object underlying a VkImage, VkImageView, or VkBufferView object, include a VkExportMetalTextureInfoEXT structure in the pNext chain of the pMetalObjectsInfo parameter of a vkExportMetalObjectsEXT call.

The VkExportMetalTextureInfoEXT structure is defined as:

// Provided by VK_EXT_metal_objects
typedef struct VkExportMetalTextureInfoEXT {
    VkStructureType          sType;
    const void*              pNext;
    VkImage                  image;
    VkImageView              imageView;
    VkBufferView             bufferView;
    VkImageAspectFlagBits    plane;
    MTLTexture_id            mtlTexture;
} VkExportMetalTextureInfoEXT;

Members

  • sType is the type of this structure.

  • pNext is NULL or a pointer to a structure extending this structure.

  • image is VK_NULL_HANDLE or a VkImage.

  • imageView is VK_NULL_HANDLE or a VkImageView.

  • bufferView is VK_NULL_HANDLE or a VkBufferView.

  • plane indicates the plane of a multi-planar VkImage or VkImageView.

  • mtlTexture is the Metal id<MTLTexture> object underlying the VkImage, VkImageView, or VkBufferView object in image, imageView, or bufferView, respectively, at the plane indicated in aspectMask. The implementation will return the MTLTexture in this member, or it will return NULL if no MTLTexture could be found underlying the VkImage, VkImageView, or VkBufferView object, at the plane indicated in aspectMask.

Description

Valid Usage (Implicit)
  • VUID-VkExportMetalTextureInfoEXT-sType-sType
    sType must be VK_STRUCTURE_TYPE_EXPORT_METAL_TEXTURE_INFO_EXT

  • VUID-VkExportMetalTextureInfoEXT-image-parameter
    If image is not VK_NULL_HANDLE, image must be a valid VkImage handle

  • VUID-VkExportMetalTextureInfoEXT-imageView-parameter
    If imageView is not VK_NULL_HANDLE, imageView must be a valid VkImageView handle

  • VUID-VkExportMetalTextureInfoEXT-bufferView-parameter
    If bufferView is not VK_NULL_HANDLE, bufferView must be a valid VkBufferView handle

  • VUID-VkExportMetalTextureInfoEXT-plane-parameter
    plane must be a valid VkImageAspectFlagBits value

  • VUID-VkExportMetalTextureInfoEXT-commonparent
    Each of bufferView, image, and imageView that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice

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

SPDX-License-Identifier: CC-BY-4.0