gl_drm: Query eglGetProcAddress with dlsym
authorDerek Foreman <derekf@osg.samsung.com>
Wed, 7 Dec 2016 22:39:17 +0000 (16:39 -0600)
committerDerek Foreman <derekf@osg.samsung.com>
Wed, 7 Dec 2016 22:39:17 +0000 (16:39 -0600)
eglGetProcAddress should be queried with dlsym unconditionally.  What we
had could query it with other extended forms of eglGetProcAddress, which
is probably not what anyone wants.

Also, throwing away the weird extended forms because there's a good chance
our other gl bits don't run on any stacks that don't support normal
eglGetProcAddress.

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

index d840e2b..4821baa 100644 (file)
@@ -206,17 +206,10 @@ gl_symbols(void)
    LINK2GENERIC(evgl_engine_shutdown);
    LINK2GENERIC(evas_gl_symbols);
 
+   LINK2GENERIC(eglGetProcAddress);
+
 #define FINDSYM(dst, sym, typ) \
-   if (glsym_eglGetProcAddress) { \
-      if (!dst) dst = (typ)glsym_eglGetProcAddress(sym); \
-   } else { \
-      if (!dst) dst = (typ)dlsym(RTLD_DEFAULT, sym); \
-   }
-
-   FINDSYM(glsym_eglGetProcAddress, "eglGetProcAddressKHR", glsym_func_eng_fn);
-   FINDSYM(glsym_eglGetProcAddress, "eglGetProcAddressEXT", glsym_func_eng_fn);
-   FINDSYM(glsym_eglGetProcAddress, "eglGetProcAddressARB", glsym_func_eng_fn);
-   FINDSYM(glsym_eglGetProcAddress, "eglGetProcAddress", glsym_func_eng_fn);
+   if (!dst) dst = (typ)glsym_eglGetProcAddress(sym);
 
    glsym_evas_gl_symbols((void*)glsym_eglGetProcAddress);