Loading...
Searching...
No Matches
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"
29
30#include "pxr/imaging/hdSt/api.h"
31#include "pxr/imaging/hdSt/bufferArrayRegistry.h"
32
33#include "pxr/imaging/hgi/hgi.h"
34
35#include "pxr/imaging/hd/bufferArrayRange.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#ifdef PXR_MATERIALX_SUPPORT_ENABLED
49#include <MaterialXCore/Library.h>
50MATERIALX_NAMESPACE_BEGIN
51 using ShaderPtr = std::shared_ptr<class Shader>;
52MATERIALX_NAMESPACE_END
53#endif
54
55PXR_NAMESPACE_OPEN_SCOPE
56
57using HdStComputationSharedPtr = std::shared_ptr<class HdStComputation>;
58using HdStDispatchBufferSharedPtr = std::shared_ptr<class HdStDispatchBuffer>;
59using HdStGLSLProgramSharedPtr = std::shared_ptr<class HdStGLSLProgram>;
60using HioGlslfxSharedPtr = std::shared_ptr<class HioGlslfx>;
61
62using HdSt_BasisCurvesTopologySharedPtr =
63 std::shared_ptr<class HdSt_BasisCurvesTopology>;
64
65using HdStShaderCodePtr =
66 std::weak_ptr<class HdStShaderCode>;
67using HdSt_GeometricShaderSharedPtr =
68 std::shared_ptr<class HdSt_GeometricShader>;
69
70using HdStTextureHandleSharedPtr =
71 std::shared_ptr<class HdStTextureHandle>;
72using HdStTextureObjectSharedPtr =
73 std::shared_ptr<class HdStTextureObject>;
74using HdStBufferResourceSharedPtr =
75 std::shared_ptr<class HdStBufferResource>;
76using HdStResourceRegistrySharedPtr =
77 std::shared_ptr<class HdStResourceRegistry>;
78using HdSt_VertexAdjacencyBuilderSharedPtr =
79 std::shared_ptr<class HdSt_VertexAdjacencyBuilder>;
80using HdSt_MeshTopologySharedPtr =
81 std::shared_ptr<class HdSt_MeshTopology>;
82using HgiResourceBindingsSharedPtr =
83 std::shared_ptr<HgiResourceBindingsHandle>;
84using HgiGraphicsPipelineSharedPtr =
85 std::shared_ptr<HgiGraphicsPipelineHandle>;
86using HgiComputePipelineSharedPtr =
87 std::shared_ptr<HgiComputePipelineHandle>;
88
92
106enum HdStComputeQueue {
107 HdStComputeQueueZero=0,
108 HdStComputeQueueOne,
109 HdStComputeQueueTwo,
110 HdStComputeQueueThree,
111 HdStComputeQueueCount};
112
113using HdStComputationComputeQueuePairVector =
114 std::vector<std::pair<HdStComputationSharedPtr, HdStComputeQueue>>;
115
116
122{
123public:
124 HF_MALLOC_TAG_NEW("new HdStResourceRegistry");
125
126 HDST_API
127 explicit HdStResourceRegistry(Hgi* hgi);
128
129 HDST_API
130 ~HdStResourceRegistry() override;
131
132 HDST_API
134
135 HDST_API
136 void ReloadResource(TfToken const& resourceType,
137 std::string const& path) override;
138
139 HDST_API
141
143 HDST_API
145
150
157 HDST_API
158 HdStTextureHandleSharedPtr AllocateTextureHandle(
162 const HdStTextureIdentifier &textureId,
164 HdTextureType textureType,
167 const HdSamplerParameters &samplerParams,
172 size_t memoryRequest,
177 HdStShaderCodePtr const &shaderCode);
178
184 HDST_API
185 HdStTextureObjectSharedPtr AllocateTextureObject(
189 const HdStTextureIdentifier &textureId,
191 HdTextureType textureType);
192
200 HDST_API
202 HdTextureType textureType,
203 size_t memoryRequest);
204
211
212 HDST_API
213 HdBufferArrayRangeSharedPtr AllocateNonUniformBufferArrayRange(
214 TfToken const &role,
215 HdBufferSpecVector const &bufferSpecs,
216 HdBufferArrayUsageHint usageHint);
217
218 HDST_API
219 HdBufferArrayRangeSharedPtr AllocateNonUniformImmutableBufferArrayRange(
220 TfToken const &role,
221 HdBufferSpecVector const &bufferSpecs,
222 HdBufferArrayUsageHint usageHint);
223
224 HDST_API
225 HdBufferArrayRangeSharedPtr AllocateUniformBufferArrayRange(
226 TfToken const &role,
227 HdBufferSpecVector const &bufferSpecs,
228 HdBufferArrayUsageHint usageHint);
229
230 HDST_API
231 HdBufferArrayRangeSharedPtr AllocateShaderStorageBufferArrayRange(
232 TfToken const &role,
233 HdBufferSpecVector const &bufferSpecs,
234 HdBufferArrayUsageHint usageHint);
235
236 HDST_API
237 HdBufferArrayRangeSharedPtr AllocateSingleBufferArrayRange(
238 TfToken const &role,
239 HdBufferSpecVector const &bufferSpecs,
240 HdBufferArrayUsageHint usageHint);
241
257
258 HDST_API
259 HdBufferArrayRangeSharedPtr UpdateNonUniformBufferArrayRange(
260 TfToken const &role,
261 HdBufferArrayRangeSharedPtr const& curRange,
262 HdBufferSpecVector const &updatedOrAddedSpecs,
263 HdBufferSpecVector const& removedSpecs,
264 HdBufferArrayUsageHint usageHint);
265
266 HDST_API
267 HdBufferArrayRangeSharedPtr UpdateNonUniformImmutableBufferArrayRange(
268 TfToken const &role,
269 HdBufferArrayRangeSharedPtr const& curRange,
270 HdBufferSpecVector const &updatedOrAddedSpecs,
271 HdBufferSpecVector const& removedSpecs,
272 HdBufferArrayUsageHint usageHint);
273
274 HDST_API
275 HdBufferArrayRangeSharedPtr UpdateUniformBufferArrayRange(
276 TfToken const &role,
277 HdBufferArrayRangeSharedPtr const& curRange,
278 HdBufferSpecVector const &updatedOrAddedSpecs,
279 HdBufferSpecVector const& removedSpecs,
280 HdBufferArrayUsageHint usageHint);
281
282 HDST_API
283 HdBufferArrayRangeSharedPtr UpdateShaderStorageBufferArrayRange(
284 TfToken const &role,
285 HdBufferArrayRangeSharedPtr const& curRange,
286 HdBufferSpecVector const &updatedOrAddedSpecs,
287 HdBufferSpecVector const& removedSpecs,
288 HdBufferArrayUsageHint usageHint);
289
293
295 HDST_API
296 void AddSources(HdBufferArrayRangeSharedPtr const &range,
297 HdBufferSourceSharedPtrVector &&sources);
298
300 HDST_API
301 void AddSource(HdBufferArrayRangeSharedPtr const &range,
302 HdBufferSourceSharedPtr const &source);
303
305 HDST_API
306 void AddSource(HdBufferSourceSharedPtr const &source);
307
314 HDST_API
315 void AddComputation(HdBufferArrayRangeSharedPtr const &range,
316 HdStComputationSharedPtr const &computation,
317 HdStComputeQueue const queue);
318
322
325 HDST_API
326 HdStDispatchBufferSharedPtr RegisterDispatchBuffer(
327 TfToken const &role, int count, int commandNumUints);
328
334 HDST_API
335 HdStBufferResourceSharedPtr RegisterBufferResource(
336 TfToken const &role,
337 HdTupleType tupleType,
338 HgiBufferUsage bufferUsage);
339
341 HDST_API
343
345 HDST_API
347
351
362
364 HDST_API
366 RegisterMeshTopology(HdInstance<HdSt_MeshTopologySharedPtr>::ID id);
367
368 HDST_API
370 RegisterBasisCurvesTopology(
371 HdInstance<HdSt_BasisCurvesTopologySharedPtr>::ID id);
372
373 HDST_API
375 RegisterVertexAdjacencyBuilder(
376 HdInstance<HdSt_VertexAdjacencyBuilderSharedPtr>::ID id);
377
382 HDST_API
385 HdInstance<HdBufferArrayRangeSharedPtr>::ID id, TfToken const &name);
386
387 HDST_API
389 RegisterBasisCurvesIndexRange(
390 HdInstance<HdBufferArrayRangeSharedPtr>::ID id, TfToken const &name);
391
396 HDST_API
399 HdInstance<HdBufferArrayRangeSharedPtr>::ID id);
400
405 HDST_API
408 HdInstance<HdBufferArrayRangeSharedPtr>::ID id);
409
411 HDST_API
413 RegisterGeometricShader(HdInstance<HdSt_GeometricShaderSharedPtr>::ID id);
414
416 HDST_API
418 RegisterGLSLProgram(HdInstance<HdStGLSLProgramSharedPtr>::ID id);
419
421 HDST_API
423 RegisterGLSLFXFile(HdInstance<HioGlslfxSharedPtr>::ID id);
424
425#ifdef PXR_MATERIALX_SUPPORT_ENABLED
427 HDST_API
429 RegisterMaterialXShader(HdInstance<MaterialX::ShaderPtr>::ID id);
430#endif
431
433 HDST_API
435 RegisterResourceBindings(HdInstance<HgiResourceBindingsSharedPtr>::ID id);
436
438 HDST_API
440 RegisterGraphicsPipeline(HdInstance<HgiGraphicsPipelineSharedPtr>::ID id);
441
443 HDST_API
445 RegisterComputePipeline(HdInstance<HgiComputePipelineSharedPtr>::ID id);
446
457 HDST_API
460 const std::string& identifier,
461 const std::function<std::unique_ptr<HdResourceRegistry>()>& factory);
462
468 HDST_API
470
476 HDST_API
478 HgiComputeDispatch dispatchMethod = HgiComputeDispatchSerial);
479
485 HDST_API
486 void SubmitBlitWork(HgiSubmitWaitType wait = HgiSubmitWaitTypeNoWait);
487
493 HDST_API
494 void SubmitComputeWork(HgiSubmitWaitType wait = HgiSubmitWaitTypeNoWait);
495
497 HDST_API
499
500public:
501 //
502 // Unit test API
503 //
504
509 std::unique_ptr<HdStAggregationStrategy> &&strategy) {
510 _nonUniformAggregationStrategy = std::move(strategy);
511 }
512
517 std::unique_ptr<HdStAggregationStrategy> &&strategy) {
518 _nonUniformImmutableAggregationStrategy = std::move(strategy);
519 }
520
524 std::unique_ptr<HdStAggregationStrategy> &&strategy) {
525 _uniformUboAggregationStrategy = std::move(strategy);
526 }
527
531 std::unique_ptr<HdStAggregationStrategy> &&strategy) {
532 _uniformSsboAggregationStrategy = std::move(strategy);
533 }
534
538 std::unique_ptr<HdStAggregationStrategy> &&strategy) {
539 _singleAggregationStrategy = std::move(strategy);
540 }
541
543 HDST_API
544 friend std::ostream &operator <<(
545 std::ostream &out,
546 const HdStResourceRegistry& self);
547
548protected:
549 void _Commit() override;
550 void _GarbageCollect() override;
551
552private:
553 void _CommitTextures();
554 // Wrapper function for BAR allocation
555 HdBufferArrayRangeSharedPtr _AllocateBufferArrayRange(
556 HdStAggregationStrategy *strategy,
557 HdStBufferArrayRegistry &bufferArrayRegistry,
558 TfToken const &role,
559 HdBufferSpecVector const &bufferSpecs,
560 HdBufferArrayUsageHint usageHint);
561
563 HdBufferArrayRangeSharedPtr _UpdateBufferArrayRange(
564 HdStAggregationStrategy *strategy,
565 HdStBufferArrayRegistry &bufferArrayRegistry,
566 TfToken const &role,
567 HdBufferArrayRangeSharedPtr const& curRange,
568 HdBufferSpecVector const &updatedOrAddedSpecs,
569 HdBufferSpecVector const& removedSpecs,
570 HdBufferArrayUsageHint usageHint);
571
572 // Tally resources by key into the given dictionary. Any additions should
573 // be cumulative with the existing key values.
574 void _TallyResourceAllocation(VtDictionary *result) const;
575
576 // TODO: this is a transient structure. we'll revisit the BufferSource
577 // interface later.
578 struct _PendingSource {
579 _PendingSource(HdBufferArrayRangeSharedPtr const &range)
580 : range(range)
581 , sources()
582 {
583 }
584
585 _PendingSource(HdBufferArrayRangeSharedPtr const &range,
586 HdBufferSourceSharedPtr const &source)
587 : range(range)
588 , sources(1, source)
589 {
590 }
591
592 _PendingSource(HdBufferArrayRangeSharedPtr const &range,
593 HdBufferSourceSharedPtrVector && sources)
594 : range(range)
595 , sources(std::move(sources))
596 {
597 }
598
599 HdBufferArrayRangeSharedPtr range;
600 HdBufferSourceSharedPtrVector sources;
601 };
602
603 Hgi* _hgi;
604
605 typedef tbb::concurrent_vector<_PendingSource> _PendingSourceList;
606 _PendingSourceList _pendingSources;
607 std::atomic_size_t _numBufferSourcesToResolve;
608
609 struct _PendingComputation{
610 _PendingComputation(HdBufferArrayRangeSharedPtr const &range,
611 HdStComputationSharedPtr const &computation)
612 : range(range), computation(computation) { }
613 HdBufferArrayRangeSharedPtr range;
614 HdStComputationSharedPtr computation;
615 };
616
617 // If we need more 'compute queues' we can increase HdStComputeQueueCount.
618 // We could also consider tbb::concurrent_priority_queue if we want this
619 // to be dynamically scalable.
620 typedef tbb::concurrent_vector<_PendingComputation> _PendingComputationList;
621 _PendingComputationList _pendingComputations[HdStComputeQueueCount];
622
623 // aggregated buffer array
624 HdStBufferArrayRegistry _nonUniformBufferArrayRegistry;
625 HdStBufferArrayRegistry _nonUniformImmutableBufferArrayRegistry;
626 HdStBufferArrayRegistry _uniformUboBufferArrayRegistry;
627 HdStBufferArrayRegistry _uniformSsboBufferArrayRegistry;
628 HdStBufferArrayRegistry _singleBufferArrayRegistry;
629
630 // current aggregation strategies
631 std::unique_ptr<HdStAggregationStrategy> _nonUniformAggregationStrategy;
632 std::unique_ptr<HdStAggregationStrategy>
633 _nonUniformImmutableAggregationStrategy;
634 std::unique_ptr<HdStAggregationStrategy> _uniformUboAggregationStrategy;
635 std::unique_ptr<HdStAggregationStrategy> _uniformSsboAggregationStrategy;
636 std::unique_ptr<HdStAggregationStrategy> _singleAggregationStrategy;
637
638 typedef std::vector<HdStDispatchBufferSharedPtr>
639 _DispatchBufferRegistry;
640 _DispatchBufferRegistry _dispatchBufferRegistry;
641
642 typedef std::vector<HdStBufferResourceSharedPtr>
643 _BufferResourceRegistry;
644 _BufferResourceRegistry _bufferResourceRegistry;
645
646 // Register mesh topology.
648 _meshTopologyRegistry;
649
650 // Register basisCurves topology.
652 _basisCurvesTopologyRegistry;
653
654 // Register vertex adjacency.
656 _vertexAdjacencyBuilderRegistry;
657
658 // Register topology index buffers.
660 _TopologyIndexRangeInstanceRegistry;
661 typedef tbb::concurrent_unordered_map< TfToken,
662 _TopologyIndexRangeInstanceRegistry,
664 _TopologyIndexRangeInstanceRegMap;
665
666 _TopologyIndexRangeInstanceRegMap _meshTopologyIndexRangeRegistry;
667 _TopologyIndexRangeInstanceRegMap _basisCurvesTopologyIndexRangeRegistry;
668
669 // Register shared primvar buffers.
671 _primvarRangeRegistry;
672
673 // Register ext computation resource.
675 _extComputationDataRangeRegistry;
676
677 // geometric shader registry
679 _geometricShaderRegistry;
680
681 // glsl shader program registry
683 _glslProgramRegistry;
684
685 // glslfx file registry
687 _glslfxFileRegistry;
688
689#ifdef PXR_MATERIALX_SUPPORT_ENABLED
690 // MaterialX glslfx shader registry
691 HdInstanceRegistry<MaterialX::ShaderPtr> _materialXShaderRegistry;
692#endif
693
694 // texture handle registry
695 std::unique_ptr<class HdSt_TextureHandleRegistry> _textureHandleRegistry;
696
697 // Hgi resource bindings registry
699 _resourceBindingsRegistry;
700
701 // Hgi graphics pipeline registry
703 _graphicsPipelineRegistry;
704
705 // Hgi compute pipeline registry
707 _computePipelineRegistry;
708
709 using _SubResourceRegistryMap =
710 tbb::concurrent_unordered_map<std::string,
711 std::unique_ptr<HdResourceRegistry>>;
712 _SubResourceRegistryMap _subResourceRegistries;
713
714 HgiBlitCmdsUniquePtr _blitCmds;
715 HgiComputeCmdsUniquePtr _computeCmds;
716
717 std::unique_ptr<HdStStagingBuffer> _stagingBuffer;
718};
719
720
721PXR_NAMESPACE_CLOSE_SCOPE
722
723#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:127
Aggregation strategy base class.
Definition: strategyBase.h:48
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 void SetMemoryRequestForTextureType(HdTextureType textureType, size_t memoryRequest)
Sets how much memory a single texture can consume in bytes by texture type.
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 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 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 shad...
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 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.
HDST_API HdStTextureObjectSharedPtr AllocateTextureObject(const HdStTextureIdentifier &textureId, HdTextureType textureType)
Allocate texture object.
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:50
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:55
A graphics API independent abstraction of compute commands.
Definition: computeCmds.h:46
Hydra Graphics Interface.
Definition: hgi.h:111
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:88
A map with string keys and VtValue values.
Definition: dictionary.h:60
STL namespace.
HdTupleType represents zero, one, or more values of the same HdType.
Definition: types.h:358
Functor to use for hash maps from tokens to other things.
Definition: token.h:166