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.
This commit is contained in:
Clément Foucault 2018-04-12 17:36:53 +02:00
parent 31067c9757
commit bf854b2851
1 changed files with 1 additions and 5 deletions

View File

@ -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) {