# vkTransitionImageLayout(3) Manual Page

## Name

vkTransitionImageLayout - Perform an image layout transition on the host

Loading… please wait.

## C Specification

To perform an image layout transition on the host, call:

    // Provided by VK_VERSION_1_4
    VkResult vkTransitionImageLayout(
        VkDevice                                    device,
        uint32_t                                    transitionCount,
        const VkHostImageLayoutTransitionInfo*      pTransitions);

or the equivalent command

    // Provided by VK_EXT_host_image_copy
    VkResult vkTransitionImageLayoutEXT(
        VkDevice                                    device,
        uint32_t                                    transitionCount,
        const VkHostImageLayoutTransitionInfo*      pTransitions);

## Parameters

- `device` is the device which owns `pTransitions`[i].`image`.

- `transitionCount` is the number of image layout transitions to perform.

- `pTransitions` is a pointer to an array of VkHostImageLayoutTransitionInfo structures specifying the image and subresource ranges within them to transition.

## Description

Valid Usage (Implicit)

- VUID-vkTransitionImageLayout-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkTransitionImageLayout-pTransitions-parameter
  `pTransitions` must be a valid pointer to an array of `transitionCount` valid VkHostImageLayoutTransitionInfo structures

- VUID-vkTransitionImageLayout-transitionCount-arraylength
  `transitionCount` must be greater than `0`

Return Codes

On success, this command returns

  - `VK_SUCCESS`

On failure, this command returns

  - `VK_ERROR_INITIALIZATION_FAILED`

  - `VK_ERROR_OUT_OF_HOST_MEMORY`

  - `VK_ERROR_OUT_OF_DEVICE_MEMORY`

  - `VK_ERROR_MEMORY_MAP_FAILED`

## See Also

VK_EXT_host_image_copy, VK_VERSION_1_4, VkDevice, VkHostImageLayoutTransitionInfo

## 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-2024 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0