diff options
Diffstat (limited to 'src/egl/drivers/dri2')
-rw-r--r-- | src/egl/drivers/dri2/Android.mk | 1 | ||||
-rw-r--r-- | src/egl/drivers/dri2/Makefile | 4 | ||||
-rw-r--r-- | src/egl/drivers/dri2/egl_dri2.c | 8 |
3 files changed, 13 insertions, 0 deletions
diff --git a/src/egl/drivers/dri2/Android.mk b/src/egl/drivers/dri2/Android.mk index b120c952127..5c506f83ab2 100644 --- a/src/egl/drivers/dri2/Android.mk +++ b/src/egl/drivers/dri2/Android.mk @@ -34,6 +34,7 @@ LOCAL_SRC_FILES := \ LOCAL_CFLAGS := \ -D_EGL_MAIN=_eglBuiltInDriverDRI2 \ -DDEFAULT_DRIVER_DIR=\"/system/lib/dri\" \ + -DHAVE_SHARED_GLAPI \ -DHAVE_ANDROID_PLATFORM LOCAL_C_INCLUDES := \ diff --git a/src/egl/drivers/dri2/Makefile b/src/egl/drivers/dri2/Makefile index 5780510dca1..d2b1f4f077a 100644 --- a/src/egl/drivers/dri2/Makefile +++ b/src/egl/drivers/dri2/Makefile @@ -21,6 +21,10 @@ EGL_LIBS = $(LIBUDEV_LIBS) $(DLOPEN_LIBS) $(LIBDRM_LIB) EGL_CFLAGS = -D_EGL_MAIN=_eglBuiltInDriverDRI2 EGL_BUILTIN = true +ifeq ($(SHARED_GLAPI),1) +EGL_CFLAGS += -DHAVE_SHARED_GLAPI +endif + ifneq ($(findstring x11, $(EGL_PLATFORMS)),) EGL_SOURCES += platform_x11.c EGL_INCLUDES += -DHAVE_X11_PLATFORM $(XCB_DRI2_CFLAGS) diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index a320f351655..80b2e38d9d3 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -1362,11 +1362,19 @@ static EGLBoolean dri2_load(_EGLDriver *drv) { struct dri2_egl_driver *dri2_drv = dri2_egl_driver(drv); +#ifdef HAVE_SHARED_GLAPI #ifdef HAVE_ANDROID_PLATFORM const char *libname = "libglapi.so"; #else const char *libname = "libglapi.so.0"; #endif +#else + /* + * Both libGL.so and libglapi.so are glapi providers. There is no way to + * tell which one to load. + */ + const char *libname = NULL; +#endif void *handle; /* RTLD_GLOBAL to make sure glapi symbols are visible to DRI drivers */ |