All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HdExtComputation Class Reference

#include <extComputation.h>

+ Inheritance diagram for HdExtComputation:

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,

Public Member Functions

HD_API HdExtComputation (SdfPath const &id)
 Construct a new ExtComputation identified by id. More...
virtual HD_API ~HdExtComputation ()=default
virtual HD_API void Sync (HdSceneDelegate *sceneDelegate, HdRenderParam *renderParam, HdDirtyBits *dirtyBits) override
virtual HD_API HdDirtyBits GetInitialDirtyBitsMask () const override
HD_API size_t GetDispatchCount () const
HD_API size_t GetElementCount () const
HD_API TfTokenVector constGetSceneInputNames () const
HD_API TfTokenVector GetOutputNames () const
GetComputationInputs () const
GetComputationOutputs () const
HD_API const std::stringGetGpuKernelSource () const
HD_API bool IsInputAggregation () const
- Public Member Functions inherited from HdSprim
HD_API HdSprim (SdfPath const &id)
virtual HD_API ~HdSprim ()
SdfPath constGetId () const
virtual HD_API void Finalize (HdRenderParam *renderParam)

Protected Member Functions

HD_API void _Sync (HdSceneDelegate *sceneDelegate, HdRenderParam *renderParam, HdDirtyBits *dirtyBits)

Static Protected Member Functions

static HD_API bool _IsEnabledSharedExtComputationData ()

Detailed Description

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 60 of file extComputation.h.

Member Enumeration Documentation

Change tracking


The list of inputs or input bindings changed


The list of outputs changed.


The number of elements in the output arrays changed


A scene input changed value.


A computation input changed value.


The compute kernel binding changed.


The number of kernel invocations to execute changed


Definition at line 72 of file extComputation.h.

Constructor & Destructor Documentation

HD_API HdExtComputation::HdExtComputation ( SdfPath const id)

Construct a new ExtComputation identified by id.

virtual HD_API HdExtComputation::~HdExtComputation ( )

Member Function Documentation

static HD_API bool HdExtComputation::_IsEnabledSharedExtComputationData ( )
HD_API void HdExtComputation::_Sync ( HdSceneDelegate sceneDelegate,
HdRenderParam renderParam,
HdDirtyBits dirtyBits 
HD_API HdExtComputationInputDescriptorVector const& HdExtComputation::GetComputationInputs ( ) const

Definition at line 119 of file extComputation.h.

HD_API HdExtComputationOutputDescriptorVector const& HdExtComputation::GetComputationOutputs ( ) const

Definition at line 125 of file extComputation.h.

HD_API size_t HdExtComputation::GetDispatchCount ( ) const
HD_API size_t HdExtComputation::GetElementCount ( ) const

Definition at line 107 of file extComputation.h.

HD_API const std::string& HdExtComputation::GetGpuKernelSource ( ) const

Definition at line 130 of file extComputation.h.

virtual HD_API HdDirtyBits HdExtComputation::GetInitialDirtyBitsMask ( ) const

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.

HD_API TfTokenVector HdExtComputation::GetOutputNames ( ) const
HD_API TfTokenVector const& HdExtComputation::GetSceneInputNames ( ) const

Definition at line 110 of file extComputation.h.

HD_API bool HdExtComputation::IsInputAggregation ( ) const
virtual HD_API void HdExtComputation::Sync ( HdSceneDelegate sceneDelegate,
HdRenderParam renderParam,
HdDirtyBits dirtyBits 

Synchronizes state from the delegate to this object.

[in,out]dirtyBitsOn 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.

The documentation for this class was generated from the following file: