C Specification

In order to collect timing information about presentation, a swapchain needs an internal queue to store asynchronously updated results until applications collect them.

To allocate the swapchain’s internal timing results queue, call:

// Provided by VK_EXT_present_timing
VkResult vkSetSwapchainPresentTimingQueueSizeEXT(
    VkDevice                                    device,
    VkSwapchainKHR                              swapchain,
    uint32_t                                    size);

Parameters

  • device is the device associated with swapchain.

  • swapchain is the swapchain to allocate a results queue for.

  • size is the requested number of slots in the internal results queue.

Description

If this function is called multiple times, the internal queue is reallocated to fit the new size. If the new size is less than the current number of outstanding results, VK_NOT_READY is returned and no allocation is performed.

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

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

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

Host Synchronization
  • Host access to swapchain must be externally synchronized

Return Codes

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

SPDX-License-Identifier: CC-BY-4.0