From bb33dad47360eac5b560a089d691173c1e183939 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Thu, 13 Sep 2018 07:42:17 -0400 Subject: [PATCH] wip! renderer-native: use proper surface type for egldevice --- src/backends/native/meta-renderer-native.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/backends/native/meta-renderer-native.c b/src/backends/native/meta-renderer-native.c index f1f3e3c70..42bcf2ce8 100644 --- a/src/backends/native/meta-renderer-native.c +++ b/src/backends/native/meta-renderer-native.c @@ -3094,19 +3094,23 @@ create_secondary_egl_config (MetaEgl *egl, GError **error) { EGLint attributes[] = { + EGL_NONE, EGL_NONE, /* reserved for surface type */ EGL_RED_SIZE, 1, EGL_GREEN_SIZE, 1, EGL_BLUE_SIZE, 1, EGL_ALPHA_SIZE, EGL_DONT_CARE, EGL_BUFFER_SIZE, EGL_DONT_CARE, EGL_RENDERABLE_TYPE, EGL_OPENGL_ES3_BIT, - EGL_SURFACE_TYPE, EGL_WINDOW_BIT, - EGL_NONE + EGL_NONE, }; + size_t i = 0; switch (mode) { case META_RENDERER_NATIVE_MODE_GBM: + attributes[i++] = EGL_SURFACE_TYPE; + attributes[i++] = EGL_WINDOW_BIT; + return choose_egl_config_from_gbm_format (egl, egl_display, attributes, @@ -3115,6 +3119,9 @@ create_secondary_egl_config (MetaEgl *egl, error); #ifdef HAVE_EGL_DEVICE case META_RENDERER_NATIVE_MODE_EGL_DEVICE: + attributes[i++] = EGL_SURFACE_TYPE; + attributes[i++] = EGL_STREAM_BIT_KHR; + return meta_egl_choose_first_config (egl, egl_display, attributes,