[Mesa-dev] [PATCH v2] egl: check if colorspace/surface type is supported
Juan A. Suarez Romero
jasuarez at igalia.com
Fri May 4 10:47:54 UTC 2018
On Fri, 2018-05-04 at 08:29 +0300, Tapani Pälli wrote:
>
> On 05/03/2018 08:49 PM, Emil Velikov wrote:
> > On 2 May 2018 at 17:23, Juan A. Suarez Romero <jasuarez at igalia.com> wrote:
> > > According to EGL 1.4 spec, section 3.5.1 ("Creating On-Screen Rendering
> > > Surfaces"), if config does not support the colorspace or alpha format
> > > attributes specified in attrib_list (as defined for
> > > eglCreateWindowSurface), an EGL_BAD_MATCH error is generated.
> > >
> > > This fixes dEQP-EGL.functional.wide_color.*_888_colorspace_srgb (still
> > > not merged,
> > > https://android-review.googlesource.com/c/platform/external/deqp/+/667322),
> > > which is crashing when trying to create a windows surface with RGB888
> > > configuration and sRGB colorspace.
> > >
> > > v2: Handle the fix in other backends (Tapani)
> > > ---
> > > src/egl/drivers/dri2/platform_drm.c | 5 +++++
> > > src/egl/drivers/dri2/platform_wayland.c | 6 ++++++
> > > src/egl/drivers/dri2/platform_x11.c | 5 +++++
> > > src/egl/drivers/dri2/platform_x11_dri3.c | 5 +++++
> > > 4 files changed, 21 insertions(+)
> > >
> > > diff --git a/src/egl/drivers/dri2/platform_drm.c b/src/egl/drivers/dri2/platform_drm.c
> > > index dc4efea9103..35bc4b5b1ac 100644
> > > --- a/src/egl/drivers/dri2/platform_drm.c
> > > +++ b/src/egl/drivers/dri2/platform_drm.c
> > > @@ -155,6 +155,11 @@ dri2_drm_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp,
> > > config = dri2_get_dri_config(dri2_conf, EGL_WINDOW_BIT,
> > > dri2_surf->base.GLColorspace);
> > >
> > > + if (!config) {
> > > + _eglError(EGL_BAD_MATCH, "Unsupported surfacetype/colorspace configuration");
> >
> > Seems like android and surfaceless are missing the EGL_BAD_MATCH bit.
> > AFAICT they need it right?
> >
>
> That is true, I've sent a patch to add the error case.
>
> BTW there seems something wrong in dEQP surfaceless support (?) Are you
> guys able to run it? For me it says EGL is not supported.
>
Same here. It seems it is not very complete, and intended to be used with
ChromeOS.
https://android.googlesource.com/platform/external/deqp/+/04589e1a53e11599a386ff
99dc1ce135e3770653
J.A.
> // Tapani
>
More information about the mesa-dev
mailing list