VkImportMetalTextureInfoEXT(3)

# VkImportMetalTextureInfoEXT(3) Manual Page

## Name

VkImportMetalTextureInfoEXT - Structure that identifies Metal MTLTexture objects to use when creating a VkImage.

Loading… please wait.

## C Specification

To import one or more existing Metal `MTLTexture` objects to underlie a VkImage object, include one or more `VkImportMetalTextureInfoEXT` structures in the `pNext` chain of the VkImageCreateInfo structure in a vkCreateImage command.

The `VkImportMetalTextureInfoEXT` structure is defined as:

    // Provided by VK_EXT_metal_objects
    typedef struct VkImportMetalTextureInfoEXT {
        VkStructureType          sType;
        const void*              pNext;
        VkImageAspectFlagBits    plane;
        MTLTexture_id            mtlTexture;
    } VkImportMetalTextureInfoEXT;

## Members

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `plane` indicates the plane of the VkImage that the `id<MTLTexture>` object should be attached to.

- `mtlTexture` is a the Metal `id<MTLTexture>` object that is to underlie the VkImage plane.

## Description

The `pNext` chain must include one `VkImportMetalTextureInfoEXT` structure for each plane in the VkImage. The app must ensure that the configuration of the Metal `id<MTLTexture>` objects are compatible with the configuration of the VkImage. Failure to do so results in undefined behavior.

Valid Usage (Implicit)

- VUID-VkImportMetalTextureInfoEXT-sType-sType
  `sType` must be `VK_STRUCTURE_TYPE_IMPORT_METAL_TEXTURE_INFO_EXT`

- VUID-VkImportMetalTextureInfoEXT-plane-parameter
  `plane` must be a valid VkImageAspectFlagBits value

## See Also

VK_EXT_metal_objects, VkImageAspectFlagBits, VkStructureType

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

SPDX-License-Identifier: CC-BY-4.0