All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
resourceRegistry.h
1 //
2 // Copyright 2016 Pixar
3 //
4 // Licensed under the Apache License, Version 2.0 (the "Apache License")
5 // with the following modification; you may not use this file except in
6 // compliance with the Apache License and the following modification to it:
7 // Section 6. Trademarks. is deleted and replaced with:
8 //
9 // 6. Trademarks. This License does not grant permission to use the trade
10 // names, trademarks, service marks, or product names of the Licensor
11 // and its affiliates, except as required to comply with Section 4(c) of
12 // the License and to reproduce the content of the NOTICE file.
13 //
14 // You may obtain a copy of the Apache License at
15 //
16 // http://www.apache.org/licenses/LICENSE-2.0
17 //
18 // Unless required by applicable law or agreed to in writing, software
19 // distributed under the Apache License with the above modification is
20 // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21 // KIND, either express or implied. See the Apache License for the specific
22 // language governing permissions and limitations under the Apache License.
23 //
24 #ifndef PXR_IMAGING_HD_ST_RESOURCE_REGISTRY_H
25 #define PXR_IMAGING_HD_ST_RESOURCE_REGISTRY_H
26 
27 #include "pxr/pxr.h"
28 #include "pxr/base/vt/dictionary.h"
29 
30 #include "pxr/imaging/hdSt/api.h"
31 
32 #include "pxr/imaging/hgi/hgi.h"
33 
34 #include "pxr/imaging/hd/bufferArrayRange.h"
35 #include "pxr/imaging/hd/bufferArrayRegistry.h"
36 #include "pxr/imaging/hd/bufferSource.h"
37 #include "pxr/imaging/hd/bufferSpec.h"
38 #include "pxr/imaging/hd/enums.h"
39 #include "pxr/imaging/hd/instanceRegistry.h"
40 #include "pxr/imaging/hd/resourceRegistry.h"
41 
42 #include <tbb/concurrent_vector.h>
43 
44 #include <atomic>
45 #include <map>
46 #include <memory>
47 
48 PXR_NAMESPACE_OPEN_SCOPE
49 
50 using HdComputationSharedPtr = std::shared_ptr<class HdComputation>;
51 using HdStDispatchBufferSharedPtr = std::shared_ptr<class HdStDispatchBuffer>;
52 using HdStGLSLProgramSharedPtr = std::shared_ptr<class HdStGLSLProgram>;
53 using HioGlslfxSharedPtr = std::shared_ptr<class HioGlslfx>;
54 
55 using HdSt_BasisCurvesTopologySharedPtr =
56  std::shared_ptr<class HdSt_BasisCurvesTopology>;
57 
58 using HdStShaderCodePtr =
59  std::weak_ptr<class HdStShaderCode>;
60 using HdSt_GeometricShaderSharedPtr =
61  std::shared_ptr<class HdSt_GeometricShader>;
62 
63 using HdStTextureHandleSharedPtr =
64  std::shared_ptr<class HdStTextureHandle>;
65 using HdStTextureObjectSharedPtr =
66  std::shared_ptr<class HdStTextureObject>;
67 using HdStBufferResourceSharedPtr =
68  std::shared_ptr<class HdStBufferResource>;
69 using HdStResourceRegistrySharedPtr =
70  std::shared_ptr<class HdStResourceRegistry>;
71 using Hd_VertexAdjacencySharedPtr =
72  std::shared_ptr<class Hd_VertexAdjacency>;
73 using HdSt_MeshTopologySharedPtr =
74  std::shared_ptr<class HdSt_MeshTopology>;
75 using HgiResourceBindingsSharedPtr =
76  std::shared_ptr<HgiResourceBindingsHandle>;
77 using HgiGraphicsPipelineSharedPtr =
78  std::shared_ptr<HgiGraphicsPipelineHandle>;
79 using HgiComputePipelineSharedPtr =
80  std::shared_ptr<HgiComputePipelineHandle>;
81 
84 
98 enum HdStComputeQueue {
99  HdStComputeQueueZero=0,
100  HdStComputeQueueOne,
101  HdStComputeQueueTwo,
102  HdStComputeQueueThree,
103  HdStComputeQueueCount};
104 
105 using HdStComputationSharedPtrVector =
106  std::vector<std::pair<HdComputationSharedPtr, HdStComputeQueue>>;
107 
108 
114 {
115 public:
116  HF_MALLOC_TAG_NEW("new HdStResourceRegistry");
117 
118  HDST_API
119  explicit HdStResourceRegistry(Hgi* hgi);
120 
121  HDST_API
122  ~HdStResourceRegistry() override;
123 
124  HDST_API
125  void InvalidateShaderRegistry() override;
126 
127  HDST_API
128  void ReloadResource(TfToken const& resourceType,
129  std::string const& path) override;
130 
131  HDST_API
132  VtDictionary GetResourceAllocation() const override;
133 
135  HDST_API
136  Hgi* GetHgi();
137 
142 
150  HDST_API
151  HdStTextureHandleSharedPtr AllocateTextureHandle(
155  const HdStTextureIdentifier &textureId,
157  HdTextureType textureType,
160  const HdSamplerParameters &samplerParams,
165  size_t memoryRequest,
168  bool createBindlessHandle,
173  HdStShaderCodePtr const &shaderCode);
174 
180  HDST_API
181  HdStTextureObjectSharedPtr AllocateTextureObject(
185  const HdStTextureIdentifier &textureId,
187  HdTextureType textureType);
188 
196  HDST_API
198  HdTextureType textureType,
199  size_t memoryRequest);
200 
207 
208  HDST_API
209  HdBufferArrayRangeSharedPtr AllocateNonUniformBufferArrayRange(
210  TfToken const &role,
211  HdBufferSpecVector const &bufferSpecs,
212  HdBufferArrayUsageHint usageHint);
213 
214  HDST_API
215  HdBufferArrayRangeSharedPtr AllocateNonUniformImmutableBufferArrayRange(
216  TfToken const &role,
217  HdBufferSpecVector const &bufferSpecs,
218  HdBufferArrayUsageHint usageHint);
219 
220  HDST_API
221  HdBufferArrayRangeSharedPtr AllocateUniformBufferArrayRange(
222  TfToken const &role,
223  HdBufferSpecVector const &bufferSpecs,
224  HdBufferArrayUsageHint usageHint);
225 
226  HDST_API
227  HdBufferArrayRangeSharedPtr AllocateShaderStorageBufferArrayRange(
228  TfToken const &role,
229  HdBufferSpecVector const &bufferSpecs,
230  HdBufferArrayUsageHint usageHint);
231 
232  HDST_API
233  HdBufferArrayRangeSharedPtr AllocateSingleBufferArrayRange(
234  TfToken const &role,
235  HdBufferSpecVector const &bufferSpecs,
236  HdBufferArrayUsageHint usageHint);
237 
253 
254  HDST_API
255  HdBufferArrayRangeSharedPtr UpdateNonUniformBufferArrayRange(
256  TfToken const &role,
257  HdBufferArrayRangeSharedPtr const& curRange,
258  HdBufferSpecVector const &updatedOrAddedSpecs,
259  HdBufferSpecVector const& removedSpecs,
260  HdBufferArrayUsageHint usageHint);
261 
262  HDST_API
263  HdBufferArrayRangeSharedPtr UpdateNonUniformImmutableBufferArrayRange(
264  TfToken const &role,
265  HdBufferArrayRangeSharedPtr const& curRange,
266  HdBufferSpecVector const &updatedOrAddedSpecs,
267  HdBufferSpecVector const& removedSpecs,
268  HdBufferArrayUsageHint usageHint);
269 
270  HDST_API
271  HdBufferArrayRangeSharedPtr UpdateUniformBufferArrayRange(
272  TfToken const &role,
273  HdBufferArrayRangeSharedPtr const& curRange,
274  HdBufferSpecVector const &updatedOrAddedSpecs,
275  HdBufferSpecVector const& removedSpecs,
276  HdBufferArrayUsageHint usageHint);
277 
278  HDST_API
279  HdBufferArrayRangeSharedPtr UpdateShaderStorageBufferArrayRange(
280  TfToken const &role,
281  HdBufferArrayRangeSharedPtr const& curRange,
282  HdBufferSpecVector const &updatedOrAddedSpecs,
283  HdBufferSpecVector const& removedSpecs,
284  HdBufferArrayUsageHint usageHint);
285 
289 
291  HDST_API
292  void AddSources(HdBufferArrayRangeSharedPtr const &range,
293  HdBufferSourceSharedPtrVector &&sources);
294 
296  HDST_API
297  void AddSource(HdBufferArrayRangeSharedPtr const &range,
298  HdBufferSourceSharedPtr const &source);
299 
301  HDST_API
302  void AddSource(HdBufferSourceSharedPtr const &source);
303 
310  HDST_API
311  void AddComputation(HdBufferArrayRangeSharedPtr const &range,
312  HdComputationSharedPtr const &computation,
313  HdStComputeQueue const queue);
314 
318 
321  HDST_API
322  HdStDispatchBufferSharedPtr RegisterDispatchBuffer(
323  TfToken const &role, int count, int commandNumUints);
324 
330  HDST_API
331  HdStBufferResourceSharedPtr RegisterBufferResource(
332  TfToken const &role,
333  HdTupleType tupleType);
334 
336  HDST_API
338 
340  HDST_API
342 
346 
357 
359  HDST_API
361  RegisterMeshTopology(HdInstance<HdSt_MeshTopologySharedPtr>::ID id);
362 
363  HDST_API
365  RegisterBasisCurvesTopology(
366  HdInstance<HdSt_BasisCurvesTopologySharedPtr>::ID id);
367 
368  HDST_API
370  RegisterVertexAdjacency(HdInstance<Hd_VertexAdjacencySharedPtr>::ID id);
371 
376  HDST_API
379  HdInstance<HdBufferArrayRangeSharedPtr>::ID id, TfToken const &name);
380 
381  HDST_API
383  RegisterBasisCurvesIndexRange(
384  HdInstance<HdBufferArrayRangeSharedPtr>::ID id, TfToken const &name);
385 
390  HDST_API
393  HdInstance<HdBufferArrayRangeSharedPtr>::ID id);
394 
399  HDST_API
402  HdInstance<HdBufferArrayRangeSharedPtr>::ID id);
403 
405  HDST_API
407  RegisterGeometricShader(HdInstance<HdSt_GeometricShaderSharedPtr>::ID id);
408 
410  HDST_API
412  RegisterGLSLProgram(HdInstance<HdStGLSLProgramSharedPtr>::ID id);
413 
415  HDST_API
417  RegisterGLSLFXFile(HdInstance<HioGlslfxSharedPtr>::ID id);
418 
420  HDST_API
422  RegisterResourceBindings(HdInstance<HgiResourceBindingsSharedPtr>::ID id);
423 
425  HDST_API
427  RegisterGraphicsPipeline(HdInstance<HgiGraphicsPipelineSharedPtr>::ID id);
428 
430  HDST_API
432  RegisterComputePipeline(HdInstance<HgiComputePipelineSharedPtr>::ID id);
433 
439  HDST_API
441 
447  HDST_API
449 
455  HDST_API
456  void SubmitBlitWork(HgiSubmitWaitType wait = HgiSubmitWaitTypeNoWait);
457 
463  HDST_API
464  void SubmitComputeWork(HgiSubmitWaitType wait = HgiSubmitWaitTypeNoWait);
465 
466 public:
467  //
468  // Unit test API
469  //
470 
475  std::unique_ptr<HdAggregationStrategy> &&strategy) {
476  _nonUniformAggregationStrategy = std::move(strategy);
477  }
478 
483  std::unique_ptr<HdAggregationStrategy> &&strategy) {
484  _nonUniformImmutableAggregationStrategy = std::move(strategy);
485  }
486 
490  std::unique_ptr<HdAggregationStrategy> &&strategy) {
491  _uniformUboAggregationStrategy = std::move(strategy);
492  }
493 
497  std::unique_ptr<HdAggregationStrategy> &&strategy) {
498  _uniformSsboAggregationStrategy = std::move(strategy);
499  }
500 
504  std::unique_ptr<HdAggregationStrategy> &&strategy) {
505  _singleAggregationStrategy = std::move(strategy);
506  }
507 
509  HDST_API
510  friend std::ostream &operator <<(
511  std::ostream &out,
512  const HdStResourceRegistry& self);
513 
514 protected:
515  void _Commit() override;
516  void _GarbageCollect() override;
517 
518 private:
519  void _CommitTextures();
520  // Wrapper function for BAR allocation
521  HdBufferArrayRangeSharedPtr _AllocateBufferArrayRange(
522  HdAggregationStrategy *strategy,
523  HdBufferArrayRegistry &bufferArrayRegistry,
524  TfToken const &role,
525  HdBufferSpecVector const &bufferSpecs,
526  HdBufferArrayUsageHint usageHint);
527 
529  HdBufferArrayRangeSharedPtr _UpdateBufferArrayRange(
530  HdAggregationStrategy *strategy,
531  HdBufferArrayRegistry &bufferArrayRegistry,
532  TfToken const &role,
533  HdBufferArrayRangeSharedPtr const& curRange,
534  HdBufferSpecVector const &updatedOrAddedSpecs,
535  HdBufferSpecVector const& removedSpecs,
536  HdBufferArrayUsageHint usageHint);
537 
538  // Tally resources by key into the given dictionary. Any additions should
539  // be cumulative with the existing key values.
540  void _TallyResourceAllocation(VtDictionary *result) const;
541 
542  // TODO: this is a transient structure. we'll revisit the BufferSource
543  // interface later.
544  struct _PendingSource {
545  _PendingSource(HdBufferArrayRangeSharedPtr const &range)
546  : range(range)
547  , sources()
548  {
549  }
550 
551  _PendingSource(HdBufferArrayRangeSharedPtr const &range,
552  HdBufferSourceSharedPtr const &source)
553  : range(range)
554  , sources(1, source)
555  {
556  }
557 
558  _PendingSource(HdBufferArrayRangeSharedPtr const &range,
559  HdBufferSourceSharedPtrVector && sources)
560  : range(range)
561  , sources(std::move(sources))
562  {
563  }
564 
565  HdBufferArrayRangeSharedPtr range;
566  HdBufferSourceSharedPtrVector sources;
567  };
568 
569  Hgi* _hgi;
570 
571  typedef tbb::concurrent_vector<_PendingSource> _PendingSourceList;
572  _PendingSourceList _pendingSources;
573  std::atomic_size_t _numBufferSourcesToResolve;
574 
575  struct _PendingComputation{
576  _PendingComputation(HdBufferArrayRangeSharedPtr const &range,
577  HdComputationSharedPtr const &computation)
578  : range(range), computation(computation) { }
579  HdBufferArrayRangeSharedPtr range;
580  HdComputationSharedPtr computation;
581  };
582 
583  // If we need more 'compute queues' we can increase HdStComputeQueueCount.
584  // We could also consider tbb::concurrent_priority_queue if we want this
585  // to be dynamically scalable.
586  typedef tbb::concurrent_vector<_PendingComputation> _PendingComputationList;
587  _PendingComputationList _pendingComputations[HdStComputeQueueCount];
588 
589  // aggregated buffer array
590  HdBufferArrayRegistry _nonUniformBufferArrayRegistry;
591  HdBufferArrayRegistry _nonUniformImmutableBufferArrayRegistry;
592  HdBufferArrayRegistry _uniformUboBufferArrayRegistry;
593  HdBufferArrayRegistry _uniformSsboBufferArrayRegistry;
594  HdBufferArrayRegistry _singleBufferArrayRegistry;
595 
596  // current aggregation strategies
597  std::unique_ptr<HdAggregationStrategy> _nonUniformAggregationStrategy;
598  std::unique_ptr<HdAggregationStrategy>
599  _nonUniformImmutableAggregationStrategy;
600  std::unique_ptr<HdAggregationStrategy> _uniformUboAggregationStrategy;
601  std::unique_ptr<HdAggregationStrategy> _uniformSsboAggregationStrategy;
602  std::unique_ptr<HdAggregationStrategy> _singleAggregationStrategy;
603 
604  typedef std::vector<HdStDispatchBufferSharedPtr>
605  _DispatchBufferRegistry;
606  _DispatchBufferRegistry _dispatchBufferRegistry;
607 
608  typedef std::vector<HdStBufferResourceSharedPtr>
609  _BufferResourceRegistry;
610  _BufferResourceRegistry _bufferResourceRegistry;
611 
612  // Register mesh topology.
614  _meshTopologyRegistry;
615 
616  // Register basisCurves topology.
618  _basisCurvesTopologyRegistry;
619 
620  // Register vertex adjacency.
622  _vertexAdjacencyRegistry;
623 
624  // Register topology index buffers.
626  _TopologyIndexRangeInstanceRegistry;
627  typedef tbb::concurrent_unordered_map< TfToken,
628  _TopologyIndexRangeInstanceRegistry,
630  _TopologyIndexRangeInstanceRegMap;
631 
632  _TopologyIndexRangeInstanceRegMap _meshTopologyIndexRangeRegistry;
633  _TopologyIndexRangeInstanceRegMap _basisCurvesTopologyIndexRangeRegistry;
634 
635  // Register shared primvar buffers.
637  _primvarRangeRegistry;
638 
639  // Register ext computation resource.
641  _extComputationDataRangeRegistry;
642 
643  // geometric shader registry
645  _geometricShaderRegistry;
646 
647  // glsl shader program registry
649  _glslProgramRegistry;
650 
651  // glslfx file registry
653  _glslfxFileRegistry;
654 
655  // texture handle registry
656  std::unique_ptr<class HdSt_TextureHandleRegistry> _textureHandleRegistry;
657 
658  // Hgi resource bindings registry
660  _resourceBindingsRegistry;
661 
662  // Hgi graphics pipeline registry
664  _graphicsPipelineRegistry;
665 
666  // Hgi compute pipeline registry
668  _computePipelineRegistry;
669 
670  HgiBlitCmdsUniquePtr _blitCmds;
671  HgiComputeCmdsUniquePtr _computeCmds;
672 };
673 
674 
675 PXR_NAMESPACE_CLOSE_SCOPE
676 
677 #endif //PXR_IMAGING_HD_ST_RESOURCE_REGISTRY_H
HDST_API HdInstance< HgiGraphicsPipelineSharedPtr > RegisterGraphicsPipeline(HdInstance< HgiGraphicsPipelineSharedPtr >::ID id)
Register a Hgi graphics pipeline into the registry.
The union provides a set of flags that provide hints to the memory management system about the proper...
Definition: bufferArray.h:70
HDST_API HdStTextureHandleSharedPtr AllocateTextureHandle(const HdStTextureIdentifier &textureId, HdTextureType textureType, const HdSamplerParameters &samplerParams, size_t memoryRequest, bool createBindlessHandle, HdStShaderCodePtr const &shaderCode)
Texture allocation API
Aggregation strategy base class.
Definition: strategyBase.h:48
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 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)
Register a misc buffer resource.
HdTupleType represents zero, one, or more values of the same HdType.
Definition: types.h:325
A map with string keys and VtValue values.
Definition: dictionary.h:63
HDST_API void SubmitComputeWork(HgiSubmitWaitType wait=HgiSubmitWaitTypeNoWait)
Submits compute work queued in global compute cmds for GPU execution.
Functor to use for hash maps from tokens to other things.
Definition: token.h:166
HDST_API void GarbageCollectDispatchBuffers()
Remove any entries associated with expired dispatch buffers.
void SetNonUniformImmutableAggregationStrategy(std::unique_ptr< HdAggregationStrategy > &&strategy)
Set the aggregation strategy for non uniform immutable parameters (vertex, varying, facevarying) Takes ownership of the passed in strategy object.
Manages the pool of buffer arrays.
HDST_API void SetMemoryRequestForTextureType(HdTextureType textureType, size_t memoryRequest)
Sets how much memory a single texture can consume in bytes by texture type.
A graphics API independent abstraction of compute commands.
Definition: computeCmds.h:45
HDST_API void AddSources(HdBufferArrayRangeSharedPtr const &range, HdBufferSourceSharedPtrVector &&sources)
Resource update &amp; computation queuing API
void SetNonUniformAggregationStrategy(std::unique_ptr< HdAggregationStrategy > &&strategy)
Set the aggregation strategy for non uniform parameters (vertex, varying, facevarying) Takes ownershi...
HDST_API Hgi * GetHgi()
Returns Hgi used to create/destroy GPU resources.
Class to identify a texture file or a texture within the texture file (e.g., a frame in a movie)...
HDST_API void AddSource(HdBufferArrayRangeSharedPtr const &range, HdBufferSourceSharedPtr const &source)
Append a source data for given range to be committed later.
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:87
HDST_API HdInstance< HioGlslfxSharedPtr > RegisterGLSLFXFile(HdInstance< HioGlslfxSharedPtr >::ID id)
Register a GLSLFX file.
A central registry of all GPU resources.
void _Commit() override
A hook for derived registries to perform additional resource commits.
A central registry for resources.
void SetUniformAggregationStrategy(std::unique_ptr< HdAggregationStrategy > &&strategy)
Set the aggregation strategy for uniform (shader globals) Takes ownership of the passed in strategy o...
HDST_API HgiBlitCmds * GetGlobalBlitCmds()
Returns the global hgi blit command queue for recording blitting work.
void SetSingleStorageAggregationStrategy(std::unique_ptr< HdAggregationStrategy > &&strategy)
Set the aggregation strategy for single buffers (for nested instancer).
HDST_API HdStDispatchBufferSharedPtr RegisterDispatchBuffer(TfToken const &role, int count, int commandNumUints)
Dispatch &amp; buffer API
HDST_API HdInstance< HgiComputePipelineSharedPtr > RegisterComputePipeline(HdInstance< HgiComputePipelineSharedPtr >::ID id)
Register a Hgi compute pipeline into the registry.
Hydra Graphics Interface.
Definition: hgi.h:106
HDST_API HdStTextureObjectSharedPtr AllocateTextureObject(const HdStTextureIdentifier &textureId, HdTextureType textureType)
Allocate texture object.
HDST_API HdBufferArrayRangeSharedPtr UpdateNonUniformBufferArrayRange(TfToken const &role, HdBufferArrayRangeSharedPtr const &curRange, HdBufferSpecVector const &updatedOrAddedSpecs, HdBufferSpecVector const &removedSpecs, HdBufferArrayUsageHint usageHint)
BAR allocation/migration/update API
HDST_API HdInstance< HdBufferArrayRangeSharedPtr > RegisterExtComputationDataRange(HdInstance< HdBufferArrayRangeSharedPtr >::ID id)
ExtComputation data array range instancing Returns the HdInstance pointing to shared HdBufferArrayRan...
HDST_API HgiComputeCmds * GetGlobalComputeCmds()
Returns the global hgi compute cmd queue for recording compute work.
void SetShaderStorageAggregationStrategy(std::unique_ptr< HdAggregationStrategy > &&strategy)
Set the aggregation strategy for SSBO (uniform primvars) Takes ownership of the passed in strategy ob...
Collection of standard parameters such as wrap modes to sample a texture.
Definition: types.h:109
void _GarbageCollect() override
Hooks for derived registries to perform additional GC when GarbageCollect() is invoked.
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 SubmitBlitWork(HgiSubmitWaitType wait=HgiSubmitWaitTypeNoWait)
Submits blit work queued in global blit cmds for GPU execution.
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 friend std::ostream & operator<<(std::ostream &out, const HdStResourceRegistry &self)
Debug dump.
HDST_API HdInstance< HdSt_MeshTopologySharedPtr > RegisterMeshTopology(HdInstance< HdSt_MeshTopologySharedPtr >::ID id)
Instance Registries
This class is used as an interface to a shared instance in HdInstanceRegistry.
A graphics API independent abstraction of resource copy commands.
Definition: blitCmds.h:54
HDST_API HdInstance< HgiResourceBindingsSharedPtr > RegisterResourceBindings(HdInstance< HgiResourceBindingsSharedPtr >::ID id)
Register a Hgi resource bindings into the registry.
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 HdBufferArrayRangeSharedPtr AllocateNonUniformBufferArrayRange(TfToken const &role, HdBufferSpecVector const &bufferSpecs, HdBufferArrayUsageHint usageHint)
BAR allocation API
HDST_API HdInstance< HdStGLSLProgramSharedPtr > RegisterGLSLProgram(HdInstance< HdStGLSLProgramSharedPtr >::ID id)
Register a GLSL program into the program registry.
HDST_API void AddComputation(HdBufferArrayRangeSharedPtr const &range, HdComputationSharedPtr const &computation, HdStComputeQueue const queue)
Append a gpu computation into queue.
HDST_API void InvalidateShaderRegistry() override
Invalidate any shaders registered with this registry.