VPP  0.8
A high-level modern C++ API for Vulkan
vpp::Semaphore Class Reference

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 Devicedevice () const
 Retrieves the device.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ Semaphore()

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.


The documentation for this class was generated from the following file: