Foray Library
rapid prototyping framework for crossplatform development of vulkan hardware ray tracing applications
|
Extension of the commandbuffer wrapper for device and/or host synchronized command buffer execution. More...
#include <foray_commandbuffer.hpp>
Public Member Functions | |
virtual DeviceSyncCommandBuffer & | AddWaitSemaphore (const SemaphoreReference &semaphore) |
Adds a semaphore to wait for before execution of the commandbuffer. | |
virtual DeviceSyncCommandBuffer & | AddSignalSemaphore (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. | |
![]() | |
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 | |
![]() | |
VulkanResource () | |
VulkanResource (std::string_view name) | |
virtual std::string_view | GetTypeName () const |
Returns <OBJECT_TYPE> stringified. | |
![]() | |
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. | |
![]() | |
NoMoveDefaults ()=default | |
NoMoveDefaults (const NoMoveDefaults &other)=delete | |
NoMoveDefaults (NoMoveDefaults &&other)=default | |
NoMoveDefaults & | operator= (const NoMoveDefaults &other)=delete |
Protected Attributes | |
std::vector< SemaphoreReference > | mWaitSemaphores |
std::vector< SemaphoreReference > | mSignalSemaphores |
VkFence | mFence = nullptr |
![]() | |
core::Context * | mContext = nullptr |
VkCommandBuffer | mCommandBuffer {} |
bool | mIsRecording = false |
![]() | |
std::string | mName |
This objects custom name. | |
Additional Inherited Members | |
![]() | |
static void | sPrintAllocatedResources (bool printAsWarning) |
Print a list of all registered existing resources. | |
static const std::unordered_set< ManagedResource * > * | GetTotalAllocatedResources () |
![]() | |
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. | |
Extension of the commandbuffer wrapper for device and/or host synchronized command buffer execution.
|
virtual |
Adds a semaphore to signal after execution of commandbuffer has finished.
|
virtual |
Adds a semaphore to wait for before execution of the commandbuffer.
|
virtual |
Submits the commandbuffer.
|
virtual |
Appends a suitable submitinfo to the vector.
|
protected |
|
protected |
|
protected |