diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-09-25 16:56:34 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-09-25 16:57:43 +0300 |
commit | 98ba302f7053b9bebc3854d0d05bdcaa55b6afc7 (patch) | |
tree | 5109e87cb6950fe45ba09e4d1f1040f9f3a978d3 /source/blender/blenkernel/intern/subsurf_ccg.c | |
parent | 76444a13c36c843de74256a131642276f9d4ab80 (diff) | |
parent | 675cef0a165ad535546f24faf9d0ac474f704e64 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/blenkernel/intern/subsurf_ccg.c')
-rw-r--r-- | source/blender/blenkernel/intern/subsurf_ccg.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c index ae949a8b039..2c30a6f9c7e 100644 --- a/source/blender/blenkernel/intern/subsurf_ccg.c +++ b/source/blender/blenkernel/intern/subsurf_ccg.c @@ -42,6 +42,8 @@ #include <math.h> #include <float.h> +#include "atomic_ops.h" + #include "MEM_guardedalloc.h" #include "DNA_mesh_types.h" @@ -4251,7 +4253,8 @@ static void ccgDM_recalcLoopTri(DerivedMesh *dm) } BLI_assert(dm->looptris.array == NULL); - SWAP(MLoopTri *, dm->looptris.array, dm->looptris.array_wip); + atomic_cas_ptr((void **)&dm->looptris.array, dm->looptris.array, dm->looptris.array_wip); + dm->looptris.array_wip = NULL; } static void ccgDM_calcNormals(DerivedMesh *dm) |