devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=110b0108ade6e7c12b93c20e5d37c3297d8df085

commit 110b0108ade6e7c12b93c20e5d37c3297d8df085
Author: Gwanglim Lee <[email protected]>
Date:   Mon Aug 11 11:08:09 2014 -0400

    evas-wayland-egl: Fix evas wayland_egl engine crash on mesa driver
    
    Summary:
    Evas wayland_egl engine crashes on startup when it is running with mesa.
    Evas is trying to get EGL / GLES extension function addresses where 
evas_gl_symbols.
    It is called before eglGetDisplay. Then mesa considers that current egl 
platform is
    X11 if it has no EGL_PLATFORM env var. This behavior of mesa is bad. But we 
should
    provide workaround until it is fixed. Thus EGL_PLATFORM env var should be 
defined to
    wayland before calling eglGetProcAddress.
    @fix
    
    Test Plan: run elementary_test under wayland with wayland_egl engine.
    
    Reviewers: raster, stefan_schmidt, devilhorns
    
    Reviewed By: devilhorns
    
    Subscribers: cedric
    
    Differential Revision: https://phab.enlightenment.org/D1312
---
 src/modules/evas/engines/wayland_egl/evas_engine.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/modules/evas/engines/wayland_egl/evas_engine.c 
b/src/modules/evas/engines/wayland_egl/evas_engine.c
index b867e8c..2734ccb 100644
--- a/src/modules/evas/engines/wayland_egl/evas_engine.c
+++ b/src/modules/evas/engines/wayland_egl/evas_engine.c
@@ -100,6 +100,14 @@ gl_symbols(void)
 
    if (done) return;
 
+   /* FIXME: Remove this line as soon as eglGetDisplay() autodetection
+    * gets fixed. Currently it is incorrectly detecting wl_display and
+    * returning _EGL_PLATFORM_X11 instead of _EGL_PLATFORM_WAYLAND.
+    *
+    * See ticket #1972 for more info.
+    */
+   setenv("EGL_PLATFORM", "wayland", 1);
+
 #define LINK2GENERIC(sym) \
    glsym_##sym = dlsym(RTLD_DEFAULT, #sym);
 

-- 


Reply via email to