From 6ffb0a0ee77e6695bf7e8b1ad5c9e1b9d9adbcb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Mon, 19 Nov 2018 15:46:13 +0100 Subject: DRW: Make profiling more precise on certain drivers. This makes the whole rendering slower (because of sync point) but the numbers displayed by the draw manager profiler is more precise on some buggy drivers. They seems to issue the query before the last one ends. --- source/blender/draw/intern/draw_manager_profiling.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/draw/intern') diff --git a/source/blender/draw/intern/draw_manager_profiling.c b/source/blender/draw/intern/draw_manager_profiling.c index 3900117327e..7b5ea4445ce 100644 --- a/source/blender/draw/intern/draw_manager_profiling.c +++ b/source/blender/draw/intern/draw_manager_profiling.c @@ -126,6 +126,7 @@ static void drw_stats_timer_start_ex(const char *name, const bool is_query) glGenQueries(1, timer->query); } + glFinish(); /* Issue query for the next frame */ glBeginQuery(GL_TIME_ELAPSED, timer->query[0]); DTP.is_querying = true; -- cgit v1.2.3