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:
authorClément Foucault <foucault.clem@gmail.com>2018-03-17 06:47:26 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-03-17 19:02:07 +0300
commitdd4424821918f2e12d6e61dd265be11c669efeb0 (patch)
tree2fbd09d38f55e6a53249e59ab4be2bca022ab86b /source/blender/draw/intern/draw_manager_profiling.c
parent9ed7093aa639f31e9ba5b146d2d88bae942ab424 (diff)
DRW: Move cache time to GPUViewport for profiling
This enables us to average this timer over time like the others.
Diffstat (limited to 'source/blender/draw/intern/draw_manager_profiling.c')
-rw-r--r--source/blender/draw/intern/draw_manager_profiling.c3
1 files changed, 2 insertions, 1 deletions
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;