diff options
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_mesh_types.h | 24 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_meshdata_types.h | 6 |
2 files changed, 16 insertions, 14 deletions
diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h index 94e88bdaca6..fdd389c9c50 100644 --- a/source/blender/makesdna/DNA_mesh_types.h +++ b/source/blender/makesdna/DNA_mesh_types.h @@ -82,6 +82,10 @@ typedef struct Mesh_Runtime { struct Mesh *mesh_eval; void *eval_mutex; + /* A separate mutex is needed for normal calculation, because sometimes + * the normals are needed while #eval_mutex is already locked. */ + void *normals_mutex; + /** Needed to ensure some thread-safety during render data pre-processing. */ void *render_mutex; @@ -129,6 +133,17 @@ typedef struct Mesh_Runtime { char wrapper_type_finalize; /** + * Settings for lazily evaluating the subdivision on the CPU if needed. These are + * set in the modifier when GPU subdivision can be performed. + */ + char subsurf_apply_render; + char subsurf_use_optimal_display; + char _pad[2]; + int subsurf_resolution; + + void *_pad2; + + /** * Used to mark when derived data needs to be recalculated for a certain layer. * Currently only normals. */ @@ -138,15 +153,6 @@ typedef struct Mesh_Runtime { int64_t cd_dirty_loop; int64_t cd_dirty_poly; - /** - * Settings for lazily evaluating the subdivision on the CPU if needed. These are - * set in the modifier when GPU subdivision can be performed. - */ - char subsurf_apply_render; - char subsurf_use_optimal_display; - char _pad[2]; - int subsurf_resolution; - } Mesh_Runtime; typedef struct Mesh { diff --git a/source/blender/makesdna/DNA_meshdata_types.h b/source/blender/makesdna/DNA_meshdata_types.h index d32470c0dcc..22c523901c0 100644 --- a/source/blender/makesdna/DNA_meshdata_types.h +++ b/source/blender/makesdna/DNA_meshdata_types.h @@ -41,12 +41,8 @@ extern "C" { */ typedef struct MVert { float co[3]; - /** - * Cache the normal, can always be recalculated from surrounding faces. - * See #CD_CUSTOMLOOPNORMAL for custom normals. - */ - short no[3]; char flag, bweight; + char _pad[2]; } MVert; /** #MVert.flag */ |