Mesa (master): egl: add EGL_BAD_MATCH error case for surfaceless and android

Tapani Pälli tpalli at kemper.freedesktop.org
Fri May 4 11:04:21 UTC 2018


Module: Mesa
Branch: master
Commit: affe63b1da25dc7038499b6884523384684d70a8
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=affe63b1da25dc7038499b6884523384684d70a8

Author: Tapani Pälli <tapani.palli at intel.com>
Date:   Fri May  4 08:28:50 2018 +0300

egl: add EGL_BAD_MATCH error case for surfaceless and android

Just like is done for other backends when suitable config is not
found (added in fd4eba4929).

Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
Reviewed-by: Juan A. Suarez <jasuarez at igalia.com>

---

 src/egl/drivers/dri2/platform_android.c     | 4 +++-
 src/egl/drivers/dri2/platform_surfaceless.c | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/egl/drivers/dri2/platform_android.c b/src/egl/drivers/dri2/platform_android.c
index 7f1a496ea2..1d6ed92bd6 100644
--- a/src/egl/drivers/dri2/platform_android.c
+++ b/src/egl/drivers/dri2/platform_android.c
@@ -337,8 +337,10 @@ droid_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type,
 
    config = dri2_get_dri_config(dri2_conf, type,
                                 dri2_surf->base.GLColorspace);
-   if (!config)
+   if (!config) {
+      _eglError(EGL_BAD_MATCH, "Unsupported surfacetype/colorspace configuration");
       goto cleanup_surface;
+   }
 
    if (dri2_dpy->image_driver)
       createNewDrawable = dri2_dpy->image_driver->createNewDrawable;
diff --git a/src/egl/drivers/dri2/platform_surfaceless.c b/src/egl/drivers/dri2/platform_surfaceless.c
index 70b302c0ce..a0348a5e95 100644
--- a/src/egl/drivers/dri2/platform_surfaceless.c
+++ b/src/egl/drivers/dri2/platform_surfaceless.c
@@ -130,8 +130,10 @@ dri2_surfaceless_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type,
    config = dri2_get_dri_config(dri2_conf, type,
                                 dri2_surf->base.GLColorspace);
 
-   if (!config)
+   if (!config) {
+      _eglError(EGL_BAD_MATCH, "Unsupported surfacetype/colorspace configuration");
       goto cleanup_surface;
+   }
 
    dri2_surf->dri_drawable =
       dri2_dpy->image_driver->createNewDrawable(dri2_dpy->dri_screen, config,




More information about the mesa-commit mailing list