Chih-Wei Huang <[email protected]> writes: > To avoid the trick of creating links for all dri drivers. > > Signed-off-by: Chih-Wei Huang <[email protected]> > --- > 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 > }
It looks like with your change, things wouldn't work if you had more
than one entry in your drivers path, and gallium_dri.so wasn't in the
last directory.
I want to squish the following changes on to this:
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index 0b8a49b..44a6c96 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -419,9 +419,14 @@ 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
}
signature.asc
Description: PGP signature
_______________________________________________ mesa-dev mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-dev
