C Specification

The VkCopyImageToImageInfo structure is defined as:

// Provided by VK_VERSION_1_4
typedef struct VkCopyImageToImageInfo {
    VkStructureType         sType;
    const void*             pNext;
    VkHostImageCopyFlags    flags;
    VkImage                 srcImage;
    VkImageLayout           srcImageLayout;
    VkImage                 dstImage;
    VkImageLayout           dstImageLayout;
    uint32_t                regionCount;
    const VkImageCopy2*     pRegions;
} VkCopyImageToImageInfo;
// Provided by VK_EXT_host_image_copy
// Equivalent to VkCopyImageToImageInfo
typedef VkCopyImageToImageInfo VkCopyImageToImageInfoEXT;

Members

  • sType is a VkStructureType value identifying this structure.

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

  • flags is a bitmask of VkHostImageCopyFlagBits values describing additional copy parameters.

  • srcImage is the source image.

  • srcImageLayout is the layout of the source image subresources for the copy.

  • dstImage is the destination image.

  • dstImageLayout is the layout of the destination image subresources for the copy.

  • regionCount is the number of regions to copy.

  • pRegions is a pointer to an array of VkImageCopy2 structures specifying the regions to copy.

Description

vkCopyImageToImage does not check whether the device memory associated with srcImage or dstImage is currently in use before performing the copy. The application must guarantee that any previously submitted command that writes to the copy regions has completed before the host performs the copy.

Valid Usage
  • VUID-VkCopyImageToImageInfo-srcImage-09069
    srcImage and dstImage must have been created with identical image creation parameters

  • VUID-VkCopyImageToImageInfo-srcImage-09109
    If srcImage is sparse then all memory ranges accessed by the copy command must be bound as described in Binding Resource Memory

  • VUID-VkCopyImageToImageInfo-srcImage-09111
    If the stencil aspect of srcImage is accessed, and srcImage was not created with separate stencil usage, srcImage must have been created with the VK_IMAGE_USAGE_HOST_TRANSFER_BIT usage flag set

  • VUID-VkCopyImageToImageInfo-srcImage-09112
    If the stencil aspect of srcImage is accessed, and srcImage was created with separate stencil usage, srcImage must have been created with the VK_IMAGE_USAGE_HOST_TRANSFER_BIT usage flag set

  • VUID-VkCopyImageToImageInfo-srcImage-09113
    If non-stencil aspects of srcImage are accessed, srcImage must have been created with the VK_IMAGE_USAGE_HOST_TRANSFER_BIT usage flag set

  • VUID-VkCopyImageToImageInfo-srcOffset-09114
    If flags contains VK_HOST_IMAGE_COPY_MEMCPY_BIT, the x, y, and z members of the srcOffset member of each element of pRegions must be 0

  • VUID-VkCopyImageToImageInfo-srcImage-09115
    If flags contains VK_HOST_IMAGE_COPY_MEMCPY_BIT, the extent member of each element of pRegions must equal the extents of srcImage identified by srcSubresource

  • VUID-VkCopyImageToImageInfo-srcImage-07966
    If srcImage is non-sparse then the image or each specified disjoint plane must be bound completely and contiguously to a single VkDeviceMemory object

  • VUID-VkCopyImageToImageInfo-srcSubresource-07967
    The srcSubresource.mipLevel member of each element of pRegions must be less than the mipLevels specified in VkImageCreateInfo when srcImage was created

  • VUID-VkCopyImageToImageInfo-srcSubresource-07968
    If srcSubresource.layerCount is not VK_REMAINING_ARRAY_LAYERS, srcSubresource.baseArrayLayer + srcSubresource.layerCount of each element of pRegions must be less than or equal to the arrayLayers specified in VkImageCreateInfo when srcImage was created

  • VUID-VkCopyImageToImageInfo-srcImage-07969
    srcImage must not have been created with flags containing VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT

  • VUID-VkCopyImageToImageInfo-srcSubresource-07971
    For each element of pRegions, srcOffset.x and (extent.width + srcOffset.x) must both be greater than or equal to 0 and less than or equal to the width of the specified srcSubresource of srcImage

  • VUID-VkCopyImageToImageInfo-srcSubresource-07972
    For each element of pRegions, srcOffset.y and (extent.height + srcOffset.y) must both be greater than or equal to 0 and less than or equal to the height of the specified srcSubresource of srcImage

  • VUID-VkCopyImageToImageInfo-dstImage-09109
    If dstImage is sparse then all memory ranges accessed by the copy command must be bound as described in Binding Resource Memory

  • VUID-VkCopyImageToImageInfo-dstImage-09111
    If the stencil aspect of dstImage is accessed, and dstImage was not created with separate stencil usage, dstImage must have been created with the VK_IMAGE_USAGE_HOST_TRANSFER_BIT usage flag set

  • VUID-VkCopyImageToImageInfo-dstImage-09112
    If the stencil aspect of dstImage is accessed, and dstImage was created with separate stencil usage, dstImage must have been created with the VK_IMAGE_USAGE_HOST_TRANSFER_BIT usage flag set

  • VUID-VkCopyImageToImageInfo-dstImage-09113
    If non-stencil aspects of dstImage are accessed, dstImage must have been created with the VK_IMAGE_USAGE_HOST_TRANSFER_BIT usage flag set

  • VUID-VkCopyImageToImageInfo-dstOffset-09114
    If flags contains VK_HOST_IMAGE_COPY_MEMCPY_BIT, the x, y, and z members of the dstOffset member of each element of pRegions must be 0

  • VUID-VkCopyImageToImageInfo-dstImage-09115
    If flags contains VK_HOST_IMAGE_COPY_MEMCPY_BIT, the extent member of each element of pRegions must equal the extents of dstImage identified by dstSubresource

  • VUID-VkCopyImageToImageInfo-dstImage-07966
    If dstImage is non-sparse then the image or each specified disjoint plane must be bound completely and contiguously to a single VkDeviceMemory object

  • VUID-VkCopyImageToImageInfo-dstSubresource-07967
    The dstSubresource.mipLevel member of each element of pRegions must be less than the mipLevels specified in VkImageCreateInfo when dstImage was created

  • VUID-VkCopyImageToImageInfo-dstSubresource-07968
    If dstSubresource.layerCount is not VK_REMAINING_ARRAY_LAYERS, dstSubresource.baseArrayLayer + dstSubresource.layerCount of each element of pRegions must be less than or equal to the arrayLayers specified in VkImageCreateInfo when dstImage was created

  • VUID-VkCopyImageToImageInfo-dstImage-07969
    dstImage must not have been created with flags containing VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT

  • VUID-VkCopyImageToImageInfo-dstSubresource-07971
    For each element of pRegions, dstOffset.x and (extent.width + dstOffset.x) must both be greater than or equal to 0 and less than or equal to the width of the specified dstSubresource of dstImage

  • VUID-VkCopyImageToImageInfo-dstSubresource-07972
    For each element of pRegions, dstOffset.y and (extent.height + dstOffset.y) must both be greater than or equal to 0 and less than or equal to the height of the specified dstSubresource of dstImage

Valid Usage (Implicit)
  • VUID-VkCopyImageToImageInfo-sType-sType
    sType must be VK_STRUCTURE_TYPE_COPY_IMAGE_TO_IMAGE_INFO

  • VUID-VkCopyImageToImageInfo-pNext-pNext
    pNext must be NULL

  • VUID-VkCopyImageToImageInfo-flags-parameter
    flags must be a valid combination of VkHostImageCopyFlagBits values

  • VUID-VkCopyImageToImageInfo-srcImage-parameter
    srcImage must be a valid VkImage handle

  • VUID-VkCopyImageToImageInfo-srcImageLayout-parameter
    srcImageLayout must be a valid VkImageLayout value

  • VUID-VkCopyImageToImageInfo-dstImage-parameter
    dstImage must be a valid VkImage handle

  • VUID-VkCopyImageToImageInfo-dstImageLayout-parameter
    dstImageLayout must be a valid VkImageLayout value

  • VUID-VkCopyImageToImageInfo-pRegions-parameter
    pRegions must be a valid pointer to an array of regionCount valid VkImageCopy2 structures

  • VUID-VkCopyImageToImageInfo-regionCount-arraylength
    regionCount must be greater than 0

  • VUID-VkCopyImageToImageInfo-commonparent
    Both of dstImage, and srcImage 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-2026 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0