diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-03-17 06:47:26 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-03-17 19:02:07 +0300 |
commit | dd4424821918f2e12d6e61dd265be11c669efeb0 (patch) | |
tree | 2fbd09d38f55e6a53249e59ab4be2bca022ab86b /source/blender/draw/intern/draw_manager_profiling.c | |
parent | 9ed7093aa639f31e9ba5b146d2d88bae942ab424 (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.c | 3 |
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; |