VkCopyMemoryToImageInfoEXT
The VkCopyMemoryToImageInfoEXT
structure is defined as:
typedef struct VkCopyMemoryToImageInfoEXT {
VkStructureType sType;
const void* pNext;
VkHostImageCopyFlagsEXT flags;
VkImage dstImage;
VkImageLayout dstImageLayout;
uint32_t regionCount;
const VkMemoryToImageCopyEXT* pRegions;
} VkCopyMemoryToImageInfoEXT;
sType
is a VkStructureType value identifying this structure.pNext
isNULL
or a pointer to a structure extending this structure.flags
is a bitmask of VkHostImageCopyFlagBitsEXT values describing additional copy parameters.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 VkMemoryToImageCopyEXT structures specifying the regions to copy.
vkCopyMemoryToImageEXT
does not check whether the device memory
associated with dstImage
is currently in use before performing the
copy.
The application must guarantee that any previously submitted command that
reads from or writes to the copy regions has completed before the host
performs the copy.
Copy regions for the image must be aligned to a multiple of the texel block extent in each dimension, except at the edges of the image, where region extents must match the edge of the image.
Valid Usage
VUID-VkCopyMemoryToImageInfoEXT-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-VkCopyMemoryToImageInfoEXT-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
VK_IMAGE_USAGE_HOST_TRANSFER_BIT_EXT
set in
VkImageCreateInfo::usage
VUID-VkCopyMemoryToImageInfoEXT-dstImage-09112
If the stencil aspect of dstImage
is accessed, and
dstImage
was created with
separate stencil usage,
dstImage
must have been created with
VK_IMAGE_USAGE_HOST_TRANSFER_BIT_EXT
set in
VkImageStencilUsageCreateInfo::stencilUsage
VUID-VkCopyMemoryToImageInfoEXT-dstImage-09113
If non-stencil aspects of dstImage
are accessed,
dstImage
must have been created with
VK_IMAGE_USAGE_HOST_TRANSFER_BIT_EXT
set in
VkImageCreateInfo::usage
VUID-VkCopyMemoryToImageInfoEXT-imageOffset-09114
If flags
contains VK_HOST_IMAGE_COPY_MEMCPY_EXT
, the
x
, y
, and z
members of the imageOffset
member
of each element of pRegions
must be 0
VUID-VkCopyMemoryToImageInfoEXT-dstImage-09115
If flags
contains VK_HOST_IMAGE_COPY_MEMCPY_EXT
, the
imageExtent
member of each element of pRegions
must equal
the extents of dstImage
identified by imageSubresource
VUID-VkCopyMemoryToImageInfoEXT-dstImage-07966
If dstImage
is non-sparse then the image
or the specified disjoint plane
must be bound completely and contiguously to a single
VkDeviceMemory
object
VUID-VkCopyMemoryToImageInfoEXT-imageSubresource-07967
The imageSubresource.mipLevel
member of each element of
pRegions
must be less than the mipLevels
specified in
VkImageCreateInfo when dstImage
was created
VUID-VkCopyMemoryToImageInfoEXT-imageSubresource-07968
If imageSubresource.layerCount
is not
VK_REMAINING_ARRAY_LAYERS
,
imageSubresource.baseArrayLayer
+
imageSubresource.layerCount
of each element of pRegions
must be less than or equal to the arrayLayers
specified in
VkImageCreateInfo when dstImage
was created
VUID-VkCopyMemoryToImageInfoEXT-dstImage-07969
dstImage
must not have been created with flags
containing VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT
VUID-VkCopyMemoryToImageInfoEXT-imageSubresource-07970
The image region specified by each element of pRegions
must be
contained within the specified imageSubresource
of
dstImage
VUID-VkCopyMemoryToImageInfoEXT-imageSubresource-07971
For each element of pRegions
, imageOffset.x
and
(imageExtent.width
+ imageOffset.x
) must
both be greater than or equal to 0
and less than or equal to the width
of the specified imageSubresource
of dstImage
VUID-VkCopyMemoryToImageInfoEXT-imageSubresource-07972
For each element of pRegions
, imageOffset.y
and
(imageExtent.height
+ imageOffset.y
) must
both be greater than or equal to 0
and less than or equal to the
height of the specified imageSubresource
of dstImage
VUID-VkCopyMemoryToImageInfoEXT-dstImage-07973
dstImage
must have a sample count equal to
VK_SAMPLE_COUNT_1_BIT
VUID-VkCopyMemoryToImageInfoEXT-dstImage-07979
If dstImage
is of type VK_IMAGE_TYPE_1D
, then for each
element of pRegions
, imageOffset.y
must be 0
and
imageExtent.height
must be 1
VUID-VkCopyMemoryToImageInfoEXT-imageOffset-09104
For each element of pRegions
, imageOffset.z
and
(imageExtent.depth
+ imageOffset.z
) must
both be greater than or equal to 0
and less than or equal to the depth
of the specified imageSubresource
of dstImage
VUID-VkCopyMemoryToImageInfoEXT-dstImage-07980
If dstImage
is of type VK_IMAGE_TYPE_1D
or
VK_IMAGE_TYPE_2D
, then for each element of pRegions
,
imageOffset.z
must be 0
and imageExtent.depth
must
be 1
VUID-VkCopyMemoryToImageInfoEXT-dstImage-07274
For each element of pRegions
,
if VkCopyCommandTransformInfoQCOM::transform
is equal to
VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR
or
VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR
,
imageOffset.x
must be a multiple of the
texel block extent width of the
VkFormat of dstImage
VUID-VkCopyMemoryToImageInfoEXT-imageOffset-10051
For each element of pRegions
, if
VkCopyCommandTransformInfoQCOM::transform
is equal to
VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR
or
VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR
, and imageOffset.x
does not equal the width of the subresource specified by
imageSubresource
, imageOffset.x
must be a multiple of
the texel block extent width of the
VkFormat of dstImage
VUID-VkCopyMemoryToImageInfoEXT-dstImage-07275
For each element of pRegions
,
if VkCopyCommandTransformInfoQCOM::transform
is equal to
VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR
or
VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR
,
imageOffset.y
must be a multiple of the
texel block extent height of the
VkFormat of dstImage
VUID-VkCopyMemoryToImageInfoEXT-imageOffset-10052
For each element of pRegions
, if
VkCopyCommandTransformInfoQCOM::transform
is equal to
VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR
or
VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR
, and imageOffset.y
does not equal the height of the subresource specified by
imageSubresource
, imageOffset.y
must be a multiple of
the texel block extent height of the
VkFormat of dstImage
VUID-VkCopyMemoryToImageInfoEXT-dstImage-07276
For each element of pRegions
, imageOffset.z
must be a
multiple of the texel block extent
depth of the VkFormat of dstImage
VUID-VkCopyMemoryToImageInfoEXT-dstImage-00207
For each element of pRegions
, if
VkCopyCommandTransformInfoQCOM::transform
is equal to
VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR
,
the sum of imageOffset.x
and extent.width
does not equal
the width of the subresource specified by imageSubresource
,
extent.width
must be a multiple of the
texel block extent width of the
VkFormat of dstImage
VUID-VkCopyMemoryToImageInfoEXT-imageOffset-10053
For each element of pRegions
, if
VkCopyCommandTransformInfoQCOM::transform
is equal to
VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR
, the difference of
imageOffset.x
and extent.height
must be a multiple of the
texel block extent width of the
VkFormat of dstImage
VUID-VkCopyMemoryToImageInfoEXT-imageOffset-10054
For each element of pRegions
, if
VkCopyCommandTransformInfoQCOM::transform
is equal to
VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR
, the difference of
imageOffset.x
and extent.width
must be a multiple of the
texel block extent width of the
VkFormat of dstImage
VUID-VkCopyMemoryToImageInfoEXT-imageOffset-10055
For each element of pRegions
, if
VkCopyCommandTransformInfoQCOM::transform
is equal to
VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR
, the sum of
imageOffset.x
and extent.height
does not equal the width
of the subresource specified by imageSubresource
,
extent.height
must be a multiple of the
texel block extent width of the
VkFormat of dstImage
VUID-VkCopyMemoryToImageInfoEXT-dstImage-00208
For each element of pRegions
, if
VkCopyCommandTransformInfoQCOM::transform
is equal to
VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR
, and
the sum of imageOffset.y
and extent.height
does not equal
the height of the subresource specified by imageSubresource
,
extent.height
must be a multiple of the
texel block extent height of the
VkFormat of dstImage
VUID-VkCopyMemoryToImageInfoEXT-imageOffset-10056
For each element of pRegions
, if
VkCopyCommandTransformInfoQCOM::transform
is equal to
VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR
, the sum of
imageOffset.y
and extent.width
does not equal the height
of the subresource specified by imageSubresource
,
extent.width
must be a multiple of the
texel block extent height of the
VkFormat of dstImage
VUID-VkCopyMemoryToImageInfoEXT-imageOffset-10057
For each element of pRegions
, if
VkCopyCommandTransformInfoQCOM::transform
is equal to
VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR
, the difference of
imageOffset.y
and extent.height
must be a multiple of the
texel block extent height of the
VkFormat of dstImage
VUID-VkCopyMemoryToImageInfoEXT-imageOffset-10058
For each element of pRegions
, if
VkCopyCommandTransformInfoQCOM::transform
is equal to
VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR
, the difference of
imageOffset.y
and extent.width
must be a multiple of the
texel block extent height of the
VkFormat of dstImage
VUID-VkCopyMemoryToImageInfoEXT-dstImage-00209
For each element of pRegions
, if the sum of imageOffset.z
and extent.depth
does not equal the depth of the subresource
specified by srcSubresource
, extent.depth
must be a
multiple of the texel block extent
depth of the VkFormat of dstImage
VUID-VkCopyMemoryToImageInfoEXT-imageSubresource-09105
For each element of pRegions
, imageSubresource.aspectMask
must specify aspects present in dstImage
VUID-VkCopyMemoryToImageInfoEXT-dstImage-07981
If dstImage
has a
multi-planar image
format, then for each element of pRegions
,
imageSubresource.aspectMask
must be a single valid
multi-planar aspect mask bit
VUID-VkCopyMemoryToImageInfoEXT-dstImage-07983
If dstImage
is of type VK_IMAGE_TYPE_3D
, for each
element of pRegions
, imageSubresource.baseArrayLayer
must
be 0
and imageSubresource.layerCount
must be 1
VUID-VkCopyMemoryToImageInfoEXT-memoryRowLength-09106
For each element of pRegions
, memoryRowLength
must be a
multiple of the texel block extent
width of the VkFormat of dstImage
VUID-VkCopyMemoryToImageInfoEXT-memoryImageHeight-09107
For each element of pRegions
, memoryImageHeight
must be a
multiple of the texel block extent
height of the VkFormat of dstImage
VUID-VkCopyMemoryToImageInfoEXT-memoryRowLength-09108
For each element of pRegions
, memoryRowLength
divided by
the texel block extent width and then
multiplied by the texel block size of dstImage
must be less
than or equal to 231-1
VUID-VkCopyMemoryToImageInfoEXT-dstImageLayout-09059
dstImageLayout
must specify the current layout of the image
subresources of dstImage
specified in pRegions
VUID-VkCopyMemoryToImageInfoEXT-dstImageLayout-09060
dstImageLayout
must be one of the image layouts returned in
VkPhysicalDeviceHostImageCopyPropertiesEXT::pCopyDstLayouts
VUID-VkCopyMemoryToImageInfoEXT-flags-09393
If flags
includes VK_HOST_IMAGE_COPY_MEMCPY_EXT
, for each
region in pRegions
, memoryRowLength
and
memoryImageHeight
must both be 0
Valid Usage (Implicit)
VUID-VkCopyMemoryToImageInfoEXT-sType-sType
sType
must be VK_STRUCTURE_TYPE_COPY_MEMORY_TO_IMAGE_INFO_EXT
VUID-VkCopyMemoryToImageInfoEXT-pNext-pNext
pNext
must be NULL
VUID-VkCopyMemoryToImageInfoEXT-flags-parameter
flags
must be a valid combination of VkHostImageCopyFlagBitsEXT values
VUID-VkCopyMemoryToImageInfoEXT-dstImage-parameter
dstImage
must be a valid VkImage handle
VUID-VkCopyMemoryToImageInfoEXT-dstImageLayout-parameter
dstImageLayout
must be a valid VkImageLayout value
VUID-VkCopyMemoryToImageInfoEXT-pRegions-parameter
pRegions
must be a valid pointer to an array of regionCount
valid VkMemoryToImageCopyEXT structures
VUID-VkCopyMemoryToImageInfoEXT-regionCount-arraylength
regionCount
must be greater than 0