C Specification

To set the state of an event to signaled from the host, call:

// Provided by VK_VERSION_1_0
VkResult vkSetEvent(
    VkDevice                                    device,
    VkEvent                                     event);

Parameters

  • device is the logical device that owns the event.

  • event is the event to set.

Description

When vkSetEvent is executed on the host, it defines an event signal operation which sets the event to the signaled state.

If event is already in the signaled state when vkSetEvent is executed, then vkSetEvent has no effect, and no event signal operation occurs.

Note

If a command buffer is waiting for an event to be signaled from the host, the application must signal the event before submitting the command buffer, as described in the queue forward progress section.

Valid Usage
  • VUID-vkSetEvent-event-03941
    event must not have been created with VK_EVENT_CREATE_DEVICE_ONLY_BIT

  • VUID-vkSetEvent-event-09543
    event must not be waited on by a command buffer in the pending state

Valid Usage (Implicit)
  • VUID-vkSetEvent-device-parameter
    device must be a valid VkDevice handle

  • VUID-vkSetEvent-event-parameter
    event must be a valid VkEvent handle

  • VUID-vkSetEvent-event-parent
    event must have been created, allocated, or retrieved from device

Host Synchronization
  • Host access to event must be externally synchronized

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

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.

Copyright 2014-2024 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0