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>2019-05-27 12:45:33 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2019-05-29 11:44:11 +0300
commit2f7711962a69de8192d048514e5927e49a1a63a2 (patch)
tree7a91196fc710ec8e47bda75cd763d09386e43d8d /source/blender/makesdna/DNA_mesh_types.h
parentda7e5e861f54ae0ca9b7ec1c71432fb08f7a53fa (diff)
Fix T58251: Cycles ignores linked meshes when rendering
The idea is to share a mesh data-block as a result across all objects which are sharing same original mesh and have no effective modifiers. This mesh is owned by an original copy-on-written version of object data. Tricky part is to make sure it is only initialized once, and currently a silly mutex lock is used. In practice it only locks if the mesh is not already there. As an extra bonus, even viewport memory is also lower after this change. Reviewers: brecht, mont29 Reviewed By: brecht, mont29 Differential Revision: https://developer.blender.org/D4954
Diffstat (limited to 'source/blender/makesdna/DNA_mesh_types.h')
-rw-r--r--source/blender/makesdna/DNA_mesh_types.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h
index f54c178f1d0..8a9a69ac178 100644
--- a/source/blender/makesdna/DNA_mesh_types.h
+++ b/source/blender/makesdna/DNA_mesh_types.h
@@ -75,6 +75,12 @@ struct MLoopTri_Store {
/* not saved in file! */
typedef struct Mesh_Runtime {
+ /* Evaluated mesh for objects which do not have effective modifiers. This mesh is sued as a
+ * result of modifier stack evaluation.
+ * Since modifier stack evaluation is threaded on object level we need some synchronization. */
+ struct Mesh *mesh_eval;
+ void *eval_mutex;
+
struct EditMeshData *edit_data;
void *batch_cache;