diff options
author | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2022-01-24 20:27:05 +0300 |
---|---|---|
committer | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2022-01-24 20:27:05 +0300 |
commit | 90d61600fca97910aafabac4b7f638d2f64dd3ff (patch) | |
tree | 1775503f91a0368c6018700e830ef3dcb763e45c /source/blender/draw/intern | |
parent | e673cfc2d703da93e6df72fc657660b8235494e8 (diff) |
GPU subdiv: fix unitialized data
Diffstat (limited to 'source/blender/draw/intern')
-rw-r--r-- | source/blender/draw/intern/draw_cache_impl_subdivision.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/draw/intern/draw_cache_impl_subdivision.cc b/source/blender/draw/intern/draw_cache_impl_subdivision.cc index 37bc9435c76..60ab2ef8062 100644 --- a/source/blender/draw/intern/draw_cache_impl_subdivision.cc +++ b/source/blender/draw/intern/draw_cache_impl_subdivision.cc @@ -573,6 +573,9 @@ void draw_subdiv_cache_free(DRWSubdivCache *cache) GPU_VERTBUF_DISCARD_SAFE(cache->subdiv_vertex_face_adjacency); cache->resolution = 0; cache->num_subdiv_loops = 0; + cache->num_subdiv_edges = 0; + cache->num_subdiv_verts = 0; + cache->num_subdiv_triangles = 0; cache->num_coarse_poly = 0; cache->num_subdiv_quads = 0; draw_subdiv_free_edit_mode_cache(cache); @@ -976,6 +979,7 @@ static bool draw_subdiv_build_cache(DRWSubdivCache *cache, } DRWCacheBuildingContext cache_building_context; + memset(&cache_building_context, 0, sizeof(DRWCacheBuildingContext)); cache_building_context.coarse_mesh = mesh_eval; cache_building_context.settings = &to_mesh_settings; cache_building_context.cache = cache; |