![]() |
VPP
0.7
A high-level modern C++ API for Vulkan
|
Allows the GPU to wait for another GPU operation to finish. More...
#include <vppSynchronization.hpp>
Public Member Functions | |
Semaphore () | |
Constructs null reference. | |
Semaphore (const Device &hDevice) | |
Constructs a semaphore on specified device. More... | |
VkSemaphore | handle () const |
Retrieves the Vulkan handle. | |
const Device & | device () const |
Retrieves the device. | |
Allows the GPU to wait for another GPU operation to finish.
Many of VPP operations (esp. queue submission) accept optional Semaphore arguments, allowing to delay a GPU operation to the moment when another GPU operation finishes. When that happens, the semaphore is being set to signaled state and the operation instructed to wait for it is resumed.
This object is reference-counted and may be passed by value.
vpp::Semaphore::Semaphore | ( | const Device & | hDevice | ) |
Constructs a semaphore on specified device.
A semaphore is always created in unsignaled state.
The semaphore will be signaled when the first operation finishes.
The semaphore will be unsignaled automatically when the second operation starts.
There must be always a pair of operations sharing common semaphore: one which signals it and another one which waits for (and unsignals) it.