[Mesa-dev] [PATCH v2 06/15] android: try to load gallium_dri.so directly

Chih-Wei Huang cwhuang at android-x86.org
Tue May 19 20:25:30 PDT 2015


To avoid the trick of creating links for all dri drivers.

Signed-off-by: Chih-Wei Huang <cwhuang at linux.org.tw>
---
 src/egl/drivers/dri2/egl_dri2.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index fe5cbc8..7fc9f78 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -419,6 +419,10 @@ dri2_open_driver(_EGLDisplay *disp)
       /* not need continue to loop all paths once the driver is found */
       if (dri2_dpy->driver != NULL)
          break;
+#ifdef ANDROID
+      snprintf(path, sizeof path, "%.*s/gallium_dri.so", len, p);
+      dri2_dpy->driver = dlopen(path, RTLD_NOW | RTLD_GLOBAL);
+#endif
    }
 
    if (dri2_dpy->driver == NULL) {
-- 
1.9.1



More information about the mesa-dev mailing list