Loading...
Searching...
No Matches
changeTracker.h
1//
2// Copyright 2016 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7#ifndef PXR_IMAGING_HD_CHANGE_TRACKER_H
8#define PXR_IMAGING_HD_CHANGE_TRACKER_H
9
10#include "pxr/pxr.h"
11#include "pxr/imaging/hd/api.h"
12#include "pxr/imaging/hd/version.h"
13#include "pxr/imaging/hd/rprimCollection.h"
14#include "pxr/imaging/hd/types.h"
15#include "pxr/usd/sdf/path.h"
16#include "pxr/base/tf/hashmap.h"
17
18#include <tbb/concurrent_hash_map.h>
19#include <atomic>
20
21PXR_NAMESPACE_OPEN_SCOPE
22
24
35{
36public:
37
38 // Common dirty bits for Rprims
39 // XXX: Move this to HdRprim
40 enum RprimDirtyBits : HdDirtyBits {
41 Clean = 0,
42 InitRepr = 1 << 0,
43 Varying = 1 << 1,
44 AllDirty = ~Varying,
45 DirtyPrimID = 1 << 2,
46 DirtyExtent = 1 << 3,
47 DirtyDisplayStyle = 1 << 4,
48 DirtyPoints = 1 << 5,
49 DirtyPrimvar = 1 << 6,
50 DirtyMaterialId = 1 << 7,
51 DirtyTopology = 1 << 8,
52 DirtyTransform = 1 << 9,
53 DirtyVisibility = 1 << 10,
54 DirtyNormals = 1 << 11,
55 DirtyDoubleSided = 1 << 12,
56 DirtyCullStyle = 1 << 13,
57 DirtySubdivTags = 1 << 14,
58 DirtyWidths = 1 << 15,
59 DirtyInstancer = 1 << 16,
60 DirtyInstanceIndex = 1 << 17,
61 DirtyRepr = 1 << 18,
62 DirtyRenderTag = 1 << 19,
63 DirtyComputationPrimvarDesc = 1 << 20,
64 DirtyCategories = 1 << 21,
65 DirtyVolumeField = 1 << 22,
66 AllSceneDirtyBits = ((1<<23) - 1),
67
68 NewRepr = 1 << 23,
69
70 CustomBitsBegin = 1 << 24,
71 CustomBitsEnd = 1 << 30,
72 CustomBitsMask = 0x7f << 24,
73 };
74
75 // InstancerDirtybits are a subset of rprim dirty bits right now:
76 // DirtyPrimvar, DirtyTransform, DirtyInstanceIndex, DirtyInstancer.
77
78 // Dirty bits for Tasks
79 // XXX: Move this to HdTask
80 enum TaskDirtyBits : HdDirtyBits {
81 DirtyParams = 1 << 2,
82 DirtyCollection = 1 << 3,
83 DirtyRenderTags = 1 << 4,
84 };
85
86 HD_API
88 HD_API
89 virtual ~HdChangeTracker();
90
91 // ---------------------------------------------------------------------- //
94 // ---------------------------------------------------------------------- //
95
97 HD_API
98 void RprimInserted(SdfPath const& id, HdDirtyBits initialDirtyState);
99
101 HD_API
102 void RprimRemoved(SdfPath const& id);
103
104 // ---------------------------------------------------------------------- //
108 // ---------------------------------------------------------------------- //
109
111 HD_API
112 HdDirtyBits GetRprimDirtyBits(SdfPath const& id) const;
113
116 HD_API
117 void MarkRprimDirty(SdfPath const& id, HdDirtyBits bits=AllDirty);
118
122 HD_API
123 void MarkRprimClean(SdfPath const& id, HdDirtyBits newBits=Clean);
124
126 HD_API
127 void MarkPrimvarDirty(SdfPath const& id, TfToken const& name);
128
132 HD_API
133 void MarkAllRprimsDirty(HdDirtyBits bits);
134
142 HD_API
144
148 HD_API
150
151
152 // ---------------------------------------------------------------------- //
153
155 HD_API
156 bool IsRprimDirty(SdfPath const& id);
157
159 HD_API
160 bool IsExtentDirty(SdfPath const& id);
161
163 HD_API
165
168 HD_API
169 bool IsPrimvarDirty(SdfPath const& id, TfToken const& name);
170
172 HD_API
173 bool IsAnyPrimvarDirty(SdfPath const& id);
174
176 HD_API
177 bool IsTopologyDirty(SdfPath const& id);
178
180 HD_API
182
184 HD_API
185 bool IsCullStyleDirty(SdfPath const& id);
186
188 HD_API
189 bool IsSubdivTagsDirty(SdfPath const& id);
190
192 HD_API
193 bool IsTransformDirty(SdfPath const& id);
194
196 HD_API
197 bool IsVisibilityDirty(SdfPath const& id);
198
200 HD_API
201 bool IsPrimIdDirty(SdfPath const& id);
202
205 static bool IsDirty(HdDirtyBits dirtyBits) {
206 return (dirtyBits & AllDirty) != 0;
207 }
208
210 static bool IsClean(HdDirtyBits dirtyBits) {
211 return (dirtyBits & AllDirty) == 0;
212 }
213
215 static bool IsVarying(HdDirtyBits dirtyBits) {
216 return (dirtyBits & Varying) != 0;
217 }
218
220 HD_API
221 static bool IsExtentDirty(HdDirtyBits dirtyBits, SdfPath const& id);
222
224 HD_API
225 static bool IsDisplayStyleDirty(HdDirtyBits dirtyBits, SdfPath const& id);
226
228 HD_API
229 static bool IsSubdivTagsDirty(HdDirtyBits dirtyBits, SdfPath const& id);
230
233 HD_API
234 static bool IsPrimvarDirty(HdDirtyBits dirtyBits, SdfPath const& id,
235 TfToken const& name);
236
239 HD_API
240 static bool IsAnyPrimvarDirty(HdDirtyBits dirtyBits, SdfPath const& id);
241
243 HD_API
244 static bool IsTopologyDirty(HdDirtyBits dirtyBits, SdfPath const& id);
245
247 HD_API
248 static bool IsDoubleSidedDirty(HdDirtyBits dirtyBits, SdfPath const& id);
249
251 HD_API
252 static bool IsCullStyleDirty(HdDirtyBits dirtyBits, SdfPath const& id);
253
255 HD_API
256 static bool IsTransformDirty(HdDirtyBits dirtyBits, SdfPath const& id);
257
259 HD_API
260 static bool IsVisibilityDirty(HdDirtyBits dirtyBits, SdfPath const& id);
261
263 HD_API
264 static bool IsPrimIdDirty(HdDirtyBits dirtyBits, SdfPath const& id);
265
267 HD_API
268 static bool IsInstancerDirty(HdDirtyBits dirtyBits, SdfPath const& id);
269
271 HD_API
272 static bool IsInstanceIndexDirty(HdDirtyBits dirtyBits, SdfPath const& id);
273
274 HD_API
275 static bool IsReprDirty(HdDirtyBits dirtyBits, SdfPath const &id);
276
277 // ---------------------------------------------------------------------- //
278
280 HD_API
281 static void MarkPrimvarDirty(HdDirtyBits *dirtyBits, TfToken const &name);
282
283 // ---------------------------------------------------------------------- //
287 // ---------------------------------------------------------------------- //
288
290 HD_API
291 void TaskInserted(SdfPath const& id, HdDirtyBits initialDirtyState);
292
294 HD_API
295 void TaskRemoved(SdfPath const& id);
296
298 HD_API
299 void MarkTaskDirty(SdfPath const& id, HdDirtyBits bits=AllDirty);
300
302 HD_API
303 HdDirtyBits GetTaskDirtyBits(SdfPath const& id);
304
306 HD_API
307 void MarkTaskClean(SdfPath const& id, HdDirtyBits newBits=Clean);
308
311 HD_API
312 unsigned GetRenderTagVersion() const;
313
315 HD_API
316 unsigned GetTaskRenderTagsVersion() const;
317
318 // ---------------------------------------------------------------------- //
322 // ---------------------------------------------------------------------- //
323
325 HD_API
326 void InstancerInserted(SdfPath const& id, HdDirtyBits initialDirtyState);
327
329 HD_API
330 void InstancerRemoved(SdfPath const& id);
331
333 HD_API
334 HdDirtyBits GetInstancerDirtyBits(SdfPath const& id);
335
338 HD_API
339 void MarkInstancerDirty(SdfPath const& id, HdDirtyBits bits=AllDirty);
340
342 HD_API
343 void MarkInstancerClean(SdfPath const& id, HdDirtyBits newBits=Clean);
344
348 HD_API
349 void AddInstancerRprimDependency(SdfPath const& instancerId,
350 SdfPath const& rprimId);
351
354 HD_API
356 SdfPath const& rprimId);
357
361 HD_API
362 void AddInstancerInstancerDependency(SdfPath const& parentInstancerId,
363 SdfPath const& instancerId);
364
367 HD_API
368 void RemoveInstancerInstancerDependency(SdfPath const& parentInstancerId,
369 SdfPath const& instancerId);
370
371 // ---------------------------------------------------------------------- //
375 // ---------------------------------------------------------------------- //
376
378 HD_API
379 void SprimInserted(SdfPath const& id, HdDirtyBits initialDirtyState);
380
382 HD_API
383 void SprimRemoved(SdfPath const& id);
384
386 HD_API
387 HdDirtyBits GetSprimDirtyBits(SdfPath const& id);
388
390 HD_API
391 void MarkSprimDirty(SdfPath const& id, HdDirtyBits bits);
392
394 HD_API
395 void MarkSprimClean(SdfPath const& id, HdDirtyBits newBits=Clean);
396
400 HD_API
401 void AddInstancerSprimDependency(SdfPath const& instancerId,
402 SdfPath const& sprimId);
403
406 HD_API
408 SdfPath const& sprimId);
409
412 HD_API
413 void AddSprimSprimDependency(SdfPath const& parentSprimId,
414 SdfPath const& sprimId);
415
418 HD_API
419 void RemoveSprimSprimDependency(SdfPath const& parentSprimId,
420 SdfPath const& sprimId);
421
423 HD_API
424 void AddSprimRprimDependency(SdfPath const& sprimId,
425 SdfPath const& rprimId);
426
428 HD_API
430 SdfPath const& rprimId);
431
433 HD_API
435
436 // ---------------------------------------------------------------------- //
440 // ---------------------------------------------------------------------- //
441
443 HD_API
444 void BprimInserted(SdfPath const& id, HdDirtyBits initialDirtyState);
445
447 HD_API
448 void BprimRemoved(SdfPath const& id);
449
451 HD_API
452 HdDirtyBits GetBprimDirtyBits(SdfPath const& id);
453
455 HD_API
456 void MarkBprimDirty(SdfPath const& id, HdDirtyBits bits);
457
459 HD_API
460 void MarkBprimClean(SdfPath const& id, HdDirtyBits newBits=Clean);
461
462 // ---------------------------------------------------------------------- //
466 // ---------------------------------------------------------------------- //
467
470 HD_API
471 void AddCollection(TfToken const& collectionName);
472
475 HD_API
476 void MarkCollectionDirty(TfToken const& collectionName);
477
482 HD_API
483 unsigned GetCollectionVersion(TfToken const& collectionName) const;
484
487 HD_API
488 unsigned GetVisibilityChangeCount() const;
489
493 HD_API
495
498 unsigned GetVaryingStateVersion() const {
499 return _varyingStateVersion;
500 }
501
502 // ---------------------------------------------------------------------- //
506 // ---------------------------------------------------------------------- //
507
511 unsigned GetRprimIndexVersion() const {
512 return _rprimIndexVersion;
513 }
514
518 unsigned GetSprimIndexVersion() const {
519 return _sprimIndexVersion;
520 }
521
525 unsigned GetBprimIndexVersion() const {
526 return _bprimIndexVersion;
527 }
528
532 unsigned GetInstancerIndexVersion() const {
533 return _instancerIndexVersion;
534 }
535
536
542 unsigned GetSceneStateVersion() const {
543 return _sceneStateVersion;
544 }
545
546 // ---------------------------------------------------------------------- //
550 // ---------------------------------------------------------------------- //
551
553 HD_API
554 void AddState(TfToken const& name);
555
558 HD_API
559 void MarkStateDirty(TfToken const& name);
560
562 HD_API
563 unsigned GetStateVersion(TfToken const &name) const;
564
565 // ---------------------------------------------------------------------- //
569 // ---------------------------------------------------------------------- //
570 HD_API
571 static std::string StringifyDirtyBits(HdDirtyBits dirtyBits);
572
573 HD_API
574 static void DumpDirtyBits(HdDirtyBits dirtyBits);
575
577
578private:
579
580 // Don't allow copies
581 HdChangeTracker(const HdChangeTracker &) = delete;
582 HdChangeTracker &operator=(const HdChangeTracker &) = delete;
583
584
585 static void _LogCacheAccess(TfToken const& cacheName,
586 SdfPath const& id, bool hit);
587
588 typedef TfHashMap<SdfPath, HdDirtyBits, SdfPath::Hash> _IDStateMap;
589 typedef TfHashMap<TfToken, int, TfToken::HashFunctor> _CollectionStateMap;
590 typedef TfHashMap<TfToken, unsigned, TfToken::HashFunctor> _GeneralStateMap;
591
592 struct _PathHashCompare {
593 static bool equal(const SdfPath& a, const SdfPath& b)
594 { return a == b; }
595
596 static size_t hash(const SdfPath& path)
597 { return hash_value(path); }
598 };
599 typedef tbb::concurrent_hash_map<SdfPath, SdfPathSet, _PathHashCompare>
600 _DependencyMap;
601
602 // Core dirty state.
603 _IDStateMap _rprimState;
604 _IDStateMap _instancerState;
605 _IDStateMap _taskState;
606 _IDStateMap _sprimState;
607 _IDStateMap _bprimState;
608 _GeneralStateMap _generalState;
609
610 // Collection versions / state.
611 _CollectionStateMap _collectionState;
612
613 // Provides reverse-association between instancers and the child
614 // instancers/prims that use them.
615 _DependencyMap _instancerRprimDependencies;
616 _DependencyMap _instancerSprimDependencies;
617 _DependencyMap _instancerInstancerDependencies;
618
619 // Provides forward and reverse-association between sprims and the child
620 // sprims that reference them. For example, a light prim (child) who needs
621 // to know when its light filter (parent) is modified.
622 // Maps parent sprim to child sprim.
623 _DependencyMap _sprimSprimTargetDependencies;
624 // Maps child sprim to parent sprim.
625 _DependencyMap _sprimSprimSourceDependencies;
626
627 _DependencyMap _sprimRprimTargetDependencies;
628
629 // Dependency map helpers
630 void _AddDependency(_DependencyMap &depMap,
631 SdfPath const& parent, SdfPath const& child);
632 void _RemoveDependency(_DependencyMap &depMap,
633 SdfPath const& parent, SdfPath const& child);
634
635 // Typically the Rprims that get marked dirty per update iteration end up
636 // being a stable set of objects; to leverage this fact, we require the
637 // delegate notify the change tracker when that state changes, which bumps
638 // the varyingStateVersion, which triggers downstream invalidation.
639 unsigned _varyingStateVersion;
640
641 // Tracks changes (insertions/removals) of prims in the render index.
642 // This is used to indicating that cached gather operations need to be
643 // re-evaluated, such as dirty lists or batch building.
644 unsigned _rprimIndexVersion;
645 unsigned _sprimIndexVersion;
646 unsigned _bprimIndexVersion;
647 unsigned _instancerIndexVersion;
648
649 // The following tracks any changes of state. As a result it is very broad.
650 // The use case to detect, when no changes have been made, as to
651 // avoid the need to sync or reset progressive renderers.
652 unsigned _sceneStateVersion;
653
654 // Used to detect that visibility changed somewhere in the render index.
655 unsigned _visChangeCount;
656
657 // Used to detect that instance indices changed somewhere in the render index.
658 unsigned _instanceIndicesChangeCount;
659
660 // Used to detect changes to the render tag opinion of rprims.
661 unsigned _rprimRenderTagVersion;
662
663 // Used to detect changes to the render tags opinion of tasks.
664 unsigned _taskRenderTagsVersion;
665
666 // Allow HdRenderIndex to provide a scene index to forward dirty
667 // information. This is necessary to accommodate legacy HdSceneDelegate
668 // based applications that rely on the HdChangeTracker for invalidating
669 // state on Hydra prims.
670 friend class HdRenderIndex;
671 friend class HdDirtyList;
672 // Does not take ownership. The HdRenderIndex manages the lifetime of this
673 // scene index.
674 HdRetainedSceneIndex * _emulationSceneIndex;
675 void _SetTargetSceneIndex(HdRetainedSceneIndex *emulationSceneIndex);
676
677 // Private methods which implement the behaviors of their public
678 // equivalents. The public versions check to see if legacy emulation is
679 // active. If so, they dirty the HdRetainedSceneIndex member instead
680 // of directly acting. If legacy render delegate emulation is active, these
681 // will eventually make their way back to the private methods via
682 // HdSceneIndexAdapterSceneDelegate. This prevents dirtying cycles while
683 // allowing single HdRenderIndex/HdChangeTracker instances to be used for
684 // both ends of emulation.
686 void _MarkRprimDirty(SdfPath const& id, HdDirtyBits bits=AllDirty);
687 void _MarkSprimDirty(SdfPath const& id, HdDirtyBits bits=AllDirty);
688 void _MarkBprimDirty(SdfPath const& id, HdDirtyBits bits=AllDirty);
689 void _MarkInstancerDirty(SdfPath const& id, HdDirtyBits bits=AllDirty);
690 void _MarkTaskDirty(SdfPath const& id, HdDirtyBits bits=AllDirty);
691};
692
693
694PXR_NAMESPACE_CLOSE_SCOPE
695
696#endif //PXR_IMAGING_HD_CHANGE_TRACKER_H
Tracks changes from the HdSceneDelegate, providing invalidation cues to the render engine.
HD_API void MarkSprimDirty(SdfPath const &id, HdDirtyBits bits)
Set the dirty flags to bits.
HD_API bool IsRprimDirty(SdfPath const &id)
Returns true if the rprim identified by id has any dirty flags set.
HD_API HdDirtyBits GetRprimDirtyBits(SdfPath const &id) const
Returns the dirty bits for the rprim with id.
HD_API HdDirtyBits GetInstancerDirtyBits(SdfPath const &id)
Returns the dirty bits for the instancer with id.
HD_API bool IsTransformDirty(SdfPath const &id)
Returns true if the rprim identified by id has a dirty transform.
HD_API void MarkTaskClean(SdfPath const &id, HdDirtyBits newBits=Clean)
Set the dirty flags to newBits.
unsigned GetRprimIndexVersion() const
Returns the current version of the Render Index's RPrim set.
HD_API void SprimInserted(SdfPath const &id, HdDirtyBits initialDirtyState)
Start tracking sprim with the given id.
unsigned GetBprimIndexVersion() const
Returns the current version of the Render Index's BPrim set.
HD_API HdDirtyBits GetTaskDirtyBits(SdfPath const &id)
Get the dirty bits for Task with the given id.
HD_API bool IsPrimIdDirty(SdfPath const &id)
Returns true if the rprim identified by id has a dirty primID.
HD_API void RemoveSprimRprimDependency(SdfPath const &sprimId, SdfPath const &rprimId)
Remove a dependency between sprimId and rprim rprimId.
HD_API bool IsSubdivTagsDirty(SdfPath const &id)
Returns true if the rprim identified by id has a dirty subdiv tags.
HD_API void MarkInstancerClean(SdfPath const &id, HdDirtyBits newBits=Clean)
Clean the specified dirty bits for the instancer with id.
HD_API void AddState(TfToken const &name)
Adds a named state for tracking.
HD_API void MarkAllRprimsDirty(HdDirtyBits bits)
Flag all the Rprim with the given id as being dirty.
static bool IsVarying(HdDirtyBits dirtyBits)
Returns true if the varying flag is set.
HD_API void RemoveSprimSprimDependency(SdfPath const &parentSprimId, SdfPath const &sprimId)
Remove a dependency between sprimId and parent sprim parentSprimId.
static HD_API bool IsVisibilityDirty(HdDirtyBits dirtyBits, SdfPath const &id)
Returns true if the dirtyBits has dirty visibility. id is for perflog.
HD_API void MarkBprimClean(SdfPath const &id, HdDirtyBits newBits=Clean)
Set the dirty flags to newBits.
HD_API void AddCollection(TfToken const &collectionName)
HD_API void MarkSprimClean(SdfPath const &id, HdDirtyBits newBits=Clean)
Set the dirty flags to newBits.
HD_API void MarkStateDirty(TfToken const &name)
Marks a named state as being dirty., this bumps the version of the state.
HD_API void AddInstancerRprimDependency(SdfPath const &instancerId, SdfPath const &rprimId)
Insert a dependency between rprimId and parent instancer instancerId.
static HD_API bool IsTopologyDirty(HdDirtyBits dirtyBits, SdfPath const &id)
Returns true if the dirtyBits has a dirty topology. id is for perflog.
HD_API void BprimInserted(SdfPath const &id, HdDirtyBits initialDirtyState)
Start tracking bprim with the given id.
static HD_API bool IsDoubleSidedDirty(HdDirtyBits dirtyBits, SdfPath const &id)
Returns true if the dirtyBits has dirty doubleSided state. id is for perflog.
unsigned GetSceneStateVersion() const
Returns the current version of the scene state.
HD_API bool IsExtentDirty(SdfPath const &id)
Returns true if the rprim identified by id has a dirty extent.
HD_API void InstancerInserted(SdfPath const &id, HdDirtyBits initialDirtyState)
Start tracking Instancer with the given id.
HD_API bool IsDisplayStyleDirty(SdfPath const &id)
Returns true if the rprim identified by id has a dirty display style.
HD_API void RemoveInstancerRprimDependency(SdfPath const &instancerId, SdfPath const &rprimId)
Remove a dependency between rprimId and parent instancer instancerId.
HD_API void AddSprimSprimDependency(SdfPath const &parentSprimId, SdfPath const &sprimId)
Insert a dependency between sprimId and parent sprim parentSprimId.
HD_API bool IsTopologyDirty(SdfPath const &id)
Returns true if the rprim identified by id has a dirty topology.
unsigned GetSprimIndexVersion() const
Returns the current version of the Render Index's SPrim set.
static HD_API bool IsCullStyleDirty(HdDirtyBits dirtyBits, SdfPath const &id)
Returns true if the dirtyBits has dirty cullstyle. id is for perflog.
HD_API unsigned GetVisibilityChangeCount() const
Returns the number of changes to visibility.
HD_API unsigned GetStateVersion(TfToken const &name) const
Returns the current version of the named state.
HD_API void InstancerRemoved(SdfPath const &id)
Stop tracking Instancer with the given id.
HD_API void RemoveSprimFromSprimSprimDependencies(SdfPath const &sprimId)
Remove all dependencies involving sprimId as a parent or child.
unsigned GetInstancerIndexVersion() const
Returns the current version of the Render Index's Instancer set.
HD_API void MarkRprimClean(SdfPath const &id, HdDirtyBits newBits=Clean)
Clear the dirty flags for an HdRprim.
HD_API bool IsAnyPrimvarDirty(SdfPath const &id)
Returns true if the rprim identified by id has any dirty primvars.
HD_API void RemoveInstancerSprimDependency(SdfPath const &instancerId, SdfPath const &sprimId)
Remove a dependency between sprimId and parent instancer instancerId.
HD_API bool IsPrimvarDirty(SdfPath const &id, TfToken const &name)
Returns true if the rprim identified by id with primvar name is dirty.
HD_API bool IsDoubleSidedDirty(SdfPath const &id)
Returns true if the rprim identified by id has dirty doubleSided state.
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 AddInstancerSprimDependency(SdfPath const &instancerId, SdfPath const &sprimId)
Insert a dependency between sprimId and parent instancer instancerId.
HD_API HdDirtyBits GetSprimDirtyBits(SdfPath const &id)
Get the dirty bits for sprim with the given id.
HD_API void ResetVaryingState()
Clear Varying bit of all prims.
HD_API void BprimRemoved(SdfPath const &id)
Stop tracking bprim with the given id.
HD_API bool IsVisibilityDirty(SdfPath const &id)
Returns true if the rprim identified by id has dirty visibility.
static HD_API void MarkPrimvarDirty(HdDirtyBits *dirtyBits, TfToken const &name)
Set the primvar dirty flag to dirtyBits.
unsigned GetVaryingStateVersion() const
Returns the current version of varying state.
static HD_API bool IsDisplayStyleDirty(HdDirtyBits dirtyBits, SdfPath const &id)
Returns true if the dirtyBits has a dirty display style. id is for perflog.
HD_API bool IsCullStyleDirty(SdfPath const &id)
Returns true if the rprim identified by id has dirty cullstyle.
HD_API void ResetRprimVaryingState(SdfPath const &id)
Reset the varying state on one Rprim This is done for Rprims, where we choose not to clean them (due ...
HD_API void AddSprimRprimDependency(SdfPath const &sprimId, SdfPath const &rprimId)
Insert a dependency between sprimId and rprim rprimId.
static HD_API bool IsPrimIdDirty(HdDirtyBits dirtyBits, SdfPath const &id)
Returns true if the dirtyBits has a dirty primID. id is for perflog.
HD_API void MarkInstancerDirty(SdfPath const &id, HdDirtyBits bits=AllDirty)
Flag the Instancer with the given id as being dirty.
HD_API void MarkBprimDirty(SdfPath const &id, HdDirtyBits bits)
Set the dirty flags to bits.
static HD_API bool IsAnyPrimvarDirty(HdDirtyBits dirtyBits, SdfPath const &id)
Returns true if the dirtyBits has any dirty primvars.
HD_API HdDirtyBits GetBprimDirtyBits(SdfPath const &id)
Get the dirty bits for bprim with the given id.
static HD_API bool IsInstanceIndexDirty(HdDirtyBits dirtyBits, SdfPath const &id)
Returns true if the dirtyBits has a dirty instance index. id is for perflog.
HD_API void TaskInserted(SdfPath const &id, HdDirtyBits initialDirtyState)
Start tracking Task with the given id.
HD_API void MarkRprimDirty(SdfPath const &id, HdDirtyBits bits=AllDirty)
Flag the Rprim with the given id as being dirty.
static bool IsDirty(HdDirtyBits dirtyBits)
Returns true if the dirtyBits has any flags set other than the varying flag.
HD_API unsigned GetInstanceIndicesChangeCount() const
Returns the number of changes to instance index.
HD_API void RprimInserted(SdfPath const &id, HdDirtyBits initialDirtyState)
Start tracking Rprim with the given id.
HD_API void MarkCollectionDirty(TfToken const &collectionName)
static HD_API bool IsTransformDirty(HdDirtyBits dirtyBits, SdfPath const &id)
Returns true if the dirtyBits has a dirty transform. id is for perflog.
HD_API unsigned GetCollectionVersion(TfToken const &collectionName) const
static HD_API bool IsPrimvarDirty(HdDirtyBits dirtyBits, SdfPath const &id, TfToken const &name)
Returns true if the dirtyBits has a dirty primvar name.
static HD_API bool IsExtentDirty(HdDirtyBits dirtyBits, SdfPath const &id)
Returns true if the dirtyBits has a dirty extent. id is for perflog.
static HD_API bool IsSubdivTagsDirty(HdDirtyBits dirtyBits, SdfPath const &id)
Returns true if the dirtyBits has a dirty subdiv tags. id is for perflog.
HD_API void MarkTaskDirty(SdfPath const &id, HdDirtyBits bits=AllDirty)
Set the dirty flags to bits.
HD_API unsigned GetTaskRenderTagsVersion() const
Retrieve the current version number of the task's render tags opinion.
static bool IsClean(HdDirtyBits dirtyBits)
Returns true if the dirtyBits has no flags set except the varying flag.
HD_API unsigned GetRenderTagVersion() const
Retrieve the current version number of the rprim render tag set XXX Rename to GetRprimRenderTagVersio...
HD_API void SprimRemoved(SdfPath const &id)
Stop tracking sprim with the given id.
HD_API void AddInstancerInstancerDependency(SdfPath const &parentInstancerId, SdfPath const &instancerId)
Insert a dependency between instancerId and parent instancer parentInstancerId.
HD_API void RprimRemoved(SdfPath const &id)
Stop tracking Rprim with the given id.
HD_API void MarkPrimvarDirty(SdfPath const &id, TfToken const &name)
Mark the primvar for the rprim with id as being dirty.
HD_API void TaskRemoved(SdfPath const &id)
Stop tracking Task with the given id.
HD_API void RemoveInstancerInstancerDependency(SdfPath const &parentInstancerId, SdfPath const &instancerId)
Remove a dependency between instancerId and parent instancer parentInstancerId.
Used for faster iteration of dirty Rprims by the render index.
Definition dirtyList.h:86
The render index is part of the Hydra 1.0 API and is only used for emulation purposes so that HdScene...
Concrete scene container which can be externally populated and dirtied.
Scene delegate which observes notices from an HdSceneIndex and applies them to an HdRenderIndex.
A path value used to locate objects in layers or scenegraphs.
Definition path.h:281
Token for efficient comparison, assignment, and hashing of known strings.
Definition token.h:81
size_t hash_value(const TfToken &x)
Overload hash_value for TfToken.
Definition token.h:486