Loading...
Searching...
No Matches
HdStInterleavedMemoryManager::_StripedInterleavedBufferRange Class Reference

specialized buffer array range More...

#include <interleavedMemoryManager.h>

+ Inheritance diagram for HdStInterleavedMemoryManager::_StripedInterleavedBufferRange:

Public Member Functions

 _StripedInterleavedBufferRange (HdStResourceRegistry *resourceRegistry)
 Constructor.
 
HDST_API ~_StripedInterleavedBufferRange () override
 Destructor.
 
bool IsValid () const override
 Returns true if this range is valid.
 
HDST_API bool IsAssigned () const override
 Returns true is the range has been assigned to a buffer.
 
bool IsImmutable () const override
 Returns true if this range is marked as immutable.
 
bool RequiresStaging () const override
 Returns true if this needs a staging buffer for CPU to GPU copies.
 
HDST_API bool Resize (int numElements) override
 Resize memory area for this range.
 
HDST_API void CopyData (HdBufferSourceSharedPtr const &bufferSource) override
 Copy source data into buffer.
 
HDST_API VtValue ReadData (TfToken const &name) const override
 Read back the buffer content.
 
int GetElementOffset () const override
 Returns the offset at which this range begins in the underlying
buffer array in terms of elements.
 
int GetByteOffset (TfToken const &resourceName) const override
 Returns the byte offset at which this range begins in the underlying buffer array for the given resource.
 
size_t GetNumElements () const override
 Returns the number of elements.
 
size_t GetVersion () const override
 Returns the version of the buffer array.
 
int GetElementStride () const override
 
void IncrementVersion () override
 Increment the version of the buffer array.
 
HDST_API size_t GetMaxNumElements () const override
 Returns the max number of elements.
 
HDST_API HdBufferArrayUsageHint GetUsageHint () const override
 Returns the usage hint from the underlying buffer array.
 
HDST_API HdStBufferResourceSharedPtr GetResource () const override
 Returns the GPU resource.
 
HDST_API HdStBufferResourceSharedPtr GetResource (TfToken const &name) override
 Returns the named GPU resource.
 
HDST_API HdStBufferResourceNamedList const & GetResources () const override
 Returns the list of all named GPU resources for this bufferArrayRange.
 
HDST_API void SetBufferArray (HdBufferArray *bufferArray) override
 Sets the buffer array associated with this buffer;.
 
HDST_API void DebugDump (std::ostream &out) const override
 Debug dump.
 
void SetIndex (int index)
 Set the relative offset for this range.
 
void Invalidate ()
 Make this range invalid.
 
int GetCapacity () const
 Returns the capacity of allocated area.
 
void SetCapacity (int capacity)
 Set the capacity of allocated area for this range.
 
- Public Member Functions inherited from HdStBufferArrayRange
 HdStBufferArrayRange (HdStResourceRegistry *resourceRegistry)
 
virtual HDST_API ~HdStBufferArrayRange ()
 Destructor (do nothing).
 
virtual HdStBufferResourceSharedPtr GetResource () const =0
 Returns the GPU resource.
 
virtual HdStBufferResourceSharedPtr GetResource (TfToken const &name)=0
 Returns the named GPU resource.
 
virtual HdStBufferResourceNamedList const & GetResources () const =0
 Returns the list of all named GPU resources for this bufferArrayRange.
 
virtual HDST_API void GetBufferSpecs (HdBufferSpecVector *bufferSpecs) const override
 Sets the bufferSpecs for all resources.
 
virtual int GetElementStride () const
 
- Public Member Functions inherited from HdBufferArrayRange
virtual HD_API ~HdBufferArrayRange ()
 Destructor (do nothing).
 
virtual bool IsValid () const =0
 Returns true if this range is valid.
 
virtual bool IsAssigned () const =0
 Returns true is the range has been assigned to a buffer.
 
virtual bool IsImmutable () const =0
 Returns true if this range is marked as immutable.
 
virtual bool RequiresStaging () const =0
 Returns true if this needs a staging buffer for CPU to GPU copies.
 
virtual bool Resize (int numElements)=0
 Resize memory area for this range.
 
virtual void CopyData (HdBufferSourceSharedPtr const &bufferSource)=0
 Copy source data into buffer.
 
virtual VtValue ReadData (TfToken const &name) const =0
 Read back the buffer content.
 
virtual int GetElementOffset () const =0
 Returns the offset at which this range begins in the underlying buffer array in terms of elements.
 
virtual int GetByteOffset (TfToken const &resourceName) const =0
 Returns the byte offset at which this range begins in the underlying buffer array for the given resource.
 
virtual size_t GetNumElements () const =0
 Returns the number of elements.
 
virtual size_t GetVersion () const =0
 Returns the version of the buffer array.
 
virtual void IncrementVersion ()=0
 Increment the version of the buffer array.
 
virtual size_t GetMaxNumElements () const =0
 Returns the max number of elements.
 
virtual HdBufferArrayUsageHint GetUsageHint () const =0
 Gets the usage hint on the underlying buffer array.
 
virtual void SetBufferArray (HdBufferArray *bufferArray)=0
 Sets the buffer array associated with this buffer;.
 
virtual void DebugDump (std::ostream &out) const =0
 Debug output.
 
bool IsAggregatedWith (HdBufferArrayRangeSharedPtr const &other) const
 Returns true if the underlying buffer array is aggregated to other's.
 
virtual void GetBufferSpecs (HdBufferSpecVector *bufferSpecs) const =0
 Gets the bufferSpecs for all resources.
 

Protected Member Functions

HDST_API const void * _GetAggregation () const override
 Returns the aggregation container.
 
- Protected Member Functions inherited from HdStBufferArrayRange
HdStResourceRegistryGetResourceRegistry ()
 
HdStResourceRegistryGetResourceRegistry () const
 
- Protected Member Functions inherited from HdBufferArrayRange
virtual const void * _GetAggregation () const =0
 Returns the aggregation container to be used in IsAggregatedWith()
 
 HdBufferArrayRange (const HdBufferArrayRange &)=delete
 
HdBufferArrayRangeoperator= (const HdBufferArrayRange &)=delete
 

Detailed Description

specialized buffer array range

Definition at line 59 of file interleavedMemoryManager.h.

Constructor & Destructor Documentation

◆ _StripedInterleavedBufferRange()

_StripedInterleavedBufferRange ( HdStResourceRegistry resourceRegistry)
inline

Constructor.

Definition at line 63 of file interleavedMemoryManager.h.

◆ ~_StripedInterleavedBufferRange()

HDST_API ~_StripedInterleavedBufferRange ( )
override

Destructor.

Member Function Documentation

◆ _GetAggregation()

HDST_API const void * _GetAggregation ( ) const
overrideprotectedvirtual

Returns the aggregation container.

Implements HdBufferArrayRange.

◆ CopyData()

HDST_API void CopyData ( HdBufferSourceSharedPtr const &  bufferSource)
overridevirtual

Copy source data into buffer.

Implements HdBufferArrayRange.

◆ DebugDump()

HDST_API void DebugDump ( std::ostream &  out) const
overridevirtual

Debug dump.

Implements HdBufferArrayRange.

◆ GetByteOffset()

int GetByteOffset ( TfToken const &  resourceName) const
inlineoverridevirtual

Returns the byte offset at which this range begins in the underlying buffer array for the given resource.

Implements HdBufferArrayRange.

Definition at line 111 of file interleavedMemoryManager.h.

◆ GetCapacity()

int GetCapacity ( ) const
inline

Returns the capacity of allocated area.

Definition at line 177 of file interleavedMemoryManager.h.

◆ GetElementOffset()

int GetElementOffset ( ) const
inlineoverridevirtual

Returns the offset at which this range begins in the underlying
buffer array in terms of elements.

Implements HdBufferArrayRange.

Definition at line 105 of file interleavedMemoryManager.h.

◆ GetElementStride()

int GetElementStride ( ) const
inlineoverridevirtual

Reimplemented from HdStBufferArrayRange.

Definition at line 128 of file interleavedMemoryManager.h.

◆ GetMaxNumElements()

HDST_API size_t GetMaxNumElements ( ) const
overridevirtual

Returns the max number of elements.

Implements HdBufferArrayRange.

◆ GetNumElements()

size_t GetNumElements ( ) const
inlineoverridevirtual

Returns the number of elements.

Implements HdBufferArrayRange.

Definition at line 119 of file interleavedMemoryManager.h.

◆ GetResource() [1/2]

HDST_API HdStBufferResourceSharedPtr GetResource ( ) const
overridevirtual

Returns the GPU resource.

If the buffer array contains more than one resource, this method raises a coding error.

Implements HdStBufferArrayRange.

◆ GetResource() [2/2]

HDST_API HdStBufferResourceSharedPtr GetResource ( TfToken const &  name)
overridevirtual

Returns the named GPU resource.

Implements HdStBufferArrayRange.

◆ GetResources()

HDST_API HdStBufferResourceNamedList const & GetResources ( ) const
overridevirtual

Returns the list of all named GPU resources for this bufferArrayRange.

Implements HdStBufferArrayRange.

◆ GetUsageHint()

HDST_API HdBufferArrayUsageHint GetUsageHint ( ) const
overridevirtual

Returns the usage hint from the underlying buffer array.

Implements HdBufferArrayRange.

◆ GetVersion()

size_t GetVersion ( ) const
inlineoverridevirtual

Returns the version of the buffer array.

Implements HdBufferArrayRange.

Definition at line 124 of file interleavedMemoryManager.h.

◆ IncrementVersion()

void IncrementVersion ( )
inlineoverridevirtual

Increment the version of the buffer array.

Implements HdBufferArrayRange.

Definition at line 133 of file interleavedMemoryManager.h.

◆ Invalidate()

void Invalidate ( )
inline

Make this range invalid.

Definition at line 172 of file interleavedMemoryManager.h.

◆ IsAssigned()

HDST_API bool IsAssigned ( ) const
overridevirtual

Returns true is the range has been assigned to a buffer.

Implements HdBufferArrayRange.

◆ IsImmutable()

bool IsImmutable ( ) const
overridevirtual

Returns true if this range is marked as immutable.

Implements HdBufferArrayRange.

◆ IsValid()

bool IsValid ( ) const
inlineoverridevirtual

Returns true if this range is valid.

Implements HdBufferArrayRange.

Definition at line 75 of file interleavedMemoryManager.h.

◆ ReadData()

HDST_API VtValue ReadData ( TfToken const &  name) const
overridevirtual

Read back the buffer content.

Implements HdBufferArrayRange.

◆ RequiresStaging()

bool RequiresStaging ( ) const
overridevirtual

Returns true if this needs a staging buffer for CPU to GPU copies.

Implements HdBufferArrayRange.

◆ Resize()

HDST_API bool Resize ( int  numElements)
overridevirtual

Resize memory area for this range.

Returns true if it causes container buffer reallocation.

Implements HdBufferArrayRange.

◆ SetBufferArray()

HDST_API void SetBufferArray ( HdBufferArray bufferArray)
overridevirtual

Sets the buffer array associated with this buffer;.

Implements HdBufferArrayRange.

◆ SetCapacity()

void SetCapacity ( int  capacity)
inline

Set the capacity of allocated area for this range.

Definition at line 182 of file interleavedMemoryManager.h.

◆ SetIndex()

void SetIndex ( int  index)
inline

Set the relative offset for this range.

Definition at line 167 of file interleavedMemoryManager.h.


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