Foray Library
rapid prototyping framework for crossplatform development of vulkan hardware ray tracing applications
|
Template class for managing a UBO. For Host -> Device synchronization this utilises a DualBuffer. More...
#include <foray_managedubo.hpp>
Public Member Functions | |
ManagedUbo () | |
~ManagedUbo () | |
void | Create (core::Context *context, std::string_view name) |
virtual void | UpdateTo (uint32_t frameIndex) override |
![]() | |
size_t | SizeOfUbo () const |
virtual void | CmdCopyToDevice (uint32_t frameIndex, VkCommandBuffer cmdBuffer) |
virtual void | CmdPrepareForRead (VkCommandBuffer cmdBuffer, VkPipelineStageFlags2 dstStageMask, VkAccessFlags2 dstAccessMask) const |
virtual VkBufferMemoryBarrier2 | MakeBarrierPrepareForRead (VkPipelineStageFlags2 dstStageMask, VkAccessFlags2 dstAccessMask) const |
void | Create (core::Context *context, VkDeviceSize size, uint32_t stageBufferCount=INFLIGHT_FRAME_COUNT) |
virtual bool | Exists () const override |
Return true, if the managed resource is allocated. | |
virtual void | Destroy () override |
Destroy the resource. | |
const core::ManagedBuffer * | GetDeviceBuffer () const |
operator VkBuffer () const | |
VkDescriptorBufferInfo | GetVkDescriptorBufferInfo () const |
VkBuffer | GetVkBuffer () const |
![]() | |
virtual std::string_view | GetTypeName () const |
Return a hint for the type of resource managed by the instantiation. | |
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. | |
![]() | |
NoMoveDefaults ()=default | |
NoMoveDefaults (const NoMoveDefaults &other)=delete | |
NoMoveDefaults (NoMoveDefaults &&other)=default | |
NoMoveDefaults & | operator= (const NoMoveDefaults &other)=delete |
Protected Attributes | |
T_UBO | mData |
![]() | |
DualBuffer | mUboBuffer |
![]() | |
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 () |
Template class for managing a UBO. For Host -> Device synchronization this utilises a DualBuffer.
T_UBO |
|
inline |
|
inline |
|
inline |
|
inlineoverridevirtual |
Implements foray::util::ManagedUboBase.
|
protected |