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/computation.h"
30#include "pxr/imaging/hdSt/extCompGpuComputationResource.h"
32#include "pxr/imaging/hd/bufferSource.h"
34#include "pxr/usd/sdf/path.h"
36#include "pxr/base/vt/value.h"
41PXR_NAMESPACE_OPEN_SCOPE
46using HdStGLSLProgramSharedPtr= std::shared_ptr<class HdStGLSLProgram>;
47using HdExtComputationPrimvarDescriptorVector =
48 std::vector<struct HdExtComputationPrimvarDescriptor>;
50using HdStExtCompGpuComputationSharedPtr =
51 std::shared_ptr<class HdStExtCompGpuComputation>;
97 HdStExtCompGpuComputationResourceSharedPtr
const &resource,
98 HdExtComputationPrimvarDescriptorVector
const &compPrimvars,
117 static HdStExtCompGpuComputationSharedPtr
121 HdExtComputationPrimvarDescriptorVector
const &compPrimvars);
142 void Execute(HdBufferArrayRangeSharedPtr
const &range,
161 HdStExtCompGpuComputationResourceSharedPtr
const &
GetResource()
const;
165 HdStExtCompGpuComputationResourceSharedPtr _resource;
166 HdExtComputationPrimvarDescriptorVector _compPrimvars;
203void HdSt_GetExtComputationPrimvarsComputations(
206 HdExtComputationPrimvarDescriptorVector
const& allCompPrimvars,
207 HdDirtyBits dirtyBits,
208 HdBufferSourceSharedPtrVector *sources,
209 HdBufferSourceSharedPtrVector *reserveOnlySources,
210 HdBufferSourceSharedPtrVector *separateComputationSources,
211 HdStComputationComputeQueuePairVector *computations);
214PXR_NAMESPACE_CLOSE_SCOPE
Hydra Representation of a Client defined computation.
A central registry for resources.
Adapter class providing data exchange with the client scene graph.
An interface class for GPU computation.
A Computation that represents a GPU implementation of a ExtComputation.
HDST_API void Execute(HdBufferArrayRangeSharedPtr const &range, HdResourceRegistry *resourceRegistry) override
Executes the computation on the GPU.
HDST_API HdStExtCompGpuComputationResourceSharedPtr const & GetResource() const
Gets the shared GPU resource holder for the computation.
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.
HDST_API int GetNumOutputElements() const override
Gets the number of elements in the output primvar.
HDST_API int GetDispatchCount() const
Gets the number of GPU kernel invocations to execute.
static HDST_API HdStExtCompGpuComputationSharedPtr CreateGpuComputation(HdSceneDelegate *sceneDelegate, HdExtComputation const *sourceComp, HdExtComputationPrimvarDescriptorVector const &compPrimvars)
Creates a GPU computation implementing the given abstract computation.
HdStExtCompGpuComputation(SdfPath const &id, HdStExtCompGpuComputationResourceSharedPtr const &resource, HdExtComputationPrimvarDescriptorVector const &compPrimvars, int dispatchCount, int elementCount)
Constructs a new GPU ExtComputation computation.
A path value used to locate objects in layers or scenegraphs.
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...