HDK
 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,
  AllDirty
}
 

Public Member Functions

HD_API HdExtComputation (SdfPath const &id)
 Construct a new ExtComputation identified by id. More...
 
HD_API ~HdExtComputation () override
 
HD_API void Sync (HdSceneDelegate *sceneDelegate, HdRenderParam *renderParam, HdDirtyBits *dirtyBits) override
 
HD_API HdDirtyBits GetInitialDirtyBitsMask () const override
 
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::stringGetGpuKernelSource () const
 
HD_API bool IsInputAggregation () const
 
- Public Member Functions inherited from HdSprim
HD_API HdSprim (SdfPath const &id)
 
virtual HD_API ~HdSprim ()
 
SdfPath const & GetId () 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 56 of file extComputation.h.

Member Enumeration Documentation

Change tracking

Enumerator
Clean 
DirtyInputDesc 

The list of inputs or input bindings changed

DirtyOutputDesc 

The list of outputs changed.

DirtyElementCount 

The number of elements in the output arrays changed

DirtySceneInput 

A scene input changed value.

DirtyCompInput 

A computation input changed value.

DirtyKernel 

The compute kernel binding changed.

DirtyDispatchCount 

The number of kernel invocations to execute changed

AllDirty 

Definition at line 69 of file extComputation.h.

Constructor & Destructor Documentation

HD_API HdExtComputation::HdExtComputation ( SdfPath const &  id)

Construct a new ExtComputation identified by id.

HD_API HdExtComputation::~HdExtComputation ( )
override

Member Function Documentation

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

Definition at line 116 of file extComputation.h.

HD_API HdExtComputationOutputDescriptorVector const& HdExtComputation::GetComputationOutputs ( ) const
inline

Definition at line 122 of file extComputation.h.

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

Definition at line 104 of file extComputation.h.

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

Definition at line 127 of file extComputation.h.

HD_API HdDirtyBits HdExtComputation::GetInitialDirtyBitsMask ( ) const
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.

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

Definition at line 107 of file extComputation.h.

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

Synchronizes state from the delegate to this object.

Parameters
[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: