Foray Library
rapid prototyping framework for crossplatform development of vulkan hardware ray tracing applications
|
Extension of the commandbuffer wrapper for temporary host synchronized command buffer execution. More...
#include <foray_commandbuffer.hpp>
Public Member Functions | |
virtual VkCommandBuffer | Create (Context *context, VkCommandBufferLevel cmdBufferLvl=VK_COMMAND_BUFFER_LEVEL_PRIMARY, bool begin=false) override |
Create based on the contexts device, command pool and queue. | |
void | Submit () |
Submits but doesn't synchronize. Use HasCompleted() and/or WaitForCompletion() to synchronize. | |
void | SubmitAndWait () |
Submits and waits for the commandbuffer to be completed. | |
bool | HasCompleted () |
Checks the fence for completion (non-blocking) | |
void | WaitForCompletion () |
Blocks CPU thread until commandbuffer has completed. | |
virtual void | Destroy () override |
Destroys the associated resources. | |
virtual | ~HostSyncCommandBuffer () |
![]() | |
CommandBuffer ()=default | |
virtual | ~CommandBuffer () |
virtual void | Begin () |
vkBeginCommandBuffer(); | |
virtual void | End () |
vkEndCommandBuffer() | |
virtual void | Reset (VkCommandBufferResetFlags flags=0) |
vkResetCommandBuffer() | |
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 | |
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 temporary host synchronized command buffer execution.
|
inlinevirtual |
|
overridevirtual |
Create based on the contexts device, command pool and queue.
Reimplemented from foray::core::CommandBuffer.
|
overridevirtual |
Destroys the associated resources.
Reimplemented from foray::core::CommandBuffer.
bool foray::core::HostSyncCommandBuffer::HasCompleted | ( | ) |
Checks the fence for completion (non-blocking)
void foray::core::HostSyncCommandBuffer::Submit | ( | ) |
Submits but doesn't synchronize. Use HasCompleted() and/or WaitForCompletion() to synchronize.
void foray::core::HostSyncCommandBuffer::SubmitAndWait | ( | ) |
Submits and waits for the commandbuffer to be completed.
void foray::core::HostSyncCommandBuffer::WaitForCompletion | ( | ) |
Blocks CPU thread until commandbuffer has completed.
|
protected |