RavEngine
Loading...
Searching...
No Matches
RavEngine::BufferedVRAMSparseSet< index_t, T > Class Template Reference

#include <BufferedVRAMVector.hpp>

Inheritance diagram for RavEngine::BufferedVRAMSparseSet< index_t, T >:
[legend]
Collaboration diagram for RavEngine::BufferedVRAMSparseSet< index_t, T >:
[legend]

Public Types

using index_type = decltype(sparseSet)::index_type
 
using value_type = T
 

Public Member Functions

 BufferedVRAMSparseSet (const std::string_view debugName)
 
 MOVE_NO_COPY (BufferedVRAMSparseSet)
 
auto DenseSize () const
 
template<typename ... A>
void Emplace (index_t sparse_index, A &&... args)
 
void EraseAtSparseIndex (index_t sparseIndex)
 
const auto & GetReverseMap () const
 
bool HasForSparseIndex (index_type sparseIndex) const
 
const auto & GetAtDenseIndex (index_t dense_index)
 
auto & GetHostDenseForWriting (index_t dense_index)
 
auto & GetSparseIndexForDense (index_t index)
 
auto & GetForSparseIndexForWriting (index_t sparse_index)
 
void EncodeSync (RGLDevicePtr device, RGLCommandBufferPtr commandBuffer, const Function< void(RGLBufferPtr)> &gcBuffersFn, bool &previousCommandResetCB)
 
- Public Member Functions inherited from RavEngine::BufferedVRAMStructureBase
auto GetPrivateBuffer () const
 
 BufferedVRAMStructureBase (const std::string_view debugName)
 
 MOVE_NO_COPY (BufferedVRAMStructureBase)
 

Additional Inherited Members

- Protected Member Functions inherited from RavEngine::BufferedVRAMStructureBase
void EncodeSync (RGLDevicePtr device, RGLBufferPtr hostBuffer, RGLCommandBufferPtr commandBuffer, uint32_t elemSize, const Function< void(RGLBufferPtr)> &gcBuffersFn, bool &previousCommandResetCB)
 
void InitializePrivateBuffer (RGLDevicePtr device, uint32_t size)
 
- Protected Attributes inherited from RavEngine::BufferedVRAMStructureBase
RGLBufferPtr privateBuffer
 
std::string debugName
 
std::vector< unsigned char > syncTrackingBuffer
 

Detailed Description

template<typename index_t, typename T>
class RavEngine::BufferedVRAMSparseSet< index_t, T >

The private buffer mirrors the Dense set.

Member Function Documentation

◆ EncodeSync()

template<typename index_t , typename T >
void RavEngine::BufferedVRAMSparseSet< index_t, T >::EncodeSync ( RGLDevicePtr  device,
RGLCommandBufferPtr  commandBuffer,
const Function< void(RGLBufferPtr)> &  gcBuffersFn,
bool &  previousCommandResetCB 
)
inline

Encodes commands to sync the host buffer with the private buffer.

Note
This function may change the value returned by GetPrivateBuffer(). Do not call GetPrivateBuffer() until after calling EncodeSync.
Returns
true if commands were encoded

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