Loading...
Searching...
No Matches
resourceRegistry.h
1//
2// Copyright 2016 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7#ifndef PXR_IMAGING_HD_ST_RESOURCE_REGISTRY_H
8#define PXR_IMAGING_HD_ST_RESOURCE_REGISTRY_H
9
10#include "pxr/pxr.h"
12
13#include "pxr/imaging/hdSt/api.h"
14#include "pxr/imaging/hdSt/bufferArrayRegistry.h"
15#include "pxr/imaging/hdSt/enums.h"
16
17#include "pxr/imaging/hgi/hgi.h"
18
19#include "pxr/imaging/hd/bufferArrayRange.h"
20#include "pxr/imaging/hd/bufferSource.h"
21#include "pxr/imaging/hd/bufferSpec.h"
22#include "pxr/imaging/hd/instanceRegistry.h"
23#include "pxr/imaging/hd/resourceRegistry.h"
24
25#include <tbb/concurrent_vector.h>
26
27#include <atomic>
28#include <map>
29#include <memory>
30
31#ifdef PXR_MATERIALX_SUPPORT_ENABLED
32#include <MaterialXCore/Library.h>
33MATERIALX_NAMESPACE_BEGIN
34 using ShaderPtr = std::shared_ptr<class Shader>;
35MATERIALX_NAMESPACE_END
36#endif
37
38PXR_NAMESPACE_OPEN_SCOPE
39
40using HdStComputationSharedPtr = std::shared_ptr<class HdStComputation>;
41using HdStDispatchBufferSharedPtr = std::shared_ptr<class HdStDispatchBuffer>;
42using HdStGLSLProgramSharedPtr = std::shared_ptr<class HdStGLSLProgram>;
43using HioGlslfxSharedPtr = std::shared_ptr<class HioGlslfx>;
44
45using HdSt_BasisCurvesTopologySharedPtr =
46 std::shared_ptr<class HdSt_BasisCurvesTopology>;
47
48using HdStShaderCodePtr =
49 std::weak_ptr<class HdStShaderCode>;
50using HdSt_GeometricShaderSharedPtr =
51 std::shared_ptr<class HdSt_GeometricShader>;
52
53using HdStTextureHandleSharedPtr =
54 std::shared_ptr<class HdStTextureHandle>;
55using HdStTextureObjectSharedPtr =
56 std::shared_ptr<class HdStTextureObject>;
57using HdStBufferResourceSharedPtr =
58 std::shared_ptr<class HdStBufferResource>;
59using HdStResourceRegistrySharedPtr =
60 std::shared_ptr<class HdStResourceRegistry>;
61using HdSt_VertexAdjacencyBuilderSharedPtr =
62 std::shared_ptr<class HdSt_VertexAdjacencyBuilder>;
63using HdSt_MeshTopologySharedPtr =
64 std::shared_ptr<class HdSt_MeshTopology>;
65using HgiResourceBindingsSharedPtr =
66 std::shared_ptr<HgiResourceBindingsHandle>;
67using HgiGraphicsPipelineSharedPtr =
68 std::shared_ptr<HgiGraphicsPipelineHandle>;
69using HgiComputePipelineSharedPtr =
70 std::shared_ptr<HgiComputePipelineHandle>;
71
75
89enum HdStComputeQueue {
90 HdStComputeQueueZero=0,
91 HdStComputeQueueOne,
92 HdStComputeQueueTwo,
93 HdStComputeQueueThree,
94 HdStComputeQueueCount};
95
96using HdStComputationComputeQueuePairVector =
97 std::vector<std::pair<HdStComputationSharedPtr, HdStComputeQueue>>;
98
99
105{
106public:
107 HF_MALLOC_TAG_NEW("new HdStResourceRegistry");
108
109 HDST_API
110 explicit HdStResourceRegistry(Hgi* hgi);
111
112 HDST_API
113 ~HdStResourceRegistry() override;
114
115 HDST_API
117
118 HDST_API
119 void ReloadResource(TfToken const& resourceType,
120 std::string const& path) override;
121
122 HDST_API
124
126 HDST_API
128
133
140 HDST_API
141 HdStTextureHandleSharedPtr AllocateTextureHandle(
145 const HdStTextureIdentifier &textureId,
147 HdStTextureType textureType,
150 const HdSamplerParameters &samplerParams,
155 size_t memoryRequest,
160 HdStShaderCodePtr const &shaderCode);
161
167 HDST_API
168 HdStTextureObjectSharedPtr AllocateTextureObject(
172 const HdStTextureIdentifier &textureId,
174 HdStTextureType textureType);
175
183 HDST_API
185 HdStTextureType textureType,
186 size_t memoryRequest);
187
194
195 HDST_API
196 HdBufferArrayRangeSharedPtr AllocateNonUniformBufferArrayRange(
197 TfToken const &role,
198 HdBufferSpecVector const &bufferSpecs,
199 HdBufferArrayUsageHint usageHint);
200
201 HDST_API
202 HdBufferArrayRangeSharedPtr AllocateNonUniformImmutableBufferArrayRange(
203 TfToken const &role,
204 HdBufferSpecVector const &bufferSpecs,
205 HdBufferArrayUsageHint usageHint);
206
207 HDST_API
208 HdBufferArrayRangeSharedPtr AllocateUniformBufferArrayRange(
209 TfToken const &role,
210 HdBufferSpecVector const &bufferSpecs,
211 HdBufferArrayUsageHint usageHint);
212
213 HDST_API
214 HdBufferArrayRangeSharedPtr AllocateShaderStorageBufferArrayRange(
215 TfToken const &role,
216 HdBufferSpecVector const &bufferSpecs,
217 HdBufferArrayUsageHint usageHint);
218
219 HDST_API
220 HdBufferArrayRangeSharedPtr AllocateSingleBufferArrayRange(
221 TfToken const &role,
222 HdBufferSpecVector const &bufferSpecs,
223 HdBufferArrayUsageHint usageHint);
224
240
241 HDST_API
242 HdBufferArrayRangeSharedPtr UpdateNonUniformBufferArrayRange(
243 TfToken const &role,
244 HdBufferArrayRangeSharedPtr const& curRange,
245 HdBufferSpecVector const &updatedOrAddedSpecs,
246 HdBufferSpecVector const& removedSpecs,
247 HdBufferArrayUsageHint usageHint);
248
249 HDST_API
250 HdBufferArrayRangeSharedPtr UpdateNonUniformImmutableBufferArrayRange(
251 TfToken const &role,
252 HdBufferArrayRangeSharedPtr const& curRange,
253 HdBufferSpecVector const &updatedOrAddedSpecs,
254 HdBufferSpecVector const& removedSpecs,
255 HdBufferArrayUsageHint usageHint);
256
257 HDST_API
258 HdBufferArrayRangeSharedPtr UpdateUniformBufferArrayRange(
259 TfToken const &role,
260 HdBufferArrayRangeSharedPtr const& curRange,
261 HdBufferSpecVector const &updatedOrAddedSpecs,
262 HdBufferSpecVector const& removedSpecs,
263 HdBufferArrayUsageHint usageHint);
264
265 HDST_API
266 HdBufferArrayRangeSharedPtr UpdateShaderStorageBufferArrayRange(
267 TfToken const &role,
268 HdBufferArrayRangeSharedPtr const& curRange,
269 HdBufferSpecVector const &updatedOrAddedSpecs,
270 HdBufferSpecVector const& removedSpecs,
271 HdBufferArrayUsageHint usageHint);
272
276
278 HDST_API
279 void AddSources(HdBufferArrayRangeSharedPtr const &range,
280 HdBufferSourceSharedPtrVector &&sources);
281
283 HDST_API
284 void AddSource(HdBufferArrayRangeSharedPtr const &range,
285 HdBufferSourceSharedPtr const &source);
286
288 HDST_API
289 void AddSource(HdBufferSourceSharedPtr const &source);
290
297 HDST_API
298 void AddComputation(HdBufferArrayRangeSharedPtr const &range,
299 HdStComputationSharedPtr const &computation,
300 HdStComputeQueue const queue);
301
305
308 HDST_API
309 HdStDispatchBufferSharedPtr RegisterDispatchBuffer(
310 TfToken const &role, int count, int commandNumUints);
311
317 HDST_API
318 HdStBufferResourceSharedPtr RegisterBufferResource(
319 TfToken const &role,
320 HdTupleType tupleType,
321 HgiBufferUsage bufferUsage);
322
324 HDST_API
326
328 HDST_API
330
334
345
347 HDST_API
349 RegisterMeshTopology(HdInstance<HdSt_MeshTopologySharedPtr>::ID id);
350
351 HDST_API
353 RegisterBasisCurvesTopology(
354 HdInstance<HdSt_BasisCurvesTopologySharedPtr>::ID id);
355
356 HDST_API
358 RegisterVertexAdjacencyBuilder(
359 HdInstance<HdSt_VertexAdjacencyBuilderSharedPtr>::ID id);
360
365 HDST_API
368 HdInstance<HdBufferArrayRangeSharedPtr>::ID id, TfToken const &name);
369
370 HDST_API
372 RegisterBasisCurvesIndexRange(
373 HdInstance<HdBufferArrayRangeSharedPtr>::ID id, TfToken const &name);
374
379 HDST_API
382 HdInstance<HdBufferArrayRangeSharedPtr>::ID id);
383
388 HDST_API
391 HdInstance<HdBufferArrayRangeSharedPtr>::ID id);
392
394 HDST_API
396 RegisterGeometricShader(HdInstance<HdSt_GeometricShaderSharedPtr>::ID id);
397
399 HDST_API
401 RegisterGLSLProgram(HdInstance<HdStGLSLProgramSharedPtr>::ID id);
402
404 HDST_API
406 RegisterGLSLFXFile(HdInstance<HioGlslfxSharedPtr>::ID id);
407
408#ifdef PXR_MATERIALX_SUPPORT_ENABLED
410 HDST_API
412 RegisterMaterialXShader(HdInstance<MaterialX::ShaderPtr>::ID id);
413#endif
414
416 HDST_API
418 RegisterResourceBindings(HdInstance<HgiResourceBindingsSharedPtr>::ID id);
419
421 HDST_API
423 RegisterGraphicsPipeline(HdInstance<HgiGraphicsPipelineSharedPtr>::ID id);
424
426 HDST_API
428 RegisterComputePipeline(HdInstance<HgiComputePipelineSharedPtr>::ID id);
429
440 HDST_API
443 const std::string& identifier,
444 const std::function<std::unique_ptr<HdResourceRegistry>()>& factory);
445
451 HDST_API
453
459 HDST_API
461 HgiComputeDispatch dispatchMethod = HgiComputeDispatchSerial);
462
468 HDST_API
469 void SubmitBlitWork(HgiSubmitWaitType wait = HgiSubmitWaitTypeNoWait);
470
476 HDST_API
477 void SubmitComputeWork(HgiSubmitWaitType wait = HgiSubmitWaitTypeNoWait);
478
480 HDST_API
482
483public:
484 //
485 // Unit test API
486 //
487
492 std::unique_ptr<HdStAggregationStrategy> &&strategy) {
493 _nonUniformAggregationStrategy = std::move(strategy);
494 }
495
500 std::unique_ptr<HdStAggregationStrategy> &&strategy) {
501 _nonUniformImmutableAggregationStrategy = std::move(strategy);
502 }
503
507 std::unique_ptr<HdStAggregationStrategy> &&strategy) {
508 _uniformUboAggregationStrategy = std::move(strategy);
509 }
510
514 std::unique_ptr<HdStAggregationStrategy> &&strategy) {
515 _uniformSsboAggregationStrategy = std::move(strategy);
516 }
517
521 std::unique_ptr<HdStAggregationStrategy> &&strategy) {
522 _singleAggregationStrategy = std::move(strategy);
523 }
524
526 HDST_API
527 friend std::ostream &operator <<(
528 std::ostream &out,
529 const HdStResourceRegistry& self);
530
531protected:
532 void _Commit() override;
533 void _GarbageCollect() override;
534
535private:
536 void _CommitTextures();
537 // Wrapper function for BAR allocation
538 HdBufferArrayRangeSharedPtr _AllocateBufferArrayRange(
539 HdStAggregationStrategy *strategy,
540 HdStBufferArrayRegistry &bufferArrayRegistry,
541 TfToken const &role,
542 HdBufferSpecVector const &bufferSpecs,
543 HdBufferArrayUsageHint usageHint);
544
546 HdBufferArrayRangeSharedPtr _UpdateBufferArrayRange(
547 HdStAggregationStrategy *strategy,
548 HdStBufferArrayRegistry &bufferArrayRegistry,
549 TfToken const &role,
550 HdBufferArrayRangeSharedPtr const& curRange,
551 HdBufferSpecVector const &updatedOrAddedSpecs,
552 HdBufferSpecVector const& removedSpecs,
553 HdBufferArrayUsageHint usageHint);
554
555 // Tally resources by key into the given dictionary. Any additions should
556 // be cumulative with the existing key values.
557 void _TallyResourceAllocation(VtDictionary *result) const;
558
559 // TODO: this is a transient structure. we'll revisit the BufferSource
560 // interface later.
561 struct _PendingSource {
562 _PendingSource(HdBufferArrayRangeSharedPtr const &range)
563 : range(range)
564 , sources()
565 {
566 }
567
568 _PendingSource(HdBufferArrayRangeSharedPtr const &range,
569 HdBufferSourceSharedPtr const &source)
570 : range(range)
571 , sources(1, source)
572 {
573 }
574
575 _PendingSource(HdBufferArrayRangeSharedPtr const &range,
576 HdBufferSourceSharedPtrVector && sources)
577 : range(range)
578 , sources(std::move(sources))
579 {
580 }
581
582 HdBufferArrayRangeSharedPtr range;
583 HdBufferSourceSharedPtrVector sources;
584 };
585
586 Hgi* _hgi;
587
588 typedef tbb::concurrent_vector<_PendingSource> _PendingSourceList;
589 _PendingSourceList _pendingSources;
590 std::atomic_size_t _numBufferSourcesToResolve;
591
592 struct _PendingComputation{
593 _PendingComputation(HdBufferArrayRangeSharedPtr const &range,
594 HdStComputationSharedPtr const &computation)
595 : range(range), computation(computation) { }
596 HdBufferArrayRangeSharedPtr range;
597 HdStComputationSharedPtr computation;
598 };
599
600 // If we need more 'compute queues' we can increase HdStComputeQueueCount.
601 // We could also consider tbb::concurrent_priority_queue if we want this
602 // to be dynamically scalable.
603 typedef tbb::concurrent_vector<_PendingComputation> _PendingComputationList;
604 _PendingComputationList _pendingComputations[HdStComputeQueueCount];
605
606 // aggregated buffer array
607 HdStBufferArrayRegistry _nonUniformBufferArrayRegistry;
608 HdStBufferArrayRegistry _nonUniformImmutableBufferArrayRegistry;
609 HdStBufferArrayRegistry _uniformUboBufferArrayRegistry;
610 HdStBufferArrayRegistry _uniformSsboBufferArrayRegistry;
611 HdStBufferArrayRegistry _singleBufferArrayRegistry;
612
613 // current aggregation strategies
614 std::unique_ptr<HdStAggregationStrategy> _nonUniformAggregationStrategy;
615 std::unique_ptr<HdStAggregationStrategy>
616 _nonUniformImmutableAggregationStrategy;
617 std::unique_ptr<HdStAggregationStrategy> _uniformUboAggregationStrategy;
618 std::unique_ptr<HdStAggregationStrategy> _uniformSsboAggregationStrategy;
619 std::unique_ptr<HdStAggregationStrategy> _singleAggregationStrategy;
620
621 typedef std::vector<HdStDispatchBufferSharedPtr>
622 _DispatchBufferRegistry;
623 _DispatchBufferRegistry _dispatchBufferRegistry;
624
625 typedef std::vector<HdStBufferResourceSharedPtr>
626 _BufferResourceRegistry;
627 _BufferResourceRegistry _bufferResourceRegistry;
628
629 // Register mesh topology.
631 _meshTopologyRegistry;
632
633 // Register basisCurves topology.
635 _basisCurvesTopologyRegistry;
636
637 // Register vertex adjacency.
639 _vertexAdjacencyBuilderRegistry;
640
641 // Register topology index buffers.
643 _TopologyIndexRangeInstanceRegistry;
644 typedef tbb::concurrent_unordered_map< TfToken,
645 _TopologyIndexRangeInstanceRegistry,
647 _TopologyIndexRangeInstanceRegMap;
648
649 _TopologyIndexRangeInstanceRegMap _meshTopologyIndexRangeRegistry;
650 _TopologyIndexRangeInstanceRegMap _basisCurvesTopologyIndexRangeRegistry;
651
652 // Register shared primvar buffers.
654 _primvarRangeRegistry;
655
656 // Register ext computation resource.
658 _extComputationDataRangeRegistry;
659
660 // geometric shader registry
662 _geometricShaderRegistry;
663
664 // glsl shader program registry
666 _glslProgramRegistry;
667
668 // glslfx file registry
670 _glslfxFileRegistry;
671
672#ifdef PXR_MATERIALX_SUPPORT_ENABLED
673 // MaterialX glslfx shader registry
674 HdInstanceRegistry<MaterialX::ShaderPtr> _materialXShaderRegistry;
675#endif
676
677 // texture handle registry
678 std::unique_ptr<class HdSt_TextureHandleRegistry> _textureHandleRegistry;
679
680 // Hgi resource bindings registry
682 _resourceBindingsRegistry;
683
684 // Hgi graphics pipeline registry
686 _graphicsPipelineRegistry;
687
688 // Hgi compute pipeline registry
690 _computePipelineRegistry;
691
692 using _SubResourceRegistryMap =
693 tbb::concurrent_unordered_map<std::string,
694 std::unique_ptr<HdResourceRegistry>>;
695 _SubResourceRegistryMap _subResourceRegistries;
696
697 HgiBlitCmdsUniquePtr _blitCmds;
698 HgiComputeCmdsUniquePtr _computeCmds;
699
700 std::unique_ptr<HdStStagingBuffer> _stagingBuffer;
701};
702
703
704PXR_NAMESPACE_CLOSE_SCOPE
705
706#endif //PXR_IMAGING_HD_ST_RESOURCE_REGISTRY_H
This class is used as an interface to a shared instance in HdInstanceRegistry.
HdInstanceRegistry is a dictionary container of HdInstance.
A central registry for resources.
Collection of standard parameters such as wrap modes to sample a texture.
Definition: types.h:110
Aggregation strategy base class.
Definition: strategyBase.h:31
Manages the pool of buffer arrays.
A central registry of all GPU resources.
HDST_API HdResourceRegistry * FindOrCreateSubResourceRegistry(const std::string &identifier, const std::function< std::unique_ptr< HdResourceRegistry >()> &factory)
Finds a sub resource registry for the given identifier if it already exists or creates one by invokin...
HDST_API void SubmitComputeWork(HgiSubmitWaitType wait=HgiSubmitWaitTypeNoWait)
Submits compute work queued in global compute cmds for GPU execution.
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).
void SetShaderStorageAggregationStrategy(std::unique_ptr< HdStAggregationStrategy > &&strategy)
Set the aggregation strategy for SSBO (uniform primvars) Takes ownership of the passed in strategy ob...
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 HdStTextureObjectSharedPtr AllocateTextureObject(const HdStTextureIdentifier &textureId, HdStTextureType textureType)
Allocate texture object.
void SetNonUniformImmutableAggregationStrategy(std::unique_ptr< HdStAggregationStrategy > &&strategy)
Set the aggregation strategy for non uniform immutable parameters (vertex, varying,...
HDST_API HdInstance< HioGlslfxSharedPtr > RegisterGLSLFXFile(HdInstance< HioGlslfxSharedPtr >::ID id)
Register a GLSLFX file.
void _GarbageCollect() override
Hooks for derived registries to perform additional GC when GarbageCollect() is invoked.
HDST_API HdInstance< HdStGLSLProgramSharedPtr > RegisterGLSLProgram(HdInstance< HdStGLSLProgramSharedPtr >::ID id)
Register a GLSL program into the program registry.
HDST_API HdInstance< HdBufferArrayRangeSharedPtr > RegisterExtComputationDataRange(HdInstance< HdBufferArrayRangeSharedPtr >::ID id)
ExtComputation data array range instancing Returns the HdInstance pointing to shared HdBufferArrayRan...
HDST_API HgiBlitCmds * GetGlobalBlitCmds()
Returns the global hgi blit command queue for recording blitting work.
HDST_API void SetMemoryRequestForTextureType(HdStTextureType textureType, size_t memoryRequest)
Sets how much memory a single texture can consume in bytes by texture type.
HDST_API void AddComputation(HdBufferArrayRangeSharedPtr const &range, HdStComputationSharedPtr const &computation, HdStComputeQueue const queue)
Append a gpu computation into queue.
void SetSingleStorageAggregationStrategy(std::unique_ptr< HdStAggregationStrategy > &&strategy)
Set the aggregation strategy for single buffers (for nested instancer).
void SetUniformAggregationStrategy(std::unique_ptr< HdStAggregationStrategy > &&strategy)
Set the aggregation strategy for uniform (shader globals) Takes ownership of the passed in strategy o...
HDST_API HdBufferArrayRangeSharedPtr UpdateNonUniformBufferArrayRange(TfToken const &role, HdBufferArrayRangeSharedPtr const &curRange, HdBufferSpecVector const &updatedOrAddedSpecs, HdBufferSpecVector const &removedSpecs, HdBufferArrayUsageHint usageHint)
HDST_API friend std::ostream & operator<<(std::ostream &out, const HdStResourceRegistry &self)
Debug dump.
HDST_API HdInstance< HgiComputePipelineSharedPtr > RegisterComputePipeline(HdInstance< HgiComputePipelineSharedPtr >::ID id)
Register a Hgi compute pipeline into the registry.
HDST_API void GarbageCollectDispatchBuffers()
Remove any entries associated with expired dispatch buffers.
HDST_API HdStStagingBuffer * GetStagingBuffer()
Returns the staging buffer used when committing data to the GPU.
HDST_API HdInstance< HgiResourceBindingsSharedPtr > RegisterResourceBindings(HdInstance< HgiResourceBindingsSharedPtr >::ID id)
Register a Hgi resource bindings into the registry.
HDST_API void InvalidateShaderRegistry() override
Invalidate any shaders registered with this registry.
HDST_API VtDictionary GetResourceAllocation() const override
Returns a report of resource allocation by role in bytes and a summary total allocation of GPU memory...
HDST_API HdStBufferResourceSharedPtr RegisterBufferResource(TfToken const &role, HdTupleType tupleType, HgiBufferUsage bufferUsage)
Register a misc buffer resource.
HDST_API Hgi * GetHgi()
Returns Hgi used to create/destroy GPU resources.
void _Commit() override
A hook for derived registries to perform additional resource commits.
HDST_API void SubmitBlitWork(HgiSubmitWaitType wait=HgiSubmitWaitTypeNoWait)
Submits blit work queued in global blit cmds for GPU execution.
HDST_API HdInstance< HdBufferArrayRangeSharedPtr > RegisterPrimvarRange(HdInstance< HdBufferArrayRangeSharedPtr >::ID id)
Primvar array range instancing Returns the HdInstance pointing to shared HdBufferArrayRange,...
HDST_API HdInstance< HdBufferArrayRangeSharedPtr > RegisterMeshIndexRange(HdInstance< HdBufferArrayRangeSharedPtr >::ID id, TfToken const &name)
Topology Index buffer array range instancing Returns the HdInstance points to shared HdBufferArrayRan...
HDST_API HgiComputeCmds * GetGlobalComputeCmds(HgiComputeDispatch dispatchMethod=HgiComputeDispatchSerial)
Returns the global hgi compute cmd queue for recording compute work.
HDST_API HdStTextureHandleSharedPtr AllocateTextureHandle(const HdStTextureIdentifier &textureId, HdStTextureType textureType, const HdSamplerParameters &samplerParams, size_t memoryRequest, HdStShaderCodePtr const &shaderCode)
Allocate texture handle (encapsulates texture and sampler object, memory request and callback to shad...
HDST_API HdInstance< HdSt_GeometricShaderSharedPtr > RegisterGeometricShader(HdInstance< HdSt_GeometricShaderSharedPtr >::ID id)
Register a geometric shader.
HDST_API void GarbageCollectBufferResources()
Remove any entries associated with expired misc buffers.
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 HdBufferArrayRangeSharedPtr AllocateNonUniformBufferArrayRange(TfToken const &role, HdBufferSpecVector const &bufferSpecs, HdBufferArrayUsageHint usageHint)
HDST_API HdInstance< HgiGraphicsPipelineSharedPtr > RegisterGraphicsPipeline(HdInstance< HgiGraphicsPipelineSharedPtr >::ID id)
Register a Hgi graphics pipeline into the registry.
void SetNonUniformAggregationStrategy(std::unique_ptr< HdStAggregationStrategy > &&strategy)
Set the aggregation strategy for non uniform parameters (vertex, varying, facevarying) Takes ownershi...
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...
Provides a staging buffer for CPU writes of triple-buffered resources.
Definition: stagingBuffer.h:33
Class to identify a texture file or a texture within the texture file (e.g., a frame in a movie).
A graphics API independent abstraction of resource copy commands.
Definition: blitCmds.h:38
A graphics API independent abstraction of compute commands.
Definition: computeCmds.h:29
Hydra Graphics Interface.
Definition: hgi.h:94
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:71
A map with string keys and VtValue values.
Definition: dictionary.h:43
STL namespace.
HdTupleType represents zero, one, or more values of the same HdType.
Definition: types.h:341
Functor to use for hash maps from tokens to other things.
Definition: token.h:149