evas gl_drm: enable blacklist gl engine check to prevent segfault when it is trying...
authorGwanglim Lee <gl77.lee@samsung.com>
Sat, 11 Apr 2015 16:04:07 +0000 (01:04 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Sat, 11 Apr 2015 16:04:07 +0000 (01:04 +0900)
Change-Id: I49f29632dd7f5daedf281cf32856bbf2b180a538

src/modules/evas/engines/gl_drm/evas_drm_main.c
src/modules/evas/engines/gl_drm/evas_engine.c

index 8e9fea6..c5498c3 100644 (file)
@@ -204,7 +204,7 @@ eng_window_new(Evas_Engine_Info_GL_Drm *info, Evas *e, struct gbm_device *gbm, s
      blacklist = EINA_TRUE;
    if (strstr((const char *)renderer, "llvmpipe"))
      blacklist = EINA_TRUE;
-   if ((blacklist) && (!getenv("EVAS_GL_NO_BLACKLIST")))
+   if (blacklist)
      {
         ERR("OpenGL Driver blacklisted:");
         ERR("Vendor: %s", (const char *)vendor);
index 89e3a7c..cc2760d 100644 (file)
@@ -80,6 +80,9 @@ void *(*glsym_eglCreateImage)(EGLDisplay a, EGLContext b, EGLenum c, EGLClientBu
 void (*glsym_eglDestroyImage)(EGLDisplay a, void *b) = NULL;
 void (*glsym_glEGLImageTargetTexture2DOES)(int a, void *b)  = NULL;
 unsigned int (*glsym_eglSwapBuffersWithDamage)(EGLDisplay a, void *b, const EGLint *d, EGLint c) = NULL;
+
+unsigned int (*glsym_eglBindWaylandDisplayWL)(EGLDisplay dpy, struct wl_display *display) = NULL;
+unsigned int (*glsym_eglUnbindWaylandDisplayWL)(EGLDisplay dpy, struct wl_display *display) = NULL;
 unsigned int (*glsym_eglQueryWaylandBufferWL)(EGLDisplay a, struct wl_resource *b, EGLint c, EGLint *d) = NULL;
 
 /* local function prototypes */
@@ -203,6 +206,10 @@ gl_symbols(void)
    FINDSYM(glsym_eglSwapBuffersWithDamage, "eglSwapBuffersWithDamage",
            glsym_func_uint);
 
+   FINDSYM(glsym_eglBindWaylandDisplayWL, "eglBindWaylandDisplayWL",
+           glsym_func_uint);
+   FINDSYM(glsym_eglUnbindWaylandDisplayWL, "eglUnbindWaylandDisplayWL",
+           glsym_func_uint);
    FINDSYM(glsym_eglQueryWaylandBufferWL, "eglQueryWaylandBufferWL",
            glsym_func_uint);
 
@@ -1223,6 +1230,16 @@ module_open(Evas_Module *em)
    setenv("EGL_PLATFORM", "drm", 1);
    gl_symbols();
 
+   if (!((glsym_eglBindWaylandDisplayWL) &&
+         (glsym_eglUnbindWaylandDisplayWL) &&
+         (glsym_eglQueryWaylandBufferWL)))
+     {
+        EINA_LOG_ERR("GLES driver doesn't support EGL_WL_bind_wayland_display extension.");
+        eina_log_domain_unregister(_evas_engine_gl_drm_log_dom);
+        /* TODO: unload gl_generic engine too */
+        return 0;
+     }
+
    /* now advertise out own api */
    em->functions = (void *)(&func);
    return 1;