CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::VKCommandBufferTracker Class Reference

A helper class that keeps track of any resource so that they remain alive for as long as Vulkan needs it to be. More...

#include <CeresEngine/RenderAPI/Vulkan/VKCommandBuffer.hpp>

Public Member Functions

 VKCommandBufferTracker ()=default
 Creates a new empty tracker.
 
 VKCommandBufferTracker (const VKCommandBufferTracker &)=delete
 
VKCommandBufferTrackeroperator= (const VKCommandBufferTracker &)=delete
 
 VKCommandBufferTracker (VKCommandBufferTracker &&)=default
 
VKCommandBufferTrackeroperator= (VKCommandBufferTracker &&)=default
 
 ~VKCommandBufferTracker ()
 Destroys the tracker and releases any resource that may be tracked.
 
void track (GPUObject *resource)
 Tracks a resource by pointer.
 
void track (GPUObject &resource)
 Tracks a resource by reference.
 
void reset ()
 Resets any tracked state.
 

Private Types

using Allocator = VKAllocator
 An allocator that stores the state of tracked objects.
 

Private Attributes

Allocator mAllocator
 An allocator that stores the state of tracked objects.
 
Deque< RC< GPUObject >, AllocatormResources {mAllocator}
 The marker that points to the top of the allocator before it allocates anything.
 

Detailed Description

A helper class that keeps track of any resource so that they remain alive for as long as Vulkan needs it to be.

Member Typedef Documentation

◆ Allocator

An allocator that stores the state of tracked objects.

Constructor & Destructor Documentation

◆ VKCommandBufferTracker() [1/3]

CeresEngine::VKCommandBufferTracker::VKCommandBufferTracker ( )
default

Creates a new empty tracker.

◆ VKCommandBufferTracker() [2/3]

CeresEngine::VKCommandBufferTracker::VKCommandBufferTracker ( const VKCommandBufferTracker )
delete

◆ VKCommandBufferTracker() [3/3]

CeresEngine::VKCommandBufferTracker::VKCommandBufferTracker ( VKCommandBufferTracker &&  )
default

◆ ~VKCommandBufferTracker()

CeresEngine::VKCommandBufferTracker::~VKCommandBufferTracker ( )
inline

Destroys the tracker and releases any resource that may be tracked.

Member Function Documentation

◆ operator=() [1/2]

VKCommandBufferTracker & CeresEngine::VKCommandBufferTracker::operator= ( const VKCommandBufferTracker )
delete

◆ operator=() [2/2]

VKCommandBufferTracker & CeresEngine::VKCommandBufferTracker::operator= ( VKCommandBufferTracker &&  )
default

◆ reset()

void CeresEngine::VKCommandBufferTracker::reset ( )
inline

Resets any tracked state.

◆ track() [1/2]

void CeresEngine::VKCommandBufferTracker::track ( GPUObject resource)
inline

Tracks a resource by reference.

Parameters
resourceA reference to the resource to be tracked

◆ track() [2/2]

void CeresEngine::VKCommandBufferTracker::track ( GPUObject resource)
inline

Tracks a resource by pointer.

Parameters
resourceA pointer to the resource to be tracked

Member Data Documentation

◆ mAllocator

Allocator CeresEngine::VKCommandBufferTracker::mAllocator
private

An allocator that stores the state of tracked objects.

◆ mResources

Deque<RC<GPUObject>, Allocator> CeresEngine::VKCommandBufferTracker::mResources {mAllocator}
private

The marker that points to the top of the allocator before it allocates anything.

Used to rewind the allocator on reset(). A vector of all tracked resources.


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