C Specification

For both vkCmdCopyBufferToImage2KHR and vkCmdCopyImageToBuffer2KHR, each element of pRegions is a structure defined as:

// Provided by VK_KHR_copy_commands2
typedef struct VkBufferImageCopy2KHR {
    VkStructureType             sType;
    const void*                 pNext;
    VkDeviceSize                bufferOffset;
    uint32_t                    bufferRowLength;
    uint32_t                    bufferImageHeight;
    VkImageSubresourceLayers    imageSubresource;
    VkOffset3D                  imageOffset;
    VkExtent3D                  imageExtent;
} VkBufferImageCopy2KHR;


  • sType is the type of this structure.

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

  • bufferOffset is the offset in bytes from the start of the buffer object where the image data is copied from or to.

  • bufferRowLength and bufferImageHeight specify in texels a subregion of a larger two- or three-dimensional image in buffer memory, and control the addressing calculations. If either of these values is zero, that aspect of the buffer memory is considered to be tightly packed according to the imageExtent.

  • imageSubresource is a VkImageSubresourceLayers used to specify the specific image subresources of the image used for the source or destination image data.

  • imageOffset selects the initial x, y, z offsets in texels of the sub-region of the source or destination image data.

  • imageExtent is the size in texels of the image to copy in width, height and depth.


This structure is functionally identical to VkBufferImageCopy, but adds sType and pNext parameters, allowing it to be more easily extended.

Valid Usage
  • VUID-VkBufferImageCopy2KHR-bufferRowLength-00195
    bufferRowLength must be 0, or greater than or equal to the width member of imageExtent

  • VUID-VkBufferImageCopy2KHR-bufferImageHeight-00196
    bufferImageHeight must be 0, or greater than or equal to the height member of imageExtent

  • VUID-VkBufferImageCopy2KHR-aspectMask-00212
    The aspectMask member of imageSubresource must only have a single bit set

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

  • VUID-VkBufferImageCopy2KHR-pNext-pNext
    pNext must be NULL

  • VUID-VkBufferImageCopy2KHR-imageSubresource-parameter
    imageSubresource must be a valid VkImageSubresourceLayers structure

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

SPDX-License-Identifier: CC-BY-4.0