7 #ifndef PXR_IMAGING_HD_CHANGE_TRACKER_H
8 #define PXR_IMAGING_HD_CHANGE_TRACKER_H
18 #include <tbb/concurrent_hash_map.h>
216 return (dirtyBits &
Varying) != 0;
485 return _varyingStateVersion;
498 return _rprimIndexVersion;
505 return _sprimIndexVersion;
512 return _bprimIndexVersion;
519 return _instancerIndexVersion;
529 return _sceneStateVersion;
571 static void _LogCacheAccess(
TfToken const& cacheName,
578 struct _PathHashCompare {
585 typedef tbb::concurrent_hash_map<SdfPath, SdfPathSet, _PathHashCompare>
589 _IDStateMap _rprimState;
590 _IDStateMap _instancerState;
591 _IDStateMap _taskState;
592 _IDStateMap _sprimState;
593 _IDStateMap _bprimState;
594 _GeneralStateMap _generalState;
597 _CollectionStateMap _collectionState;
601 _DependencyMap _instancerRprimDependencies;
602 _DependencyMap _instancerSprimDependencies;
603 _DependencyMap _instancerInstancerDependencies;
609 _DependencyMap _sprimSprimTargetDependencies;
611 _DependencyMap _sprimSprimSourceDependencies;
614 void _AddDependency(_DependencyMap &depMap,
616 void _RemoveDependency(_DependencyMap &depMap,
623 unsigned _varyingStateVersion;
628 unsigned _rprimIndexVersion;
629 unsigned _sprimIndexVersion;
630 unsigned _bprimIndexVersion;
631 unsigned _instancerIndexVersion;
636 unsigned _sceneStateVersion;
639 unsigned _visChangeCount;
642 unsigned _instanceIndicesChangeCount;
645 unsigned _rprimRenderTagVersion;
648 unsigned _taskRenderTagsVersion;
679 #endif //PXR_IMAGING_HD_CHANGE_TRACKER_H
HD_API void AddInstancerRprimDependency(SdfPath const &instancerId, SdfPath const &rprimId)
HD_API void RprimRemoved(SdfPath const &id)
Stop tracking Rprim with the given id.
HD_API unsigned GetTaskRenderTagsVersion() const
Retrieve the current version number of the task's render tags opinion.
HD_API void RemoveSprimFromSprimSprimDependencies(SdfPath const &sprimId)
Remove all dependencies involving sprimId as a parent or child.
HD_API bool IsSubdivTagsDirty(SdfPath const &id)
Returns true if the rprim identified by id has a dirty subdiv tags.
HD_API bool IsExtentDirty(SdfPath const &id)
Returns true if the rprim identified by id has a dirty extent.
HD_API void SprimRemoved(SdfPath const &id)
Stop tracking sprim with the given id.
HD_API void RemoveInstancerInstancerDependency(SdfPath const &parentInstancerId, SdfPath const &instancerId)
HD_API void RemoveInstancerSprimDependency(SdfPath const &instancerId, SdfPath const &sprimId)
HD_API void ResetRprimVaryingState(SdfPath const &id)
virtual HD_API ~HdChangeTracker()
static HD_API bool IsInstanceIndexDirty(HdDirtyBits dirtyBits, SdfPath const &id)
Returns true if the dirtyBits has a dirty instance index. id is for perflog.
GLsizei const GLchar *const * path
static bool IsDirty(HdDirtyBits dirtyBits)
unsigned GetSceneStateVersion() const
GLboolean GLboolean GLboolean GLboolean a
HD_API void MarkTaskClean(SdfPath const &id, HdDirtyBits newBits=Clean)
Set the dirty flags to newBits.
IMATH_HOSTDEVICE constexpr bool equal(T1 a, T2 b, T3 t) IMATH_NOEXCEPT
HD_API bool IsPrimIdDirty(SdfPath const &id)
Returns true if the rprim identified by id has a dirty primID.
HD_API HdDirtyBits GetInstancerDirtyBits(SdfPath const &id)
Returns the dirty bits for the instancer with id.
HD_API unsigned GetVisibilityChangeCount() const
HD_API void MarkInstancerClean(SdfPath const &id, HdDirtyBits newBits=Clean)
Clean the specified dirty bits for the instancer with id.
HD_API void MarkAllRprimsDirty(HdDirtyBits bits)
HD_API void BprimRemoved(SdfPath const &id)
Stop tracking bprim with the given id.
HD_API void MarkCollectionDirty(TfToken const &collectionName)
HD_API bool IsTransformDirty(SdfPath const &id)
Returns true if the rprim identified by id has a dirty transform.
static bool IsClean(HdDirtyBits dirtyBits)
Returns true if the dirtyBits has no flags set except the varying flag.
HD_API void RprimInserted(SdfPath const &id, HdDirtyBits initialDirtyState)
Start tracking Rprim with the given id.
HD_API unsigned GetStateVersion(TfToken const &name) const
Returns the current version of the named state.
HD_API void MarkSprimDirty(SdfPath const &id, HdDirtyBits bits)
Set the dirty flags to bits.
HD_API void MarkPrimvarDirty(SdfPath const &id, TfToken const &name)
Mark the primvar for the rprim with id as being dirty.
HD_API void MarkTaskDirty(SdfPath const &id, HdDirtyBits bits=AllDirty)
Set the dirty flags to bits.
HD_API HdDirtyBits GetBprimDirtyBits(SdfPath const &id)
Get the dirty bits for bprim with the given id.
HD_API void BprimInserted(SdfPath const &id, HdDirtyBits initialDirtyState)
Start tracking bprim with the given id.
HD_API bool IsPrimvarDirty(SdfPath const &id, TfToken const &name)
HD_API bool IsRprimDirty(SdfPath const &id)
Returns true if the rprim identified by id has any dirty flags set.
HD_API void MarkBprimDirty(SdfPath const &id, HdDirtyBits bits)
Set the dirty flags to bits.
static HD_API bool IsReprDirty(HdDirtyBits dirtyBits, SdfPath const &id)
Returns the dirty bits for the rprim with id.
HD_API HdDirtyBits GetTaskDirtyBits(SdfPath const &id)
Get the dirty bits for Task with the given id.
HD_API bool IsTopologyDirty(SdfPath const &id)
Returns true if the rprim identified by id has a dirty topology.
HD_API HdDirtyBits GetRprimDirtyBits(SdfPath const &id) const
Returns the dirty bits for the rprim with id.
HD_API void MarkRprimDirty(SdfPath const &id, HdDirtyBits bits=AllDirty)
HD_API void AddCollection(TfToken const &collectionName)
Adds a named collection for tracking.
HD_API void AddInstancerSprimDependency(SdfPath const &instancerId, SdfPath const &sprimId)
static bool IsVarying(HdDirtyBits dirtyBits)
Returns true if the varying flag is set.
HD_API void RemoveInstancerRprimDependency(SdfPath const &instancerId, SdfPath const &rprimId)
GLuint const GLchar * name
unsigned GetRprimIndexVersion() const
HD_API void TaskInserted(SdfPath const &id, HdDirtyBits initialDirtyState)
Start tracking Task with the given id.
GLboolean GLboolean GLboolean b
unsigned GetVaryingStateVersion() const
HD_API void TaskRemoved(SdfPath const &id)
Stop tracking Task with the given id.
HD_API void SprimInserted(SdfPath const &id, HdDirtyBits initialDirtyState)
Start tracking sprim with the given id.
HD_API unsigned GetRenderTagVersion() const
HD_API void RemoveSprimSprimDependency(SdfPath const &parentSprimId, SdfPath const &sprimId)
static HD_API void DumpDirtyBits(HdDirtyBits dirtyBits)
unsigned GetBprimIndexVersion() const
HD_API void MarkRprimClean(SdfPath const &id, HdDirtyBits newBits=Clean)
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
HD_API unsigned GetInstanceIndicesChangeCount() const
HD_API void MarkInstancerDirty(SdfPath const &id, HdDirtyBits bits=AllDirty)
HD_API void AddState(TfToken const &name)
Adds a named state for tracking.
HD_API void AddInstancerInstancerDependency(SdfPath const &parentInstancerId, SdfPath const &instancerId)
static HD_API std::string StringifyDirtyBits(HdDirtyBits dirtyBits)
HD_API void AddSprimSprimDependency(SdfPath const &parentSprimId, SdfPath const &sprimId)
unsigned GetInstancerIndexVersion() const
HD_API bool IsCullStyleDirty(SdfPath const &id)
Returns true if the rprim identified by id has dirty cullstyle.
#define PXR_NAMESPACE_CLOSE_SCOPE
HD_API HdDirtyBits GetSprimDirtyBits(SdfPath const &id)
Get the dirty bits for sprim with the given id.
static HD_API bool IsInstancerDirty(HdDirtyBits dirtyBits, SdfPath const &id)
Returns true if the dirtyBits has a dirty instancer. id is for perflog.
HD_API void MarkStateDirty(TfToken const &name)
HD_API void InstancerRemoved(SdfPath const &id)
Stop tracking Instancer with the given id.
HD_API unsigned GetCollectionVersion(TfToken const &collectionName) const
Returns the current version of the named collection.
HD_API bool IsVisibilityDirty(SdfPath const &id)
Returns true if the rprim identified by id has dirty visibility.
HD_API bool IsAnyPrimvarDirty(SdfPath const &id)
Returns true if the rprim identified by id has any dirty primvars.
HD_API void MarkBprimClean(SdfPath const &id, HdDirtyBits newBits=Clean)
Set the dirty flags to newBits.
HD_API bool IsDisplayStyleDirty(SdfPath const &id)
Returns true if the rprim identified by id has a dirty display style.
size_t hash_value(const CH_ChannelRef &ref)
HD_API void InstancerInserted(SdfPath const &id, HdDirtyBits initialDirtyState)
Start tracking Instancer with the given id.
unsigned GetSprimIndexVersion() const
HD_API void MarkSprimClean(SdfPath const &id, HdDirtyBits newBits=Clean)
Set the dirty flags to newBits.
HD_API void ResetVaryingState()
HD_API bool IsDoubleSidedDirty(SdfPath const &id)
Returns true if the rprim identified by id has dirty doubleSided state.