From 9767d3b5ad08640737e9d8dd4feb046478ae1f4b Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Sun, 26 Dec 2010 18:02:59 +0800 Subject: glapi: Fix OpenGL ES 1.1 and 2.0 interop. Move _glapi_* symbols from libGLESv1_CM.so and libGLESv2.so to libglapi.so. This makes sure an app will get only one copy of glapi in its address space. Note that with this change, libGLES* and libglapi must be built from the same source tree and distributed together. This requirement comes from the fact that the dispatch offsets used by these libraries are re-assigned whenever GLAPI XMLs are changed. --- configs/autoconf.in | 4 ++++ configs/default | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'configs') diff --git a/configs/autoconf.in b/configs/autoconf.in index ff5ea6f862..93923c822a 100644 --- a/configs/autoconf.in +++ b/configs/autoconf.in @@ -65,6 +65,7 @@ OSMESA_LIB = @OSMESA_LIB@ GLESv1_CM_LIB = GLESv1_CM GLESv2_LIB = GLESv2 VG_LIB = OpenVG +GLAPI_LIB = glapi # Library names (actual file names) GL_LIB_NAME = @GL_LIB_NAME@ @@ -76,6 +77,7 @@ EGL_LIB_NAME = @EGL_LIB_NAME@ GLESv1_CM_LIB_NAME = @GLESv1_CM_LIB_NAME@ GLESv2_LIB_NAME = @GLESv2_LIB_NAME@ VG_LIB_NAME = @VG_LIB_NAME@ +GLAPI_LIB_NAME = @GLAPI_LIB_NAME@ # Globs used to install the lib and all symlinks GL_LIB_GLOB = @GL_LIB_GLOB@ @@ -87,6 +89,7 @@ EGL_LIB_GLOB = @EGL_LIB_GLOB@ GLESv1_CM_LIB_GLOB = @GLESv1_CM_LIB_GLOB@ GLESv2_LIB_GLOB = @GLESv2_LIB_GLOB@ VG_LIB_GLOB = @VG_LIB_GLOB@ +GLAPI_LIB_GLOB = @GLAPI_LIB_GLOB@ # Directories to build LIB_DIR = @LIB_DIR@ @@ -129,6 +132,7 @@ APP_LIB_DEPS = $(EXTRA_LIB_PATH) @APP_LIB_DEPS@ GLESv1_CM_LIB_DEPS = $(EXTRA_LIB_PATH) @GLESv1_CM_LIB_DEPS@ GLESv2_LIB_DEPS = $(EXTRA_LIB_PATH) @GLESv2_LIB_DEPS@ VG_LIB_DEPS = $(EXTRA_LIB_PATH) @VG_LIB_DEPS@ +GLAPI_LIB_DEPS = $(EXTRA_LIB_PATH) @GLAPI_LIB_DEPS@ # DRI dependencies DRI_LIB_DEPS = $(EXTRA_LIB_PATH) @DRI_LIB_DEPS@ diff --git a/configs/default b/configs/default index b969415278..9030cf5b9d 100644 --- a/configs/default +++ b/configs/default @@ -59,6 +59,7 @@ EGL_LIB = EGL GLESv1_CM_LIB = GLESv1_CM GLESv2_LIB = GLESv2 VG_LIB = OpenVG +GLAPI_LIB = glapi # Library names (actual file names) @@ -71,6 +72,7 @@ EGL_LIB_NAME = lib$(EGL_LIB).so GLESv1_CM_LIB_NAME = lib$(GLESv1_CM_LIB).so GLESv2_LIB_NAME = lib$(GLESv2_LIB).so VG_LIB_NAME = lib$(VG_LIB).so +GLAPI_LIB_NAME = lib$(GLAPI_LIB).so # globs used to install the lib and all symlinks GL_LIB_GLOB = $(GL_LIB_NAME)* @@ -82,6 +84,7 @@ EGL_LIB_GLOB = $(EGL_LIB_NAME)* GLESv1_CM_LIB_GLOB = $(GLESv1_CM_LIB_NAME)* GLESv2_LIB_GLOB = $(GLESv2_LIB_NAME)* VG_LIB_GLOB = $(VG_LIB_NAME)* +GLAPI_LIB_GLOB = $(GLAPI_LIB_NAME)* TALLOC_LIBS = `pkg-config --libs talloc` TALLOC_CFLAGS = `pkg-config --cflags talloc` @@ -130,6 +133,7 @@ APP_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LI GLESv1_CM_LIB_DEPS = $(EXTRA_LIB_PATH) -lpthread GLESv2_LIB_DEPS = $(EXTRA_LIB_PATH) -lpthread VG_LIB_DEPS = $(EXTRA_LIB_PATH) -lpthread +GLAPI_LIB_DEPS = $(EXTRA_LIB_PATH) -lpthread # Program dependencies - specific GL/glut libraries added in Makefiles APP_LIB_DEPS = -lm -- cgit v1.2.3