[PATCH 5/5] RFC: add eglWaitGL()

Rob Clark rob.clark at linaro.org
Sun Mar 11 17:48:45 PDT 2012


From: Rob Clark <rob at ti.com>

For deferred rendering GPUs, some magic under the hood of eglSwapBuffers()
is responsible for making sure rendering has actually started.  (glFlush()
doesn't do the trick.)

I've managed to make weston drm compositor work on sgx/pvr stack (plus
omapdrm providing the KMS bits) by getting eglWaitGL() to do the work
that would normally be done in eglSwapBuffers(), in case that the
surfaceless_gles2 extension is in use (as detected by eglMakeCurrent()
call).

I'm not sure if this eglWaitGL() call would potentially cause issues on
other GL(ES) stacks?  Or if it is a suitable work-around until the
gbm-surface stuff is in use?
---
 src/compositor-drm.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/compositor-drm.c b/src/compositor-drm.c
index c8e6eaf..f556ac3 100644
--- a/src/compositor-drm.c
+++ b/src/compositor-drm.c
@@ -246,6 +246,7 @@ drm_output_repaint(struct weston_output *output_base,
 		weston_surface_draw(surface, &output->base, damage);
 
 	glFlush();
+	eglWaitGL();
 
 	output->current ^= 1;
 
-- 
1.7.5.4



More information about the wayland-devel mailing list