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:
authorKévin Dietrich <kevin.dietrich@mailoo.org>2022-04-27 15:03:03 +0300
committerKévin Dietrich <kevin.dietrich@mailoo.org>2022-04-27 15:03:03 +0300
commit08731d70bf667a7179a3ea4c29aa9d81b019d4ee (patch)
treec8b166bec21960c43bde5c3530c8a7bea1145dc8 /source/blender/makesdna
parentc5a4159beeb287a152e998f506a0041613c6f9d3 (diff)
Fix T96327: data transfer crash with GPU subdivision
The crash is caused as the subdivision wrapper does not have loop normals, which are generally computed at the end of the modifier stack evaluation via `mesh_calc_modifier_final_normals`. (Note that they are initially computed, but deleted by the subdivision wrapper creation.) This records in the mesh runtime whether loop normals should have been computed and computes them alongside the subdivision wrapper. Differential Revision: https://developer.blender.org/D14489
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_mesh_types.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h
index 1f8ff182510..0d57afe4225 100644
--- a/source/blender/makesdna/DNA_mesh_types.h
+++ b/source/blender/makesdna/DNA_mesh_types.h
@@ -126,7 +126,9 @@ typedef struct Mesh_Runtime {
* set in the modifier when GPU subdivision can be performed.
*/
SessionUUID subsurf_session_uuid;
- int subsurf_resolution;
+ char subsurf_resolution;
+ char subsurf_do_loop_normals;
+ char _pad3[2];
char subsurf_apply_render;
char subsurf_use_optimal_display;