diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2017-08-11 17:51:19 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2017-08-11 18:08:41 +0300 |
commit | 00cb3527902b11b5f136432e8670e299789b6716 (patch) | |
tree | 3a1aed650b83d088a10853fc0464daa5daca27e5 /source/blender/blenkernel/BKE_DerivedMesh.h | |
parent | c034193821ec7e67a0ae1050c8ccef7b5cd5473b (diff) |
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?
Diffstat (limited to 'source/blender/blenkernel/BKE_DerivedMesh.h')
-rw-r--r-- | source/blender/blenkernel/BKE_DerivedMesh.h | 2 |
1 files changed, 1 insertions, 1 deletions
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); |