VKCREATESEMAPHORE(3)

NAME
vkCreateSemaphore - Create a new queue semaphore object.

C SPECIFICATION

    VkResult vkCreateSemaphore(
        VkDevice                                    device,
        const VkSemaphoreCreateInfo*                pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkSemaphore*                                pSemaphore);

PARAMETERS

device
    The device with which to create the queue semaphore object.

pCreateInfo
    A pointer to a structure containing information to be placed in the object.

pSemaphore
    A pointer to a variable which will receive the handle to the new object.

DESCRIPTION

vkCreateSemaphore creates a new queue semaphore object using the information contained in pCreateInfo and the device specified in device. Upon success, a handle to the new queue semaphore object is deposited in the variable pointed to by pSemaphore. pCreateInfo should point to an instance of the VkSemaphoreCreateInfo structure, the definition of which is:

    typedef struct VkSemaphoreCreateInfo {
        VkStructureType           sType;
        const void*               pNext;
        VkSemaphoreCreateFlags    flags;
    } VkSemaphoreCreateInfo;

The sType member of the VkSemaphoreCreateInfo structure should be set to VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO. The pNext member is reserved for use by extensions and should be set to NULL.

The flags member of the VkSemaphoreCreateInfo structure pointed to by pCreateInfo contains flags defining the initial state and behavior of the semaphore. Currently, no flags are defined.

The semaphore is created in the unsignaled state and may be signaled by submitting it to a queue through a call to vkQueueSubmit.

VALID USAGE

    • device must be a valid VkDevice handle

    • pCreateInfo must be a pointer to a valid VkSemaphoreCreateInfo structure

    • If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure

    • pSemaphore must be a pointer to a VkSemaphore handle

RETURN CODES

On success, this command returns

        • VK_SUCCESS

On failure, this command returns

        • VK_ERROR_OUT_OF_HOST_MEMORY

        • VK_ERROR_OUT_OF_DEVICE_MEMORY

SEE ALSO

vkDestroySemaphore, vkQueueSubmit

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.