diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-04-12 18:36:53 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-04-12 18:37:13 +0300 |
commit | bf854b2851501f585ae83e7a60b2732243e13997 (patch) | |
tree | 68dda02615195d280929ebe1810db569a09744b1 /source/blender/gpu/intern/gpu_select_sample_query.c | |
parent | 31067c975759255c013a2b4d872082155d41479e (diff) |
GPUSelect: Remove glFinish() that was causing bad perf issue.
I can see how it's slowing things down: glFinish make sure that every query
are finished but the first query may have been finished a long time ago.
This might create bubbles because of the PIL_sleep_ms.
Diffstat (limited to 'source/blender/gpu/intern/gpu_select_sample_query.c')
-rw-r--r-- | source/blender/gpu/intern/gpu_select_sample_query.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/source/blender/gpu/intern/gpu_select_sample_query.c b/source/blender/gpu/intern/gpu_select_sample_query.c index d9e8351c094..12390e5cdb0 100644 --- a/source/blender/gpu/intern/gpu_select_sample_query.c +++ b/source/blender/gpu/intern/gpu_select_sample_query.c @@ -175,13 +175,9 @@ uint gpu_select_query_end(void) glEndQuery(GL_SAMPLES_PASSED); } - /* We need to sync to get the results anyway. - * If we don't do that the driver will do. */ - glFinish(); - for (i = 0; i < g_query_state.active_query; i++) { uint result = 0; - /* Wait until the result is available. This can happen even if glFinish() was called. */ + /* Wait until the result is available. */ while (result == 0) { glGetQueryObjectuiv(g_query_state.queries[i], GL_QUERY_RESULT_AVAILABLE, &result); if (result == 0) { |