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:
authorSergey Sharybin <sergey.vfx@gmail.com>2019-01-15 17:34:11 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2019-01-16 13:00:43 +0300
commitb0c6c65e7b45bf66f2f9e0aa3718be7eb0f72f81 (patch)
tree74f3aeb53634bd80bdca4d5626ee9e8fe09b5caf /source/blender/blenkernel/intern/subdiv_stats.c
parente064777cac02a065e20a9453f6d2a03651250d56 (diff)
Subdiv: Initial implementation of topology cache
This commit makes it so OpenSubdiv's topology refiner is kept in memory and reused for until topology changes. There are the following modifications which causes topology refiner to become invalid: - Change in a mesh topology (for example, vertices, edges, and faces connectivity). - Change in UV islands (adding new islands, merging them and so on), - Change in UV smoothing options. - Change in creases. - Change in Catmull-Clark / Simple subdivisions. The following limitations are known: - CPU evaluator is not yet cached. - UV islands topology is not checked. The UV limitation is currently a stopper for making this cache enabled by default.
Diffstat (limited to 'source/blender/blenkernel/intern/subdiv_stats.c')
-rw-r--r--source/blender/blenkernel/intern/subdiv_stats.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/subdiv_stats.c b/source/blender/blenkernel/intern/subdiv_stats.c
index a0cd1d909b7..370aedad04f 100644
--- a/source/blender/blenkernel/intern/subdiv_stats.c
+++ b/source/blender/blenkernel/intern/subdiv_stats.c
@@ -42,6 +42,7 @@ void BKE_subdiv_stats_init(SubdivStats *stats)
stats->evaluator_refine_time = 0.0;
stats->subdiv_to_ccg_time = 0.0;
stats->subdiv_to_ccg_elements_time = 0.0;
+ stats->topology_compare_time = 0.0;
}
void BKE_subdiv_stats_begin(SubdivStats *stats, eSubdivStatsValue value)
@@ -87,6 +88,9 @@ void BKE_subdiv_stats_print(const SubdivStats *stats)
STATS_PRINT_TIME(stats,
subdiv_to_ccg_elements_time,
" Elements time");
+ STATS_PRINT_TIME(stats,
+ topology_compare_time,
+ "Topology comparison time");
#undef STATS_PRINT_TIME
}