Loading...
Searching...
No Matches
HdStVBOMemoryManager Class Reference

VBO memory manager. More...

#include <vboMemoryManager.h>

+ Inheritance diagram for HdStVBOMemoryManager:

Classes

class  _StripedBufferArray
 striped buffer array More...
 
class  _StripedBufferArrayRange
 specialized buffer array range More...
 

Public Member Functions

 HdStVBOMemoryManager (HdStResourceRegistry *resourceRegistry)
 
virtual HDST_API HdBufferArraySharedPtr CreateBufferArray (TfToken const &role, HdBufferSpecVector const &bufferSpecs, HdBufferArrayUsageHint usageHint)
 Factory for creating HdBufferArray managed by HdStVBOMemoryManager aggregation.
 
virtual HDST_API HdBufferArrayRangeSharedPtr CreateBufferArrayRange ()
 Factory for creating HdBufferArrayRange managed by HdStVBOMemoryManager aggregation.
 
virtual HDST_API 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 _StripedBufferArraySharedPtr = std::shared_ptr< _StripedBufferArray >
 
using _StripedBufferArrayRangeSharedPtr = std::shared_ptr< _StripedBufferArrayRange >
 
using _StripedBufferArrayRangePtr = std::weak_ptr< _StripedBufferArrayRange >
 

Protected Attributes

HdStResourceRegistry_resourceRegistry
 

Additional Inherited Members

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

Detailed Description

VBO memory manager.

Definition at line 50 of file vboMemoryManager.h.

Member Typedef Documentation

◆ _StripedBufferArrayRangePtr

using _StripedBufferArrayRangePtr = std::weak_ptr<_StripedBufferArrayRange>
protected

Definition at line 235 of file vboMemoryManager.h.

◆ _StripedBufferArrayRangeSharedPtr

using _StripedBufferArrayRangeSharedPtr = std::shared_ptr<_StripedBufferArrayRange>
protected

Definition at line 233 of file vboMemoryManager.h.

◆ _StripedBufferArraySharedPtr

using _StripedBufferArraySharedPtr = std::shared_ptr<_StripedBufferArray>
protected

Definition at line 231 of file vboMemoryManager.h.

Constructor & Destructor Documentation

◆ HdStVBOMemoryManager()

HdStVBOMemoryManager ( HdStResourceRegistry resourceRegistry)
inline

Definition at line 53 of file vboMemoryManager.h.

Member Function Documentation

◆ ComputeAggregationId()

virtual HDST_API 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 HdStVBOMemoryManager aggregation.

Implements HdStAggregationStrategy.

◆ CreateBufferArrayRange()

virtual HDST_API HdBufferArrayRangeSharedPtr CreateBufferArrayRange ( )
virtual

Factory for creating HdBufferArrayRange managed by HdStVBOMemoryManager aggregation.

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* _resourceRegistry
protected

Definition at line 329 of file vboMemoryManager.h.


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