24 #ifndef PXR_IMAGING_PLUGIN_HD_ST_RENDER_PARAM_H
25 #define PXR_IMAGING_PLUGIN_HD_ST_RENDER_PARAM_H
32 #include <shared_mutex>
116 _needsGarbageCollection =
true;
120 _needsGarbageCollection =
false;
124 return _needsGarbageCollection;
128 typedef std::unordered_map<TfToken, std::atomic_int, TfHash> _TagToCountMap;
130 void _AdjustTagCount(
131 std::shared_timed_mutex *mutex,
132 _TagToCountMap *tagToCountMap,
134 const int increment);
137 std::shared_timed_mutex *mutex,
138 const _TagToCountMap *tagToCountMap,
141 std::atomic_uint _drawBatchesVersion;
142 std::atomic_uint _materialTagsVersion;
143 std::atomic_uint _geomSubsetDrawItemsVersion;
144 bool _needsGarbageCollection;
147 mutable std::shared_timed_mutex _materialTagToCountMutex;
148 _TagToCountMap _materialTagToCount;
150 mutable std::shared_timed_mutex _renderTagToCountMutex;
151 _TagToCountMap _renderTagToCount;
156 #endif // PXR_IMAGING_PLUGIN_HD_ST_RENDER_PARAM_H
~HdStRenderParam() override
HDST_API void MarkDrawBatchesDirty()
Draw items cache and batch invalidation.
HDST_API void DecreaseRenderTagCount(const TfToken &renderTag)
Unregister that there is an rprim with given renderTag.
HDST_API unsigned int GetDrawBatchesVersion() const
HDST_API void MarkMaterialTagsDirty()
HDST_API void DecreaseMaterialTagCount(const TfToken &materialTag)
Unregister that there is an rprim with given materialTag.
bool IsGarbageCollectionNeeded() const
HDST_API void MarkGeomSubsetDrawItemsDirty()
std::vector< TfToken > TfTokenVector
Convenience types.
void ClearGarbageCollectionNeeded()
HDST_API unsigned int GetGeomSubsetDrawItemsVersion() const
HDST_API bool HasAnyRenderTag(const TfTokenVector &renderTags) const
Render tag tracking.
HDST_API bool HasMaterialTag(const TfToken &materialTag) const
Material tag tracking.
HDST_API void IncreaseMaterialTagCount(const TfToken &materialTag)
Register that there is an rprim with given materialTag.
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
HDST_API void IncreaseRenderTagCount(const TfToken &renderTag)
Register that there is an rprim with given renderTag.
#define PXR_NAMESPACE_CLOSE_SCOPE
HDST_API unsigned int GetMaterialTagsVersion() const
void SetGarbageCollectionNeeded()
Garbage collection tracking.