Fix GetNodesPose issue when 2 threads call it at once
This commit is contained in:
@@ -212,7 +212,6 @@ const Array<Matrix>& SkeletonData::GetNodesPose() const
|
||||
ScopeLock lock(RenderContext::GPULocker);
|
||||
if (Platform::AtomicRead(&_dirty))
|
||||
{
|
||||
Platform::AtomicStore(&_dirty, 0);
|
||||
const SkeletonNode* nodes = Nodes.Get();
|
||||
const int32 nodesCount = Nodes.Count();
|
||||
_cachedPose.Resize(nodesCount);
|
||||
@@ -227,6 +226,7 @@ const Array<Matrix>& SkeletonData::GetNodesPose() const
|
||||
else
|
||||
posePtr[nodeIndex] = local;
|
||||
}
|
||||
Platform::AtomicStore(&_dirty, 0);
|
||||
}
|
||||
}
|
||||
return _cachedPose;
|
||||
|
||||
Reference in New Issue
Block a user