# VkImageBlit(3) Manual Page

## Name

VkImageBlit - Structure specifying an image blit operation

## C Specification

The `VkImageBlit` structure is defined as:

    typedef struct VkImageBlit {
        VkImageSubresourceLayers    srcSubresource;
        VkOffset3D                  srcOffsets[2];
        VkImageSubresourceLayers    dstSubresource;
        VkOffset3D                  dstOffsets[2];
    } VkImageBlit;

## Members

- `srcSubresource` is the subresource to blit from.

- `srcOffsets` is a pointer to an array of two VkOffset3D structures specifying the bounds of the source region within `srcSubresource`.

- `dstSubresource` is the subresource to blit into.

- `dstOffsets` is a pointer to an array of two VkOffset3D structures specifying the bounds of the destination region within `dstSubresource`.

## Description

For each element of the `pRegions` array, a blit operation is performed the specified source and destination regions.

Valid Usage

- The `aspectMask` member of `srcSubresource` and `dstSubresource` must match

- The `layerCount` member of `srcSubresource` and `dstSubresource` must match

- If either of the calling command’s `srcImage` or `dstImage` parameters are of VkImageType `VK_IMAGE_TYPE_3D`, the `baseArrayLayer` and `layerCount` members of both `srcSubresource` and `dstSubresource` must be `0` and `1`, respectively

- The `aspectMask` member of `srcSubresource` must specify aspects present in the calling command’s `srcImage`

- The `aspectMask` member of `dstSubresource` must specify aspects present in the calling command’s `dstImage`

- `srcOffset`[0].x and `srcOffset`[1].x must both be greater than or equal to `0` and less than or equal to the source image subresource width

- `srcOffset`[0].y and `srcOffset`[1].y must both be greater than or equal to `0` and less than or equal to the source image subresource height

- If the calling command’s `srcImage` is of type `VK_IMAGE_TYPE_1D`, then `srcOffset`[0].y must be `0` and `srcOffset`[1].y must be `1`.

- `srcOffset`[0].z and `srcOffset`[1].z must both be greater than or equal to `0` and less than or equal to the source image subresource depth

- If the calling command’s `srcImage` is of type `VK_IMAGE_TYPE_1D` or `VK_IMAGE_TYPE_2D`, then `srcOffset`[0].z must be `0` and `srcOffset`[1].z must be `1`.

- `dstOffset`[0].x and `dstOffset`[1].x must both be greater than or equal to `0` and less than or equal to the destination image subresource width

- `dstOffset`[0].y and `dstOffset`[1].y must both be greater than or equal to `0` and less than or equal to the destination image subresource height

- If the calling command’s `dstImage` is of type `VK_IMAGE_TYPE_1D`, then `dstOffset`[0].y must be `0` and `dstOffset`[1].y must be `1`.

- `dstOffset`[0].z and `dstOffset`[1].z must both be greater than or equal to `0` and less than or equal to the destination image subresource depth

- If the calling command’s `dstImage` is of type `VK_IMAGE_TYPE_1D` or `VK_IMAGE_TYPE_2D`, then `dstOffset`[0].z must be `0` and `dstOffset`[1].z must be `1`.

Valid Usage (Implicit)

- `srcSubresource` must be a valid VkImageSubresourceLayers structure

- `dstSubresource` must be a valid VkImageSubresourceLayers structure

## See Also

VkImageSubresourceLayers, VkOffset3D, vkCmdBlitImage

## 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 (c) 2014-2020 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.