![]() |
VPP
0.7
A high-level modern C++ API for Vulkan
|
Allows the GPU to wait for certain condition on CPU or GPU side to occur. More...
#include <vppSynchronization.hpp>
Public Member Functions | |
Event (const Device &hDevice) | |
Constructs null reference. | |
VkEvent | handle () const |
Retrieves the Vulkan handle. | |
const Device & | device () const |
Retrieves the device. | |
void | signal (bool bSignal) |
Sets the signaled or unsignaled state of the event. | |
bool | isSignaled () const |
Checks whether the event is signaled. | |
void | cmdSignal (bool bSignal, VkPipelineStageFlags stageMask, CommandBuffer hCommandBuffer=CommandBuffer()) |
Generates a command to set signaled or unsignaled event state. More... | |
void | cmdWait (VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, CommandBuffer hCommandBuffer=CommandBuffer()) |
Generates a command to wait for signaled event state. More... | |
void | cmdWait (VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, const Barriers &barriers, CommandBuffer hCommandBuffer=CommandBuffer()) |
Generates a command to wait for signaled event state. More... | |
Allows the GPU to wait for certain condition on CPU or GPU side to occur.
This object is reference-counted and may be passed by value.
void vpp::Event::cmdSignal | ( | bool | bSignal, |
VkPipelineStageFlags | stageMask, | ||
CommandBuffer | hCommandBuffer = CommandBuffer() |
||
) |
Generates a command to set signaled or unsignaled event state.
This command sets the state of the event during GPU execution. The state change is being performed during the pipeline stage specified by the stageMask
parameter.
The command will be generated into specified command buffer, or the default command buffer if omitted.
void vpp::Event::cmdWait | ( | VkPipelineStageFlags | srcStageMask, |
VkPipelineStageFlags | dstStageMask, | ||
CommandBuffer | hCommandBuffer = CommandBuffer() |
||
) |
Generates a command to wait for signaled event state.
This command instructs GPU to wait until the state of the event becomes signaled.
The srcStageMask
parameter specifies the pipeline stages in which an event state change might occur, to be taken into account. This corresponds to the stageMask
parameter in cmdSignal() method. In case of events triggered on CPU side, use VK_PIPELINE_STAGE_HOST_BIT
stage flag.
The dstStageMask
parameter specifies the pipeline stage in which the wait operation shall occur (the stage will be executed after the event is signaled).
The wait and corresponding signal operations should be issued on the same queue within the device.
The command will be generated into specified command buffer, or the default command buffer if omitted.
void vpp::Event::cmdWait | ( | VkPipelineStageFlags | srcStageMask, |
VkPipelineStageFlags | dstStageMask, | ||
const Barriers & | barriers, | ||
CommandBuffer | hCommandBuffer = CommandBuffer() |
||
) |
Generates a command to wait for signaled event state.
This command instructs GPU to wait until the state of the event becomes signaled and produced resources are ready for further processing.
For the second goal, it defines a pipeline barrier. That means two things:
The wait and corresponding signal operations should be issued on the same queue within the device.
The command will be generated into specified command buffer, or the default command buffer if omitted.