From ca19410b428b9b08c54c33f33764a9fabf512b54 Mon Sep 17 00:00:00 2001 From: "errong.leng" Date: Thu, 12 Apr 2018 14:01:51 +0800 Subject: [PATCH] egl: add more EGL_SURFACE_TYPE config for wayland Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105995 --- src/egl/drivers/dri2/platform_wayland.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c index 94f7def..1e6aed5 100644 --- a/src/egl/drivers/dri2/platform_wayland.c +++ b/src/egl/drivers/dri2/platform_wayland.c @@ -1261,6 +1261,12 @@ dri2_wl_add_configs_for_visuals(_EGLDriver *drv, _EGLDisplay *disp) unsigned int format_count[ARRAY_SIZE(dri2_wl_visuals)] = { 0 }; unsigned int count = 0; + EGLint surface_type; + surface_type = + EGL_WINDOW_BIT | + EGL_PIXMAP_BIT | + EGL_PBUFFER_BIT; + for (unsigned i = 0; dri2_dpy->driver_configs[i]; i++) { for (unsigned j = 0; j < ARRAY_SIZE(dri2_wl_visuals); j++) { struct dri2_egl_config *dri2_conf; @@ -1269,7 +1275,7 @@ dri2_wl_add_configs_for_visuals(_EGLDriver *drv, _EGLDisplay *disp) continue; dri2_conf = dri2_add_config(disp, dri2_dpy->driver_configs[i], - count + 1, EGL_WINDOW_BIT, NULL, dri2_wl_visuals[j].rgba_masks); + count + 1, surface_type, NULL, dri2_wl_visuals[j].rgba_masks); if (dri2_conf) { if (dri2_conf->base.ConfigID == count + 1) count++; -- 1.9.1