VkSubresourceHostMemcpySize(3)

# VkSubresourceHostMemcpySize(3) Manual Page

## Name

VkSubresourceHostMemcpySize - Memory size needed to copy to or from an image on the host with VK_HOST_IMAGE_COPY_MEMCPY_BIT

## C Specification

To query the memory size needed to copy to or from an image using vkCopyMemoryToImage or vkCopyImageToMemory when the VK_HOST_IMAGE_COPY_MEMCPY_BIT flag is specified, add a VkSubresourceHostMemcpySize structure to the `pNext` chain of the VkSubresourceLayout2 structure in a call to vkGetImageSubresourceLayout2.

The `VkSubresourceHostMemcpySize` structure is defined as:

    // Provided by VK_VERSION_1_4
    typedef struct VkSubresourceHostMemcpySize {
        VkStructureType    sType;
        void*              pNext;
        VkDeviceSize       size;
    } VkSubresourceHostMemcpySize;

    // Provided by VK_EXT_host_image_copy
    // Equivalent to VkSubresourceHostMemcpySize
    typedef VkSubresourceHostMemcpySize VkSubresourceHostMemcpySizeEXT;

## Members

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

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

- `size` is the size in bytes of the image subresource.

## Description

Valid Usage (Implicit)

- VUID-VkSubresourceHostMemcpySize-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_SUBRESOURCE_HOST_MEMCPY_SIZE

Structure Chaining

Extends the structure

  - VkSubresourceLayout2

## See Also

VK_EXT_host_image_copy, VK_VERSION_1_4, VkDeviceSize, 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-2026 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0