VkImageToMemoryCopyEXT(3)

# VkImageToMemoryCopyEXT(3) Manual Page

## Name

VkImageToMemoryCopyEXT - Structure specifying an image to host memory copy operation

Loading… please wait.

## C Specification

Each element of VkCopyImageToMemoryInfoEXT::`pRegions` is a structure defined as:

    // Provided by VK_EXT_host_image_copy
    typedef struct VkImageToMemoryCopyEXT {
        VkStructureType             sType;
        const void*                 pNext;
        void*                       pHostPointer;
        uint32_t                    memoryRowLength;
        uint32_t                    memoryImageHeight;
        VkImageSubresourceLayers    imageSubresource;
        VkOffset3D                  imageOffset;
        VkExtent3D                  imageExtent;
    } VkImageToMemoryCopyEXT;

## Members

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `pHostPointer` is the host memory address which is the destination of the copy.

- `memoryRowLength` and `memoryImageHeight` specify in texels a subregion of a larger two- or three-dimensional image in host memory, and control the addressing calculations. If either of these values is zero, that aspect of the host 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 image data.

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

## Description

This structure is functionally similar to VkBufferImageCopy2, except it defines host memory as the target of copy instead of a buffer. In particular, the same data packing rules and restrictions as that structure apply here as well.

Valid Usage

- VUID-VkImageToMemoryCopyEXT-pHostPointer-09066
  `pHostPointer` must point to memory that is large enough to contain all memory locations that are accessed according to Buffer and Image Addressing, for each element of `pRegions`

- VUID-VkImageToMemoryCopyEXT-pRegions-09067
  The union of all source regions, and the union of all destination regions, specified by the elements of `pRegions`, must not overlap in memory

- VUID-VkImageToMemoryCopyEXT-memoryRowLength-09101
  `memoryRowLength` must be `0`, or greater than or equal to the `width` member of `imageExtent`

- VUID-VkImageToMemoryCopyEXT-memoryImageHeight-09102
  `memoryImageHeight` must be `0`, or greater than or equal to the `height` member of `imageExtent`

- VUID-VkImageToMemoryCopyEXT-aspectMask-09103
  The `aspectMask` member of `imageSubresource` must only have a single bit set

- VUID-VkImageToMemoryCopyEXT-imageExtent-06659
  `imageExtent.width` must not be 0

- VUID-VkImageToMemoryCopyEXT-imageExtent-06660
  `imageExtent.height` must not be 0

- VUID-VkImageToMemoryCopyEXT-imageExtent-06661
  `imageExtent.depth` must not be 0

Valid Usage (Implicit)

- VUID-VkImageToMemoryCopyEXT-sType-sType
  `sType` must be `VK_STRUCTURE_TYPE_IMAGE_TO_MEMORY_COPY_EXT`

- VUID-VkImageToMemoryCopyEXT-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkImageToMemoryCopyEXT-pHostPointer-parameter
  `pHostPointer` must be a pointer value

- VUID-VkImageToMemoryCopyEXT-imageSubresource-parameter
  `imageSubresource` must be a valid VkImageSubresourceLayers structure

## See Also

VK_EXT_host_image_copy, VkCopyImageToMemoryInfoEXT, VkExtent3D, VkImageSubresourceLayers, VkOffset3D, VkStructureType

## 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

Copyright 2014-2023 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0