Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2017-09-25 16:56:34 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-09-25 16:57:43 +0300
commit98ba302f7053b9bebc3854d0d05bdcaa55b6afc7 (patch)
tree5109e87cb6950fe45ba09e4d1f1040f9f3a978d3 /source/blender/blenkernel/intern/cdderivedmesh.c
parent76444a13c36c843de74256a131642276f9d4ab80 (diff)
parent675cef0a165ad535546f24faf9d0ac474f704e64 (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/blenkernel/intern/cdderivedmesh.c')
-rw-r--r--source/blender/blenkernel/intern/cdderivedmesh.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c
index 68b790b2a93..bc26c838ddd 100644
--- a/source/blender/blenkernel/intern/cdderivedmesh.c
+++ b/source/blender/blenkernel/intern/cdderivedmesh.c
@@ -34,6 +34,8 @@
* \ingroup bke
*/
+#include "atomic_ops.h"
+
#include "BLI_math.h"
#include "BLI_edgehash.h"
#include "BLI_utildefines.h"
@@ -1808,7 +1810,8 @@ void CDDM_recalc_looptri(DerivedMesh *dm)
cddm->dm.looptris.array_wip);
BLI_assert(cddm->dm.looptris.array == NULL);
- SWAP(MLoopTri *, cddm->dm.looptris.array, cddm->dm.looptris.array_wip);
+ atomic_cas_ptr((void **)&cddm->dm.looptris.array, cddm->dm.looptris.array, cddm->dm.looptris.array_wip);
+ cddm->dm.looptris.array_wip = NULL;
}
static void cdDM_free_internal(CDDerivedMesh *cddm)