-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MAYA-113944 If USD reports that the topology is dirty compare the #2143
MAYA-113944 If USD reports that the topology is dirty compare the #2143
Conversation
… the old. Only do the topology updates if the old and new topologies are different. Save the adjacency calculation used to compute normals.
_rprimId.asChar(), | ||
"HdVP2Mesh::computeAdjacency"); | ||
|
||
adjacencyComputation->Resolve(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This call to resolve is slow, so save the result and only re-do it if the topology actually changes.
|
||
// Test to see if the topology actually changed. If not, we don't have to do anything! | ||
// Don't test IsTopologyDirty anywhere below this because it is not accurate. Instead | ||
// using the _indexBufferValid flag on render item data. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need the separate flag because we've already lost dirty information by the time sync is called. In propagate dirty bits the old topology dirty flag saved the the render item was overwritten. If that item hasn't been getting updated (because it's in a repr that is not currently displayed) then we don't know if there was a ligitimate topology change before this frame that still needs to be handled for that item.
For that reason I need the separate _indexBufferValid flag per render item.
} | ||
|
||
template <typename Func> | ||
void HdVP2Mesh::_ForEachRenderItemInRepr(const TfToken& reprToken, Func func) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this could more to the parent class once the clean up gets merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. I moved this function to the parent class so this will have to be propely merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
new topology to the old. Only do the topology updates if the old and new typologies are different. Save the adjacency calculation used to compute normals.