mirror of
https://github.com/PixarAnimationStudios/OpenSubdiv
synced 2025-01-16 11:14:13 +00:00
Make sure to update the _maxEdgeFaces in the child from the parent
level before we do any further population from the parent as that may further modify the child's _maxEdgeFaces. When _maxEdgeFaces is incorrect we may end up with stack corruption problems when Far::TopologyRefiner::interpolateChildVertsFromEdges() goes to use this data to allocate some stack space.
This commit is contained in:
parent
da9c8a83dc
commit
d38d683d0a
@ -373,6 +373,11 @@ QuadRefinement::populateEdgeFaceRelation() {
|
|||||||
child._edgeFaceIndices.resize( childEdgeFaceIndexSizeEstimate);
|
child._edgeFaceIndices.resize( childEdgeFaceIndexSizeEstimate);
|
||||||
child._edgeFaceLocalIndices.resize(childEdgeFaceIndexSizeEstimate);
|
child._edgeFaceLocalIndices.resize(childEdgeFaceIndexSizeEstimate);
|
||||||
|
|
||||||
|
// Update _maxEdgeFaces from the parent level before calling the
|
||||||
|
// populateEdgeFacesFromParent methods below, as these may further
|
||||||
|
// update _maxEdgeFaces.
|
||||||
|
child._maxEdgeFaces = parent._maxEdgeFaces;
|
||||||
|
|
||||||
populateEdgeFacesFromParentFaces();
|
populateEdgeFacesFromParentFaces();
|
||||||
populateEdgeFacesFromParentEdges();
|
populateEdgeFacesFromParentEdges();
|
||||||
|
|
||||||
@ -382,8 +387,6 @@ QuadRefinement::populateEdgeFaceRelation() {
|
|||||||
child.getOffsetOfEdgeFaces(child.getNumEdges()-1);
|
child.getOffsetOfEdgeFaces(child.getNumEdges()-1);
|
||||||
child._edgeFaceIndices.resize( childEdgeFaceIndexSizeEstimate);
|
child._edgeFaceIndices.resize( childEdgeFaceIndexSizeEstimate);
|
||||||
child._edgeFaceLocalIndices.resize(childEdgeFaceIndexSizeEstimate);
|
child._edgeFaceLocalIndices.resize(childEdgeFaceIndexSizeEstimate);
|
||||||
|
|
||||||
child._maxEdgeFaces = parent._maxEdgeFaces;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -366,6 +366,11 @@ TriRefinement::populateEdgeFaceRelation() {
|
|||||||
_child->_edgeFaceIndices.resize(childEdgeFaceIndexSizeEstimate);
|
_child->_edgeFaceIndices.resize(childEdgeFaceIndexSizeEstimate);
|
||||||
_child->_edgeFaceLocalIndices.resize(childEdgeFaceIndexSizeEstimate);
|
_child->_edgeFaceLocalIndices.resize(childEdgeFaceIndexSizeEstimate);
|
||||||
|
|
||||||
|
// Update _maxEdgeFaces from the parent level before calling the
|
||||||
|
// populateEdgeFacesFromParent methods below, as these may further
|
||||||
|
// update _maxEdgeFaces.
|
||||||
|
_child->_maxEdgeFaces = _parent->_maxEdgeFaces;
|
||||||
|
|
||||||
populateEdgeFacesFromParentFaces();
|
populateEdgeFacesFromParentFaces();
|
||||||
populateEdgeFacesFromParentEdges();
|
populateEdgeFacesFromParentEdges();
|
||||||
|
|
||||||
@ -375,8 +380,6 @@ TriRefinement::populateEdgeFaceRelation() {
|
|||||||
_child->getOffsetOfEdgeFaces(_child->getNumEdges()-1);
|
_child->getOffsetOfEdgeFaces(_child->getNumEdges()-1);
|
||||||
_child->_edgeFaceIndices.resize(childEdgeFaceIndexSizeEstimate);
|
_child->_edgeFaceIndices.resize(childEdgeFaceIndexSizeEstimate);
|
||||||
_child->_edgeFaceLocalIndices.resize(childEdgeFaceIndexSizeEstimate);
|
_child->_edgeFaceLocalIndices.resize(childEdgeFaceIndexSizeEstimate);
|
||||||
|
|
||||||
_child->_maxEdgeFaces = _parent->_maxEdgeFaces;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Loading…
Reference in New Issue
Block a user