diff options
author | Paul Berry <stereotype441@gmail.com> | 2012-11-19 09:56:09 -0800 |
---|---|---|
committer | Paul Berry <stereotype441@gmail.com> | 2012-11-20 12:10:19 -0800 |
commit | a19009e25ba66679e0b7340e95e906cd2e726910 (patch) | |
tree | f6b825733a09358ea5ae9c30af109ed32b7b6bf4 | |
parent | 12ce4ccb5258844a462daf5ba5c2ecfb5a740d34 (diff) |
glx-multithread: Replace glFlush calls with glFinish
Currently, in Mesa with the i965 driver, calling glFlush() forces all
pending drawing operations to be sent to the kernel; this ensures that
any subsequent drawing operations will be performed after those
pending drawing operations, even if they come from other contexts.
The glx-multithread test was relying on this behaviour, however, the
GL and GLX specs do not garantee this.
This patch modifies the glx-multithread test to use glFinish() instead
of glFlush().
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
-rw-r--r-- | tests/glx/glx-multithread.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/glx/glx-multithread.c b/tests/glx/glx-multithread.c index 2372609d..3d162b05 100644 --- a/tests/glx/glx-multithread.c +++ b/tests/glx/glx-multithread.c @@ -58,7 +58,7 @@ thread_func(void *arg) glColor4f(0.0, 1.0, 0.0, 0.0); piglit_draw_rect(*x, 10, 10, 10); - glFlush(); + glFinish(); glXDestroyContext(dpy, ctx); pthread_mutex_unlock(&mutex); @@ -84,7 +84,7 @@ draw(Display *dpy) /* Clear background to gray */ glClearColor(0.5, 0.5, 0.5, 1.0); glClear(GL_COLOR_BUFFER_BIT); - glFlush(); + glFinish(); pthread_mutex_init(&mutex, NULL); /* Now, spawn some threads that do some drawing, both with this |