[Mesa-dev] [PATCH] egl: Account for default values of texture target and format

Anuj Phogat anuj.phogat at gmail.com
Thu Jun 2 23:11:04 UTC 2016


On Wed, Jun 1, 2016 at 11:59 AM, Anuj Phogat <anuj.phogat at gmail.com> wrote:
>
> On Wed, Jun 1, 2016 at 9:31 AM, Plamena Manolova
> <plamena.manolova at intel.com> wrote:
> >
> > When validating attributes during surface creation we should account
> > for the default values of texture target and format (EGL_NO_TEXTURE)
> > since the user is not obligated to explicitly set both via the
> > attribute list passed to eglCreatePbufferSurface.
> >
> > Signed-off-by: Plamena Manolova <plamena.manolova at intel.com>
> > ---
> >  src/egl/main/eglsurface.c | 6 ++++++
> >  1 file changed, 6 insertions(+)
> >
> > diff --git a/src/egl/main/eglsurface.c b/src/egl/main/eglsurface.c
> > index 17d7907..99e24dd 100644
> > --- a/src/egl/main/eglsurface.c
> > +++ b/src/egl/main/eglsurface.c
> > @@ -236,6 +236,12 @@ _eglParseSurfaceAttribList(_EGLSurface *surf, const EGLint *attrib_list)
> >        }
> >
> >        if (type == EGL_PBUFFER_BIT) {
> > +         if (tex_target == -1)
> > +            tex_target = surf->TextureTarget;
> > +
> > +         if (tex_format == -1)
> > +            tex_format = surf->TextureFormat;
> > +
> >           if ((tex_target == EGL_NO_TEXTURE && tex_format != EGL_NO_TEXTURE) ||
> >               (tex_format == EGL_NO_TEXTURE && tex_target != EGL_NO_TEXTURE)) {
> >              err = EGL_BAD_MATCH;
> > --
> > 2.7.4
> >
> > _______________________________________________
> > mesa-dev mailing list
> > mesa-dev at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
> Looks good to me.
>
> Reviewed-by: Anuj Phogat <anuj.phogat at gmail.com>


I pushed the patch after seeing a clean Jenkins test report.

Thanks
Anuj


More information about the mesa-dev mailing list