![]() |
|
Hydra Representation of a Client defined computation. More...
Public Types | |
enum | DirtyBits : HdDirtyBits { Clean = 0, DirtyInputDesc = 1 << 0, DirtyOutputDesc = 1 << 1, DirtyElementCount = 1 << 2, DirtySceneInput = 1 << 3, DirtyCompInput = 1 << 4, DirtyKernel = 1 << 5, DirtyDispatchCount = 1 << 6, AllDirty } |
Change tracking. More... | |
Public Member Functions | |
HD_API | HdExtComputation (SdfPath const &id) |
Construct a new ExtComputation identified by id. More... | |
HD_API void | Sync (HdSceneDelegate *sceneDelegate, HdRenderParam *renderParam, HdDirtyBits *dirtyBits) override |
Synchronizes state from the delegate to this object. More... | |
HD_API HdDirtyBits | GetInitialDirtyBitsMask () const override |
Returns the minimal set of dirty bits to place in the change tracker for use in the first sync of this prim. More... | |
HD_API size_t | GetDispatchCount () const |
HD_API size_t | GetElementCount () const |
HD_API TfTokenVector const & | GetSceneInputNames () const |
HD_API TfTokenVector | GetOutputNames () const |
HD_API HdExtComputationInputDescriptorVector const & | GetComputationInputs () const |
HD_API HdExtComputationOutputDescriptorVector const & | GetComputationOutputs () const |
HD_API const std::string & | GetGpuKernelSource () const |
HD_API bool | IsInputAggregation () const |
![]() | |
HD_API | HdSprim (SdfPath const &id) |
SdfPath const & | GetId () const |
Returns the identifier by which this state is known. More... | |
virtual HD_API void | Finalize (HdRenderParam *renderParam) |
Finalizes object resources. More... | |
Protected Member Functions | |
HD_API void | _Sync (HdSceneDelegate *sceneDelegate, HdRenderParam *renderParam, HdDirtyBits *dirtyBits) |
Static Protected Member Functions | |
static HD_API bool | _IsEnabledSharedExtComputationData () |
Hydra Representation of a Client defined computation.
A computation provides a way to procedurally generate a primvar.
It represents a basic Input -> Processing -> Output model.
Primarily inputs are provided by the scene delegate via the Get() mechanism.
Computations can also be chained together, such that the output from one computation can be an input to another.
The results of a computation is designed to be in SOA form (structure or array), where each output is a member of the "structure" producing several parallel arrays. While the type of the elements of the array is defined by the output member, the number of elements in each array is the same across all outputs.
ExtComputations use a pull model, so processing is only triggered if a downstream computation or prim pulls on one the computations outputs.
Definition at line 56 of file extComputation.h.
enum DirtyBits : HdDirtyBits |
Change tracking.
Definition at line 69 of file extComputation.h.
HD_API HdExtComputation | ( | SdfPath const & | id | ) |
Construct a new ExtComputation identified by id.
|
overridevirtual |
Returns the minimal set of dirty bits to place in the change tracker for use in the first sync of this prim.
Typically this would be all dirty bits.
Implements HdSprim.
|
overridevirtual |
Synchronizes state from the delegate to this object.
[in,out] | dirtyBits | On input specifies which state is is dirty and can be pulled from the scene delegate. On output specifies which bits are still dirty and were not cleaned by the sync. |
Implements HdSprim.
Reimplemented in HdStExtComputation.