VKWAITFORFENCES(3)

NAME
vkWaitForFences - Wait for one or more fences to become signaled.

C SPECIFICATION

    VkResult vkWaitForFences(
        VkDevice                                    device,
        uint32_t                                    fenceCount,
        const VkFence*                              pFences,
        VkBool32                                    waitAll,
        uint64_t                                    timeout);

PARAMETERS

device
    The device owning the fences to be waited upon.

fenceCount
    The number of fences to wait on.

pFences
    The address of an array of fences to wait on.

waitAll
    If true, wait for all fences to become signaled. Otherwise, wait for at least one fence to become signaled.

timeout
    Timeout, in nanoseconds, to wait for fences to become signaled.

DESCRIPTION

vkWaitForFences waits for one or more fences become signaled. fenceCount is the number of fences to wait on and pFences is a pointer to an array of fenceCount fences. If waitAll is VK_TRUE, then vkWaitForFences waits for all fences in the array to become signaled, otherwise it will return when any fence in the array becomes signaled. If none of the fences are signaled before timeout nanoseconds elapses, then vkWaitForFences will return without any fence necessarily becoming signaled.

VALID USAGE

    • device must be a valid VkDevice handle

    • pFences must be a pointer to an array of fenceCount valid VkFence handles

    • fenceCount must be greater than 0

    • Each element of pFences must have been created, allocated or retrieved from device

    • Each of device and the elements of pFences must have been created, allocated or retrieved from the same VkPhysicalDevice

RETURN CODES

On success, this command returns

        • VK_SUCCESS

        • VK_TIMEOUT

On failure, this command returns

        • VK_ERROR_OUT_OF_HOST_MEMORY

        • VK_ERROR_OUT_OF_DEVICE_MEMORY

        • VK_ERROR_DEVICE_LOST

RETURN VALUE

Upon successful detection of a signaled fence, vkWaitForFences returns VK_SUCCESS. If timeout nanoseconds pass before any fence becomes signaled, vkWaitForFences returns VK_TIMEOUT. Upon failure, a descriptive error code is returned.

SEE ALSO

vkCreateFence, vkDestroyFence, vkResetFences

COPYRIGHT

Copyright © 2014-2016 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.

AUTHOR

Khronos Group
    Author.