Re: [waffle] [PATCH 3/7] egl: Allow pbuffers to back wegl_surface

2016-10-29 Thread Chad Versace
On Wed 19 Oct 2016, Emil Velikov wrote:
> On 18 October 2016 at 18:33, Chad Versace  wrote:
> > Add function wegl_pbuffer_init(), which initializes a struct
> > wegl_surface with eglCreatePbufferSurface().
> >
> > Not yet used, but will be used later by the new surfaceless platform.
> >
> > Cc: Gurchetan Singh 
> > Cc: Haixia Shi 
> > ---
> >  src/waffle/egl/wegl_platform.c |  1 +
> >  src/waffle/egl/wegl_platform.h |  2 ++
> >  src/waffle/egl/wegl_surface.c  | 42 
> > ++
> >  src/waffle/egl/wegl_surface.h  |  5 +
> >  4 files changed, 50 insertions(+)
> >
> > diff --git a/src/waffle/egl/wegl_platform.c b/src/waffle/egl/wegl_platform.c
> > index 71eb29e..331cc89 100644
> > --- a/src/waffle/egl/wegl_platform.c
> > +++ b/src/waffle/egl/wegl_platform.c
> > @@ -139,6 +139,7 @@ wegl_platform_init(struct wegl_platform *self, EGLenum 
> > egl_platform)
> >  // window
> >  RETRIEVE_EGL_SYMBOL(eglGetConfigAttrib);
> >  RETRIEVE_EGL_SYMBOL(eglCreateWindowSurface);
> > +RETRIEVE_EGL_SYMBOL(eglCreatePbufferSurface);
> >  RETRIEVE_EGL_SYMBOL(eglDestroySurface);
> >  RETRIEVE_EGL_SYMBOL(eglSwapBuffers);
> >
> > diff --git a/src/waffle/egl/wegl_platform.h b/src/waffle/egl/wegl_platform.h
> > index d6788eb..a5092a5 100644
> > --- a/src/waffle/egl/wegl_platform.h
> > +++ b/src/waffle/egl/wegl_platform.h
> > @@ -89,6 +89,8 @@ struct wegl_platform {
> >  EGLSurface (*eglCreateWindowSurface)(EGLDisplay dpy, EGLConfig config,
> >   EGLNativeWindowType win,
> >   const EGLint *attrib_list);
> > +EGLSurface (*eglCreatePbufferSurface)(EGLDisplay dpy, EGLConfig config,
> > +  const EGLint *attrib_list);
> >  EGLBoolean (*eglDestroySurface)(EGLDisplay dpy, EGLSurface surface);
> >  EGLBoolean (*eglSwapBuffers)(EGLDisplay dpy, EGLSurface surface);
> >  };
> > diff --git a/src/waffle/egl/wegl_surface.c b/src/waffle/egl/wegl_surface.c
> > index ccd0799..0bd0857 100644
> > --- a/src/waffle/egl/wegl_surface.c
> > +++ b/src/waffle/egl/wegl_surface.c
> > @@ -74,6 +74,48 @@ fail:
> >  }
> >
> >  bool
> > +wegl_pbuffer_init(struct wegl_surface *surf,
> > +  struct wcore_config *wc_config,
> > +  int32_t width, int32_t height)
> > +{
> > +struct wegl_config *config = wegl_config(wc_config);
> > +struct wegl_display *dpy = wegl_display(wc_config->display);
> > +struct wegl_platform *plat = wegl_platform(dpy->wcore.platform);
> > +bool ok;
> > +
> > +ok = wcore_window_init(&surf->wcore, wc_config);
> > +if (!ok)
> > +goto fail;
> > +

> This hunk (and most of the series really) will clash with a fair bit
> of cleanups I have on the list.
> In this particular case - the wcore_window_init API has 'lost' it's
> [always return true] return type.
> 
> Re-basing either way will be fun, so let's get the new platform in
> first and then consider the cleanups.

> Please ?

Yes. I'll rebase your cleanups after the new platform lands.
___
waffle mailing list
waffle@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/waffle


Re: [waffle] [PATCH 3/7] egl: Allow pbuffers to back wegl_surface

2016-10-18 Thread Emil Velikov
On 18 October 2016 at 18:33, Chad Versace  wrote:
> Add function wegl_pbuffer_init(), which initializes a struct
> wegl_surface with eglCreatePbufferSurface().
>
> Not yet used, but will be used later by the new surfaceless platform.
>
> Cc: Gurchetan Singh 
> Cc: Haixia Shi 
> ---
>  src/waffle/egl/wegl_platform.c |  1 +
>  src/waffle/egl/wegl_platform.h |  2 ++
>  src/waffle/egl/wegl_surface.c  | 42 
> ++
>  src/waffle/egl/wegl_surface.h  |  5 +
>  4 files changed, 50 insertions(+)
>
> diff --git a/src/waffle/egl/wegl_platform.c b/src/waffle/egl/wegl_platform.c
> index 71eb29e..331cc89 100644
> --- a/src/waffle/egl/wegl_platform.c
> +++ b/src/waffle/egl/wegl_platform.c
> @@ -139,6 +139,7 @@ wegl_platform_init(struct wegl_platform *self, EGLenum 
> egl_platform)
>  // window
>  RETRIEVE_EGL_SYMBOL(eglGetConfigAttrib);
>  RETRIEVE_EGL_SYMBOL(eglCreateWindowSurface);
> +RETRIEVE_EGL_SYMBOL(eglCreatePbufferSurface);
>  RETRIEVE_EGL_SYMBOL(eglDestroySurface);
>  RETRIEVE_EGL_SYMBOL(eglSwapBuffers);
>
> diff --git a/src/waffle/egl/wegl_platform.h b/src/waffle/egl/wegl_platform.h
> index d6788eb..a5092a5 100644
> --- a/src/waffle/egl/wegl_platform.h
> +++ b/src/waffle/egl/wegl_platform.h
> @@ -89,6 +89,8 @@ struct wegl_platform {
>  EGLSurface (*eglCreateWindowSurface)(EGLDisplay dpy, EGLConfig config,
>   EGLNativeWindowType win,
>   const EGLint *attrib_list);
> +EGLSurface (*eglCreatePbufferSurface)(EGLDisplay dpy, EGLConfig config,
> +  const EGLint *attrib_list);
>  EGLBoolean (*eglDestroySurface)(EGLDisplay dpy, EGLSurface surface);
>  EGLBoolean (*eglSwapBuffers)(EGLDisplay dpy, EGLSurface surface);
>  };
> diff --git a/src/waffle/egl/wegl_surface.c b/src/waffle/egl/wegl_surface.c
> index ccd0799..0bd0857 100644
> --- a/src/waffle/egl/wegl_surface.c
> +++ b/src/waffle/egl/wegl_surface.c
> @@ -74,6 +74,48 @@ fail:
>  }
>
>  bool
> +wegl_pbuffer_init(struct wegl_surface *surf,
> +  struct wcore_config *wc_config,
> +  int32_t width, int32_t height)
> +{
> +struct wegl_config *config = wegl_config(wc_config);
> +struct wegl_display *dpy = wegl_display(wc_config->display);
> +struct wegl_platform *plat = wegl_platform(dpy->wcore.platform);
> +bool ok;
> +
> +ok = wcore_window_init(&surf->wcore, wc_config);
> +if (!ok)
> +goto fail;
> +
This hunk (and most of the series really) will clash with a fair bit
of cleanups I have on the list.
In this particular case - the wcore_window_init API has 'lost' it's
[always return true] return type.

Re-basing either way will be fun, so let's get the new platform in
first and then consider the cleanups.
Please ?

Emil
___
waffle mailing list
waffle@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/waffle