From dd4424821918f2e12d6e61dd265be11c669efeb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Sat, 17 Mar 2018 04:47:26 +0100 Subject: DRW: Move cache time to GPUViewport for profiling This enables us to average this timer over time like the others. --- source/blender/draw/intern/draw_manager_profiling.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/draw/intern/draw_manager_profiling.c') diff --git a/source/blender/draw/intern/draw_manager_profiling.c b/source/blender/draw/intern/draw_manager_profiling.c index 8e5f98b5a49..47769b1fb18 100644 --- a/source/blender/draw/intern/draw_manager_profiling.c +++ b/source/blender/draw/intern/draw_manager_profiling.c @@ -286,9 +286,10 @@ void DRW_stats_draw(rcti *rect) v += 2; u = 0; + double *cache_time = GPU_viewport_cache_time_get(DST.viewport); sprintf(col_label, "Cache Time"); draw_stat_5row(rect, u++, v, col_label, sizeof(col_label)); - sprintf(time_to_txt, "%.2fms", DST.cache_time); + sprintf(time_to_txt, "%.2fms", *cache_time); draw_stat_5row(rect, u++, v, time_to_txt, sizeof(time_to_txt)); v += 2; -- cgit v1.2.3