From 00cb3527902b11b5f136432e8670e299789b6716 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Fri, 11 Aug 2017 16:51:19 +0200 Subject: Fix T52149: LoopTriArray computation was not correctly protected against concurrency. Note: this commit seems to work as expected (also with transform snapping etc.). However, it is rather unsafe - not enough for 2.79 at least, unless we get much more testing on it. It also depends on three previous ones. Note that using a global lock here is far from ideal, we should rather have a lock per DM, but that will do for now, whole DM thing is doomed to oblivion anyway in 2.8. Also, we may need a `DM_DIRTY_LOOPTRIS` dirty flag at some point. Looks like we can survive without it for now though... Probably because cached looptris are never copied accross DM's? --- source/blender/blenkernel/BKE_DerivedMesh.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/blenkernel/BKE_DerivedMesh.h') diff --git a/source/blender/blenkernel/BKE_DerivedMesh.h b/source/blender/blenkernel/BKE_DerivedMesh.h index 5a4fdcf2510..e2577689101 100644 --- a/source/blender/blenkernel/BKE_DerivedMesh.h +++ b/source/blender/blenkernel/BKE_DerivedMesh.h @@ -220,7 +220,7 @@ struct DerivedMesh { /** Recalculates mesh tessellation */ void (*recalcTessellation)(DerivedMesh *dm); - /** Loop tessellation cache */ + /** Loop tessellation cache (WARNING! Only call inside threading-protected code!) */ void (*recalcLoopTri)(DerivedMesh *dm); /** accessor functions */ const struct MLoopTri *(*getLoopTriArray)(DerivedMesh * dm); -- cgit v1.2.3