Fix: SubdivCCG uses 2x as much memory as needed for edge adjacency
On a Suzanne mesh with 125k faces subdivided at level 3, this patch results in a 40MB savings of memory, from 1.24 GB measured in Blender itself to 1.20 GB with this patch applied. Pull Request: https://projects.blender.org/blender/blender/pulls/141167
This commit is contained in:
@@ -262,7 +262,7 @@ static SubdivCCGCoord *subdiv_ccg_adjacent_edge_add_face(SubdivCCG &subdiv_ccg,
|
||||
MEM_reallocN(adjacent_edge.boundary_coords,
|
||||
adjacent_edge.num_adjacent_faces * sizeof(*adjacent_edge.boundary_coords)));
|
||||
adjacent_edge.boundary_coords[adjacent_face_index] = MEM_malloc_arrayN<SubdivCCGCoord>(
|
||||
grid_size * 2, "ccg adjacent boundary");
|
||||
grid_size, "ccg adjacent boundary");
|
||||
return adjacent_edge.boundary_coords[adjacent_face_index];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user