Commit: bf854b2851501f585ae83e7a60b2732243e13997 Author: Clément Foucault Date: Thu Apr 12 17:36:53 2018 +0200 Branches: blender2.8 https://developer.blender.org/rBbf854b2851501f585ae83e7a60b2732243e13997
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. =================================================================== M source/blender/gpu/intern/gpu_select_sample_query.c =================================================================== 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) { _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs