[PATCH] weston: Don't ask for EGL depth buffer if not needed

Kristian Hoegsberg hoegsberg at gmail.com
Tue Mar 20 13:40:07 PDT 2012


On Sat, Mar 17, 2012 at 01:43:52PM -0700, Bill Spitzak wrote:
> This makes the compositor and demo clients work on the current
> nouveau nvfx driver. Obviously does not fix any clients that
> actually want a depth buffer, but this does allow more people to at
> least try wayland.

Ok, yeah, that's a good point.  It's probably a bug in nouveau that it
doesn't work when we ask for a depth buffer, but of course, if we
don't need a depth buffer we shouldn't ask for one.  I applied the
patch, except for the window.c part.  The gears client does actually
need a depth buffer.  We would need some way to tell init_egl in
window.c whether or not to ask for a depth buffer, so we could do that
only in case of gears.c.

> PS: I have no idea if this is the correct way to submit a patch,
> please tell me if I am right or wrong.

This is fine.  Normally you would add "meta-comments" like the above
PS after the --- that separates the commit message and the actual
patch.  That way git will automatically discard it when I apply the patch.

thanks,
Kristian

> diff --git a/clients/simple-egl.c b/clients/simple-egl.c
> index 9893a82..c0e2855 100644
> --- a/clients/simple-egl.c
> +++ b/clients/simple-egl.c
> @@ -100,7 +100,6 @@ init_egl(struct display *display)
>  		EGL_GREEN_SIZE, 1,
>  		EGL_BLUE_SIZE, 1,
>  		EGL_ALPHA_SIZE, 1,
> -		EGL_DEPTH_SIZE, 1,
>  		EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
>  		EGL_NONE
>  	};
> diff --git a/clients/window.c b/clients/window.c
> index 9058e4e..fc89894 100644
> --- a/clients/window.c
> +++ b/clients/window.c
> @@ -2766,7 +2766,6 @@ init_egl(struct display *d)
>  		EGL_GREEN_SIZE, 1,
>  		EGL_BLUE_SIZE, 1,
>  		EGL_ALPHA_SIZE, 1,
> -		EGL_DEPTH_SIZE, 1,
>  		EGL_RENDERABLE_TYPE, GL_BIT,
>  		EGL_NONE
>  	};
> diff --git a/src/compositor-wayland.c b/src/compositor-wayland.c
> index 48358e3..423968f 100644
> --- a/src/compositor-wayland.c
> +++ b/src/compositor-wayland.c
> @@ -263,7 +263,6 @@ wayland_compositor_init_egl(struct wayland_compositor *c)
>  		EGL_GREEN_SIZE, 1,
>  		EGL_BLUE_SIZE, 1,
>  		EGL_ALPHA_SIZE, 1,
> -		EGL_DEPTH_SIZE, 1,
>  		EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
>  		EGL_NONE
>  	};
> diff --git a/src/compositor-x11.c b/src/compositor-x11.c
> index c3eaab7..0b7da9b 100644
> --- a/src/compositor-x11.c
> +++ b/src/compositor-x11.c
> @@ -123,7 +123,6 @@ x11_compositor_init_egl(struct x11_compositor *c)
>  		EGL_RED_SIZE, 1,
>  		EGL_GREEN_SIZE, 1,
>  		EGL_BLUE_SIZE, 1,
> -		EGL_DEPTH_SIZE, 1,
>  		EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
>  		EGL_NONE
>  	};

> _______________________________________________
> 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