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:

StatusMeaning
VK_SUCCESSThe fence specified byfenceis signaled.
VK_NOT_READYThe fence specified byfenceis unsignaled.
VK_ERROR_DEVICE_LOSTThe device has been lost. SeeLost 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