diff options
author | Chia-I Wu <olv@lunarg.com> | 2010-04-26 12:56:44 +0800 |
---|---|---|
committer | Chia-I Wu <olv@lunarg.com> | 2010-05-07 10:41:11 +0800 |
commit | 296adbd545b8efd38c9ed508166b2de2764a444b (patch) | |
tree | b146a292769007902a0aca98cfdd9d8ce7c44b59 | |
parent | 73ded0624de66bc83ae990530febb129d950d04b (diff) | |
download | mesa-296adbd545b8efd38c9ed508166b2de2764a444b.tar.gz |
glapi: Move to src/mapi/.
Move glapi to src/mapi/{glapi,es1api,es2api}.
-rw-r--r-- | configs/darwin | 2 | ||||
-rw-r--r-- | configs/default | 3 | ||||
-rw-r--r-- | configs/linux-cell | 3 | ||||
-rw-r--r-- | configs/linux-opengl-es | 3 | ||||
-rw-r--r-- | configure.ac | 6 | ||||
-rw-r--r-- | src/SConscript | 1 | ||||
-rw-r--r-- | src/egl/drivers/dri/Makefile | 2 | ||||
-rw-r--r-- | src/egl/drivers/dri2/Makefile | 2 | ||||
-rw-r--r-- | src/gallium/state_trackers/dri/drm/Makefile | 1 | ||||
-rw-r--r-- | src/gallium/state_trackers/dri/drm/SConscript | 1 | ||||
-rw-r--r-- | src/gallium/state_trackers/dri/sw/Makefile | 1 | ||||
-rw-r--r-- | src/gallium/state_trackers/dri/sw/SConscript | 1 | ||||
-rw-r--r-- | src/gallium/state_trackers/egl/Makefile | 1 | ||||
-rw-r--r-- | src/gallium/state_trackers/es/Makefile | 5 | ||||
-rw-r--r-- | src/gallium/state_trackers/glx/xlib/Makefile | 1 | ||||
-rw-r--r-- | src/gallium/state_trackers/glx/xlib/SConscript | 1 | ||||
-rw-r--r-- | src/gallium/targets/Makefile.dri | 2 | ||||
-rw-r--r-- | src/gallium/targets/SConscript.dri | 1 | ||||
-rw-r--r-- | src/gallium/targets/libgl-xlib/Makefile | 3 | ||||
-rw-r--r-- | src/gallium/targets/libgl-xlib/SConscript | 1 | ||||
-rw-r--r-- | src/gallium/winsys/i965/xlib/Makefile | 2 | ||||
-rw-r--r-- | src/gles/Makefile | 16 | ||||
-rw-r--r-- | src/glx/Makefile | 7 | ||||
-rw-r--r-- | src/mapi/es1api/Makefile | 60 | ||||
-rw-r--r-- | src/mapi/es2api/Makefile | 3 | ||||
-rw-r--r-- | src/mapi/glapi/.gitignore (renamed from src/mesa/glapi/.gitignore) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/Makefile | 38 | ||||
-rw-r--r-- | src/mapi/glapi/SConscript | 64 | ||||
-rw-r--r-- | src/mapi/glapi/gen-es/Makefile (renamed from src/mesa/es/glapi/Makefile) | 17 | ||||
-rw-r--r-- | src/mapi/glapi/gen-es/base1_API.xml (renamed from src/mesa/es/glapi/base1_API.xml) | 2 | ||||
-rw-r--r-- | src/mapi/glapi/gen-es/base2_API.xml (renamed from src/mesa/es/glapi/base2_API.xml) | 2 | ||||
-rw-r--r-- | src/mapi/glapi/gen-es/es1_API.xml (renamed from src/mesa/es/glapi/es1_API.xml) | 2 | ||||
-rw-r--r-- | src/mapi/glapi/gen-es/es1_COMPAT.xml (renamed from src/mesa/es/glapi/es1_COMPAT.xml) | 2 | ||||
-rw-r--r-- | src/mapi/glapi/gen-es/es1_EXT.xml (renamed from src/mesa/es/glapi/es1_EXT.xml) | 2 | ||||
-rw-r--r-- | src/mapi/glapi/gen-es/es2_API.xml (renamed from src/mesa/es/glapi/es2_API.xml) | 2 | ||||
-rw-r--r-- | src/mapi/glapi/gen-es/es2_COMPAT.xml (renamed from src/mesa/es/glapi/es2_COMPAT.xml) | 2 | ||||
-rw-r--r-- | src/mapi/glapi/gen-es/es2_EXT.xml (renamed from src/mesa/es/glapi/es2_EXT.xml) | 2 | ||||
-rw-r--r-- | src/mapi/glapi/gen-es/es_COMPAT.xml (renamed from src/mesa/es/glapi/es_COMPAT.xml) | 4 | ||||
-rw-r--r-- | src/mapi/glapi/gen-es/es_EXT.xml (renamed from src/mesa/es/glapi/es_EXT.xml) | 4 | ||||
-rw-r--r-- | src/mapi/glapi/gen-es/gl_compare.py (renamed from src/mesa/es/glapi/gl_compare.py) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/gen-es/gl_parse_header.py (renamed from src/mesa/es/glapi/gl_parse_header.py) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/gen/APPLE_object_purgeable.xml (renamed from src/mesa/glapi/gen/APPLE_object_purgeable.xml) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/gen/APPLE_vertex_array_object.xml (renamed from src/mesa/glapi/gen/APPLE_vertex_array_object.xml) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/gen/ARB_copy_buffer.xml (renamed from src/mesa/glapi/gen/ARB_copy_buffer.xml) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/gen/ARB_depth_clamp.xml (renamed from src/mesa/glapi/gen/ARB_depth_clamp.xml) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/gen/ARB_draw_elements_base_vertex.xml (renamed from src/mesa/glapi/gen/ARB_draw_elements_base_vertex.xml) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/gen/ARB_draw_instanced.xml (renamed from src/mesa/glapi/gen/ARB_draw_instanced.xml) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/gen/ARB_framebuffer_object.xml (renamed from src/mesa/glapi/gen/ARB_framebuffer_object.xml) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/gen/ARB_map_buffer_range.xml (renamed from src/mesa/glapi/gen/ARB_map_buffer_range.xml) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/gen/ARB_seamless_cube_map.xml (renamed from src/mesa/glapi/gen/ARB_seamless_cube_map.xml) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/gen/ARB_sync.xml (renamed from src/mesa/glapi/gen/ARB_sync.xml) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/gen/ARB_vertex_array_object.xml (renamed from src/mesa/glapi/gen/ARB_vertex_array_object.xml) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/gen/EXT_draw_buffers2.xml (renamed from src/mesa/glapi/gen/EXT_draw_buffers2.xml) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/gen/EXT_framebuffer_object.xml (renamed from src/mesa/glapi/gen/EXT_framebuffer_object.xml) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/gen/EXT_packed_depth_stencil.xml (renamed from src/mesa/glapi/gen/EXT_packed_depth_stencil.xml) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/gen/EXT_provoking_vertex.xml (renamed from src/mesa/glapi/gen/EXT_provoking_vertex.xml) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/gen/EXT_texture_array.xml (renamed from src/mesa/glapi/gen/EXT_texture_array.xml) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/gen/EXT_transform_feedback.xml (renamed from src/mesa/glapi/gen/EXT_transform_feedback.xml) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/gen/GL3.xml (renamed from src/mesa/glapi/gen/GL3.xml) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/gen/Makefile (renamed from src/mesa/glapi/gen/Makefile) | 6 | ||||
-rw-r--r-- | src/mapi/glapi/gen/NV_conditional_render.xml (renamed from src/mesa/glapi/gen/NV_conditional_render.xml) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/gen/OES_EGL_image.xml (renamed from src/mesa/glapi/gen/OES_EGL_image.xml) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/gen/extension_helper.py (renamed from src/mesa/glapi/gen/extension_helper.py) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/gen/glX_API.xml (renamed from src/mesa/glapi/gen/glX_API.xml) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/gen/glX_XML.py (renamed from src/mesa/glapi/gen/glX_XML.py) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/gen/glX_doc.py (renamed from src/mesa/glapi/gen/glX_doc.py) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/gen/glX_proto_common.py (renamed from src/mesa/glapi/gen/glX_proto_common.py) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/gen/glX_proto_recv.py (renamed from src/mesa/glapi/gen/glX_proto_recv.py) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/gen/glX_proto_send.py (renamed from src/mesa/glapi/gen/glX_proto_send.py) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/gen/glX_proto_size.py (renamed from src/mesa/glapi/gen/glX_proto_size.py) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/gen/glX_server_table.py (renamed from src/mesa/glapi/gen/glX_server_table.py) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/gen/gl_API.dtd (renamed from src/mesa/glapi/gen/gl_API.dtd) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/gen/gl_API.xml (renamed from src/mesa/glapi/gen/gl_API.xml) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/gen/gl_SPARC_asm.py (renamed from src/mesa/glapi/gen/gl_SPARC_asm.py) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/gen/gl_XML.py (renamed from src/mesa/glapi/gen/gl_XML.py) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/gen/gl_and_glX_API.xml (renamed from src/mesa/glapi/gen/gl_and_glX_API.xml) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/gen/gl_apitemp.py (renamed from src/mesa/glapi/gen/gl_apitemp.py) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/gen/gl_enums.py (renamed from src/mesa/glapi/gen/gl_enums.py) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/gen/gl_offsets.py (renamed from src/mesa/glapi/gen/gl_offsets.py) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/gen/gl_procs.py (renamed from src/mesa/glapi/gen/gl_procs.py) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/gen/gl_table.py (renamed from src/mesa/glapi/gen/gl_table.py) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/gen/gl_x86-64_asm.py (renamed from src/mesa/glapi/gen/gl_x86-64_asm.py) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/gen/gl_x86_asm.py (renamed from src/mesa/glapi/gen/gl_x86_asm.py) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/gen/license.py (renamed from src/mesa/glapi/gen/license.py) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/gen/mesadef.py (renamed from src/mesa/glapi/gen/mesadef.py) | 0 | ||||
-rwxr-xr-x | src/mapi/glapi/gen/next_available_offset.sh (renamed from src/mesa/glapi/gen/next_available_offset.sh) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/gen/remap_helper.py (renamed from src/mesa/glapi/gen/remap_helper.py) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/gen/typeexpr.py (renamed from src/mesa/glapi/gen/typeexpr.py) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/glapi.c (renamed from src/mesa/glapi/glapi.c) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/glapi.h (renamed from src/mesa/glapi/glapi.h) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/glapi_dispatch.c (renamed from src/mesa/glapi/glapi_dispatch.c) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/glapi_entrypoint.c (renamed from src/mesa/glapi/glapi_entrypoint.c) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/glapi_execmem.c (renamed from src/mesa/glapi/glapi_execmem.c) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/glapi_getproc.c (renamed from src/mesa/glapi/glapi_getproc.c) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/glapi_nop.c (renamed from src/mesa/glapi/glapi_nop.c) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/glapi_priv.h (renamed from src/mesa/glapi/glapi_priv.h) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/glapi_sparc.S (renamed from src/mesa/glapi/glapi_sparc.S) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/glapi_x86-64.S (renamed from src/mesa/glapi/glapi_x86-64.S) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/glapi_x86.S (renamed from src/mesa/glapi/glapi_x86.S) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/glapidispatch.h (renamed from src/mesa/glapi/glapidispatch.h) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/glapioffsets.h (renamed from src/mesa/glapi/glapioffsets.h) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/glapitable.h (renamed from src/mesa/glapi/glapitable.h) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/glapitemp.h (renamed from src/mesa/glapi/glapitemp.h) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/glprocs.h (renamed from src/mesa/glapi/glprocs.h) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/glthread.c (renamed from src/mesa/glapi/glthread.c) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/glthread.h (renamed from src/mesa/glapi/glthread.h) | 0 | ||||
-rw-r--r-- | src/mapi/glapi/sources.mak | 19 | ||||
-rw-r--r-- | src/mesa/Makefile | 19 | ||||
-rw-r--r-- | src/mesa/SConscript | 29 | ||||
-rw-r--r-- | src/mesa/drivers/dri/Makefile.template | 1 | ||||
-rw-r--r-- | src/mesa/drivers/fbdev/Makefile | 3 | ||||
-rw-r--r-- | src/mesa/drivers/glslcompiler/Makefile | 3 | ||||
-rw-r--r-- | src/mesa/drivers/osmesa/Makefile | 3 | ||||
-rw-r--r-- | src/mesa/drivers/x11/Makefile | 3 | ||||
-rw-r--r-- | src/mesa/es/Makefile | 28 | ||||
-rw-r--r-- | src/mesa/es/sources.mak | 24 | ||||
-rw-r--r-- | src/mesa/main/es_generator.py | 8 | ||||
-rw-r--r-- | src/mesa/sources.mak | 24 | ||||
-rw-r--r-- | src/mesa/x86-64/Makefile | 1 | ||||
-rw-r--r-- | src/mesa/x86/Makefile | 2 |
120 files changed, 282 insertions, 163 deletions
diff --git a/configs/darwin b/configs/darwin index e5196848776..0af77c7d31d 100644 --- a/configs/darwin +++ b/configs/darwin @@ -52,7 +52,7 @@ GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X11_DIR)/$(LIB_DIR) -lX11 -lXmu -lXt -lXi -lm # omit glw lib for now: -SRC_DIRS = glsl glx/apple mesa gallium glu glut/glx glew +SRC_DIRS = glsl mapi/glapi mapi/vgapi glx/apple mesa gallium glu glut/glx glew GLU_DIRS = sgi DRIVER_DIRS = osmesa #DRIVER_DIRS = dri diff --git a/configs/default b/configs/default index dd701de0401..0eb76db2aee 100644 --- a/configs/default +++ b/configs/default @@ -86,7 +86,8 @@ MOTIF_CFLAGS = -I/usr/include/Motif1.2 # Directories to build LIB_DIR = lib -SRC_DIRS = glsl mesa gallium egl gallium/winsys gallium/targets glu glut/glx glew glw +SRC_DIRS = glsl mapi/glapi mapi/vgapi mesa \ + gallium egl gallium/winsys gallium/targets glu glut/glx glew glw GLU_DIRS = sgi DRIVER_DIRS = x11 osmesa # Which subdirs under $(TOP)/progs/ to enter: diff --git a/configs/linux-cell b/configs/linux-cell index 0908dba9e05..ac6a2088d31 100644 --- a/configs/linux-cell +++ b/configs/linux-cell @@ -37,7 +37,8 @@ CXXFLAGS = $(COMMON_C_CPP_FLAGS) # Omitting glw here: -SRC_DIRS = glsl mesa gallium gallium/winsys gallium/targets glu glut/glx glew +SRC_DIRS = glsl mapi/glapi mapi/vgapi mesa \ + gallium gallium/winsys gallium/targets glu glut/glx glew # Build no traditional Mesa drivers: DRIVER_DIRS = diff --git a/configs/linux-opengl-es b/configs/linux-opengl-es index 6984aa9b2cd..5e31b8c52f2 100644 --- a/configs/linux-opengl-es +++ b/configs/linux-opengl-es @@ -6,7 +6,8 @@ CONFIG_NAME = linux-opengl-es # Directories to build LIB_DIR = lib -SRC_DIRS = egl glsl mesa/es gallium gallium/winsys gallium/targets +SRC_DIRS = egl glsl mapi/es1api mapi/es2api mesa/es \ + gallium gallium/winsys gallium/targets PROGRAM_DIRS = egl/eglut egl/opengles1 egl/opengles2 # egl st needs this diff --git a/configure.ac b/configure.ac index b2e49a71365..4f37e16e3f0 100644 --- a/configure.ac +++ b/configure.ac @@ -463,7 +463,7 @@ dnl Driver specific build directories dnl dnl this variable will be prepended to SRC_DIRS and is not exported -CORE_DIRS="glsl mesa" +CORE_DIRS="mapi/glapi glsl mesa" SRC_DIRS="glew" GLU_DIRS="sgi" @@ -763,6 +763,7 @@ if test "x$enable_gles2" = xyes; then APIS="$APIS es2" fi if test "x$enable_gles1" = xyes -o "x$enable_gles2" = xyes; then + CORE_DIRS="mapi/es1api mapi/es2api $CORE_DIRS" SRC_DIRS="$SRC_DIRS gles" fi AC_SUBST([API_DEFINES]) @@ -1308,6 +1309,9 @@ yes) HAVE_ST_XORG="yes" ;; es) + if test "x$enable_gles1" != xyes -a "x$enable_gles2" != xyes; then + CORE_DIRS="mapi/es1api mapi/es2api $CORE_DIRS" + fi # mesa/es is required to build es state tracker CORE_DIRS="$CORE_DIRS mesa/es" ;; diff --git a/src/SConscript b/src/SConscript index cf6db730da2..b72491d96f2 100644 --- a/src/SConscript +++ b/src/SConscript @@ -1,6 +1,7 @@ Import('*') SConscript('glsl/SConscript') +SConscript('mapi/glapi/SConscript') if 'mesa' in env['statetrackers']: SConscript('mesa/SConscript') diff --git a/src/egl/drivers/dri/Makefile b/src/egl/drivers/dri/Makefile index 7339c97c77d..c3aacff1cfe 100644 --- a/src/egl/drivers/dri/Makefile +++ b/src/egl/drivers/dri/Makefile @@ -11,9 +11,9 @@ INCLUDE_DIRS = \ $(shell pkg-config --cflags-only-I libdrm) \ -I$(TOP)/include \ -I$(TOP)/include/GL/internal \ + -I$(TOP)/src/mapi \ -I$(TOP)/src/mesa \ -I$(TOP)/src/mesa/main \ - -I$(TOP)/src/mesa/glapi \ -I$(TOP)/src/mesa/math \ -I$(TOP)/src/mesa/transform \ -I$(TOP)/src/mesa/shader \ diff --git a/src/egl/drivers/dri2/Makefile b/src/egl/drivers/dri2/Makefile index 129e67b8c66..4e760aec4c8 100644 --- a/src/egl/drivers/dri2/Makefile +++ b/src/egl/drivers/dri2/Makefile @@ -9,7 +9,7 @@ EGL_SOURCES = egl_dri2.c EGL_INCLUDES = \ -I$(TOP)/include \ -I$(TOP)/src/egl/main \ - -I$(TOP)/src/mesa \ + -I$(TOP)/src/mapi \ -DDEFAULT_DRIVER_DIR=\"$(DRI_DRIVER_SEARCH_DIR)\" \ $(EGL_DRI2_CFLAGS) diff --git a/src/gallium/state_trackers/dri/drm/Makefile b/src/gallium/state_trackers/dri/drm/Makefile index d9a973e3c3e..6c9d03fc5de 100644 --- a/src/gallium/state_trackers/dri/drm/Makefile +++ b/src/gallium/state_trackers/dri/drm/Makefile @@ -5,6 +5,7 @@ LIBNAME = dridrm LIBRARY_INCLUDES = \ -I$(TOP)/include \ + -I$(TOP)/src/mapi \ -I$(TOP)/src/mesa \ -I$(TOP)/src/gallium/state_trackers/dri/common \ -I$(TOP)/src/mesa/drivers/dri/common \ diff --git a/src/gallium/state_trackers/dri/drm/SConscript b/src/gallium/state_trackers/dri/drm/SConscript index 8800b655343..965dc95760f 100644 --- a/src/gallium/state_trackers/dri/drm/SConscript +++ b/src/gallium/state_trackers/dri/drm/SConscript @@ -10,6 +10,7 @@ if env['dri']: env.ParseConfig('pkg-config --cflags --libs libdrm') env.Append(CPPPATH = [ + '#/src/mapi', '#/src/mesa', '#/src/gallium/state_trackers/dri/common', '#/src/mesa/drivers/dri/common', diff --git a/src/gallium/state_trackers/dri/sw/Makefile b/src/gallium/state_trackers/dri/sw/Makefile index c0ae71451b2..a1dadeba5e6 100644 --- a/src/gallium/state_trackers/dri/sw/Makefile +++ b/src/gallium/state_trackers/dri/sw/Makefile @@ -8,6 +8,7 @@ LIBRARY_DEFINES = -D__NOT_HAVE_DRM_H LIBRARY_INCLUDES = \ -I../dri \ -I$(TOP)/include \ + -I$(TOP)/src/mapi \ -I$(TOP)/src/mesa \ -I$(TOP)/src/gallium/state_trackers/dri/common \ -I$(TOP)/src/mesa/drivers/dri/common \ diff --git a/src/gallium/state_trackers/dri/sw/SConscript b/src/gallium/state_trackers/dri/sw/SConscript index 6bb282d1a4c..0c5194d6edc 100644 --- a/src/gallium/state_trackers/dri/sw/SConscript +++ b/src/gallium/state_trackers/dri/sw/SConscript @@ -8,6 +8,7 @@ if env['dri']: env = env.Clone() env.Append(CPPPATH = [ + '#/src/mapi', '#/src/mesa', '#/src/gallium/state_trackers/dri/common', '#/src/mesa/drivers/dri/common', diff --git a/src/gallium/state_trackers/egl/Makefile b/src/gallium/state_trackers/egl/Makefile index 1768241352f..a3c1bb43469 100644 --- a/src/gallium/state_trackers/egl/Makefile +++ b/src/gallium/state_trackers/egl/Makefile @@ -15,6 +15,7 @@ common_OBJECTS = $(common_SOURCES:.c=.o) x11_INCLUDES = \ -I$(TOP)/src/gallium/drivers \ -I$(TOP)/src/glx \ + -I$(TOP)/src/mapi \ -I$(TOP)/src/mesa \ $(X11_CFLAGS) \ $(shell pkg-config --cflags-only-I libdrm) diff --git a/src/gallium/state_trackers/es/Makefile b/src/gallium/state_trackers/es/Makefile index 7370634ea24..37a78a5034b 100644 --- a/src/gallium/state_trackers/es/Makefile +++ b/src/gallium/state_trackers/es/Makefile @@ -30,17 +30,18 @@ ES2_OBJECTS = st_es2.o ES1_LIBS = \ $(TOP)/src/mesa/es/libes1gallium.a \ - $(TOP)/src/mesa/es/libes1api.a + $(TOP)/src/mapi/es1api/libes1api.a ES2_LIBS = \ $(TOP)/src/mesa/es/libes2gallium.a \ - $(TOP)/src/mesa/es/libes2api.a + $(TOP)/src/mapi/es2api/libes2api.a SYS_LIBS = -lm -pthread INCLUDE_DIRS = \ -I$(TOP)/include \ + -I$(TOP)/src/mapi \ -I$(TOP)/src/mesa \ -I$(TOP)/src/gallium/include diff --git a/src/gallium/state_trackers/glx/xlib/Makefile b/src/gallium/state_trackers/glx/xlib/Makefile index 35509fd708b..84cb36ec367 100644 --- a/src/gallium/state_trackers/glx/xlib/Makefile +++ b/src/gallium/state_trackers/glx/xlib/Makefile @@ -5,6 +5,7 @@ LIBNAME = xlib LIBRARY_INCLUDES = \ -I$(TOP)/include \ + -I$(TOP)/src/mapi \ -I$(TOP)/src/mesa \ $(X11_CFLAGS) diff --git a/src/gallium/state_trackers/glx/xlib/SConscript b/src/gallium/state_trackers/glx/xlib/SConscript index d6c16ad2f52..9df351a2769 100644 --- a/src/gallium/state_trackers/glx/xlib/SConscript +++ b/src/gallium/state_trackers/glx/xlib/SConscript @@ -9,6 +9,7 @@ if env['platform'] == 'linux' \ env = env.Clone() env.Append(CPPPATH = [ + '#/src/mapi', '#/src/mesa', '#/src/mesa/main', ]) diff --git a/src/gallium/targets/Makefile.dri b/src/gallium/targets/Makefile.dri index 3cbaf615e2f..48326e209e3 100644 --- a/src/gallium/targets/Makefile.dri +++ b/src/gallium/targets/Makefile.dri @@ -42,13 +42,13 @@ SHARED_INCLUDES = \ -Iserver \ -I$(TOP)/include \ -I$(TOP)/include/GL/internal \ + -I$(TOP)/src/mapi \ -I$(TOP)/src/gallium/include \ -I$(TOP)/src/gallium/auxiliary \ -I$(TOP)/src/gallium/drivers \ -I$(TOP)/src/gallium/winsys \ -I$(TOP)/src/mesa \ -I$(TOP)/src/mesa/main \ - -I$(TOP)/src/mesa/glapi \ -I$(TOP)/src/mesa/math \ -I$(TOP)/src/mesa/transform \ -I$(TOP)/src/mesa/shader \ diff --git a/src/gallium/targets/SConscript.dri b/src/gallium/targets/SConscript.dri index 28fbe02ab8d..4bbb16c2272 100644 --- a/src/gallium/targets/SConscript.dri +++ b/src/gallium/targets/SConscript.dri @@ -9,6 +9,7 @@ drienv.Replace(CPPPATH = [ '#src/mesa/drivers/dri/common', '#include', '#include/GL/internal', + '#src/mapi', '#src/gallium/include', '#src/gallium/auxiliary', '#src/gallium/drivers', diff --git a/src/gallium/targets/libgl-xlib/Makefile b/src/gallium/targets/libgl-xlib/Makefile index add3a273945..1574de080ab 100644 --- a/src/gallium/targets/libgl-xlib/Makefile +++ b/src/gallium/targets/libgl-xlib/Makefile @@ -15,6 +15,7 @@ GL_TINY = 0$(MESA_MAJOR)0$(MESA_MINOR)0$(MESA_TINY) INCLUDE_DIRS = \ -I$(TOP)/include \ + -I$(TOP)/src/mapi \ -I$(TOP)/src/mesa \ -I$(TOP)/src/mesa/main \ -I$(TOP)/src/gallium/include \ @@ -42,7 +43,7 @@ LIBS = \ $(TOP)/src/gallium/winsys/sw/xlib/libws_xlib.a \ $(TOP)/src/gallium/drivers/trace/libtrace.a \ $(TOP)/src/gallium/drivers/identity/libidentity.a \ - $(TOP)/src/mesa/libglapi.a \ + $(TOP)/src/mapi/glapi/libglapi.a \ $(TOP)/src/mesa/libmesagallium.a \ $(GALLIUM_AUXILIARIES) \ $(CELL_SPU_LIB) \ diff --git a/src/gallium/targets/libgl-xlib/SConscript b/src/gallium/targets/libgl-xlib/SConscript index 63e4531263a..4ff9f88ff67 100644 --- a/src/gallium/targets/libgl-xlib/SConscript +++ b/src/gallium/targets/libgl-xlib/SConscript @@ -17,6 +17,7 @@ if env['dri']: env = env.Clone() env.Append(CPPPATH = [ + '#/src/mapi', '#/src/mesa', '#/src/mesa/main', '#src/gallium/state_trackers/glx/xlib', diff --git a/src/gallium/winsys/i965/xlib/Makefile b/src/gallium/winsys/i965/xlib/Makefile index 3730db6997e..cc8249395c5 100644 --- a/src/gallium/winsys/i965/xlib/Makefile +++ b/src/gallium/winsys/i965/xlib/Makefile @@ -38,7 +38,7 @@ LIBS = \ $(TOP)/src/gallium/drivers/i965/libi965.a \ $(TOP)/src/gallium/drivers/trace/libtrace.a \ $(TOP)/src/gallium/state_trackers/glx/xlib/libxlib.a \ - $(TOP)/src/mesa/libglapi.a \ + $(TOP)/src/mapi/glapi/libglapi.a \ $(TOP)/src/mesa/libmesagallium.a \ $(GALLIUM_AUXILIARIES) diff --git a/src/gles/Makefile b/src/gles/Makefile index d023c14049f..5e5fc127b3f 100644 --- a/src/gles/Makefile +++ b/src/gles/Makefile @@ -1,11 +1,11 @@ TOP = ../.. -MESA = $(TOP)/src/mesa +MAPI = $(TOP)/src/mapi include $(TOP)/configs/current -include $(MESA)/sources.mak -GLESv1_CM_ASM := $(addprefix $(MESA)/es/glapi/glapi-es1/,$(GLAPI_ASM_SOURCES)) -GLESv2_ASM := $(addprefix $(MESA)/es/glapi/glapi-es2/,$(GLAPI_ASM_SOURCES)) -API_SOURCES := $(addprefix $(MESA)/,$(GLAPI_SOURCES)) +include $(MAPI)/glapi/sources.mak +GLESv1_CM_ASM := $(addprefix $(MAPI)/es1api/glapi/,$(GLAPI_ASM_SOURCES)) +GLESv2_ASM := $(addprefix $(MAPI)/es2api/glapi/,$(GLAPI_ASM_SOURCES)) +API_SOURCES := $(addprefix $(MAPI)/glapi/,$(GLAPI_SOURCES)) $(TOP)/$(LIB_DIR)/$(GLESv1_CM_LIB_NAME) : PREFIX = es1 $(TOP)/$(LIB_DIR)/$(GLESv1_CM_LIB_NAME) : NAME = GLESv1_CM @@ -13,7 +13,7 @@ $(TOP)/$(LIB_DIR)/$(GLESv1_CM_LIB_NAME) : NAME = GLESv1_CM $(TOP)/$(LIB_DIR)/$(GLESv2_LIB_NAME) : PREFIX = es2 $(TOP)/$(LIB_DIR)/$(GLESv2_LIB_NAME) : NAME = GLESv2 -INCLUDES = -I$(TOP)/include -I$(MESA)/es/glapi/glapi-$(PREFIX) -I$(MESA) +INCLUDES = -I$(TOP)/include -I$(MAPI)/$(PREFIX)api -I$(MAPI) -I$(TOP)/src/mesa OBJECTS = \ $(notdir $(GLAPI_ASM_SOURCES:%.S=%.o)) \ @@ -24,12 +24,12 @@ GLESv2_OBJECTS = $(addprefix es2-,$(OBJECTS)) es1-%.o: $(dir $(GLESv1_CM_ASM))%.S $(CC) -c $(CFLAGS) $(INCLUDES) -o $@ $< -es1-%.o: $(MESA)/glapi/%.c +es1-%.o: $(MAPI)/glapi/%.c $(CC) -c $(CFLAGS) $(INCLUDES) -o $@ $< es2-%.o: $(dir $(GLESv2_ASM))%.S $(CC) -c $(CFLAGS) $(INCLUDES) -o $@ $< -es2-%.o: $(MESA)/glapi/%.c +es2-%.o: $(MAPI)/glapi/%.c $(CC) -c $(CFLAGS) $(INCLUDES) -o $@ $< default: depend \ diff --git a/src/glx/Makefile b/src/glx/Makefile index c6ebc49828b..48d901fb894 100644 --- a/src/glx/Makefile +++ b/src/glx/Makefile @@ -39,7 +39,7 @@ SOURCES = \ dri2_glx.c \ dri2.c -GLAPI_LIB = $(TOP)/src/mesa/libglapi.a +GLAPI_LIB = $(TOP)/src/mapi/glapi/libglapi.a OBJECTS = $(SOURCES:.c=.o) @@ -47,7 +47,8 @@ INCLUDES = -I. \ -I$(TOP)/include \ -I$(TOP)/include/GL/internal \ -I$(TOP)/src/mesa \ - -I$(TOP)/src/mesa/glapi \ + -I$(TOP)/src/mapi \ + -I$(TOP)/src/mapi/glapi \ $(LIBDRM_CFLAGS) \ $(DRI2PROTO_CFLAGS) \ $(X11_INCLUDES) @@ -73,7 +74,7 @@ $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME): $(OBJECTS) $(GLAPI_LIB) Makefile $(GL_LIB_DEPS) $(OBJECTS) $(GLAPI_LIB) $(GLAPI_LIB): - @$(MAKE) -C $(TOP)/src/mesa libglapi.a + @$(MAKE) -C $(TOP)/src/mapi/glapi depend: $(SOURCES) Makefile rm -f depend diff --git a/src/mapi/es1api/Makefile b/src/mapi/es1api/Makefile new file mode 100644 index 00000000000..9130d0b01c4 --- /dev/null +++ b/src/mapi/es1api/Makefile @@ -0,0 +1,60 @@ +# src/mapi/es1api/Makefile + +TOP := ../../.. +include $(TOP)/configs/current + +# this Makefile can build both libes1api.a and libes2api.a +ifeq ($(ES),) +ES := es1 +endif + +ESAPI = $(ES)api + +GLAPI := ../glapi +include $(GLAPI)/sources.mak +ESAPI_SOURCES := $(addprefix $(GLAPI)/, $(GLAPI_SOURCES)) +ESAPI_OBJECTS := $(GLAPI_SOURCES:.c=.o) +ESAPI_ASM_SOURCES := $(addprefix glapi/, $(GLAPI_ASM_SOURCES)) +ESAPI_ASM_OBJECTS := $(GLAPI_ASM_SOURCES:.S=.o) + +INCLUDE_DIRS = \ + -I$(TOP)/include \ + -I$(TOP)/src/mapi/$(ESAPI) \ + -I$(TOP)/src/mapi \ + -I$(TOP)/src/mesa + +.PHONY: default +default: depend lib$(ESAPI).a + +lib$(ESAPI).a: $(ESAPI_OBJECTS) $(ESAPI_ASM_OBJECTS) + @$(MKLIB) -o $(ESAPI) -static $(ESAPI_OBJECTS) $(ESAPI_ASM_OBJECTS) + +$(ESAPI_OBJECTS): %.o: $(GLAPI)/%.c + $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@ + +$(ESAPI_ASM_OBJECTS): %.o: glapi/%.S + $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@ + +$(ESAPI_SOURCES) $(ESAPI_ASM_SOURCES): | glapi-stamp + +glapi-stamp: + @$(MAKE) -C $(GLAPI)/gen-es $(ES) + @touch $@ + +.PHONY: clean +clean: + -rm -f $(ESAPI_OBJECTS) $(ESAPI_ASM_OBJECTS) + -rm -f lib$(ESAPI).a + -rm -f depend depend.bak + @$(MAKE) -C $(GLAPI)/gen-es clean-$(ES) + -rm -f glapi-stamp + +# nothing to install +install: + +depend: $(ESAPI_SOURCES) + @echo "running $(MKDEP)" + @touch depend + @$(MKDEP) $(MKDEP_OPTIONS) -f- $(DEFINES) $(INCLUDE_DIRS) \ + $(ESAPI_SOURCES) 2>/dev/null | \ + sed -e 's,^$(GLAPI)/,,' > depend diff --git a/src/mapi/es2api/Makefile b/src/mapi/es2api/Makefile new file mode 100644 index 00000000000..21816a694af --- /dev/null +++ b/src/mapi/es2api/Makefile @@ -0,0 +1,3 @@ +# src/mapi/es2api/Makefile +ES := es2 +include ../es1api/Makefile diff --git a/src/mesa/glapi/.gitignore b/src/mapi/glapi/.gitignore index e706bc23cab..e706bc23cab 100644 --- a/src/mesa/glapi/.gitignore +++ b/src/mapi/glapi/.gitignore diff --git a/src/mapi/glapi/Makefile b/src/mapi/glapi/Makefile new file mode 100644 index 00000000000..13c8c54de21 --- /dev/null +++ b/src/mapi/glapi/Makefile @@ -0,0 +1,38 @@ +# src/mapi/glapi/Makefile + +TOP = ../../.. +include $(TOP)/configs/current + +include sources.mak +GLAPI_OBJECTS = $(GLAPI_SOURCES:.c=.o) +GLAPI_ASM_OBJECTS = $(GLAPI_ASM_SOURCES:.S=.o) + +INCLUDE_DIRS = \ + -I$(TOP)/include \ + -I$(TOP)/src/mapi \ + -I$(TOP)/src/mesa + +default: depend libglapi.a + +libglapi.a: $(GLAPI_OBJECTS) $(GLAPI_ASM_OBJECTS) + @ $(MKLIB) -o glapi -static $(GLAPI_OBJECTS) $(GLAPI_ASM_OBJECTS) + +$(GLAPI_OBJECTS): %.o: %.c + $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@ + +$(GLAPI_ASM_OBJECTS): %.o: %.S + $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@ + +install: + +clean: + -rm -f $(GLAPI_OBJECTS) $(GLAPI_ASM_OBJECTS) + -rm -f depend depend.bak libglapi.a + +depend: $(GLAPI_SOURCES) + @ echo "running $(MKDEP)" + @ touch depend + @$(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDE_DIRS) $(GLAPI_SOURCES) \ + > /dev/null 2>/dev/null + +-include depend diff --git a/src/mapi/glapi/SConscript b/src/mapi/glapi/SConscript new file mode 100644 index 00000000000..1ace2e6b2cd --- /dev/null +++ b/src/mapi/glapi/SConscript @@ -0,0 +1,64 @@ +####################################################################### +# SConscript for Mesa + + +Import('*') + +if env['platform'] != 'winddk': + + env = env.Clone() + + env.Append(CPPPATH = [ + '#/src/mapi', + '#/src/mesa', + ]) + + glapi_sources = [ + 'glapi.c', + 'glapi_dispatch.c', + 'glapi_entrypoint.c', + 'glapi_execmem.c', + 'glapi_getproc.c', + 'glapi_nop.c', + 'glthread.c', + ] + + # + # Assembly sources + # + if gcc and env['machine'] == 'x86': + env.Append(CPPDEFINES = [ + 'USE_X86_ASM', + 'USE_MMX_ASM', + 'USE_3DNOW_ASM', + 'USE_SSE_ASM', + ]) + glapi_sources += [ + 'glapi_x86.S', + ] + elif gcc and env['machine'] == 'x86_64': + env.Append(CPPDEFINES = [ + 'USE_X86_64_ASM', + ]) + glapi_sources += [ + 'glapi_x86-64.S' + ] + elif gcc and env['machine'] == 'ppc': + env.Append(CPPDEFINES = [ + 'USE_PPC_ASM', + 'USE_VMX_ASM', + ]) + glapi_sources += [ + ] + elif gcc and env['machine'] == 'sparc': + glapi_sources += [ + 'glapi_sparc.S' + ] + else: + pass + + glapi = env.ConvenienceLibrary( + target = 'glapi', + source = glapi_sources, + ) + Export('glapi') diff --git a/src/mesa/es/glapi/Makefile b/src/mapi/glapi/gen-es/Makefile index d12b8a5507b..bda8e9ef729 100644 --- a/src/mesa/es/glapi/Makefile +++ b/src/mapi/glapi/gen-es/Makefile @@ -1,5 +1,5 @@ TOP = ../../../.. -GLAPI = ../../glapi/gen +GLAPI = ../gen include $(TOP)/configs/current OUTPUTS := \ @@ -18,8 +18,8 @@ COMMON := $(addprefix $(GLAPI)/, $(COMMON)) ES1_APIXML := es1_API.xml ES2_APIXML := es2_API.xml -ES1_OUTPUT_DIR := glapi-es1 -ES2_OUTPUT_DIR := glapi-es2 +ES1_OUTPUT_DIR := $(TOP)/src/mapi/es1api +ES2_OUTPUT_DIR := $(TOP)/src/mapi/es2api ES1_DEPS = $(ES1_APIXML) base1_API.xml es1_EXT.xml es_EXT.xml \ es1_COMPAT.xml es_COMPAT.xml @@ -84,6 +84,13 @@ verify_xml: @$(PYTHON2) $(PYTHON_FLAGS) gl_compare.py difference tmp.xml es2_API.xml @rm -f tmp.xml -clean: - -rm -rf $(ES1_OUTPUT_DIR) $(ES2_OUTPUT_DIR) +clean-es1: + -rm -rf $(ES1_OUTPUT_DIR)/glapi + -rm -rf $(ES1_OUTPUT_DIR)/main + +clean-es2: + -rm -rf $(ES2_OUTPUT_DIR)/glapi + -rm -rf $(ES2_OUTPUT_DIR)/main + +clean: clean-es1 clean-es2 -rm -f *~ *.pyc *.pyo diff --git a/src/mesa/es/glapi/base1_API.xml b/src/mapi/glapi/gen-es/base1_API.xml index 72e41282726..720be257ca2 100644 --- a/src/mesa/es/glapi/base1_API.xml +++ b/src/mapi/glapi/gen-es/base1_API.xml @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<!DOCTYPE OpenGLAPI SYSTEM "../../glapi/gen/gl_API.dtd"> +<!DOCTYPE OpenGLAPI SYSTEM "../gen/gl_API.dtd"> <!-- OpenGL and OpenGL ES 1.x APIs This file defines the base categories that can be shared by all APIs. diff --git a/src/mesa/es/glapi/base2_API.xml b/src/mapi/glapi/gen-es/base2_API.xml index 5657b8e775e..b59ef62de64 100644 --- a/src/mesa/es/glapi/base2_API.xml +++ b/src/mapi/glapi/gen-es/base2_API.xml @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<!DOCTYPE OpenGLAPI SYSTEM "../../glapi/gen/gl_API.dtd"> +<!DOCTYPE OpenGLAPI SYSTEM "../gen/gl_API.dtd"> <!-- OpenGL and OpenGL ES 2.x APIs --> diff --git a/src/mesa/es/glapi/es1_API.xml b/src/mapi/glapi/gen-es/es1_API.xml index 1ac14674583..3428ae5616a 100644 --- a/src/mesa/es/glapi/es1_API.xml +++ b/src/mapi/glapi/gen-es/es1_API.xml @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<!DOCTYPE OpenGLAPI SYSTEM "../../glapi/gen/gl_API.dtd"> +<!DOCTYPE OpenGLAPI SYSTEM "../gen/gl_API.dtd"> <!-- OpenGL ES 1.x API --> diff --git a/src/mesa/es/glapi/es1_COMPAT.xml b/src/mapi/glapi/gen-es/es1_COMPAT.xml index 1f45a8c0b64..096cea88d6f 100644 --- a/src/mesa/es/glapi/es1_COMPAT.xml +++ b/src/mapi/glapi/gen-es/es1_COMPAT.xml @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<!DOCTYPE OpenGLAPI SYSTEM "../../glapi/gen/gl_API.dtd"> +<!DOCTYPE OpenGLAPI SYSTEM "../gen/gl_API.dtd"> <OpenGLAPI> diff --git a/src/mesa/es/glapi/es1_EXT.xml b/src/mapi/glapi/gen-es/es1_EXT.xml index d4abd81046b..c1e86373d8b 100644 --- a/src/mesa/es/glapi/es1_EXT.xml +++ b/src/mapi/glapi/gen-es/es1_EXT.xml @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<!DOCTYPE OpenGLAPI SYSTEM "../../glapi/gen/gl_API.dtd"> +<!DOCTYPE OpenGLAPI SYSTEM "../gen/gl_API.dtd"> <!-- OpenGL ES 1.x extensions --> diff --git a/src/mesa/es/glapi/es2_API.xml b/src/mapi/glapi/gen-es/es2_API.xml index b476dbe00f2..f8af63b94fe 100644 --- a/src/mesa/es/glapi/es2_API.xml +++ b/src/mapi/glapi/gen-es/es2_API.xml @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<!DOCTYPE OpenGLAPI SYSTEM "../../glapi/gen/gl_API.dtd"> +<!DOCTYPE OpenGLAPI SYSTEM "../gen/gl_API.dtd"> <!-- OpenGL ES 2.x API --> diff --git a/src/mesa/es/glapi/es2_COMPAT.xml b/src/mapi/glapi/gen-es/es2_COMPAT.xml index 5ecd4a1ba6e..1bd3569635b 100644 --- a/src/mesa/es/glapi/es2_COMPAT.xml +++ b/src/mapi/glapi/gen-es/es2_COMPAT.xml @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<!DOCTYPE OpenGLAPI SYSTEM "../../glapi/gen/gl_API.dtd"> +<!DOCTYPE OpenGLAPI SYSTEM "../gen/gl_API.dtd"> <OpenGLAPI> diff --git a/src/mesa/es/glapi/es2_EXT.xml b/src/mapi/glapi/gen-es/es2_EXT.xml index dcf9858569f..4a67952e5c3 100644 --- a/src/mesa/es/glapi/es2_EXT.xml +++ b/src/mapi/glapi/gen-es/es2_EXT.xml @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<!DOCTYPE OpenGLAPI SYSTEM "../../glapi/gen/gl_API.dtd"> +<!DOCTYPE OpenGLAPI SYSTEM "../gen/gl_API.dtd"> <!-- OpenGL ES 2.x extensions --> diff --git a/src/mesa/es/glapi/es_COMPAT.xml b/src/mapi/glapi/gen-es/es_COMPAT.xml index 1bd66dad306..7c729261105 100644 --- a/src/mesa/es/glapi/es_COMPAT.xml +++ b/src/mapi/glapi/gen-es/es_COMPAT.xml @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<!DOCTYPE OpenGLAPI SYSTEM "../../glapi/gen/gl_API.dtd"> +<!DOCTYPE OpenGLAPI SYSTEM "../gen/gl_API.dtd"> <OpenGLAPI> @@ -2641,6 +2641,6 @@ </function> </category> -<xi:include href="../../glapi/gen/APPLE_vertex_array_object.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> +<xi:include href="../gen/APPLE_vertex_array_object.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> </OpenGLAPI> diff --git a/src/mesa/es/glapi/es_EXT.xml b/src/mapi/glapi/gen-es/es_EXT.xml index 291a53b4b27..113d8d74ddd 100644 --- a/src/mesa/es/glapi/es_EXT.xml +++ b/src/mapi/glapi/gen-es/es_EXT.xml @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<!DOCTYPE OpenGLAPI SYSTEM "../../glapi/gen/gl_API.dtd"> +<!DOCTYPE OpenGLAPI SYSTEM "../gen/gl_API.dtd"> <!-- OpenGL ES extensions --> @@ -19,7 +19,7 @@ </category> <!-- 23. GL_OES_EGL_image --> -<xi:include href="../../glapi/gen/OES_EGL_image.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> +<xi:include href="../gen/OES_EGL_image.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> <category name="GL_OES_depth24" number="24"> <enum name="DEPTH_COMPONENT24_OES" value="0x81A6"/> diff --git a/src/mesa/es/glapi/gl_compare.py b/src/mapi/glapi/gen-es/gl_compare.py index 6b5e43bb98b..6b5e43bb98b 100644 --- a/src/mesa/es/glapi/gl_compare.py +++ b/src/mapi/glapi/gen-es/gl_compare.py diff --git a/src/mesa/es/glapi/gl_parse_header.py b/src/mapi/glapi/gen-es/gl_parse_header.py index 5382eba35c3..5382eba35c3 100644 --- a/src/mesa/es/glapi/gl_parse_header.py +++ b/src/mapi/glapi/gen-es/gl_parse_header.py diff --git a/src/mesa/glapi/gen/APPLE_object_purgeable.xml b/src/mapi/glapi/gen/APPLE_object_purgeable.xml index 62fa64ad212..62fa64ad212 100644 --- a/src/mesa/glapi/gen/APPLE_object_purgeable.xml +++ b/src/mapi/glapi/gen/APPLE_object_purgeable.xml diff --git a/src/mesa/glapi/gen/APPLE_vertex_array_object.xml b/src/mapi/glapi/gen/APPLE_vertex_array_object.xml index bd8427eaf62..bd8427eaf62 100644 --- a/src/mesa/glapi/gen/APPLE_vertex_array_object.xml +++ b/src/mapi/glapi/gen/APPLE_vertex_array_object.xml diff --git a/src/mesa/glapi/gen/ARB_copy_buffer.xml b/src/mapi/glapi/gen/ARB_copy_buffer.xml index 719816d817e..719816d817e 100644 --- a/src/mesa/glapi/gen/ARB_copy_buffer.xml +++ b/src/mapi/glapi/gen/ARB_copy_buffer.xml diff --git a/src/mesa/glapi/gen/ARB_depth_clamp.xml b/src/mapi/glapi/gen/ARB_depth_clamp.xml index 157c9a86b12..157c9a86b12 100644 --- a/src/mesa/glapi/gen/ARB_depth_clamp.xml +++ b/src/mapi/glapi/gen/ARB_depth_clamp.xml diff --git a/src/mesa/glapi/gen/ARB_draw_elements_base_vertex.xml b/src/mapi/glapi/gen/ARB_draw_elements_base_vertex.xml index f4067f4c8dd..f4067f4c8dd 100644 --- a/src/mesa/glapi/gen/ARB_draw_elements_base_vertex.xml +++ b/src/mapi/glapi/gen/ARB_draw_elements_base_vertex.xml diff --git a/src/mesa/glapi/gen/ARB_draw_instanced.xml b/src/mapi/glapi/gen/ARB_draw_instanced.xml index 5741a588c9f..5741a588c9f 100644 --- a/src/mesa/glapi/gen/ARB_draw_instanced.xml +++ b/src/mapi/glapi/gen/ARB_draw_instanced.xml diff --git a/src/mesa/glapi/gen/ARB_framebuffer_object.xml b/src/mapi/glapi/gen/ARB_framebuffer_object.xml index e6bdcd6e509..e6bdcd6e509 100644 --- a/src/mesa/glapi/gen/ARB_framebuffer_object.xml +++ b/src/mapi/glapi/gen/ARB_framebuffer_object.xml diff --git a/src/mesa/glapi/gen/ARB_map_buffer_range.xml b/src/mapi/glapi/gen/ARB_map_buffer_range.xml index afcb9b6ba6d..afcb9b6ba6d 100644 --- a/src/mesa/glapi/gen/ARB_map_buffer_range.xml +++ b/src/mapi/glapi/gen/ARB_map_buffer_range.xml diff --git a/src/mesa/glapi/gen/ARB_seamless_cube_map.xml b/src/mapi/glapi/gen/ARB_seamless_cube_map.xml index 8dc827c5a89..8dc827c5a89 100644 --- a/src/mesa/glapi/gen/ARB_seamless_cube_map.xml +++ b/src/mapi/glapi/gen/ARB_seamless_cube_map.xml diff --git a/src/mesa/glapi/gen/ARB_sync.xml b/src/mapi/glapi/gen/ARB_sync.xml index 4e4eebac32a..4e4eebac32a 100644 --- a/src/mesa/glapi/gen/ARB_sync.xml +++ b/src/mapi/glapi/gen/ARB_sync.xml diff --git a/src/mesa/glapi/gen/ARB_vertex_array_object.xml b/src/mapi/glapi/gen/ARB_vertex_array_object.xml index 3b4ab64f557..3b4ab64f557 100644 --- a/src/mesa/glapi/gen/ARB_vertex_array_object.xml +++ b/src/mapi/glapi/gen/ARB_vertex_array_object.xml diff --git a/src/mesa/glapi/gen/EXT_draw_buffers2.xml b/src/mapi/glapi/gen/EXT_draw_buffers2.xml index efbe61f74ed..efbe61f74ed 100644 --- a/src/mesa/glapi/gen/EXT_draw_buffers2.xml +++ b/src/mapi/glapi/gen/EXT_draw_buffers2.xml diff --git a/src/mesa/glapi/gen/EXT_framebuffer_object.xml b/src/mapi/glapi/gen/EXT_framebuffer_object.xml index 4f418f7b64c..4f418f7b64c 100644 --- a/src/mesa/glapi/gen/EXT_framebuffer_object.xml +++ b/src/mapi/glapi/gen/EXT_framebuffer_object.xml diff --git a/src/mesa/glapi/gen/EXT_packed_depth_stencil.xml b/src/mapi/glapi/gen/EXT_packed_depth_stencil.xml index 5be810302f3..5be810302f3 100644 --- a/src/mesa/glapi/gen/EXT_packed_depth_stencil.xml +++ b/src/mapi/glapi/gen/EXT_packed_depth_stencil.xml diff --git a/src/mesa/glapi/gen/EXT_provoking_vertex.xml b/src/mapi/glapi/gen/EXT_provoking_vertex.xml index 71d2c729091..71d2c729091 100644 --- a/src/mesa/glapi/gen/EXT_provoking_vertex.xml +++ b/src/mapi/glapi/gen/EXT_provoking_vertex.xml diff --git a/src/mesa/glapi/gen/EXT_texture_array.xml b/src/mapi/glapi/gen/EXT_texture_array.xml index b5b8bd406f7..b5b8bd406f7 100644 --- a/src/mesa/glapi/gen/EXT_texture_array.xml +++ b/src/mapi/glapi/gen/EXT_texture_array.xml diff --git a/src/mesa/glapi/gen/EXT_transform_feedback.xml b/src/mapi/glapi/gen/EXT_transform_feedback.xml index abbed9b25b3..abbed9b25b3 100644 --- a/src/mesa/glapi/gen/EXT_transform_feedback.xml +++ b/src/mapi/glapi/gen/EXT_transform_feedback.xml diff --git a/src/mesa/glapi/gen/GL3.xml b/src/mapi/glapi/gen/GL3.xml index 0d8d935f0ae..0d8d935f0ae 100644 --- a/src/mesa/glapi/gen/GL3.xml +++ b/src/mapi/glapi/gen/GL3.xml diff --git a/src/mesa/glapi/gen/Makefile b/src/mapi/glapi/gen/Makefile index 289ffbde01d..daa0a48ddae 100644 --- a/src/mesa/glapi/gen/Makefile +++ b/src/mapi/glapi/gen/Makefile @@ -8,7 +8,7 @@ TOP = ../../../.. include $(TOP)/configs/current MESA_DIR = $(TOP)/src/mesa -MESA_GLAPI_DIR = $(TOP)/src/mesa/glapi +MESA_GLAPI_DIR = $(TOP)/src/mapi/glapi MESA_GLX_DIR = $(TOP)/src/glx MESA_GLAPI_OUTPUTS = \ @@ -153,8 +153,8 @@ $(MESA_GLAPI_DIR)/glapi_sparc.S: gl_SPARC_asm.py $(COMMON) $(MESA_DIR)/main/enums.c: gl_enums.py $(COMMON) $(ES_API) $(PYTHON2) $(PYTHON_FLAGS) $< -f gl_API.xml \ - -f $(MESA_DIR)/es/glapi/es1_API.xml \ - -f $(MESA_DIR)/es/glapi/es2_API.xml > $@ + -f $(MESA_GLAPI_DIR)/gen-es/es1_API.xml \ + -f $(MESA_GLAPI_DIR)/gen-es/es2_API.xml > $@ $(MESA_DIR)/main/remap_helper.h: remap_helper.py $(COMMON) $(PYTHON2) $(PYTHON_FLAGS) $< > $@ diff --git a/src/mesa/glapi/gen/NV_conditional_render.xml b/src/mapi/glapi/gen/NV_conditional_render.xml index 8bb31dd1fc9..8bb31dd1fc9 100644 --- a/src/mesa/glapi/gen/NV_conditional_render.xml +++ b/src/mapi/glapi/gen/NV_conditional_render.xml diff --git a/src/mesa/glapi/gen/OES_EGL_image.xml b/src/mapi/glapi/gen/OES_EGL_image.xml index 1cb43d49a41..1cb43d49a41 100644 --- a/src/mesa/glapi/gen/OES_EGL_image.xml +++ b/src/mapi/glapi/gen/OES_EGL_image.xml diff --git a/src/mesa/glapi/gen/extension_helper.py b/src/mapi/glapi/gen/extension_helper.py index 2c83b4e0d10..2c83b4e0d10 100644 --- a/src/mesa/glapi/gen/extension_helper.py +++ b/src/mapi/glapi/gen/extension_helper.py diff --git a/src/mesa/glapi/gen/glX_API.xml b/src/mapi/glapi/gen/glX_API.xml index 9e02aa498ee..9e02aa498ee 100644 --- a/src/mesa/glapi/gen/glX_API.xml +++ b/src/mapi/glapi/gen/glX_API.xml diff --git a/src/mesa/glapi/gen/glX_XML.py b/src/mapi/glapi/gen/glX_XML.py index 4c2e0f95bf4..4c2e0f95bf4 100644 --- a/src/mesa/glapi/gen/glX_XML.py +++ b/src/mapi/glapi/gen/glX_XML.py diff --git a/src/mesa/glapi/gen/glX_doc.py b/src/mapi/glapi/gen/glX_doc.py index e9fbbe6f169..e9fbbe6f169 100644 --- a/src/mesa/glapi/gen/glX_doc.py +++ b/src/mapi/glapi/gen/glX_doc.py diff --git a/src/mesa/glapi/gen/glX_proto_common.py b/src/mapi/glapi/gen/glX_proto_common.py index 6f094e22b31..6f094e22b31 100644 --- a/src/mesa/glapi/gen/glX_proto_common.py +++ b/src/mapi/glapi/gen/glX_proto_common.py diff --git a/src/mesa/glapi/gen/glX_proto_recv.py b/src/mapi/glapi/gen/glX_proto_recv.py index 31745fcef77..31745fcef77 100644 --- a/src/mesa/glapi/gen/glX_proto_recv.py +++ b/src/mapi/glapi/gen/glX_proto_recv.py diff --git a/src/mesa/glapi/gen/glX_proto_send.py b/src/mapi/glapi/gen/glX_proto_send.py index c52b85bfb4f..c52b85bfb4f 100644 --- a/src/mesa/glapi/gen/glX_proto_send.py +++ b/src/mapi/glapi/gen/glX_proto_send.py diff --git a/src/mesa/glapi/gen/glX_proto_size.py b/src/mapi/glapi/gen/glX_proto_size.py index 95cb5110cc3..95cb5110cc3 100644 --- a/src/mesa/glapi/gen/glX_proto_size.py +++ b/src/mapi/glapi/gen/glX_proto_size.py diff --git a/src/mesa/glapi/gen/glX_server_table.py b/src/mapi/glapi/gen/glX_server_table.py index f3962f875b0..f3962f875b0 100644 --- a/src/mesa/glapi/gen/glX_server_table.py +++ b/src/mapi/glapi/gen/glX_server_table.py diff --git a/src/mesa/glapi/gen/gl_API.dtd b/src/mapi/glapi/gen/gl_API.dtd index 30c646c9244..30c646c9244 100644 --- a/src/mesa/glapi/gen/gl_API.dtd +++ b/src/mapi/glapi/gen/gl_API.dtd diff --git a/src/mesa/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml index 31df7a5f801..31df7a5f801 100644 --- a/src/mesa/glapi/gen/gl_API.xml +++ b/src/mapi/glapi/gen/gl_API.xml diff --git a/src/mesa/glapi/gen/gl_SPARC_asm.py b/src/mapi/glapi/gen/gl_SPARC_asm.py index 33e752df38c..33e752df38c 100644 --- a/src/mesa/glapi/gen/gl_SPARC_asm.py +++ b/src/mapi/glapi/gen/gl_SPARC_asm.py diff --git a/src/mesa/glapi/gen/gl_XML.py b/src/mapi/glapi/gen/gl_XML.py index 660c8cfb711..660c8cfb711 100644 --- a/src/mesa/glapi/gen/gl_XML.py +++ b/src/mapi/glapi/gen/gl_XML.py diff --git a/src/mesa/glapi/gen/gl_and_glX_API.xml b/src/mapi/glapi/gen/gl_and_glX_API.xml index 34c977e9c0c..34c977e9c0c 100644 --- a/src/mesa/glapi/gen/gl_and_glX_API.xml +++ b/src/mapi/glapi/gen/gl_and_glX_API.xml diff --git a/src/mesa/glapi/gen/gl_apitemp.py b/src/mapi/glapi/gen/gl_apitemp.py index 41a40fbeb68..41a40fbeb68 100644 --- a/src/mesa/glapi/gen/gl_apitemp.py +++ b/src/mapi/glapi/gen/gl_apitemp.py diff --git a/src/mesa/glapi/gen/gl_enums.py b/src/mapi/glapi/gen/gl_enums.py index 644e0855229..644e0855229 100644 --- a/src/mesa/glapi/gen/gl_enums.py +++ b/src/mapi/glapi/gen/gl_enums.py diff --git a/src/mesa/glapi/gen/gl_offsets.py b/src/mapi/glapi/gen/gl_offsets.py index 54867b34634..54867b34634 100644 --- a/src/mesa/glapi/gen/gl_offsets.py +++ b/src/mapi/glapi/gen/gl_offsets.py diff --git a/src/mesa/glapi/gen/gl_procs.py b/src/mapi/glapi/gen/gl_procs.py index 5de61fbdfe9..5de61fbdfe9 100644 --- a/src/mesa/glapi/gen/gl_procs.py +++ b/src/mapi/glapi/gen/gl_procs.py diff --git a/src/mesa/glapi/gen/gl_table.py b/src/mapi/glapi/gen/gl_table.py index 3bd7569e92a..3bd7569e92a 100644 --- a/src/mesa/glapi/gen/gl_table.py +++ b/src/mapi/glapi/gen/gl_table.py diff --git a/src/mesa/glapi/gen/gl_x86-64_asm.py b/src/mapi/glapi/gen/gl_x86-64_asm.py index e6e78c42f3b..e6e78c42f3b 100644 --- a/src/mesa/glapi/gen/gl_x86-64_asm.py +++ b/src/mapi/glapi/gen/gl_x86-64_asm.py diff --git a/src/mesa/glapi/gen/gl_x86_asm.py b/src/mapi/glapi/gen/gl_x86_asm.py index 10dfa1ddb34..10dfa1ddb34 100644 --- a/src/mesa/glapi/gen/gl_x86_asm.py +++ b/src/mapi/glapi/gen/gl_x86_asm.py diff --git a/src/mesa/glapi/gen/license.py b/src/mapi/glapi/gen/license.py index 02181648e4b..02181648e4b 100644 --- a/src/mesa/glapi/gen/license.py +++ b/src/mapi/glapi/gen/license.py diff --git a/src/mesa/glapi/gen/mesadef.py b/src/mapi/glapi/gen/mesadef.py index 38b0246ba5b..38b0246ba5b 100644 --- a/src/mesa/glapi/gen/mesadef.py +++ b/src/mapi/glapi/gen/mesadef.py diff --git a/src/mesa/glapi/gen/next_available_offset.sh b/src/mapi/glapi/gen/next_available_offset.sh index e7d6c2f4afa..e7d6c2f4afa 100755 --- a/src/mesa/glapi/gen/next_available_offset.sh +++ b/src/mapi/glapi/gen/next_available_offset.sh diff --git a/src/mesa/glapi/gen/remap_helper.py b/src/mapi/glapi/gen/remap_helper.py index 69b8e5e9d02..69b8e5e9d02 100644 --- a/src/mesa/glapi/gen/remap_helper.py +++ b/src/mapi/glapi/gen/remap_helper.py diff --git a/src/mesa/glapi/gen/typeexpr.py b/src/mapi/glapi/gen/typeexpr.py index 8ba7de48627..8ba7de48627 100644 --- a/src/mesa/glapi/gen/typeexpr.py +++ b/src/mapi/glapi/gen/typeexpr.py diff --git a/src/mesa/glapi/glapi.c b/src/mapi/glapi/glapi.c index ce85cf6a87b..ce85cf6a87b 100644 --- a/src/mesa/glapi/glapi.c +++ b/src/mapi/glapi/glapi.c diff --git a/src/mesa/glapi/glapi.h b/src/mapi/glapi/glapi.h index 7dcf2e8910b..7dcf2e8910b 100644 --- a/src/mesa/glapi/glapi.h +++ b/src/mapi/glapi/glapi.h diff --git a/src/mesa/glapi/glapi_dispatch.c b/src/mapi/glapi/glapi_dispatch.c index ae59140ad3a..ae59140ad3a 100644 --- a/src/mesa/glapi/glapi_dispatch.c +++ b/src/mapi/glapi/glapi_dispatch.c diff --git a/src/mesa/glapi/glapi_entrypoint.c b/src/mapi/glapi/glapi_entrypoint.c index 239780e7539..239780e7539 100644 --- a/src/mesa/glapi/glapi_entrypoint.c +++ b/src/mapi/glapi/glapi_entrypoint.c diff --git a/src/mesa/glapi/glapi_execmem.c b/src/mapi/glapi/glapi_execmem.c index 57f00be8dcc..57f00be8dcc 100644 --- a/src/mesa/glapi/glapi_execmem.c +++ b/src/mapi/glapi/glapi_execmem.c diff --git a/src/mesa/glapi/glapi_getproc.c b/src/mapi/glapi/glapi_getproc.c index c73e8dd3b04..c73e8dd3b04 100644 --- a/src/mesa/glapi/glapi_getproc.c +++ b/src/mapi/glapi/glapi_getproc.c diff --git a/src/mesa/glapi/glapi_nop.c b/src/mapi/glapi/glapi_nop.c index 4257b1fbce6..4257b1fbce6 100644 --- a/src/mesa/glapi/glapi_nop.c +++ b/src/mapi/glapi/glapi_nop.c diff --git a/src/mesa/glapi/glapi_priv.h b/src/mapi/glapi/glapi_priv.h index da6fee63fe7..da6fee63fe7 100644 --- a/src/mesa/glapi/glapi_priv.h +++ b/src/mapi/glapi/glapi_priv.h diff --git a/src/mesa/glapi/glapi_sparc.S b/src/mapi/glapi/glapi_sparc.S index e9f887b78f2..e9f887b78f2 100644 --- a/src/mesa/glapi/glapi_sparc.S +++ b/src/mapi/glapi/glapi_sparc.S diff --git a/src/mesa/glapi/glapi_x86-64.S b/src/mapi/glapi/glapi_x86-64.S index 96930162175..96930162175 100644 --- a/src/mesa/glapi/glapi_x86-64.S +++ b/src/mapi/glapi/glapi_x86-64.S diff --git a/src/mesa/glapi/glapi_x86.S b/src/mapi/glapi/glapi_x86.S index 317f595454a..317f595454a 100644 --- a/src/mesa/glapi/glapi_x86.S +++ b/src/mapi/glapi/glapi_x86.S diff --git a/src/mesa/glapi/glapidispatch.h b/src/mapi/glapi/glapidispatch.h index f66876fe8d2..f66876fe8d2 100644 --- a/src/mesa/glapi/glapidispatch.h +++ b/src/mapi/glapi/glapidispatch.h diff --git a/src/mesa/glapi/glapioffsets.h b/src/mapi/glapi/glapioffsets.h index a8133b40737..a8133b40737 100644 --- a/src/mesa/glapi/glapioffsets.h +++ b/src/mapi/glapi/glapioffsets.h diff --git a/src/mesa/glapi/glapitable.h b/src/mapi/glapi/glapitable.h index faf274f2704..faf274f2704 100644 --- a/src/mesa/glapi/glapitable.h +++ b/src/mapi/glapi/glapitable.h diff --git a/src/mesa/glapi/glapitemp.h b/src/mapi/glapi/glapitemp.h index 3ed337f8254..3ed337f8254 100644 --- a/src/mesa/glapi/glapitemp.h +++ b/src/mapi/glapi/glapitemp.h diff --git a/src/mesa/glapi/glprocs.h b/src/mapi/glapi/glprocs.h index 8eb04ee6781..8eb04ee6781 100644 --- a/src/mesa/glapi/glprocs.h +++ b/src/mapi/glapi/glprocs.h diff --git a/src/mesa/glapi/glthread.c b/src/mapi/glapi/glthread.c index f365d17bdda..f365d17bdda 100644 --- a/src/mesa/glapi/glthread.c +++ b/src/mapi/glapi/glthread.c diff --git a/src/mesa/glapi/glthread.h b/src/mapi/glapi/glthread.h index 4fe99284a8c..4fe99284a8c 100644 --- a/src/mesa/glapi/glthread.h +++ b/src/mapi/glapi/glthread.h diff --git a/src/mapi/glapi/sources.mak b/src/mapi/glapi/sources.mak new file mode 100644 index 00000000000..8e1e82f359a --- /dev/null +++ b/src/mapi/glapi/sources.mak @@ -0,0 +1,19 @@ +# src/mapi/glapi/sources.mak + +GLAPI_SOURCES = \ + glapi.c \ + glapi_dispatch.c \ + glapi_entrypoint.c \ + glapi_execmem.c \ + glapi_getproc.c \ + glapi_nop.c \ + glthread.c + +X86_API = \ + glapi_x86.S + +X86-64_API = \ + glapi_x86-64.S + +SPARC_API = \ + glapi_sparc.S diff --git a/src/mesa/Makefile b/src/mesa/Makefile index 72f983e10a0..332063a507e 100644 --- a/src/mesa/Makefile +++ b/src/mesa/Makefile @@ -21,15 +21,8 @@ CFLAGS += $(API_DEFINES) # Default: build dependencies, then asm_subdirs, GLSL built-in lib, # then convenience libs (.a) and finally the device drivers: -default: depend es_glapi asm_subdirs glsl_builtin libmesa.a libmesagallium.a \ - libglapi.a driver_subdirs - -es_glapi: - @for api in $(APIS) ; do \ - case "$$api" in \ - es1|es2) $(MAKE) -C es/glapi $$api;; \ - esac; \ - done +default: depend asm_subdirs glsl_builtin libmesa.a libmesagallium.a \ + driver_subdirs main/api_exec_es1.c: main/APIspec.xml main/es_generator.py main/APIspecutil.py main/APIspec.py $(PYTHON2) $(PYTHON_FLAGS) main/es_generator.py -S main/APIspec.xml -V GLES1.1 > $@ @@ -54,13 +47,9 @@ libmesa.a: $(MESA_OBJECTS) $(GLSL_LIBS) libmesagallium.a: $(MESA_GALLIUM_OBJECTS) $(GLSL_LIBS) @ $(MKLIB) -o mesagallium -static $(MESA_GALLIUM_OBJECTS) $(GLSL_LIBS) -# Make archive of gl* API dispatcher functions only -libglapi.a: $(GLAPI_OBJECTS) - @ $(MKLIB) -o glapi -static $(GLAPI_OBJECTS) - ###################################################################### # Device drivers -driver_subdirs: libmesa.a libglapi.a libmesagallium.a +driver_subdirs: libmesa.a libmesagallium.a @ (cd drivers && $(MAKE)) @@ -218,7 +207,7 @@ tags: clean: -rm -f */*.o -rm -f */*/*.o - -rm -f depend depend.bak libmesa.a libglapi.a libmesagallium.a + -rm -f depend depend.bak libmesa.a libmesagallium.a -rm -f drivers/*/*.o -rm -f *.pc -rm -f shader/slang/library/*_gc.h diff --git a/src/mesa/SConscript b/src/mesa/SConscript index 9cc5d493111..bf4ad6d2619 100644 --- a/src/mesa/SConscript +++ b/src/mesa/SConscript @@ -9,6 +9,7 @@ if env['platform'] != 'winddk': env = env.Clone() env.Append(CPPPATH = [ + '#/src/mapi', '#/src/mesa', ]) @@ -247,16 +248,6 @@ if env['platform'] != 'winddk': slang_sources ) - glapi_sources = [ - 'glapi/glapi.c', - 'glapi/glapi_dispatch.c', - 'glapi/glapi_entrypoint.c', - 'glapi/glapi_execmem.c', - 'glapi/glapi_getproc.c', - 'glapi/glapi_nop.c', - 'glapi/glthread.c', - ] - # # Assembly sources # @@ -290,9 +281,6 @@ if env['platform'] != 'winddk': 'x86/sse_normal.S', 'x86/read_rgba_span_x86.S', ] - glapi_sources += [ - 'glapi/glapi_x86.S', - ] elif gcc and env['machine'] == 'x86_64': env.Append(CPPDEFINES = [ 'USE_X86_64_ASM', @@ -301,9 +289,6 @@ if env['platform'] != 'winddk': 'x86-64/x86-64.c', 'x86-64/xform4.S', ] - glapi_sources += [ - 'glapi/glapi_x86-64.S' - ] elif gcc and env['machine'] == 'ppc': env.Append(CPPDEFINES = [ 'USE_PPC_ASM', @@ -312,8 +297,6 @@ if env['platform'] != 'winddk': mesa_sources += [ 'ppc/common_ppc.c', ] - glapi_sources += [ - ] elif gcc and env['machine'] == 'sparc': mesa_sources += [ 'sparc/sparc.c', @@ -321,9 +304,6 @@ if env['platform'] != 'winddk': 'sparc/norm.S', 'sparc/xform.S', ] - glapi_sources += [ - 'glapi/glapi_sparc.S' - ] else: pass @@ -354,10 +334,3 @@ if env['platform'] != 'winddk': source = mesa_sources, ) Export('mesa') - - glapi = env.ConvenienceLibrary( - target = 'glapi', - source = glapi_sources, - ) - Export('glapi') - diff --git a/src/mesa/drivers/dri/Makefile.template b/src/mesa/drivers/dri/Makefile.template index 4b9a0c1786d..8cb25439e48 100644 --- a/src/mesa/drivers/dri/Makefile.template +++ b/src/mesa/drivers/dri/Makefile.template @@ -26,6 +26,7 @@ SHARED_INCLUDES = \ -I$(TOP)/src/mesa/drivers/dri/common \ -Iserver \ -I$(TOP)/include \ + -I$(TOP)/src/mapi \ -I$(TOP)/src/mesa \ -I$(TOP)/src/egl/main \ -I$(TOP)/src/egl/drivers/dri \ diff --git a/src/mesa/drivers/fbdev/Makefile b/src/mesa/drivers/fbdev/Makefile index ee73f29a46a..5120e1ac9e5 100644 --- a/src/mesa/drivers/fbdev/Makefile +++ b/src/mesa/drivers/fbdev/Makefile @@ -11,10 +11,11 @@ OBJECTS = $(SOURCES:.c=.o) INCLUDE_DIRS = \ -I$(TOP)/include \ + -I$(TOP)/src/mapi \ -I$(TOP)/src/mesa \ -I$(TOP)/src/mesa/main -CORE_MESA = $(TOP)/src/mesa/libmesa.a $(TOP)/src/mesa/libglapi.a +CORE_MESA = $(TOP)/src/mesa/libmesa.a $(TOP)/src/mapi/glapi/libglapi.a .c.o: diff --git a/src/mesa/drivers/glslcompiler/Makefile b/src/mesa/drivers/glslcompiler/Makefile index 7dcf9a6541a..6da9f93f59a 100644 --- a/src/mesa/drivers/glslcompiler/Makefile +++ b/src/mesa/drivers/glslcompiler/Makefile @@ -11,11 +11,12 @@ OBJECTS = \ glslcompiler.o \ ../common/driverfuncs.o \ ../../libmesa.a \ - ../../libglapi.a + $(TOP)/src/mapi/glapi/libglapi.a INCLUDES = \ -I$(TOP)/include \ -I$(TOP)/include/GL/internal \ + -I$(TOP)/src/mapi \ -I$(TOP)/src/mesa \ -I$(TOP)/src/mesa/main \ -I$(TOP)/src/mesa/glapi \ diff --git a/src/mesa/drivers/osmesa/Makefile b/src/mesa/drivers/osmesa/Makefile index 9010bbd130a..ea49a896590 100644 --- a/src/mesa/drivers/osmesa/Makefile +++ b/src/mesa/drivers/osmesa/Makefile @@ -16,6 +16,7 @@ OBJECTS = $(SOURCES:.c=.o) INCLUDE_DIRS = \ -I$(TOP)/include \ + -I$(TOP)/src/mapi \ -I$(TOP)/src/mesa \ -I$(TOP)/src/mesa/main @@ -23,7 +24,7 @@ INCLUDE_DIRS = \ ifeq ($(DRIVER_DIRS), osmesa) CORE_MESA = \ $(TOP)/src/mesa/libmesa.a \ - $(TOP)/src/mesa/libglapi.a \ + $(TOP)/src/mapi/glapi/libglapi.a \ $(TOP)/src/glsl/cl/libglslcl.a \ $(TOP)/src/glsl/pp/libglslpp.a else diff --git a/src/mesa/drivers/x11/Makefile b/src/mesa/drivers/x11/Makefile index 5e427d2d5c6..b5b0c1f11a8 100644 --- a/src/mesa/drivers/x11/Makefile +++ b/src/mesa/drivers/x11/Makefile @@ -40,11 +40,12 @@ OBJECTS = $(SOURCES:.c=.o) INCLUDE_DIRS = \ -I$(TOP)/include \ + -I$(TOP)/src/mapi \ -I$(TOP)/src/mesa \ -I$(TOP)/src/mesa/main \ $(X11_INCLUDES) -CORE_MESA = $(TOP)/src/mesa/libmesa.a $(TOP)/src/mesa/libglapi.a +CORE_MESA = $(TOP)/src/mesa/libmesa.a $(TOP)/src/mapi/glapi/libglapi.a diff --git a/src/mesa/es/Makefile b/src/mesa/es/Makefile index 5498b086aab..426799abf1b 100644 --- a/src/mesa/es/Makefile +++ b/src/mesa/es/Makefile @@ -6,18 +6,16 @@ MESA := .. include $(TOP)/configs/current include sources.mak -ES1_LIBS := libes1gallium.a libes1api.a -ES2_LIBS := libes2gallium.a libes2api.a +ES1_LIBS := libes1gallium.a +ES2_LIBS := libes2gallium.a # Default rule: create ES1 and ES2 libs -.PHONY: default es1 es2 -default: depend es1 es2 +.PHONY: default subdirs es1 es2 +default: depend subdirs es1 es2 es1: $(ES1_LIBS) - @rm -f subdirs-stamp-tmp es2: $(ES2_LIBS) - @rm -f subdirs-stamp-tmp ES1_CPPFLAGS := -DFEATURE_ES1=1 -D__GL_EXPORTS ES2_CPPFLAGS := -DFEATURE_ES2=1 -D__GL_EXPORTS @@ -28,11 +26,9 @@ ES2_OBJ_DIR := objs-es2 # adjust output dirs ES1_OBJECTS := $(addprefix $(ES1_OBJ_DIR)/, $(ES1_OBJECTS)) ES1_GALLIUM_OBJECTS := $(addprefix $(ES1_OBJ_DIR)/, $(ES1_GALLIUM_OBJECTS)) -ES1_API_OBJECTS := $(addprefix $(ES1_OBJ_DIR)/, $(ES1_API_OBJECTS)) ES2_OBJECTS := $(addprefix $(ES2_OBJ_DIR)/, $(ES2_OBJECTS)) ES2_GALLIUM_OBJECTS := $(addprefix $(ES2_OBJ_DIR)/, $(ES2_GALLIUM_OBJECTS)) -ES2_API_OBJECTS := $(addprefix $(ES2_OBJ_DIR)/, $(ES2_API_OBJECTS)) # compile either ES1 or ES2 sources define es-compile @@ -76,36 +72,22 @@ libes1gallium.a: $(ES1_GALLIUM_OBJECTS) $(GLSL_LIBS) libes2gallium.a: $(ES2_GALLIUM_OBJECTS) $(GLSL_LIBS) @$(MKLIB) -o es2gallium -static $(ES2_GALLIUM_OBJECTS) $(GLSL_LIBS) -libes1api.a: $(ES1_API_OBJECTS) - @$(MKLIB) -o es1api -static $(ES1_API_OBJECTS) - -libes2api.a: $(ES2_API_OBJECTS) - @$(MKLIB) -o es2api -static $(ES2_API_OBJECTS) - .PHONY: clean clean: -rm -f $(ES1_LIBS) $(ES2_LIBS) -rm -rf $(ES1_OBJ_DIR) $(ES2_OBJ_DIR) - -rm -f $(GENERATED_SOURCES) -rm -f depend depend.bak - -rm -f subdirs-stamp-tmp - @$(MAKE) -C glapi clean # nothing to install install: -subdirs-stamp-tmp: +subdirs: @$(MAKE) -C $(MESA) asm_subdirs @$(MAKE) -C $(MESA) glsl_builtin - @$(MAKE) -C glapi - @touch subdirs-stamp-tmp # sort to avoid duplicates ALL_SOURCES := $(sort $(ES1_ALL_SOURCES) $(ES2_ALL_SOURCES)) -# need to make sure the subdirs are processed first -$(ALL_SOURCES): | subdirs-stamp-tmp - depend: $(ALL_SOURCES) @echo "running $(MKDEP)" @touch depend diff --git a/src/mesa/es/sources.mak b/src/mesa/es/sources.mak index 9bb7a6ff38c..bc479e66ebd 100644 --- a/src/mesa/es/sources.mak +++ b/src/mesa/es/sources.mak @@ -1,14 +1,10 @@ include $(MESA)/sources.mak -# always use local version of GLAPI_ASM_SOURCES -LOCAL_ES1_API_ASM := $(addprefix glapi/glapi-es1/, $(GLAPI_ASM_SOURCES)) - LOCAL_ES1_INCLUDES := \ -I. \ - -I./glapi/glapi-es1 \ + -I$(TOP)/src/mapi/es1api \ -I$(MESA)/state_tracker -LOCAL_ES2_API_ASM := $(subst es1,es2, $(LOCAL_ES1_API_ASM)) LOCAL_ES2_INCLUDES := $(subst es1,es2, $(LOCAL_ES1_INCLUDES)) # MESA sources @@ -63,15 +59,11 @@ MESA_ES1_GALLIUM_SOURCES := \ x86/common_x86.c \ $(SLANG_SOURCES) -MESA_ES1_API_SOURCES := \ - $(GLAPI_SOURCES) - MESA_ES1_INCLUDES := $(INCLUDE_DIRS) # right now es2 and es1 share MESA sources MESA_ES2_SOURCES := $(MESA_ES1_SOURCES) MESA_ES2_GALLIUM_SOURCES := $(MESA_ES1_GALLIUM_SOURCES) -MESA_ES2_API_SOURCES := $(MESA_ES1_API_SOURCES) MESA_ES2_INCLUDES := $(MESA_ES1_INCLUDES) @@ -81,11 +73,9 @@ MESA_ES_ASM := $(MESA_ASM_SOURCES) # collect sources, adjust the pathes ES1_SOURCES := $(addprefix $(MESA)/,$(MESA_ES1_SOURCES)) ES1_GALLIUM_SOURCES := $(addprefix $(MESA)/,$(MESA_ES1_GALLIUM_SOURCES)) -ES1_API_SOURCES := $(addprefix $(MESA)/,$(MESA_ES1_API_SOURCES)) ES2_SOURCES := $(addprefix $(MESA)/,$(MESA_ES2_SOURCES)) ES2_GALLIUM_SOURCES := $(addprefix $(MESA)/,$(MESA_ES2_GALLIUM_SOURCES)) -ES2_API_SOURCES := $(addprefix $(MESA)/,$(MESA_ES2_API_SOURCES)) # collect includes ES1_INCLUDES := $(LOCAL_ES1_INCLUDES) $(MESA_ES1_INCLUDES) @@ -100,10 +90,6 @@ ES1_GALLIUM_OBJECTS := \ $(MESA_ES1_GALLIUM_SOURCES:.c=.o) \ $(MESA_ES_ASM:.S=.o) -ES1_API_OBJECTS := \ - $(LOCAL_ES1_API_ASM:.S=.o) \ - $(MESA_ES1_API_SOURCES:.c=.o) - ES2_OBJECTS := \ $(MESA_ES2_SOURCES:.c=.o) \ $(MESA_ES_ASM:.S=.o) @@ -112,13 +98,9 @@ ES2_GALLIUM_OBJECTS := \ $(MESA_ES2_GALLIUM_SOURCES:.c=.o) \ $(MESA_ES_ASM:.S=.o) -ES2_API_OBJECTS := \ - $(LOCAL_ES2_API_ASM:.S=.o) \ - $(MESA_ES2_API_SOURCES:.c=.o) - # collect sources for makedepend -ES1_ALL_SOURCES := $(ES1_SOURCES) $(ES1_GALLIUM_SOURCES) $(ES1_API_SOURCES) -ES2_ALL_SOURCES := $(ES2_SOURCES) $(ES2_GALLIUM_SOURCES) $(ES2_API_SOURCES) +ES1_ALL_SOURCES := $(ES1_SOURCES) $(ES1_GALLIUM_SOURCES) +ES2_ALL_SOURCES := $(ES2_SOURCES) $(ES2_GALLIUM_SOURCES) # sort to remove duplicates ES1_ALL_SOURCES := $(sort $(ES1_ALL_SOURCES)) diff --git a/src/mesa/main/es_generator.py b/src/mesa/main/es_generator.py index 12f03a5c229..a3e089ed58e 100644 --- a/src/mesa/main/es_generator.py +++ b/src/mesa/main/es_generator.py @@ -218,9 +218,9 @@ extern void _mesa_error(void *ctx, GLenum error, const char *fmtString, ... ); #ifdef IN_DRI_DRIVER #define _GLAPI_USE_REMAP_TABLE #endif -#include "es/glapi/glapi-%s/glapi/glapitable.h" -#include "es/glapi/glapi-%s/glapi/glapioffsets.h" -#include "es/glapi/glapi-%s/glapi/glapidispatch.h" +#include "%sapi/glapi/glapitable.h" +#include "%sapi/glapi/glapioffsets.h" +#include "%sapi/glapi/glapidispatch.h" #if FEATURE_remap_table @@ -230,7 +230,7 @@ int driDispatchRemapTable[driDispatchRemapTable_size]; #define need_MESA_remap_table -#include "es/glapi/glapi-%s/main/remap_helper.h" +#include "%sapi/main/remap_helper.h" void _mesa_init_remap_table_%s(void) diff --git a/src/mesa/sources.mak b/src/mesa/sources.mak index 9ac850ecf81..55523fad1d3 100644 --- a/src/mesa/sources.mak +++ b/src/mesa/sources.mak @@ -96,15 +96,6 @@ MAIN_SOURCES = \ main/vtxfmt.c \ $(MAIN_ES_SOURCES) -GLAPI_SOURCES = \ - glapi/glapi.c \ - glapi/glapi_dispatch.c \ - glapi/glapi_entrypoint.c \ - glapi/glapi_execmem.c \ - glapi/glapi_getproc.c \ - glapi/glapi_nop.c \ - glapi/glthread.c - MATH_SOURCES = \ math/m_debug_clip.c \ math/m_debug_norm.c \ @@ -307,23 +298,14 @@ X86_SOURCES = \ x86/sse_normal.S \ x86/read_rgba_span_x86.S -X86_API = \ - glapi/glapi_x86.S - X86-64_SOURCES = \ x86-64/xform4.S -X86-64_API = \ - glapi/glapi_x86-64.S - SPARC_SOURCES = \ sparc/clip.S \ sparc/norm.S \ sparc/xform.S -SPARC_API = \ - glapi/glapi_sparc.S - COMMON_DRIVER_SOURCES = \ drivers/common/driverfuncs.c \ drivers/common/meta.c @@ -357,7 +339,6 @@ MESA_GALLIUM_SOURCES = \ # All the core C sources, for dependency checking ALL_SOURCES = \ $(MESA_SOURCES) \ - $(GLAPI_SOURCES) \ $(MESA_ASM_SOURCES) \ $(STATETRACKER_SOURCES) @@ -372,10 +353,6 @@ MESA_GALLIUM_OBJECTS = \ $(MESA_GALLIUM_SOURCES:.c=.o) \ $(MESA_ASM_SOURCES:.S=.o) -GLAPI_OBJECTS = \ - $(GLAPI_SOURCES:.c=.o) \ - $(GLAPI_ASM_SOURCES:.S=.o) - COMMON_DRIVER_OBJECTS = $(COMMON_DRIVER_SOURCES:.c=.o) @@ -392,5 +369,6 @@ GLSL_LIBS = \ INCLUDE_DIRS = \ -I$(TOP)/include \ -I$(TOP)/src/mesa \ + -I$(TOP)/src/mapi \ -I$(TOP)/src/gallium/include \ -I$(TOP)/src/gallium/auxiliary diff --git a/src/mesa/x86-64/Makefile b/src/mesa/x86-64/Makefile index 9c3e9d2adf8..2fd3e5f04a9 100644 --- a/src/mesa/x86-64/Makefile +++ b/src/mesa/x86-64/Makefile @@ -12,7 +12,6 @@ INCLUDE_DIRS = \ -I.. \ -I../main \ -I../math \ - -I../glapi \ -I../tnl diff --git a/src/mesa/x86/Makefile b/src/mesa/x86/Makefile index 69122c114b0..9716dc27f97 100644 --- a/src/mesa/x86/Makefile +++ b/src/mesa/x86/Makefile @@ -7,10 +7,10 @@ include $(TOP)/configs/current INCLUDE_DIRS = \ -I$(TOP)/include/GL \ -I$(TOP)/include \ + -I$(TOP)/src/mapi \ -I.. \ -I../main \ -I../math \ - -I../glapi \ -I../tnl |