Loading...
Searching...
No Matches
HdStResourceRegistry Class Referencefinal

A central registry of all GPU resources. More...

#include <resourceRegistry.h>

+ Inheritance diagram for HdStResourceRegistry:

Public Member Functions

 HF_MALLOC_TAG_NEW ("new HdStResourceRegistry")
 
HDST_API HdStResourceRegistry (Hgi *hgi)
 
HDST_API void InvalidateShaderRegistry () override
 Invalidate any shaders registered with this registry.
 
HDST_API void ReloadResource (TfToken const &resourceType, std::string const &path) override
 Generic method to inform RenderDelegate a resource needs to be reloaded.
 
HDST_API VtDictionary GetResourceAllocation () const override
 Returns a report of resource allocation by role in bytes and a summary total allocation of GPU memory in bytes for this registry.
 
HDST_API HgiGetHgi ()
 Returns Hgi used to create/destroy GPU resources.
 
HDST_API HdStTextureHandleSharedPtr AllocateTextureHandle (const HdStTextureIdentifier &textureId, HdTextureType textureType, const HdSamplerParameters &samplerParams, size_t memoryRequest, HdStShaderCodePtr const &shaderCode)
 Allocate texture handle (encapsulates texture and sampler object, memory request and callback to shader).
 
HDST_API HdStTextureObjectSharedPtr AllocateTextureObject (const HdStTextureIdentifier &textureId, HdTextureType textureType)
 Allocate texture object.
 
HDST_API void SetMemoryRequestForTextureType (HdTextureType textureType, size_t memoryRequest)
 Sets how much memory a single texture can consume in bytes by texture type.
 
HDST_API HdBufferArrayRangeSharedPtr AllocateNonUniformBufferArrayRange (TfToken const &role, HdBufferSpecVector const &bufferSpecs, HdBufferArrayUsageHint usageHint)
 
HDST_API HdBufferArrayRangeSharedPtr AllocateNonUniformImmutableBufferArrayRange (TfToken const &role, HdBufferSpecVector const &bufferSpecs, HdBufferArrayUsageHint usageHint)
 
HDST_API HdBufferArrayRangeSharedPtr AllocateUniformBufferArrayRange (TfToken const &role, HdBufferSpecVector const &bufferSpecs, HdBufferArrayUsageHint usageHint)
 
HDST_API HdBufferArrayRangeSharedPtr AllocateShaderStorageBufferArrayRange (TfToken const &role, HdBufferSpecVector const &bufferSpecs, HdBufferArrayUsageHint usageHint)
 
HDST_API HdBufferArrayRangeSharedPtr AllocateSingleBufferArrayRange (TfToken const &role, HdBufferSpecVector const &bufferSpecs, HdBufferArrayUsageHint usageHint)
 
HDST_API HdBufferArrayRangeSharedPtr UpdateNonUniformBufferArrayRange (TfToken const &role, HdBufferArrayRangeSharedPtr const &curRange, HdBufferSpecVector const &updatedOrAddedSpecs, HdBufferSpecVector const &removedSpecs, HdBufferArrayUsageHint usageHint)
 
HDST_API HdBufferArrayRangeSharedPtr UpdateNonUniformImmutableBufferArrayRange (TfToken const &role, HdBufferArrayRangeSharedPtr const &curRange, HdBufferSpecVector const &updatedOrAddedSpecs, HdBufferSpecVector const &removedSpecs, HdBufferArrayUsageHint usageHint)
 
HDST_API HdBufferArrayRangeSharedPtr UpdateUniformBufferArrayRange (TfToken const &role, HdBufferArrayRangeSharedPtr const &curRange, HdBufferSpecVector const &updatedOrAddedSpecs, HdBufferSpecVector const &removedSpecs, HdBufferArrayUsageHint usageHint)
 
HDST_API HdBufferArrayRangeSharedPtr UpdateShaderStorageBufferArrayRange (TfToken const &role, HdBufferArrayRangeSharedPtr const &curRange, HdBufferSpecVector const &updatedOrAddedSpecs, HdBufferSpecVector const &removedSpecs, HdBufferArrayUsageHint usageHint)
 
HDST_API void AddSources (HdBufferArrayRangeSharedPtr const &range, HdBufferSourceSharedPtrVector &&sources)
 Append source data for given range to be committed later.
 
HDST_API void AddSource (HdBufferArrayRangeSharedPtr const &range, HdBufferSourceSharedPtr const &source)
 Append a source data for given range to be committed later.
 
HDST_API void AddSource (HdBufferSourceSharedPtr const &source)
 Append a source data just to be resolved (used for cpu computations).
 
HDST_API void AddComputation (HdBufferArrayRangeSharedPtr const &range, HdStComputationSharedPtr const &computation, HdStComputeQueue const queue)
 Append a gpu computation into queue.
 
HDST_API HdStDispatchBufferSharedPtr RegisterDispatchBuffer (TfToken const &role, int count, int commandNumUints)
 Register a buffer allocated with count * commandNumUints * sizeof(uint32_t) to be used as an indirect dispatch buffer.
 
HDST_API HdStBufferResourceSharedPtr RegisterBufferResource (TfToken const &role, HdTupleType tupleType, HgiBufferUsage bufferUsage)
 Register a misc buffer resource.
 
HDST_API void GarbageCollectDispatchBuffers ()
 Remove any entries associated with expired dispatch buffers.
 
HDST_API void GarbageCollectBufferResources ()
 Remove any entries associated with expired misc buffers.
 
HDST_API HdInstance< HdSt_MeshTopologySharedPtr > RegisterMeshTopology (HdInstance< HdSt_MeshTopologySharedPtr >::ID id)
 These registries implement sharing and deduplication of data based on computed hash identifiers.
 
HDST_API HdInstance< HdSt_BasisCurvesTopologySharedPtr > RegisterBasisCurvesTopology (HdInstance< HdSt_BasisCurvesTopologySharedPtr >::ID id)
 
HDST_API HdInstance< HdSt_VertexAdjacencyBuilderSharedPtr > RegisterVertexAdjacencyBuilder (HdInstance< HdSt_VertexAdjacencyBuilderSharedPtr >::ID id)
 
HDST_API HdInstance< HdBufferArrayRangeSharedPtr > RegisterMeshIndexRange (HdInstance< HdBufferArrayRangeSharedPtr >::ID id, TfToken const &name)
 Topology Index buffer array range instancing Returns the HdInstance points to shared HdBufferArrayRange, distinguished by given ID.
 
HDST_API HdInstance< HdBufferArrayRangeSharedPtr > RegisterBasisCurvesIndexRange (HdInstance< HdBufferArrayRangeSharedPtr >::ID id, TfToken const &name)
 
HDST_API HdInstance< HdBufferArrayRangeSharedPtr > RegisterPrimvarRange (HdInstance< HdBufferArrayRangeSharedPtr >::ID id)
 Primvar array range instancing Returns the HdInstance pointing to shared HdBufferArrayRange, distinguished by given ID.
 
HDST_API HdInstance< HdBufferArrayRangeSharedPtr > RegisterExtComputationDataRange (HdInstance< HdBufferArrayRangeSharedPtr >::ID id)
 ExtComputation data array range instancing Returns the HdInstance pointing to shared HdBufferArrayRange, distinguished by given ID.
 
HDST_API HdInstance< HdSt_GeometricShaderSharedPtr > RegisterGeometricShader (HdInstance< HdSt_GeometricShaderSharedPtr >::ID id)
 Register a geometric shader.
 
HDST_API HdInstance< HdStGLSLProgramSharedPtr > RegisterGLSLProgram (HdInstance< HdStGLSLProgramSharedPtr >::ID id)
 Register a GLSL program into the program registry.
 
HDST_API HdInstance< HioGlslfxSharedPtr > RegisterGLSLFXFile (HdInstance< HioGlslfxSharedPtr >::ID id)
 Register a GLSLFX file.
 
HDST_API HdInstance< HgiResourceBindingsSharedPtr > RegisterResourceBindings (HdInstance< HgiResourceBindingsSharedPtr >::ID id)
 Register a Hgi resource bindings into the registry.
 
HDST_API HdInstance< HgiGraphicsPipelineSharedPtr > RegisterGraphicsPipeline (HdInstance< HgiGraphicsPipelineSharedPtr >::ID id)
 Register a Hgi graphics pipeline into the registry.
 
HDST_API HdInstance< HgiComputePipelineSharedPtr > RegisterComputePipeline (HdInstance< HgiComputePipelineSharedPtr >::ID id)
 Register a Hgi compute pipeline into the registry.
 
HDST_API HgiBlitCmdsGetGlobalBlitCmds ()
 Returns the global hgi blit command queue for recording blitting work.
 
HDST_API HgiComputeCmdsGetGlobalComputeCmds (HgiComputeDispatch dispatchMethod=HgiComputeDispatchSerial)
 Returns the global hgi compute cmd queue for recording compute work.
 
HDST_API void SubmitBlitWork (HgiSubmitWaitType wait=HgiSubmitWaitTypeNoWait)
 Submits blit work queued in global blit cmds for GPU execution.
 
HDST_API void SubmitComputeWork (HgiSubmitWaitType wait=HgiSubmitWaitTypeNoWait)
 Submits compute work queued in global compute cmds for GPU execution.
 
HDST_API HdStStagingBufferGetStagingBuffer ()
 Returns the staging buffer used when committing data to the GPU.
 
void SetNonUniformAggregationStrategy (std::unique_ptr< HdStAggregationStrategy > &&strategy)
 Set the aggregation strategy for non uniform parameters (vertex, varying, facevarying) Takes ownership of the passed in strategy object.
 
void SetNonUniformImmutableAggregationStrategy (std::unique_ptr< HdStAggregationStrategy > &&strategy)
 Set the aggregation strategy for non uniform immutable parameters (vertex, varying, facevarying) Takes ownership of the passed in strategy object.
 
void SetUniformAggregationStrategy (std::unique_ptr< HdStAggregationStrategy > &&strategy)
 Set the aggregation strategy for uniform (shader globals) Takes ownership of the passed in strategy object.
 
void SetShaderStorageAggregationStrategy (std::unique_ptr< HdStAggregationStrategy > &&strategy)
 Set the aggregation strategy for SSBO (uniform primvars) Takes ownership of the passed in strategy object.
 
void SetSingleStorageAggregationStrategy (std::unique_ptr< HdStAggregationStrategy > &&strategy)
 Set the aggregation strategy for single buffers (for nested instancer).
 
- Public Member Functions inherited from HdResourceRegistry
 HF_MALLOC_TAG_NEW ("new HdResourceRegistry")
 
HD_API void Commit ()
 Commits all in-flight source data.
 
HD_API void GarbageCollect ()
 cleanup all buffers and remove if empty
 
virtual HD_API void InvalidateShaderRegistry ()
 Invalidate any shaders registered with this registry.
 
virtual HD_API void ReloadResource (TfToken const &resourceType, std::string const &path)
 Generic method to inform RenderDelegate a resource needs to be reloaded.
 
virtual HD_API VtDictionary GetResourceAllocation () const
 Returns a report of resource allocation by role in bytes and a summary total allocation of GPU memory in bytes for this registry.
 

Protected Member Functions

void _Commit () override
 A hook for derived registries to perform additional resource commits.
 
void _GarbageCollect () override
 Hooks for derived registries to perform additional GC when GarbageCollect() is invoked.
 
virtual HD_API void _Commit ()
 A hook for derived registries to perform additional resource commits.
 
virtual HD_API void _GarbageCollect ()
 Hooks for derived registries to perform additional GC when GarbageCollect() is invoked.
 

Friends

HDST_API friend std::ostream & operator<< (std::ostream &out, const HdStResourceRegistry &self)
 Debug dump.
 

Additional Inherited Members

- Public Types inherited from HdResourceRegistry
typedef size_t TextureKey
 Globally unique id for texture, see HdRenderIndex::GetTextureKey() for details.
 

Detailed Description

A central registry of all GPU resources.

Definition at line 121 of file resourceRegistry.h.

Member Function Documentation

◆ _Commit()

void _Commit ( )
overrideprotectedvirtual

A hook for derived registries to perform additional resource commits.

Reimplemented from HdResourceRegistry.

◆ _GarbageCollect()

void _GarbageCollect ( )
overrideprotectedvirtual

Hooks for derived registries to perform additional GC when GarbageCollect() is invoked.

Reimplemented from HdResourceRegistry.

◆ AddComputation()

HDST_API void AddComputation ( HdBufferArrayRangeSharedPtr const &  range,
HdStComputationSharedPtr const &  computation,
HdStComputeQueue const  queue 
)

Append a gpu computation into queue.

The parameter 'range' specifies the destination buffer range, which has to be allocated by caller of this function.

note: GPU computations will be executed in the order that they are registered.

◆ AddSource() [1/2]

HDST_API void AddSource ( HdBufferArrayRangeSharedPtr const &  range,
HdBufferSourceSharedPtr const &  source 
)

Append a source data for given range to be committed later.

◆ AddSource() [2/2]

HDST_API void AddSource ( HdBufferSourceSharedPtr const &  source)

Append a source data just to be resolved (used for cpu computations).

◆ AddSources()

HDST_API void AddSources ( HdBufferArrayRangeSharedPtr const &  range,
HdBufferSourceSharedPtrVector &&  sources 
)

Append source data for given range to be committed later.


Resource update & computation queuing API

◆ AllocateNonUniformBufferArrayRange()

HDST_API HdBufferArrayRangeSharedPtr AllocateNonUniformBufferArrayRange ( TfToken const &  role,
HdBufferSpecVector const &  bufferSpecs,
HdBufferArrayUsageHint  usageHint 
)

BAR allocation API

The Allocate* flavor of methods allocate a new BAR for the given buffer specs using the chosen aggregation strategy.

◆ AllocateTextureHandle()

HDST_API HdStTextureHandleSharedPtr AllocateTextureHandle ( const HdStTextureIdentifier textureId,
HdTextureType  textureType,
const HdSamplerParameters samplerParams,
size_t  memoryRequest,
HdStShaderCodePtr const &  shaderCode 
)

Allocate texture handle (encapsulates texture and sampler object, memory request and callback to shader).


Texture allocation API

The actual allocation of the associated GPU texture and sampler resources and loading of the texture file is delayed until the commit phase.

Parameters
textureIdPath to file and information to identify a texture if the file is a container for several textures (e.g., OpenVDB file containing several grids, movie file containing frames).
textureTypeTexture type, e.g., uv, ptex, ...
samplerParamsSampling parameters such as wrapS, ... wrapS, wrapT, wrapR mode, min filer, mag filter
memoryRequestMemory request. The texture is down-sampled to meet the target memory which is the maximum of all memory requests associated to the texture. If all memory requests are 0, no down-sampling will happen.
shaderCodeAfter the texture is committed (or after it has been changed) the given shader code can add additional buffer sources and computations using the texture metadata with AddResourcesFromTextures.

◆ AllocateTextureObject()

HDST_API HdStTextureObjectSharedPtr AllocateTextureObject ( const HdStTextureIdentifier textureId,
HdTextureType  textureType 
)

Allocate texture object.

The actual allocation of the associated GPU texture and sampler resources and loading of the texture file is delayed until the commit phase.

Parameters
textureIdPath to file and information to identify a texture if the file is a container for several textures (e.g., OpenVDB file containing several grids, movie file containing frames).
textureTypeTexture type, e.g., uv, ptex, ...

◆ GarbageCollectBufferResources()

HDST_API void GarbageCollectBufferResources ( )

Remove any entries associated with expired misc buffers.

◆ GarbageCollectDispatchBuffers()

HDST_API void GarbageCollectDispatchBuffers ( )

Remove any entries associated with expired dispatch buffers.

◆ GetGlobalBlitCmds()

HDST_API HgiBlitCmds * GetGlobalBlitCmds ( )

Returns the global hgi blit command queue for recording blitting work.

When using this global cmd instead of creating a new HgiBlitCmds we reduce the number of command buffers being created. The returned pointer should not be held onto by the client as it is only valid until the HgiBlitCmds has been submitted.

◆ GetGlobalComputeCmds()

HDST_API HgiComputeCmds * GetGlobalComputeCmds ( HgiComputeDispatch  dispatchMethod = HgiComputeDispatchSerial)

Returns the global hgi compute cmd queue for recording compute work.

When using this global cmd instead of creating a new HgiComputeCmds we reduce the number of command buffers being created. The returned pointer should not be held onto by the client as it is only valid until the HgiComputeCmds has been submitted.

◆ GetHgi()

HDST_API Hgi * GetHgi ( )

Returns Hgi used to create/destroy GPU resources.

◆ GetResourceAllocation()

HDST_API VtDictionary GetResourceAllocation ( ) const
overridevirtual

Returns a report of resource allocation by role in bytes and a summary total allocation of GPU memory in bytes for this registry.

Reimplemented from HdResourceRegistry.

◆ GetStagingBuffer()

HDST_API HdStStagingBuffer * GetStagingBuffer ( )

Returns the staging buffer used when committing data to the GPU.

◆ InvalidateShaderRegistry()

HDST_API void InvalidateShaderRegistry ( )
overridevirtual

Invalidate any shaders registered with this registry.

Reimplemented from HdResourceRegistry.

◆ RegisterBufferResource()

HDST_API HdStBufferResourceSharedPtr RegisterBufferResource ( TfToken const &  role,
HdTupleType  tupleType,
HgiBufferUsage  bufferUsage 
)

Register a misc buffer resource.

Usually buffers are part of a buffer array (buffer aggregation) and are managed via buffer array APIs. RegisterBufferResource lets you create a standalone buffer that can be used for misc purposes (Eg. GPU frustum cull prim count read back).

◆ RegisterComputePipeline()

HDST_API HdInstance< HgiComputePipelineSharedPtr > RegisterComputePipeline ( HdInstance< HgiComputePipelineSharedPtr >::ID  id)

Register a Hgi compute pipeline into the registry.

◆ RegisterDispatchBuffer()

HDST_API HdStDispatchBufferSharedPtr RegisterDispatchBuffer ( TfToken const &  role,
int  count,
int  commandNumUints 
)

Register a buffer allocated with count * commandNumUints * sizeof(uint32_t) to be used as an indirect dispatch buffer.


Dispatch & buffer API

◆ RegisterExtComputationDataRange()

HDST_API HdInstance< HdBufferArrayRangeSharedPtr > RegisterExtComputationDataRange ( HdInstance< HdBufferArrayRangeSharedPtr >::ID  id)

ExtComputation data array range instancing Returns the HdInstance pointing to shared HdBufferArrayRange, distinguished by given ID.

*Refer the comment on RegisterTopology for the same consideration.

◆ RegisterGeometricShader()

HDST_API HdInstance< HdSt_GeometricShaderSharedPtr > RegisterGeometricShader ( HdInstance< HdSt_GeometricShaderSharedPtr >::ID  id)

Register a geometric shader.

◆ RegisterGLSLFXFile()

HDST_API HdInstance< HioGlslfxSharedPtr > RegisterGLSLFXFile ( HdInstance< HioGlslfxSharedPtr >::ID  id)

Register a GLSLFX file.

◆ RegisterGLSLProgram()

HDST_API HdInstance< HdStGLSLProgramSharedPtr > RegisterGLSLProgram ( HdInstance< HdStGLSLProgramSharedPtr >::ID  id)

Register a GLSL program into the program registry.

◆ RegisterGraphicsPipeline()

HDST_API HdInstance< HgiGraphicsPipelineSharedPtr > RegisterGraphicsPipeline ( HdInstance< HgiGraphicsPipelineSharedPtr >::ID  id)

Register a Hgi graphics pipeline into the registry.

◆ RegisterMeshIndexRange()

HDST_API HdInstance< HdBufferArrayRangeSharedPtr > RegisterMeshIndexRange ( HdInstance< HdBufferArrayRangeSharedPtr >::ID  id,
TfToken const &  name 
)

Topology Index buffer array range instancing Returns the HdInstance points to shared HdBufferArrayRange, distinguished by given ID.

*Refer the comment on RegisterTopology for the same consideration.

◆ RegisterMeshTopology()

HDST_API HdInstance< HdSt_MeshTopologySharedPtr > RegisterMeshTopology ( HdInstance< HdSt_MeshTopologySharedPtr >::ID  id)

These registries implement sharing and deduplication of data based on computed hash identifiers.


Instance Registries

a shared pointer to a data instance. When an HdInstance is registered for a previously unused ID, the data pointer will be null and it is the caller's responsibility to set its value. The instance registries are cleaned of unreferenced entries during garbage collection.

Note: As entries can be registered from multiple threads, the returned object holds a lock on the instance registry. This lock is held until the returned HdInstance object is destroyed. Topology instancing

◆ RegisterPrimvarRange()

HDST_API HdInstance< HdBufferArrayRangeSharedPtr > RegisterPrimvarRange ( HdInstance< HdBufferArrayRangeSharedPtr >::ID  id)

Primvar array range instancing Returns the HdInstance pointing to shared HdBufferArrayRange, distinguished by given ID.

*Refer the comment on RegisterTopology for the same consideration.

◆ RegisterResourceBindings()

HDST_API HdInstance< HgiResourceBindingsSharedPtr > RegisterResourceBindings ( HdInstance< HgiResourceBindingsSharedPtr >::ID  id)

Register a Hgi resource bindings into the registry.

◆ ReloadResource()

HDST_API void ReloadResource ( TfToken const &  resourceType,
std::string const &  path 
)
overridevirtual

Generic method to inform RenderDelegate a resource needs to be reloaded.

This method can be used by the application to inform the renderDelegate that a resource, which may not have any prim representation in Hydra, needs to be reloaded. For example a texture found in a material network. The path can be absolute or relative. It should usually match the path found for textures during HdMaterial::Sync.

Reimplemented from HdResourceRegistry.

◆ SetMemoryRequestForTextureType()

HDST_API void SetMemoryRequestForTextureType ( HdTextureType  textureType,
size_t  memoryRequest 
)

Sets how much memory a single texture can consume in bytes by texture type.

Only has an effect if non-zero and only applies to textures if no texture handle referencing the texture has a memory request.

◆ SetNonUniformAggregationStrategy()

void SetNonUniformAggregationStrategy ( std::unique_ptr< HdStAggregationStrategy > &&  strategy)
inline

Set the aggregation strategy for non uniform parameters (vertex, varying, facevarying) Takes ownership of the passed in strategy object.

Definition at line 492 of file resourceRegistry.h.

◆ SetNonUniformImmutableAggregationStrategy()

void SetNonUniformImmutableAggregationStrategy ( std::unique_ptr< HdStAggregationStrategy > &&  strategy)
inline

Set the aggregation strategy for non uniform immutable parameters (vertex, varying, facevarying) Takes ownership of the passed in strategy object.

Definition at line 500 of file resourceRegistry.h.

◆ SetShaderStorageAggregationStrategy()

void SetShaderStorageAggregationStrategy ( std::unique_ptr< HdStAggregationStrategy > &&  strategy)
inline

Set the aggregation strategy for SSBO (uniform primvars) Takes ownership of the passed in strategy object.

Definition at line 514 of file resourceRegistry.h.

◆ SetSingleStorageAggregationStrategy()

void SetSingleStorageAggregationStrategy ( std::unique_ptr< HdStAggregationStrategy > &&  strategy)
inline

Set the aggregation strategy for single buffers (for nested instancer).

Takes ownership of the passed in strategy object.

Definition at line 521 of file resourceRegistry.h.

◆ SetUniformAggregationStrategy()

void SetUniformAggregationStrategy ( std::unique_ptr< HdStAggregationStrategy > &&  strategy)
inline

Set the aggregation strategy for uniform (shader globals) Takes ownership of the passed in strategy object.

Definition at line 507 of file resourceRegistry.h.

◆ SubmitBlitWork()

HDST_API void SubmitBlitWork ( HgiSubmitWaitType  wait = HgiSubmitWaitTypeNoWait)

Submits blit work queued in global blit cmds for GPU execution.

We can call this when we want to submit some work to the GPU. To stall the CPU and wait for the GPU to finish, 'wait' can be provided. To insert a barrier to ensure memory writes are visible after the barrier a HgiMemoryBarrier can be provided.

◆ SubmitComputeWork()

HDST_API void SubmitComputeWork ( HgiSubmitWaitType  wait = HgiSubmitWaitTypeNoWait)

Submits compute work queued in global compute cmds for GPU execution.

We can call this when we want to submit some work to the GPU. To stall the CPU and wait for the GPU to finish, 'wait' can be provided. To insert a barrier to ensure memory writes are visible after the barrier a HgiMemoryBarrier can be provided.

◆ UpdateNonUniformBufferArrayRange()

HDST_API HdBufferArrayRangeSharedPtr UpdateNonUniformBufferArrayRange ( TfToken const &  role,
HdBufferArrayRangeSharedPtr const &  curRange,
HdBufferSpecVector const &  updatedOrAddedSpecs,
HdBufferSpecVector const &  removedSpecs,
HdBufferArrayUsageHint  usageHint 
)

BAR allocation/migration/update API

The Update* flavor of methods handle both allocation of a new BAR and reallocation-migration based on the existing range, updated/added specs, removed specs and usage hint. This allows client code to be less verbose when a range's signature (specs) can change.

If curRange is invalid, this is equivalent to calling Allocate*. Otherwise, checks if curRange needs to be migrated to a new range (based on updatedOrAddedSpecs and removedSpecs and usageHint). If migration is necessary, allocate a new range and register necessary migration computations and return the new range. Otherwise, just return the same range.

Friends And Related Function Documentation

◆ operator<<

HDST_API friend std::ostream & operator<< ( std::ostream &  out,
const HdStResourceRegistry self 
)
friend

Debug dump.


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