Foray Library
rapid prototyping framework for crossplatform development of vulkan hardware ray tracing applications
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
foray::util::ExternalSemaphore Class Reference

Timeline Semaphore exposing handles for synchronization with other Apis (e.g. Cuda for OptiX denoising) More...

#include <foray_externalsemaphore.hpp>

Inheritance diagram for foray::util::ExternalSemaphore:
foray::core::VulkanResource< VkObjectType::VK_OBJECT_TYPE_SEMAPHORE > foray::core::ManagedResource foray::NoMoveDefaults

Public Member Functions

void Create (core::Context *context)
 
virtual bool Exists () const override
 Return true, if the managed resource is allocated.
 
virtual void Destroy () override
 Destroy the resource.
 
 operator VkSemaphore () const
 
- Public Member Functions inherited from foray::core::VulkanResource< VkObjectType::VK_OBJECT_TYPE_SEMAPHORE >
 VulkanResource ()
 
 VulkanResource (std::string_view name)
 
virtual std::string_view GetTypeName () const
 Returns <OBJECT_TYPE> stringified.
 
- Public Member Functions inherited from foray::core::ManagedResource
 ManagedResource ()
 Default constructor registers the resource.
 
 ManagedResource (std::string_view name)
 Registers the resource and sets its name.
 
virtual ~ManagedResource ()
 Unregisters the resource.
 
std::string_view GetName () const
 Return a custom name for the object.
 
virtual void SetName (std::string_view name)
 Set a custom name for the object.
 
std::string Print () const
 Print name and type in one string.
 
- Public Member Functions inherited from foray::NoMoveDefaults
 NoMoveDefaults ()=default
 
 NoMoveDefaults (const NoMoveDefaults &other)=delete
 
 NoMoveDefaults (NoMoveDefaults &&other)=default
 
NoMoveDefaultsoperator= (const NoMoveDefaults &other)=delete
 

Protected Attributes

core::ContextmContext = nullptr
 
VkSemaphore mSemaphore = nullptr
 
int mHandle = -1
 
- Protected Attributes inherited from foray::core::ManagedResource
std::string mName
 This objects custom name.
 

Additional Inherited Members

- Static Public Member Functions inherited from foray::core::ManagedResource
static void sPrintAllocatedResources (bool printAsWarning)
 Print a list of all registered existing resources.
 
static const std::unordered_set< ManagedResource * > * GetTotalAllocatedResources ()
 
- Protected Member Functions inherited from foray::core::VulkanResource< VkObjectType::VK_OBJECT_TYPE_SEMAPHORE >
virtual void SetObjectName (core::Context *context, const void *handle, std::string_view name, bool updateResourceName=true)
 Set the object name. Sets both ManagedResource::mName aswell as vulkan debug object name.
 

Detailed Description

Timeline Semaphore exposing handles for synchronization with other Apis (e.g. Cuda for OptiX denoising)

Member Function Documentation

◆ Create()

void foray::util::ExternalSemaphore::Create ( core::Context context)

◆ Destroy()

virtual void foray::util::ExternalSemaphore::Destroy ( )
overridevirtual

Destroy the resource.

Remarks
This method must be callable even if the resource has not been initialized yet. This method must call any Destroy() overloads of child objects and of base classes

Implements foray::core::ManagedResource.

◆ Exists()

virtual bool foray::util::ExternalSemaphore::Exists ( ) const
inlineoverridevirtual

Return true, if the managed resource is allocated.

Example: Vulkan object stored could be nullptr or instantiated

Implements foray::core::ManagedResource.

◆ operator VkSemaphore()

foray::util::ExternalSemaphore::operator VkSemaphore ( ) const
inline

Member Data Documentation

◆ mContext

core::Context* foray::util::ExternalSemaphore::mContext = nullptr
protected

◆ mHandle

int foray::util::ExternalSemaphore::mHandle = -1
protected

◆ mSemaphore

VkSemaphore foray::util::ExternalSemaphore::mSemaphore = nullptr
protected

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