HDK
|
striped buffer array More...
#include <vboMemoryManager.h>
Public Member Functions | |
HDST_API | _StripedBufferArray (HdStResourceRegistry *resourceRegistry, TfToken const &role, HdBufferSpecVector const &bufferSpecs, HdBufferArrayUsageHint usageHint) |
Constructor. More... | |
HDST_API | ~_StripedBufferArray () override |
Destructor. It invalidates _rangeList. More... | |
HDST_API bool | GarbageCollect () override |
HDST_API void | DebugDump (std::ostream &out) const override |
Debug output. More... | |
HDST_API void | Reallocate (std::vector< HdBufferArrayRangeSharedPtr > const &ranges, HdBufferArraySharedPtr const &curRangeOwner) override |
HDST_API size_t | GetMaxNumElements () const override |
Returns the maximum number of elements capacity. More... | |
void | SetNeedsReallocation () |
Mark to perform reallocation on Reallocate() More... | |
void | SetNeedsCompaction () |
Mark to perform compaction on GarbageCollect() More... | |
HDST_API HdStBufferResourceSharedPtr | GetResource () const |
HDST_API HdStBufferResourceSharedPtr | GetResource (TfToken const &name) |
HdStBufferResourceNamedList const & | GetResources () const |
Returns the list of all named GPU resources for this bufferArray. More... | |
HDST_API HdBufferSpecVector | GetBufferSpecs () const |
Reconstructs the bufferspecs and returns it (for buffer splitting) More... | |
![]() | |
HD_API | HdBufferArray (TfToken const &role, TfToken const garbageCollectionPerfToken, HdBufferArrayUsageHint usageHint) |
virtual HD_API | ~HdBufferArray () |
TfToken const & | GetRole () const |
Returns the role of the GPU data in this bufferArray. More... | |
size_t | GetVersion () const |
HD_API void | IncrementVersion () |
Increments the version of this buffer array. More... | |
HD_API bool | TryAssignRange (HdBufferArrayRangeSharedPtr &range) |
size_t | GetRangeCount () const |
How many ranges are attached to the buffer array. More... | |
HD_API HdBufferArrayRangePtr | GetRange (size_t idx) const |
Get the attached range at the specified index. More... | |
HD_API void | RemoveUnusedRanges () |
bool | NeedsReallocation () const |
Returns true if Reallocate() needs to be called on this buffer array. More... | |
bool | IsImmutable () const |
Returns true if this buffer array is marked as immutable. More... | |
HdBufferArrayUsageHint | GetUsageHint () const |
Returns the usage hints for this buffer array. More... | |
Protected Member Functions | |
HDST_API void | _DeallocateResources () |
HDST_API HdStBufferResourceSharedPtr | _AddResource (TfToken const &name, HdTupleType tupleType, int offset, int stride) |
Adds a new, named GPU resource and returns it. More... | |
![]() | |
void | _SetMaxNumRanges (size_t max) |
HD_API void | _SetRangeList (std::vector< HdBufferArrayRangeSharedPtr > const &ranges) |
Swap the rangelist with ranges . More... | |
Additional Inherited Members | |
![]() | |
bool | _needsReallocation |
striped buffer array
Definition at line 239 of file vboMemoryManager.h.
HDST_API HdStVBOMemoryManager::_StripedBufferArray::_StripedBufferArray | ( | HdStResourceRegistry * | resourceRegistry, |
TfToken const & | role, | ||
HdBufferSpecVector const & | bufferSpecs, | ||
HdBufferArrayUsageHint | usageHint | ||
) |
Constructor.
|
override |
Destructor. It invalidates _rangeList.
|
protected |
Adds a new, named GPU resource and returns it.
|
overridevirtual |
Debug output.
Implements HdBufferArray.
|
overridevirtual |
perform compaction if necessary. If it becomes empty, release all resources and returns true
Implements HdBufferArray.
HDST_API HdBufferSpecVector HdStVBOMemoryManager::_StripedBufferArray::GetBufferSpecs | ( | ) | const |
Reconstructs the bufferspecs and returns it (for buffer splitting)
|
overridevirtual |
Returns the maximum number of elements capacity.
Reimplemented from HdBufferArray.
HDST_API HdStBufferResourceSharedPtr HdStVBOMemoryManager::_StripedBufferArray::GetResource | ( | ) | const |
Returns the GPU resource. If the buffer array contains more than one resource, this method raises a coding error.
HDST_API HdStBufferResourceSharedPtr HdStVBOMemoryManager::_StripedBufferArray::GetResource | ( | TfToken const & | name | ) |
Returns the named GPU resource. This method returns the first found resource. In HD_SAFE_MODE it checks all underlying GL buffers in _resourceMap and raises a coding error if there are more than one GL buffers exist.
|
inline |
Returns the list of all named GPU resources for this bufferArray.
Definition at line 296 of file vboMemoryManager.h.
|
overridevirtual |
Performs reallocation. GLX context has to be set when calling this function.
Implements HdBufferArray.
|
inline |
Mark to perform compaction on GarbageCollect()
Definition at line 279 of file vboMemoryManager.h.
|
inline |
Mark to perform reallocation on Reallocate()
Definition at line 274 of file vboMemoryManager.h.