All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HdStInterleavedMemoryManager Class Reference

Interleaved memory manager (base class). More...

+ Inheritance diagram for HdStInterleavedMemoryManager:

Classes

class  _StripedInterleavedBuffer
 striped buffer More...
 
class  _StripedInterleavedBufferRange
 specialized buffer array range More...
 

Public Member Functions

void StageBufferCopy (HgiBufferCpuToGpuOp const &copyOp)
 Copy new data from CPU into staging buffer. More...
 
void Flush () override
 Flush the staging buffer to GPU. More...
 
- Public Member Functions inherited from HdAggregationStrategy
virtual HdBufferArraySharedPtr CreateBufferArray (TfToken const &role, HdBufferSpecVector const &bufferSpecs, HdBufferArrayUsageHint usageHint)=0
 Factory for creating HdBufferArray. More...
 
virtual AggregationId ComputeAggregationId (HdBufferSpecVector const &bufferSpecs, HdBufferArrayUsageHint usageHint) const =0
 Returns id for given bufferSpecs to be used for aggregation. More...
 

Protected Types

using _BufferFlushMap = std::unordered_map< class HgiBuffer *, _BufferFlushListEntry >
 
using _StripedInterleavedBufferSharedPtr = std::shared_ptr< _StripedInterleavedBuffer >
 
using _StripedInterleavedBufferRangeSharedPtr = std::shared_ptr< _StripedInterleavedBufferRange >
 
using _StripedInterleavedBufferRangePtr = std::weak_ptr< _StripedInterleavedBufferRange >
 

Protected Member Functions

 HdStInterleavedMemoryManager (HdStResourceRegistry *resourceRegistry)
 
HdBufferArrayRangeSharedPtr CreateBufferArrayRange () override
 Factory for creating HdBufferArrayRange. More...
 
HdBufferSpecVector GetBufferSpecs (HdBufferArraySharedPtr const &bufferArray) const override
 Returns the buffer specs from a given buffer array. More...
 
size_t GetResourceAllocation (HdBufferArraySharedPtr const &bufferArray, VtDictionary &result) const override
 Returns the size of the GPU memory used by the passed buffer array. More...
 

Protected Attributes

HdStResourceRegistry *const _resourceRegistry
 
_BufferFlushMap _queuedBuffers
 

Additional Inherited Members

- Public Types inherited from HdAggregationStrategy
typedef size_t AggregationId
 Aggregation ID. More...
 

Detailed Description

Interleaved memory manager (base class).

Definition at line 54 of file interleavedMemoryManager.h.

Member Function Documentation

HdBufferArrayRangeSharedPtr CreateBufferArrayRange ( )
overrideprotectedvirtual

Factory for creating HdBufferArrayRange.

Implements HdAggregationStrategy.

void Flush ( )
overridevirtual

Flush the staging buffer to GPU.

Copy the new buffer data from staging area to GPU.

Reimplemented from HdAggregationStrategy.

HdBufferSpecVector GetBufferSpecs ( HdBufferArraySharedPtr const &  bufferArray) const
overrideprotectedvirtual

Returns the buffer specs from a given buffer array.

Implements HdAggregationStrategy.

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

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

Implements HdAggregationStrategy.

void StageBufferCopy ( HgiBufferCpuToGpuOp const &  copyOp)

Copy new data from CPU into staging buffer.

This reduces the amount of GPU copy commands we emit by first writing to the CPU staging area of the buffer and only flushing it to the GPU when we write to a non-consecutive area of a buffer.


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