[Bf-blender-cvs] [ffca3b7c520] temp-vert-normals-cleanup: Fix GPU subdivision crash due to missing vertex normals

Hans Goudey noreply at git.blender.org
Tue Jan 11 20:08:19 CET 2022


Commit: ffca3b7c5201b27f8e9a59a101f32b667bb91397
Author: Hans Goudey
Date:   Tue Jan 11 12:20:39 2022 -0600
Branches: temp-vert-normals-cleanup
https://developer.blender.org/rBffca3b7c5201b27f8e9a59a101f32b667bb91397

Fix GPU subdivision crash due to missing vertex normals

===================================================================

M	source/blender/draw/intern/draw_cache_impl_subdivision.cc

===================================================================

diff --git a/source/blender/draw/intern/draw_cache_impl_subdivision.cc b/source/blender/draw/intern/draw_cache_impl_subdivision.cc
index 372566a8f90..6eb1fbf26fa 100644
--- a/source/blender/draw/intern/draw_cache_impl_subdivision.cc
+++ b/source/blender/draw/intern/draw_cache_impl_subdivision.cc
@@ -23,6 +23,7 @@
 #include "DNA_scene_types.h"
 
 #include "BKE_editmesh.h"
+#include "BKE_mesh.h"
 #include "BKE_modifier.h"
 #include "BKE_object.h"
 #include "BKE_scene.h"
@@ -1668,6 +1669,7 @@ void draw_subdiv_init_mesh_render_data(DRWSubdivCache *cache,
   mr->mvert = mesh->mvert;
   mr->mpoly = mesh->mpoly;
   mr->mloop = mesh->mloop;
+  mr->vert_normals = BKE_mesh_vertex_normals_ensure(mesh);
   mr->vert_len = mesh->totvert;
   mr->edge_len = mesh->totedge;
   mr->poly_len = mesh->totpoly;



More information about the Bf-blender-cvs mailing list