## 18.1. Common Operation

Some rules for valid operation are common to all copy commands:

• Copy commands must be recorded outside of a render pass instance.
• For non-sparse resources, the union of the source regions in a given buffer or image must not overlap the union of the destination regions in the same buffer or image.
• For sparse resources, the set of bytes used by all the source regions must not intersect the set of bytes used by all the destination regions.
• Copy regions must be non-empty.
• Regions must not extend outside the bounds of the buffer or image level, except that regions of compressed images can extend as far as the dimension of the image level rounded up to a complete compressed texel block.
• Source image subresources must be in either the VK_IMAGE_LAYOUT_GENERAL or VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL layout. Destination image subresources must be in either the VK_IMAGE_LAYOUT_GENERAL or VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL layout. As a consequence, if an image subresource is used as both source and destination of a copy, it must be in the VK_IMAGE_LAYOUT_GENERAL layout.
• Source images must have been created with the VK_IMAGE_USAGE_TRANSFER_SRC_BIT usage bit enabled and destination images must have been created with the VK_IMAGE_USAGE_TRANSFER_DST_BIT usage bit enabled.
• Source buffers must have been created with the VK_BUFFER_USAGE_TRANSFER_SRC_BIT usage bit enabled and destination buffers must have been created with the VK_BUFFER_USAGE_TRANSFER_DST_BIT usage bit enabled.

All copy commands are treated as “transfer” operations for the purposes of synchronization barriers.