mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 04:00:10 +01:00
gbm: add Android gallium_dri.so library loading support
GBM needs the same special gallium_dri.so loading as EGL for Android, so copy over the same hunk from the EGL code. Signed-off-by: Rob Herring <robh@kernel.org> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
parent
7d79eec456
commit
64a005e3ee
1 changed files with 9 additions and 0 deletions
|
|
@ -341,6 +341,15 @@ dri_open_driver(struct gbm_dri_device *dri)
|
|||
/* not need continue to loop all paths once the driver is found */
|
||||
if (dri->driver != NULL)
|
||||
break;
|
||||
|
||||
#ifdef ANDROID
|
||||
snprintf(path, sizeof path, "%.*s/gallium_dri.so", len, p);
|
||||
dri->driver = dlopen(path, RTLD_NOW | RTLD_GLOBAL);
|
||||
if (dri->driver == NULL)
|
||||
sprintf("failed to open %s: %s\n", path, dlerror());
|
||||
else
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
if (dri->driver == NULL) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue