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

Kristian Hoegsberg hoegsberg at gmail.com
Tue Mar 20 10:45:32 PDT 2012


On Sun, Mar 11, 2012 at 07:48:45PM -0500, Rob Clark wrote:
> 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?

I hope we can land the gbm-surface feature sooner rather than later,
so maybe you can just keep this a local workaround a little longer?

thanks,
Kristian

> ---
>  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
> 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel


More information about the wayland-devel mailing list