Mesa (master): android: try to load gallium_dri.so directly
Eric Anholt
anholt at kemper.freedesktop.org
Tue Jun 9 20:04:50 UTC 2015
Module: Mesa
Branch: master
Commit: c3b5afbd4e682f76e16ea85883af571165bd24ee
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c3b5afbd4e682f76e16ea85883af571165bd24ee
Author: Chih-Wei Huang <cwhuang at android-x86.org>
Date: Wed May 20 11:25:30 2015 +0800
android: try to load gallium_dri.so directly
This avoids needing hardlinks between all of the DRI driver .so names,
since we're the only loader on the system.
v2: Add early exit on success (like previous block) and log message on
failure.
Signed-off-by: Chih-Wei Huang <cwhuang at linux.org.tw>
Reviewed-by: Eric Anholt <eric at anholt.net>
---
src/egl/drivers/dri2/egl_dri2.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index 82f8843..44a6c96 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -419,6 +419,15 @@ 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);
+ if (dri2_dpy->driver == NULL)
+ _eglLog(_EGL_DEBUG, "failed to open %s: %s\n", path, dlerror());
+ else
+ break;
+#endif
}
if (dri2_dpy->driver == NULL) {
More information about the mesa-commit
mailing list