Loading...
Searching...
No Matches
HdStVBOSimpleMemoryManager Class Reference

VBO simple memory manager. More...

#include <vboSimpleMemoryManager.h>

+ Inheritance diagram for HdStVBOSimpleMemoryManager:

Classes

class  _SimpleBufferArray
 Simple buffer array (non-aggregated). More...
 
class  _SimpleBufferArrayRange
 Specialized buffer array range for SimpleBufferArray. More...
 

Public Member Functions

 HdStVBOSimpleMemoryManager (HdStResourceRegistry *resourceRegistry)
 
virtual HDST_API HdBufferArraySharedPtr CreateBufferArray (TfToken const &role, HdBufferSpecVector const &bufferSpecs, HdBufferArrayUsageHint usageHint)
 Factory for creating HdBufferArray managed by HdStVBOSimpleMemoryManager.
 
virtual HDST_API HdBufferArrayRangeSharedPtr CreateBufferArrayRange ()
 Factory for creating HdBufferArrayRange.
 
virtual HDST_API HdStAggregationStrategy::AggregationId ComputeAggregationId (HdBufferSpecVector const &bufferSpecs, HdBufferArrayUsageHint usageHint) const
 Returns id for given bufferSpecs to be used for aggregation.
 
virtual HdBufferSpecVector GetBufferSpecs (HdBufferArraySharedPtr const &bufferArray) const
 Returns the buffer specs from a given buffer array.
 
virtual size_t GetResourceAllocation (HdBufferArraySharedPtr const &bufferArray, VtDictionary &result) const
 Returns the size of the GPU memory used by the passed buffer array.
 
- Public Member Functions inherited from HdStAggregationStrategy
virtual HdBufferArraySharedPtr CreateBufferArray (TfToken const &role, HdBufferSpecVector const &bufferSpecs, HdBufferArrayUsageHint usageHint)=0
 Factory for creating HdBufferArray.
 
virtual HdBufferArrayRangeSharedPtr CreateBufferArrayRange ()=0
 Factory for creating HdBufferArrayRange.
 
virtual AggregationId ComputeAggregationId (HdBufferSpecVector const &bufferSpecs, HdBufferArrayUsageHint usageHint) const =0
 Returns id for given bufferSpecs to be used for aggregation.
 
virtual HdBufferSpecVector GetBufferSpecs (HdBufferArraySharedPtr const &bufferArray) const =0
 Returns the buffer specs from a given buffer array.
 
virtual size_t GetResourceAllocation (HdBufferArraySharedPtr const &bufferArray, VtDictionary &result) const =0
 Returns the accumulated GPU resource allocation for items in the BufferArray passed as parameter.
 
virtual HDST_API void Flush ()
 (Optional) called to Flush consolidated / staging buffers.
 

Protected Types

using _SimpleBufferArraySharedPtr = std::shared_ptr< _SimpleBufferArray >
 
using _SimpleBufferArrayRangeSharedPtr = std::shared_ptr< _SimpleBufferArrayRange >
 
using _SimpleBufferArrayRangePtr = std::weak_ptr< _SimpleBufferArrayRange >
 

Protected Attributes

HdStResourceRegistry *const _resourceRegistry
 

Additional Inherited Members

- Public Types inherited from HdStAggregationStrategy
typedef size_t AggregationId
 Aggregation ID.
 

Detailed Description

VBO simple memory manager.

This class doesn't perform any aggregation.

Definition at line 47 of file vboSimpleMemoryManager.h.

Member Typedef Documentation

◆ _SimpleBufferArrayRangePtr

using _SimpleBufferArrayRangePtr = std::weak_ptr<_SimpleBufferArrayRange>
protected

Definition at line 215 of file vboSimpleMemoryManager.h.

◆ _SimpleBufferArrayRangeSharedPtr

using _SimpleBufferArrayRangeSharedPtr = std::shared_ptr<_SimpleBufferArrayRange>
protected

Definition at line 213 of file vboSimpleMemoryManager.h.

◆ _SimpleBufferArraySharedPtr

using _SimpleBufferArraySharedPtr = std::shared_ptr<_SimpleBufferArray>
protected

Definition at line 211 of file vboSimpleMemoryManager.h.

Constructor & Destructor Documentation

◆ HdStVBOSimpleMemoryManager()

HdStVBOSimpleMemoryManager ( HdStResourceRegistry resourceRegistry)
inline

Definition at line 50 of file vboSimpleMemoryManager.h.

Member Function Documentation

◆ ComputeAggregationId()

virtual HDST_API HdStAggregationStrategy::AggregationId ComputeAggregationId ( HdBufferSpecVector const &  bufferSpecs,
HdBufferArrayUsageHint  usageHint 
) const
virtual

Returns id for given bufferSpecs to be used for aggregation.

Implements HdStAggregationStrategy.

◆ CreateBufferArray()

virtual HDST_API HdBufferArraySharedPtr CreateBufferArray ( TfToken const &  role,
HdBufferSpecVector const &  bufferSpecs,
HdBufferArrayUsageHint  usageHint 
)
virtual

Factory for creating HdBufferArray managed by HdStVBOSimpleMemoryManager.

Implements HdStAggregationStrategy.

◆ CreateBufferArrayRange()

virtual HDST_API HdBufferArrayRangeSharedPtr CreateBufferArrayRange ( )
virtual

Factory for creating HdBufferArrayRange.

Implements HdStAggregationStrategy.

◆ GetBufferSpecs()

virtual HdBufferSpecVector GetBufferSpecs ( HdBufferArraySharedPtr const &  bufferArray) const
virtual

Returns the buffer specs from a given buffer array.

Implements HdStAggregationStrategy.

◆ GetResourceAllocation()

virtual size_t GetResourceAllocation ( HdBufferArraySharedPtr const &  bufferArray,
VtDictionary result 
) const
virtual

Returns the size of the GPU memory used by the passed buffer array.

Implements HdStAggregationStrategy.

Member Data Documentation

◆ _resourceRegistry

HdStResourceRegistry* const _resourceRegistry
protected

Definition at line 308 of file vboSimpleMemoryManager.h.


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