mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-23 21:20:21 +01:00
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@linux.org.tw>
Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
parent
ac296aee58
commit
c3b5afbd4e
1 changed files with 9 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue