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/bufferSource.h" 32 #include "pxr/imaging/hd/computation.h" 33 #include "pxr/imaging/hd/types.h" 34 #include "pxr/usd/sdf/path.h" 36 #include "pxr/base/vt/value.h" 41 PXR_NAMESPACE_OPEN_SCOPE
45 using HdStGLSLProgramSharedPtr= std::shared_ptr<class HdStGLSLProgram>;
46 using HdExtComputationPrimvarDescriptorVector =
47 std::vector<struct HdExtComputationPrimvarDescriptor>;
49 using HdStExtCompGpuComputationSharedPtr =
50 std::shared_ptr<class HdStExtCompGpuComputation>;
95 HdStExtCompGpuComputationResourceSharedPtr
const &resource,
96 HdExtComputationPrimvarDescriptorVector
const &compPrimvars,
115 static HdStExtCompGpuComputationSharedPtr
119 HdExtComputationPrimvarDescriptorVector
const &compPrimvars);
129 virtual void GetBufferSpecs(HdBufferSpecVector *specs)
const override;
140 virtual void Execute(HdBufferArrayRangeSharedPtr
const &range,
159 virtual HdStExtCompGpuComputationResourceSharedPtr
const &
164 HdStExtCompGpuComputationResourceSharedPtr _resource;
165 HdExtComputationPrimvarDescriptorVector _compPrimvars;
201 void HdSt_GetExtComputationPrimvarsComputations(
204 HdExtComputationPrimvarDescriptorVector
const& allCompPrimvars,
205 HdDirtyBits dirtyBits,
206 HdBufferSourceSharedPtrVector *sources,
207 HdBufferSourceSharedPtrVector *reserveOnlySources,
208 HdBufferSourceSharedPtrVector *separateComputationSources,
209 HdStComputationSharedPtrVector *computations);
211 PXR_NAMESPACE_CLOSE_SCOPE
213 #endif // PXR_IMAGING_HD_ST_EXT_COMP_GPU_COMPUTATION_H Hydra Representation of a Client defined 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 HdStExtCompGpuComputationResourceSharedPtr const & GetResource() const
Gets the shared GPU resource holder for the computation.
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.
HDST_API int GetDispatchCount() const
Gets the number of GPU kernel invocations to execute.
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...