VkSwapchainPresentFenceInfoKHR(3)

Name

VkSwapchainPresentFenceInfoKHR - Fences associated with a vkQueuePresentKHR operation

C Specification

The VkSwapchainPresentFenceInfoKHR structure is defined as:

// Provided by VK_KHR_swapchain_maintenance1
typedef struct VkSwapchainPresentFenceInfoKHR {
    VkStructureType    sType;
    const void*        pNext;
    uint32_t           swapchainCount;
    const VkFence*     pFences;
} VkSwapchainPresentFenceInfoKHR;

or the equivalent

// Provided by VK_EXT_swapchain_maintenance1
typedef VkSwapchainPresentFenceInfoKHR VkSwapchainPresentFenceInfoEXT;

Members

  • sType is a VkStructureType value identifying this structure.

  • pNext is NULL or a pointer to a structure extending this structure.

  • swapchainCount is the number of swapchains being presented to by this command.

  • pFences is a list of fences with swapchainCount entries. Each entry must be VK_NULL_HANDLE or the handle of a fence to signal when the relevant operations on the associated swapchain have completed.

Description

The set of queue operations defined by queuing an image for presentation, as well as operations performed by the presentation engine, access the payloads of objects associated with the presentation operation. The associated objects include:

  • The swapchain image, its implicitly bound memory, and any other resources bound to that memory.

  • The wait semaphores specified when queuing the image for presentation.

The application can provide a fence that the implementation will signal after all such queue operations have completed, and after the presentation engine has taken a reference to the payloads of all objects provided in VkPresentInfoKHR that the presentation engine accesses as part of the present operation. The fence may not wait for the present operation to complete. For all binary wait semaphores imported by the presentation engine using the equivalent of reference transference, as described in Importing Semaphore Payloads, this fence must not signal until all such semaphore payloads have been reset by the presentation engine.

The application can destroy the wait semaphores associated with a given presentation operation when at least one of the associated fences is signaled, and can destroy the swapchain when the fences associated with all past presentation requests referring to that swapchain have signaled.

Fences associated with presentations to the same swapchain on the same VkQueue must be signaled in the same order as the present operations.

To specify a fence for each swapchain in a present operation, include the VkSwapchainPresentFenceInfoKHR structure in the pNext chain of the VkPresentInfoKHR structure.

Valid Usage
  • VUID-VkSwapchainPresentFenceInfoKHR-swapchainCount-07757
    swapchainCount must be equal to VkPresentInfoKHR::swapchainCount

  • VUID-VkSwapchainPresentFenceInfoKHR-pFences-07758
    Each element of pFences that is not VK_NULL_HANDLE must be unsignaled

  • VUID-VkSwapchainPresentFenceInfoKHR-pFences-07759
    Each element of pFences that is not VK_NULL_HANDLE must not be associated with any other queue command that has not yet completed execution on that queue

Valid Usage (Implicit)
  • VUID-VkSwapchainPresentFenceInfoKHR-sType-sType
    sType must be VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_FENCE_INFO_KHR

  • VUID-VkSwapchainPresentFenceInfoKHR-pFences-parameter
    pFences must be a valid pointer to an array of swapchainCount valid or VK_NULL_HANDLE VkFence handles

  • VUID-VkSwapchainPresentFenceInfoKHR-swapchainCount-arraylength
    swapchainCount must be greater than 0

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.