C Specification

In order to query a swapchain’s status when rendering to a shared presentable image, call:

// Provided by VK_KHR_shared_presentable_image
VkResult vkGetSwapchainStatusKHR(
    VkDevice                                    device,
    VkSwapchainKHR                              swapchain);

Parameters

  • device is the device associated with swapchain.

  • swapchain is the swapchain to query.

Description

If VkPhysicalDeviceVulkanSC10Properties::deviceNoDynamicHostAllocations is VK_TRUE, vkGetSwapchainStatusKHR must not return VK_ERROR_OUT_OF_HOST_MEMORY.

Valid Usage (Implicit)
  • VUID-vkGetSwapchainStatusKHR-device-parameter
    device must be a valid VkDevice handle

  • VUID-vkGetSwapchainStatusKHR-swapchain-parameter
    swapchain must be a valid VkSwapchainKHR handle

  • VUID-vkGetSwapchainStatusKHR-swapchain-parent
    swapchain must have been created, allocated, or retrieved from device

Host Synchronization
  • Host access to swapchain must be externally synchronized

Return Codes
On success, this command returns
  • VK_SUCCESS

  • VK_SUBOPTIMAL_KHR

On failure, this command returns
  • VK_ERROR_OUT_OF_HOST_MEMORY

  • VK_ERROR_OUT_OF_DEVICE_MEMORY

  • VK_ERROR_DEVICE_LOST

  • VK_ERROR_OUT_OF_DATE_KHR

  • VK_ERROR_SURFACE_LOST_KHR

See Also

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 2014-2023 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0