Structures

VkCopyMemoryToImageIndirectInfoKHR

Parameters describing indirect image copy parameters

The VkCopyMemoryToImageIndirectInfoKHR structure is defined as:

typedef struct VkCopyMemoryToImageIndirectInfoKHR {
    VkStructureType sType;
    const void* pNext;
    VkAddressCopyFlagsKHR srcCopyFlags;
    uint32_t copyCount;
    VkStridedDeviceAddressRangeKHR copyAddressRange;
    VkImage dstImage;
    VkImageLayout dstImageLayout;
    const VkImageSubresourceLayers* pImageSubresources;
} VkCopyMemoryToImageIndirectInfoKHR;
  • sType is a VkStructureType value identifying this structure.
  • pNext is NULL or a pointer to a structure extending this structure.
  • srcCopyFlags is a VkAddressCopyFlagsKHR value defining the copy flags for the source address range.
  • copyCount is the number of copies to execute, and can be zero.
  • copyAddressRange is a memory region specifying the copy parameters. It is laid out as an array of VkCopyMemoryToImageIndirectCommandKHR structures.
  • dstImage is the destination image.
  • dstImageLayout is the layout of the destination image subresources for the copy.
  • pImageSubresources is a pointer to an array of copyCount
    VkImageSubresourceLayers structures, specifying the image subresources of the destination image data for the copy operation.

Valid Usage

VUID-VkCopyMemoryToImageIndirectInfoKHR-srcCopyFlags-10950

If srcCopyFlags contains VK_ADDRESS_COPY_SPARSE_BIT_KHR, the source memory regions accessed must be bound to memory

VUID-VkCopyMemoryToImageIndirectInfoKHR-copyCount-10951

copyCount must be less than or equal to copyAddressRange.size / copyAddressRange.stride

VUID-VkCopyMemoryToImageIndirectInfoKHR-copyAddressRange-10952

copyAddressRange.address must be 4 byte aligned

VUID-VkCopyMemoryToImageIndirectInfoKHR-copyAddressRange-10953

copyAddressRange.stride must be a multiple of 4 and must be greater than or equal to sizeof(VkCopyMemoryToImageIndirectCommandKHR)

VUID-VkCopyMemoryToImageIndirectInfoKHR-dstImage-10955

The format features of dstImage must contain VK_FORMAT_FEATURE_2_COPY_IMAGE_INDIRECT_DST_BIT_KHR

VUID-VkCopyMemoryToImageIndirectInfoKHR-copyAddressRange-12213

copyAddressRange must be a device address range allocated to the application from a buffer created with the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT usage flag set

VUID-VkCopyMemoryToImageIndirectInfoKHR-dstImage-07661

dstImage must not be a protected image

VUID-VkCopyMemoryToImageIndirectInfoKHR-aspectMask-07662

The aspectMask member for every subresource in pImageSubresources must only have a single bit set

VUID-VkCopyMemoryToImageIndirectInfoKHR-aspectMask-12287

The aspectMask member for every subresource in pImageSubresources must specify an aspect present in dstImage

VUID-VkCopyMemoryToImageIndirectInfoKHR-dstImage-07664

dstImage must have been created with the VK_IMAGE_USAGE_TRANSFER_DST_BIT usage flag set

VUID-VkCopyMemoryToImageIndirectInfoKHR-dstImage-07665

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-VkCopyMemoryToImageIndirectInfoKHR-dstImage-07973

dstImage must have a sample count equal to VK_SAMPLE_COUNT_1_BIT

VUID-VkCopyMemoryToImageIndirectInfoKHR-dstImageLayout-07667

dstImageLayout must specify the layout of the image subresources of dstImage at the time this command is executed on a VkDevice

VUID-VkCopyMemoryToImageIndirectInfoKHR-dstImageLayout-07669

dstImageLayout must be VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR, or VK_IMAGE_LAYOUT_GENERAL

VUID-VkCopyMemoryToImageIndirectInfoKHR-mipLevel-07670

The specified mipLevel of each region in pImageSubresourcesmust be less than the mipLevels specified in VkImageCreateInfo when dstImage was created

VUID-VkCopyMemoryToImageIndirectInfoKHR-dstImage-12288

If dstImage is not of type VK_IMAGE_TYPE_3D, and the specified layerCount of each region in pImageSubresources is not VK_REMAINING_ARRAY_LAYERS, the specified baseArrayLayer + layerCount of each region in pImageSubresources must be less than or equal to the arrayLayers specified in VkImageCreateInfo when dstImage was created

VUID-VkCopyMemoryToImageIndirectInfoKHR-dstImage-12289

If dstImage is of type VK_IMAGE_TYPE_3D, and the specified layerCount of each region in pImageSubresources is not VK_REMAINING_ARRAY_LAYERS, for each destination region, (imageSubresource.baseArrayLayer + imageSubresource.layerCount) must be less than or equal to the depth of the specified subresource

VUID-VkCopyMemoryToImageIndirectInfoKHR-dstImage-12290

If dstImage is of type VK_IMAGE_TYPE_3D, and the specified layerCount of each region in pImageSubresources is not VK_REMAINING_ARRAY_LAYERS, for each destination region, if (imageSubresource.baseArrayLayer + imageSubresource.layerCount) does not equal the depth of the specified subresource, imageSubresource.layerCount must be a multiple of the texel block extent depth of the VkFormat of dstImage

VUID-VkCopyMemoryToImageIndirectInfoKHR-dstImage-12291

If dstImage is of type VK_IMAGE_TYPE_3D, for each destination region, imageSubresource.baseArrayLayer must be a multiple of the texel block extent depth of the VkFormat of dstImage

VUID-VkCopyMemoryToImageIndirectInfoKHR-dstImage-12292

If dstImage is of type VK_IMAGE_TYPE_3D, for each destination region, imageSubresource.baseArrayLayer must be less than or equal to the depth of the specified subresource

VUID-VkCopyMemoryToImageIndirectInfoKHR-dstImage-07673

dstImage must not have been created with flags containing VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT

VUID-VkCopyMemoryToImageIndirectInfoKHR-commandBuffer-07674

If the queue family used to create the VkCommandPool which commandBuffer was allocated from does not support VK_QUEUE_GRAPHICS_BIT, for each region, the aspectMask member of pImageSubresources must not be VK_IMAGE_ASPECT_DEPTH_BIT or VK_IMAGE_ASPECT_STENCIL_BIT

VUID-VkCopyMemoryToImageIndirectInfoKHR-dstImage-10974

The format features of dstImage must contain VK_FORMAT_FEATURE_TRANSFER_DST_BIT

VUID-VkCopyMemoryToImageIndirectInfoKHR-copyAddressRange-10975

Any of the source or destination memory regions specified in copyAddressRange must not overlap with any of the specified destination memory regions at the time this command is executed on device

Valid Usage (Implicit)

VUID-VkCopyMemoryToImageIndirectInfoKHR-sType-sType

sType must be VK_STRUCTURE_TYPE_COPY_MEMORY_TO_IMAGE_INDIRECT_INFO_KHR

VUID-VkCopyMemoryToImageIndirectInfoKHR-pImageSubresources-parameter

pImageSubresources must be a valid pointer to an array of copyCount valid VkImageSubresourceLayers structures