diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-07-09 14:20:25 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-07-09 15:03:25 +0300 |
commit | db45aaafab8cc821b0e06a659de44f5fedbf847b (patch) | |
tree | 51a2a056319fc145e973f4882e3c15660a09e303 /source/blender/gpu | |
parent | 89c762dd991c64fa46803b3459a2197e25b6138a (diff) |
Fix T61474: laggy interaction on Windows/NVIDIA when gizmos are visible
Thanks to Sergey and Clément for helping to track this down.
Diffstat (limited to 'source/blender/gpu')
-rw-r--r-- | source/blender/gpu/intern/gpu_select_sample_query.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/source/blender/gpu/intern/gpu_select_sample_query.c b/source/blender/gpu/intern/gpu_select_sample_query.c index 9dc225b4190..beea25b4171 100644 --- a/source/blender/gpu/intern/gpu_select_sample_query.c +++ b/source/blender/gpu/intern/gpu_select_sample_query.c @@ -175,17 +175,8 @@ uint gpu_select_query_end(void) for (i = 0; i < g_query_state.active_query; i++) { uint result = 0; - /* Wait until the result is available. */ - while (result == 0) { - glGetQueryObjectuiv(g_query_state.queries[i], GL_QUERY_RESULT_AVAILABLE, &result); - if (result == 0) { - /* (fclem) Not sure if this is better than calling glGetQueryObjectuiv() indefinitely. - * (brecht) Added debug test for lagging issue in T61474. */ - if (G.debug_value != 474) { - PIL_sleep_ms(1); - } - } - } + /* We are not using GL_QUERY_RESULT_AVAILABLE and sleep to wait for results, + * because it causes lagging on Windows/NVIDIA, see T61474. */ glGetQueryObjectuiv(g_query_state.queries[i], GL_QUERY_RESULT, &result); if (result > 0) { if (g_query_state.mode != GPU_SELECT_NEAREST_SECOND_PASS) { |