vkReleaseSwapchainImagesKHR(3)

# vkReleaseSwapchainImagesKHR(3) Manual Page

## Name

vkReleaseSwapchainImagesKHR - Release previously acquired but unused images

## C Specification

To release images previously acquired through vkAcquireNextImage2KHR or vkAcquireNextImageKHR, call:

    // Provided by VK_KHR_swapchain_maintenance1
    VkResult vkReleaseSwapchainImagesKHR(
        VkDevice                                    device,
        const VkReleaseSwapchainImagesInfoKHR*      pReleaseInfo);

    // Provided by VK_EXT_swapchain_maintenance1
    // Equivalent to vkReleaseSwapchainImagesKHR
    VkResult vkReleaseSwapchainImagesEXT(
        VkDevice                                    device,
        const VkReleaseSwapchainImagesInfoKHR*      pReleaseInfo);

## Parameters

- `device` is the device associated with VkReleaseSwapchainImagesInfoKHR::`swapchain`.

- `pReleaseInfo` is a pointer to a VkReleaseSwapchainImagesInfoKHR structure containing parameters of the release.

## Description

Only images that are not in use by the device can be released.

Releasing images is a read-only operation that will not affect the content of the released images. Upon reacquiring the image, the image contents and its layout will be the same as they were prior to releasing it. However, if a mechanism other than Vulkan is used to modify the platform window associated with the swapchain, the content of all presentable images in the swapchain becomes undefined.

Note | This functionality is useful during swapchain recreation, where acquired images from the old swapchain can be released instead of presented.

Valid Usage

- VUID-vkReleaseSwapchainImagesKHR-swapchainMaintenance1-10159
  Feature `swapchainMaintenance1` must be enabled

Valid Usage (Implicit)

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

- VUID-vkReleaseSwapchainImagesKHR-pReleaseInfo-parameter
  `pReleaseInfo` must be a valid pointer to a valid VkReleaseSwapchainImagesInfoKHR structure

Return Codes

On success, this command returns

  - VK_SUCCESS

On failure, this command returns

  - VK_ERROR_SURFACE_LOST_KHR

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

## See Also

VK_EXT_swapchain_maintenance1, VK_KHR_swapchain_maintenance1, VkDevice, VkReleaseSwapchainImagesInfoKHR

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