7#ifndef PXR_IMAGING_HD_ST_EXT_COMP_GPU_COMPUTATION_H
8#define PXR_IMAGING_HD_ST_EXT_COMP_GPU_COMPUTATION_H
11#include "pxr/imaging/hdSt/api.h"
12#include "pxr/imaging/hdSt/computation.h"
13#include "pxr/imaging/hdSt/extCompGpuComputationResource.h"
15#include "pxr/imaging/hd/bufferSource.h"
17#include "pxr/usd/sdf/path.h"
19#include "pxr/base/vt/value.h"
24PXR_NAMESPACE_OPEN_SCOPE
29using HdStGLSLProgramSharedPtr= std::shared_ptr<class HdStGLSLProgram>;
30using HdExtComputationPrimvarDescriptorVector =
31 std::vector<struct HdExtComputationPrimvarDescriptor>;
33using HdStExtCompGpuComputationSharedPtr =
34 std::shared_ptr<class HdStExtCompGpuComputation>;
80 HdStExtCompGpuComputationResourceSharedPtr
const &resource,
81 HdExtComputationPrimvarDescriptorVector
const &compPrimvars,
100 static HdStExtCompGpuComputationSharedPtr
104 HdExtComputationPrimvarDescriptorVector
const &compPrimvars);
125 void Execute(HdBufferArrayRangeSharedPtr
const &range,
144 HdStExtCompGpuComputationResourceSharedPtr
const &
GetResource()
const;
148 HdStExtCompGpuComputationResourceSharedPtr _resource;
149 HdExtComputationPrimvarDescriptorVector _compPrimvars;
186void HdSt_GetExtComputationPrimvarsComputations(
189 HdExtComputationPrimvarDescriptorVector
const& allCompPrimvars,
190 HdDirtyBits dirtyBits,
191 HdBufferSourceSharedPtrVector *sources,
192 HdBufferSourceSharedPtrVector *reserveOnlySources,
193 HdBufferSourceSharedPtrVector *separateComputationSources,
194 HdStComputationComputeQueuePairVector *computations);
197PXR_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...