24 #ifndef PXR_IMAGING_HD_ST_EXT_COMP_GPU_COMPUTATION_H
25 #define PXR_IMAGING_HD_ST_EXT_COMP_GPU_COMPUTATION_H
28 #include "pxr/imaging/hdSt/api.h"
29 #include "pxr/imaging/hdSt/extCompGpuComputationResource.h"
30 #include "pxr/imaging/hdSt/resourceBinder.h"
31 #include "pxr/imaging/hd/binding.h"
32 #include "pxr/imaging/hd/bufferSource.h"
33 #include "pxr/imaging/hd/computation.h"
34 #include "pxr/imaging/hd/types.h"
35 #include "pxr/usd/sdf/path.h"
37 #include "pxr/base/vt/value.h"
42 PXR_NAMESPACE_OPEN_SCOPE
46 using HdStGLSLProgramSharedPtr= std::shared_ptr<class HdStGLSLProgram>;
47 using HdExtComputationPrimvarDescriptorVector =
48 std::vector<struct HdExtComputationPrimvarDescriptor>;
50 using HdStExtCompGpuComputationSharedPtr =
51 std::shared_ptr<class HdStExtCompGpuComputation>;
96 HdStExtCompGpuComputationResourceSharedPtr
const &resource,
97 HdExtComputationPrimvarDescriptorVector
const &compPrimvars,
116 static HdStExtCompGpuComputationSharedPtr
120 HdExtComputationPrimvarDescriptorVector
const &compPrimvars);
130 virtual void GetBufferSpecs(HdBufferSpecVector *specs)
const override;
141 virtual void Execute(HdBufferArrayRangeSharedPtr
const &range,
160 virtual HdStExtCompGpuComputationResourceSharedPtr
const &
165 HdStExtCompGpuComputationResourceSharedPtr _resource;
166 HdExtComputationPrimvarDescriptorVector _compPrimvars;
202 void HdSt_GetExtComputationPrimvarsComputations(
205 HdExtComputationPrimvarDescriptorVector
const& allCompPrimvars,
206 HdDirtyBits dirtyBits,
207 HdBufferSourceSharedPtrVector *sources,
208 HdBufferSourceSharedPtrVector *reserveOnlySources,
209 HdBufferSourceSharedPtrVector *separateComputationSources,
210 HdStComputationSharedPtrVector *computations);
212 PXR_NAMESPACE_CLOSE_SCOPE
214 #endif // PXR_IMAGING_HD_ST_EXT_COMP_GPU_COMPUTATION_H
Hydra Representation of a Client defined computation.
HDST_API int GetDispatchCount() const
Gets the number of GPU kernel invocations to execute.
virtual HDST_API HdStExtCompGpuComputationResourceSharedPtr const & GetResource() const
Gets the shared GPU resource holder for the computation.
Adapter class providing data exchange with the client scene graph.
A central registry for resources.
A path value used to locate objects in layers or scenegraphs.
virtual HDST_API int GetNumOutputElements() const override
Gets the number of elements in the output primvar.
An interface class for GPU computation.
A Computation that represents a GPU implementation of a ExtComputation.
virtual HDST_API void Execute(HdBufferArrayRangeSharedPtr const &range, HdResourceRegistry *resourceRegistry) override
Executes the computation on the GPU.
static HDST_API HdStExtCompGpuComputationSharedPtr CreateGpuComputation(HdSceneDelegate *sceneDelegate, HdExtComputation const *sourceComp, HdExtComputationPrimvarDescriptorVector const &compPrimvars)
Creates a GPU computation implementing the given abstract computation.
virtual HDST_API void GetBufferSpecs(HdBufferSpecVector *specs) const override
Adds the output buffer specs generated by this computation to the passed in vector of buffer specs...
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...