VkExportMetalTextureInfoEXT
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:
typedef struct VkExportMetalTextureInfoEXT {
VkStructureType sType;
const void* pNext;
VkImage image;
VkImageView imageView;
VkBufferView bufferView;
VkImageAspectFlagBits plane;
MTLTexture_id mtlTexture;
} VkExportMetalTextureInfoEXT;
sType
is a VkStructureType value identifying this structure.pNext
isNULL
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 Metalid<MTLTexture>
object underlying the VkImage, VkImageView, or VkBufferView object inimage
,imageView
, orbufferView
, respectively, at the plane indicated inaspectMask
. The implementation will return theMTLTexture
in this member, or it will returnNULL
if noMTLTexture
could be found underlying the VkImage, VkImageView, or VkBufferView object, at the plane indicated inaspectMask
.
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