7#ifndef PXR_IMAGING_PLUGIN_HD_ST_RENDER_PARAM_H
8#define PXR_IMAGING_PLUGIN_HD_ST_RENDER_PARAM_H
11#include "pxr/imaging/hd/renderDelegate.h"
12#include "pxr/imaging/hdSt/api.h"
15#include <shared_mutex>
17PXR_NAMESPACE_OPEN_SCOPE
41 unsigned int GetDrawBatchesVersion()
const;
49 unsigned int GetMaterialTagsVersion()
const;
57 unsigned int GetGeomSubsetDrawItemsVersion()
const;
104 unsigned int GetActiveDrawTargetSetVersion()
const;
110 _needsGarbageCollection =
true;
113 void ClearGarbageCollectionNeeded() {
114 _needsGarbageCollection =
false;
117 bool IsGarbageCollectionNeeded()
const {
118 return _needsGarbageCollection;
122 typedef std::unordered_map<TfToken, std::atomic_int, TfHash> _TagToCountMap;
124 void _AdjustTagCount(
125 std::shared_timed_mutex *mutex,
126 _TagToCountMap *tagToCountMap,
128 const int increment);
131 std::shared_timed_mutex *mutex,
132 const _TagToCountMap *tagToCountMap,
135 std::atomic_uint _drawBatchesVersion;
136 std::atomic_uint _materialTagsVersion;
137 std::atomic_uint _geomSubsetDrawItemsVersion;
138 std::atomic_uint _activeDrawTargetSetVersion;
139 bool _needsGarbageCollection;
142 mutable std::shared_timed_mutex _materialTagToCountMutex;
143 _TagToCountMap _materialTagToCount;
145 mutable std::shared_timed_mutex _renderTagToCountMutex;
146 _TagToCountMap _renderTagToCount;
149PXR_NAMESPACE_CLOSE_SCOPE
The HdRenderParam is an opaque (to core Hydra) handle, to an object that is obtained from the render ...
The render delegate can create an object of type HdRenderParam, to pass to each prim during Sync().
HDST_API void DecreaseRenderTagCount(const TfToken &renderTag)
Unregister that there is an rprim with given renderTag.
HDST_API void MarkDrawBatchesDirty()
Draw items cache and batch invalidation.
HDST_API void MarkMaterialTagsDirty()
Marks material tags dirty, meaning that the draw items associated with the collection of a render pas...
HDST_API void DecreaseMaterialTagCount(const TfToken &materialTag)
Unregister that there is an rprim with given materialTag.
HDST_API void MarkActiveDrawTargetSetDirty()
Draw targets.
HDST_API void IncreaseRenderTagCount(const TfToken &renderTag)
Register that there is an rprim with given renderTag.
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.
void SetGarbageCollectionNeeded()
Garbage collection tracking.
HDST_API void MarkGeomSubsetDrawItemsDirty()
Marks geom subsets draw items dirty, meaning that the draw items associated with the collection of a ...
Token for efficient comparison, assignment, and hashing of known strings.
std::vector< TfToken > TfTokenVector
Convenience types.