Function Prototype

vkGetFenceStatus

Return the status of a fence

To query the status of a fence from the host, call:

VkResult vkGetFenceStatus(
    VkDevice device,
    VkFence fence);
  • device is the logical device that owns the fence.
  • fence is the handle of the fence to query.

Upon success, vkGetFenceStatus returns the status of the fence object, with the following return codes:

Table 1. Fence Object Status Codes
StatusMeaning

VK_SUCCESS

The fence specified by fence is signaled.

VK_NOT_READY

The fence specified by fence is unsignaled.

VK_ERROR_DEVICE_LOST

The device has been lost. See Lost Device.

If a queue submission command is pending execution, then the value returned by this command may immediately be out of date.

If the device has been lost (see Lost Device), vkGetFenceStatus may return any of the above status codes. If the device has been lost and vkGetFenceStatus is called repeatedly, it will eventually return either VK_SUCCESS or VK_ERROR_DEVICE_LOST.

Valid Usage (Implicit)

VUID-vkGetFenceStatus-fence-parent

fence must have been created, allocated, or retrieved from device