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::core::DeviceSyncCommandBuffer Class Reference

Extension of the commandbuffer wrapper for device and/or host synchronized command buffer execution. More...

#include <foray_commandbuffer.hpp>

Inheritance diagram for foray::core::DeviceSyncCommandBuffer:
foray::core::CommandBuffer foray::core::VulkanResource< VkObjectType::VK_OBJECT_TYPE_COMMAND_BUFFER > foray::core::ManagedResource foray::NoMoveDefaults

Public Member Functions

virtual DeviceSyncCommandBufferAddWaitSemaphore (const SemaphoreReference &semaphore)
 Adds a semaphore to wait for before execution of the commandbuffer.
 
virtual DeviceSyncCommandBufferAddSignalSemaphore (const SemaphoreReference &semaphore)
 Adds a semaphore to signal after execution of commandbuffer has finished.
 
virtual void Submit ()
 Submits the commandbuffer.
 
virtual void WriteToSubmitInfo (std::vector< VkSubmitInfo2 > &submitInfos)
 Appends a suitable submitinfo to the vector.
 
- Public Member Functions inherited from foray::core::CommandBuffer
 CommandBuffer ()=default
 
virtual ~CommandBuffer ()
 
virtual VkCommandBuffer Create (Context *context, VkCommandBufferLevel cmdBufferLvl=VK_COMMAND_BUFFER_LEVEL_PRIMARY, bool begin=false)
 Create based on the contexts device, command pool and queue.
 
virtual void Begin ()
 vkBeginCommandBuffer();
 
virtual void End ()
 vkEndCommandBuffer()
 
virtual void Reset (VkCommandBufferResetFlags flags=0)
 vkResetCommandBuffer()
 
virtual void Destroy () override
 Destroys the associated resources.
 
virtual bool Exists () const override
 Return true, if the managed resource is allocated.
 
virtual void SetName (std::string_view name) override
 Set a custom name for the object.
 
 operator VkCommandBuffer () const
 
- Public Member Functions inherited from foray::core::VulkanResource< VkObjectType::VK_OBJECT_TYPE_COMMAND_BUFFER >
 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.
 
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

std::vector< SemaphoreReferencemWaitSemaphores
 
std::vector< SemaphoreReferencemSignalSemaphores
 
VkFence mFence = nullptr
 
- Protected Attributes inherited from foray::core::CommandBuffer
core::ContextmContext = nullptr
 
VkCommandBuffer mCommandBuffer {}
 
bool mIsRecording = false
 
- 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_COMMAND_BUFFER >
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

Extension of the commandbuffer wrapper for device and/or host synchronized command buffer execution.

Member Function Documentation

◆ AddSignalSemaphore()

virtual DeviceSyncCommandBuffer & foray::core::DeviceSyncCommandBuffer::AddSignalSemaphore ( const SemaphoreReference semaphore)
virtual

Adds a semaphore to signal after execution of commandbuffer has finished.

◆ AddWaitSemaphore()

virtual DeviceSyncCommandBuffer & foray::core::DeviceSyncCommandBuffer::AddWaitSemaphore ( const SemaphoreReference semaphore)
virtual

Adds a semaphore to wait for before execution of the commandbuffer.

◆ Submit()

virtual void foray::core::DeviceSyncCommandBuffer::Submit ( )
virtual

Submits the commandbuffer.

◆ WriteToSubmitInfo()

virtual void foray::core::DeviceSyncCommandBuffer::WriteToSubmitInfo ( std::vector< VkSubmitInfo2 > &  submitInfos)
virtual

Appends a suitable submitinfo to the vector.

Member Data Documentation

◆ mFence

VkFence foray::core::DeviceSyncCommandBuffer::mFence = nullptr
protected

◆ mSignalSemaphores

std::vector<SemaphoreReference> foray::core::DeviceSyncCommandBuffer::mSignalSemaphores
protected

◆ mWaitSemaphores

std::vector<SemaphoreReference> foray::core::DeviceSyncCommandBuffer::mWaitSemaphores
protected

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