From 296adbd545b8efd38c9ed508166b2de2764a444b Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Mon, 26 Apr 2010 12:56:44 +0800 Subject: [PATCH] glapi: Move to src/mapi/. Move glapi to src/mapi/{glapi,es1api,es2api}. --- configs/darwin | 2 +- configs/default | 3 +- configs/linux-cell | 3 +- configs/linux-opengl-es | 3 +- configure.ac | 6 +- src/SConscript | 1 + src/egl/drivers/dri/Makefile | 2 +- src/egl/drivers/dri2/Makefile | 2 +- src/gallium/state_trackers/dri/drm/Makefile | 1 + src/gallium/state_trackers/dri/drm/SConscript | 1 + src/gallium/state_trackers/dri/sw/Makefile | 1 + src/gallium/state_trackers/dri/sw/SConscript | 1 + src/gallium/state_trackers/egl/Makefile | 1 + src/gallium/state_trackers/es/Makefile | 5 +- src/gallium/state_trackers/glx/xlib/Makefile | 1 + .../state_trackers/glx/xlib/SConscript | 1 + src/gallium/targets/Makefile.dri | 2 +- src/gallium/targets/SConscript.dri | 1 + src/gallium/targets/libgl-xlib/Makefile | 3 +- src/gallium/targets/libgl-xlib/SConscript | 1 + src/gallium/winsys/i965/xlib/Makefile | 2 +- src/gles/Makefile | 16 ++--- src/glx/Makefile | 7 +- src/mapi/es1api/Makefile | 60 +++++++++++++++++ src/mapi/es2api/Makefile | 3 + src/{mesa => mapi}/glapi/.gitignore | 0 src/mapi/glapi/Makefile | 38 +++++++++++ src/mapi/glapi/SConscript | 64 +++++++++++++++++++ .../es/glapi => mapi/glapi/gen-es}/Makefile | 17 +++-- .../glapi => mapi/glapi/gen-es}/base1_API.xml | 2 +- .../glapi => mapi/glapi/gen-es}/base2_API.xml | 2 +- .../glapi => mapi/glapi/gen-es}/es1_API.xml | 2 +- .../glapi/gen-es}/es1_COMPAT.xml | 2 +- .../glapi => mapi/glapi/gen-es}/es1_EXT.xml | 2 +- .../glapi => mapi/glapi/gen-es}/es2_API.xml | 2 +- .../glapi/gen-es}/es2_COMPAT.xml | 2 +- .../glapi => mapi/glapi/gen-es}/es2_EXT.xml | 2 +- .../glapi => mapi/glapi/gen-es}/es_COMPAT.xml | 4 +- .../es/glapi => mapi/glapi/gen-es}/es_EXT.xml | 4 +- .../glapi => mapi/glapi/gen-es}/gl_compare.py | 0 .../glapi/gen-es}/gl_parse_header.py | 0 .../glapi/gen/APPLE_object_purgeable.xml | 0 .../glapi/gen/APPLE_vertex_array_object.xml | 0 .../glapi/gen/ARB_copy_buffer.xml | 0 .../glapi/gen/ARB_depth_clamp.xml | 0 .../gen/ARB_draw_elements_base_vertex.xml | 0 .../glapi/gen/ARB_draw_instanced.xml | 0 .../glapi/gen/ARB_framebuffer_object.xml | 0 .../glapi/gen/ARB_map_buffer_range.xml | 0 .../glapi/gen/ARB_seamless_cube_map.xml | 0 src/{mesa => mapi}/glapi/gen/ARB_sync.xml | 0 .../glapi/gen/ARB_vertex_array_object.xml | 0 .../glapi/gen/EXT_draw_buffers2.xml | 0 .../glapi/gen/EXT_framebuffer_object.xml | 0 .../glapi/gen/EXT_packed_depth_stencil.xml | 0 .../glapi/gen/EXT_provoking_vertex.xml | 0 .../glapi/gen/EXT_texture_array.xml | 0 .../glapi/gen/EXT_transform_feedback.xml | 0 src/{mesa => mapi}/glapi/gen/GL3.xml | 0 src/{mesa => mapi}/glapi/gen/Makefile | 6 +- .../glapi/gen/NV_conditional_render.xml | 0 .../glapi/gen/OES_EGL_image.xml | 0 .../glapi/gen/extension_helper.py | 0 src/{mesa => mapi}/glapi/gen/glX_API.xml | 0 src/{mesa => mapi}/glapi/gen/glX_XML.py | 0 src/{mesa => mapi}/glapi/gen/glX_doc.py | 0 .../glapi/gen/glX_proto_common.py | 0 .../glapi/gen/glX_proto_recv.py | 0 .../glapi/gen/glX_proto_send.py | 0 .../glapi/gen/glX_proto_size.py | 0 .../glapi/gen/glX_server_table.py | 0 src/{mesa => mapi}/glapi/gen/gl_API.dtd | 0 src/{mesa => mapi}/glapi/gen/gl_API.xml | 0 src/{mesa => mapi}/glapi/gen/gl_SPARC_asm.py | 0 src/{mesa => mapi}/glapi/gen/gl_XML.py | 0 .../glapi/gen/gl_and_glX_API.xml | 0 src/{mesa => mapi}/glapi/gen/gl_apitemp.py | 0 src/{mesa => mapi}/glapi/gen/gl_enums.py | 0 src/{mesa => mapi}/glapi/gen/gl_offsets.py | 0 src/{mesa => mapi}/glapi/gen/gl_procs.py | 0 src/{mesa => mapi}/glapi/gen/gl_table.py | 0 src/{mesa => mapi}/glapi/gen/gl_x86-64_asm.py | 0 src/{mesa => mapi}/glapi/gen/gl_x86_asm.py | 0 src/{mesa => mapi}/glapi/gen/license.py | 0 src/{mesa => mapi}/glapi/gen/mesadef.py | 0 .../glapi/gen/next_available_offset.sh | 0 src/{mesa => mapi}/glapi/gen/remap_helper.py | 0 src/{mesa => mapi}/glapi/gen/typeexpr.py | 0 src/{mesa => mapi}/glapi/glapi.c | 0 src/{mesa => mapi}/glapi/glapi.h | 0 src/{mesa => mapi}/glapi/glapi_dispatch.c | 0 src/{mesa => mapi}/glapi/glapi_entrypoint.c | 0 src/{mesa => mapi}/glapi/glapi_execmem.c | 0 src/{mesa => mapi}/glapi/glapi_getproc.c | 0 src/{mesa => mapi}/glapi/glapi_nop.c | 0 src/{mesa => mapi}/glapi/glapi_priv.h | 0 src/{mesa => mapi}/glapi/glapi_sparc.S | 0 src/{mesa => mapi}/glapi/glapi_x86-64.S | 0 src/{mesa => mapi}/glapi/glapi_x86.S | 0 src/{mesa => mapi}/glapi/glapidispatch.h | 0 src/{mesa => mapi}/glapi/glapioffsets.h | 0 src/{mesa => mapi}/glapi/glapitable.h | 0 src/{mesa => mapi}/glapi/glapitemp.h | 0 src/{mesa => mapi}/glapi/glprocs.h | 0 src/{mesa => mapi}/glapi/glthread.c | 0 src/{mesa => mapi}/glapi/glthread.h | 0 src/mapi/glapi/sources.mak | 19 ++++++ src/mesa/Makefile | 19 ++---- src/mesa/SConscript | 29 +-------- src/mesa/drivers/dri/Makefile.template | 1 + src/mesa/drivers/fbdev/Makefile | 3 +- src/mesa/drivers/glslcompiler/Makefile | 3 +- src/mesa/drivers/osmesa/Makefile | 3 +- src/mesa/drivers/x11/Makefile | 3 +- src/mesa/es/Makefile | 28 ++------ src/mesa/es/sources.mak | 24 +------ src/mesa/main/es_generator.py | 8 +-- src/mesa/sources.mak | 24 +------ src/mesa/x86-64/Makefile | 1 - src/mesa/x86/Makefile | 2 +- 120 files changed, 282 insertions(+), 163 deletions(-) create mode 100644 src/mapi/es1api/Makefile create mode 100644 src/mapi/es2api/Makefile rename src/{mesa => mapi}/glapi/.gitignore (100%) create mode 100644 src/mapi/glapi/Makefile create mode 100644 src/mapi/glapi/SConscript rename src/{mesa/es/glapi => mapi/glapi/gen-es}/Makefile (88%) rename src/{mesa/es/glapi => mapi/glapi/gen-es}/base1_API.xml (99%) rename src/{mesa/es/glapi => mapi/glapi/gen-es}/base2_API.xml (99%) rename src/{mesa/es/glapi => mapi/glapi/gen-es}/es1_API.xml (99%) rename src/{mesa/es/glapi => mapi/glapi/gen-es}/es1_COMPAT.xml (98%) rename src/{mesa/es/glapi => mapi/glapi/gen-es}/es1_EXT.xml (99%) rename src/{mesa/es/glapi => mapi/glapi/gen-es}/es2_API.xml (99%) rename src/{mesa/es/glapi => mapi/glapi/gen-es}/es2_COMPAT.xml (99%) rename src/{mesa/es/glapi => mapi/glapi/gen-es}/es2_EXT.xml (99%) rename src/{mesa/es/glapi => mapi/glapi/gen-es}/es_COMPAT.xml (99%) rename src/{mesa/es/glapi => mapi/glapi/gen-es}/es_EXT.xml (96%) rename src/{mesa/es/glapi => mapi/glapi/gen-es}/gl_compare.py (100%) rename src/{mesa/es/glapi => mapi/glapi/gen-es}/gl_parse_header.py (100%) rename src/{mesa => mapi}/glapi/gen/APPLE_object_purgeable.xml (100%) rename src/{mesa => mapi}/glapi/gen/APPLE_vertex_array_object.xml (100%) rename src/{mesa => mapi}/glapi/gen/ARB_copy_buffer.xml (100%) rename src/{mesa => mapi}/glapi/gen/ARB_depth_clamp.xml (100%) rename src/{mesa => mapi}/glapi/gen/ARB_draw_elements_base_vertex.xml (100%) rename src/{mesa => mapi}/glapi/gen/ARB_draw_instanced.xml (100%) rename src/{mesa => mapi}/glapi/gen/ARB_framebuffer_object.xml (100%) rename src/{mesa => mapi}/glapi/gen/ARB_map_buffer_range.xml (100%) rename src/{mesa => mapi}/glapi/gen/ARB_seamless_cube_map.xml (100%) rename src/{mesa => mapi}/glapi/gen/ARB_sync.xml (100%) rename src/{mesa => mapi}/glapi/gen/ARB_vertex_array_object.xml (100%) rename src/{mesa => mapi}/glapi/gen/EXT_draw_buffers2.xml (100%) rename src/{mesa => mapi}/glapi/gen/EXT_framebuffer_object.xml (100%) rename src/{mesa => mapi}/glapi/gen/EXT_packed_depth_stencil.xml (100%) rename src/{mesa => mapi}/glapi/gen/EXT_provoking_vertex.xml (100%) rename src/{mesa => mapi}/glapi/gen/EXT_texture_array.xml (100%) rename src/{mesa => mapi}/glapi/gen/EXT_transform_feedback.xml (100%) rename src/{mesa => mapi}/glapi/gen/GL3.xml (100%) rename src/{mesa => mapi}/glapi/gen/Makefile (98%) rename src/{mesa => mapi}/glapi/gen/NV_conditional_render.xml (100%) rename src/{mesa => mapi}/glapi/gen/OES_EGL_image.xml (100%) rename src/{mesa => mapi}/glapi/gen/extension_helper.py (100%) rename src/{mesa => mapi}/glapi/gen/glX_API.xml (100%) rename src/{mesa => mapi}/glapi/gen/glX_XML.py (100%) rename src/{mesa => mapi}/glapi/gen/glX_doc.py (100%) rename src/{mesa => mapi}/glapi/gen/glX_proto_common.py (100%) rename src/{mesa => mapi}/glapi/gen/glX_proto_recv.py (100%) rename src/{mesa => mapi}/glapi/gen/glX_proto_send.py (100%) rename src/{mesa => mapi}/glapi/gen/glX_proto_size.py (100%) rename src/{mesa => mapi}/glapi/gen/glX_server_table.py (100%) rename src/{mesa => mapi}/glapi/gen/gl_API.dtd (100%) rename src/{mesa => mapi}/glapi/gen/gl_API.xml (100%) rename src/{mesa => mapi}/glapi/gen/gl_SPARC_asm.py (100%) rename src/{mesa => mapi}/glapi/gen/gl_XML.py (100%) rename src/{mesa => mapi}/glapi/gen/gl_and_glX_API.xml (100%) rename src/{mesa => mapi}/glapi/gen/gl_apitemp.py (100%) rename src/{mesa => mapi}/glapi/gen/gl_enums.py (100%) rename src/{mesa => mapi}/glapi/gen/gl_offsets.py (100%) rename src/{mesa => mapi}/glapi/gen/gl_procs.py (100%) rename src/{mesa => mapi}/glapi/gen/gl_table.py (100%) rename src/{mesa => mapi}/glapi/gen/gl_x86-64_asm.py (100%) rename src/{mesa => mapi}/glapi/gen/gl_x86_asm.py (100%) rename src/{mesa => mapi}/glapi/gen/license.py (100%) rename src/{mesa => mapi}/glapi/gen/mesadef.py (100%) rename src/{mesa => mapi}/glapi/gen/next_available_offset.sh (100%) rename src/{mesa => mapi}/glapi/gen/remap_helper.py (100%) rename src/{mesa => mapi}/glapi/gen/typeexpr.py (100%) rename src/{mesa => mapi}/glapi/glapi.c (100%) rename src/{mesa => mapi}/glapi/glapi.h (100%) rename src/{mesa => mapi}/glapi/glapi_dispatch.c (100%) rename src/{mesa => mapi}/glapi/glapi_entrypoint.c (100%) rename src/{mesa => mapi}/glapi/glapi_execmem.c (100%) rename src/{mesa => mapi}/glapi/glapi_getproc.c (100%) rename src/{mesa => mapi}/glapi/glapi_nop.c (100%) rename src/{mesa => mapi}/glapi/glapi_priv.h (100%) rename src/{mesa => mapi}/glapi/glapi_sparc.S (100%) rename src/{mesa => mapi}/glapi/glapi_x86-64.S (100%) rename src/{mesa => mapi}/glapi/glapi_x86.S (100%) rename src/{mesa => mapi}/glapi/glapidispatch.h (100%) rename src/{mesa => mapi}/glapi/glapioffsets.h (100%) rename src/{mesa => mapi}/glapi/glapitable.h (100%) rename src/{mesa => mapi}/glapi/glapitemp.h (100%) rename src/{mesa => mapi}/glapi/glprocs.h (100%) rename src/{mesa => mapi}/glapi/glthread.c (100%) rename src/{mesa => mapi}/glapi/glthread.h (100%) create mode 100644 src/mapi/glapi/sources.mak 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 similarity index 100% rename from src/mesa/glapi/.gitignore rename to 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 similarity index 88% rename from src/mesa/es/glapi/Makefile rename to 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 similarity index 99% rename from src/mesa/es/glapi/base1_API.xml rename to 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 @@ - + diff --git a/src/mesa/es/glapi/es1_API.xml b/src/mapi/glapi/gen-es/es1_API.xml similarity index 99% rename from src/mesa/es/glapi/es1_API.xml rename to 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 @@ - + diff --git a/src/mesa/es/glapi/es1_COMPAT.xml b/src/mapi/glapi/gen-es/es1_COMPAT.xml similarity index 98% rename from src/mesa/es/glapi/es1_COMPAT.xml rename to 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 @@ - + diff --git a/src/mesa/es/glapi/es1_EXT.xml b/src/mapi/glapi/gen-es/es1_EXT.xml similarity index 99% rename from src/mesa/es/glapi/es1_EXT.xml rename to 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 @@ - + diff --git a/src/mesa/es/glapi/es2_API.xml b/src/mapi/glapi/gen-es/es2_API.xml similarity index 99% rename from src/mesa/es/glapi/es2_API.xml rename to 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 @@ - + diff --git a/src/mesa/es/glapi/es2_COMPAT.xml b/src/mapi/glapi/gen-es/es2_COMPAT.xml similarity index 99% rename from src/mesa/es/glapi/es2_COMPAT.xml rename to 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 @@ - + diff --git a/src/mesa/es/glapi/es2_EXT.xml b/src/mapi/glapi/gen-es/es2_EXT.xml similarity index 99% rename from src/mesa/es/glapi/es2_EXT.xml rename to 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 @@ - + diff --git a/src/mesa/es/glapi/es_COMPAT.xml b/src/mapi/glapi/gen-es/es_COMPAT.xml similarity index 99% rename from src/mesa/es/glapi/es_COMPAT.xml rename to 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 @@ - + @@ -2641,6 +2641,6 @@ - + diff --git a/src/mesa/es/glapi/es_EXT.xml b/src/mapi/glapi/gen-es/es_EXT.xml similarity index 96% rename from src/mesa/es/glapi/es_EXT.xml rename to 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 @@ - + @@ -19,7 +19,7 @@ - + diff --git a/src/mesa/es/glapi/gl_compare.py b/src/mapi/glapi/gen-es/gl_compare.py similarity index 100% rename from src/mesa/es/glapi/gl_compare.py rename to 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 similarity index 100% rename from src/mesa/es/glapi/gl_parse_header.py rename to 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 similarity index 100% rename from src/mesa/glapi/gen/APPLE_object_purgeable.xml rename to 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 similarity index 100% rename from src/mesa/glapi/gen/APPLE_vertex_array_object.xml rename to 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 similarity index 100% rename from src/mesa/glapi/gen/ARB_copy_buffer.xml rename to 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 similarity index 100% rename from src/mesa/glapi/gen/ARB_depth_clamp.xml rename to 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 similarity index 100% rename from src/mesa/glapi/gen/ARB_draw_elements_base_vertex.xml rename to 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 similarity index 100% rename from src/mesa/glapi/gen/ARB_draw_instanced.xml rename to 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 similarity index 100% rename from src/mesa/glapi/gen/ARB_framebuffer_object.xml rename to 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 similarity index 100% rename from src/mesa/glapi/gen/ARB_map_buffer_range.xml rename to 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 similarity index 100% rename from src/mesa/glapi/gen/ARB_seamless_cube_map.xml rename to 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 similarity index 100% rename from src/mesa/glapi/gen/ARB_sync.xml rename to 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 similarity index 100% rename from src/mesa/glapi/gen/ARB_vertex_array_object.xml rename to 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 similarity index 100% rename from src/mesa/glapi/gen/EXT_draw_buffers2.xml rename to 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 similarity index 100% rename from src/mesa/glapi/gen/EXT_framebuffer_object.xml rename to 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 similarity index 100% rename from src/mesa/glapi/gen/EXT_packed_depth_stencil.xml rename to 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 similarity index 100% rename from src/mesa/glapi/gen/EXT_provoking_vertex.xml rename to 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 similarity index 100% rename from src/mesa/glapi/gen/EXT_texture_array.xml rename to 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 similarity index 100% rename from src/mesa/glapi/gen/EXT_transform_feedback.xml rename to src/mapi/glapi/gen/EXT_transform_feedback.xml diff --git a/src/mesa/glapi/gen/GL3.xml b/src/mapi/glapi/gen/GL3.xml similarity index 100% rename from src/mesa/glapi/gen/GL3.xml rename to src/mapi/glapi/gen/GL3.xml diff --git a/src/mesa/glapi/gen/Makefile b/src/mapi/glapi/gen/Makefile similarity index 98% rename from src/mesa/glapi/gen/Makefile rename to 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 similarity index 100% rename from src/mesa/glapi/gen/NV_conditional_render.xml rename to 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 similarity index 100% rename from src/mesa/glapi/gen/OES_EGL_image.xml rename to 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 similarity index 100% rename from src/mesa/glapi/gen/extension_helper.py rename to 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 similarity index 100% rename from src/mesa/glapi/gen/glX_API.xml rename to 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 similarity index 100% rename from src/mesa/glapi/gen/glX_XML.py rename to 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 similarity index 100% rename from src/mesa/glapi/gen/glX_doc.py rename to 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 similarity index 100% rename from src/mesa/glapi/gen/glX_proto_common.py rename to 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 similarity index 100% rename from src/mesa/glapi/gen/glX_proto_recv.py rename to 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 similarity index 100% rename from src/mesa/glapi/gen/glX_proto_send.py rename to 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 similarity index 100% rename from src/mesa/glapi/gen/glX_proto_size.py rename to 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 similarity index 100% rename from src/mesa/glapi/gen/glX_server_table.py rename to 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 similarity index 100% rename from src/mesa/glapi/gen/gl_API.dtd rename to 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 similarity index 100% rename from src/mesa/glapi/gen/gl_API.xml rename to 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 similarity index 100% rename from src/mesa/glapi/gen/gl_SPARC_asm.py rename to 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 similarity index 100% rename from src/mesa/glapi/gen/gl_XML.py rename to 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 similarity index 100% rename from src/mesa/glapi/gen/gl_and_glX_API.xml rename to 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 similarity index 100% rename from src/mesa/glapi/gen/gl_apitemp.py rename to 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 similarity index 100% rename from src/mesa/glapi/gen/gl_enums.py rename to 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 similarity index 100% rename from src/mesa/glapi/gen/gl_offsets.py rename to 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 similarity index 100% rename from src/mesa/glapi/gen/gl_procs.py rename to 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 similarity index 100% rename from src/mesa/glapi/gen/gl_table.py rename to 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 similarity index 100% rename from src/mesa/glapi/gen/gl_x86-64_asm.py rename to 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 similarity index 100% rename from src/mesa/glapi/gen/gl_x86_asm.py rename to src/mapi/glapi/gen/gl_x86_asm.py diff --git a/src/mesa/glapi/gen/license.py b/src/mapi/glapi/gen/license.py similarity index 100% rename from src/mesa/glapi/gen/license.py rename to src/mapi/glapi/gen/license.py diff --git a/src/mesa/glapi/gen/mesadef.py b/src/mapi/glapi/gen/mesadef.py similarity index 100% rename from src/mesa/glapi/gen/mesadef.py rename to 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 similarity index 100% rename from src/mesa/glapi/gen/next_available_offset.sh rename to 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 similarity index 100% rename from src/mesa/glapi/gen/remap_helper.py rename to src/mapi/glapi/gen/remap_helper.py diff --git a/src/mesa/glapi/gen/typeexpr.py b/src/mapi/glapi/gen/typeexpr.py similarity index 100% rename from src/mesa/glapi/gen/typeexpr.py rename to src/mapi/glapi/gen/typeexpr.py diff --git a/src/mesa/glapi/glapi.c b/src/mapi/glapi/glapi.c similarity index 100% rename from src/mesa/glapi/glapi.c rename to src/mapi/glapi/glapi.c diff --git a/src/mesa/glapi/glapi.h b/src/mapi/glapi/glapi.h similarity index 100% rename from src/mesa/glapi/glapi.h rename to src/mapi/glapi/glapi.h diff --git a/src/mesa/glapi/glapi_dispatch.c b/src/mapi/glapi/glapi_dispatch.c similarity index 100% rename from src/mesa/glapi/glapi_dispatch.c rename to src/mapi/glapi/glapi_dispatch.c diff --git a/src/mesa/glapi/glapi_entrypoint.c b/src/mapi/glapi/glapi_entrypoint.c similarity index 100% rename from src/mesa/glapi/glapi_entrypoint.c rename to src/mapi/glapi/glapi_entrypoint.c diff --git a/src/mesa/glapi/glapi_execmem.c b/src/mapi/glapi/glapi_execmem.c similarity index 100% rename from src/mesa/glapi/glapi_execmem.c rename to src/mapi/glapi/glapi_execmem.c diff --git a/src/mesa/glapi/glapi_getproc.c b/src/mapi/glapi/glapi_getproc.c similarity index 100% rename from src/mesa/glapi/glapi_getproc.c rename to src/mapi/glapi/glapi_getproc.c diff --git a/src/mesa/glapi/glapi_nop.c b/src/mapi/glapi/glapi_nop.c similarity index 100% rename from src/mesa/glapi/glapi_nop.c rename to src/mapi/glapi/glapi_nop.c diff --git a/src/mesa/glapi/glapi_priv.h b/src/mapi/glapi/glapi_priv.h similarity index 100% rename from src/mesa/glapi/glapi_priv.h rename to src/mapi/glapi/glapi_priv.h diff --git a/src/mesa/glapi/glapi_sparc.S b/src/mapi/glapi/glapi_sparc.S similarity index 100% rename from src/mesa/glapi/glapi_sparc.S rename to src/mapi/glapi/glapi_sparc.S diff --git a/src/mesa/glapi/glapi_x86-64.S b/src/mapi/glapi/glapi_x86-64.S similarity index 100% rename from src/mesa/glapi/glapi_x86-64.S rename to src/mapi/glapi/glapi_x86-64.S diff --git a/src/mesa/glapi/glapi_x86.S b/src/mapi/glapi/glapi_x86.S similarity index 100% rename from src/mesa/glapi/glapi_x86.S rename to src/mapi/glapi/glapi_x86.S diff --git a/src/mesa/glapi/glapidispatch.h b/src/mapi/glapi/glapidispatch.h similarity index 100% rename from src/mesa/glapi/glapidispatch.h rename to src/mapi/glapi/glapidispatch.h diff --git a/src/mesa/glapi/glapioffsets.h b/src/mapi/glapi/glapioffsets.h similarity index 100% rename from src/mesa/glapi/glapioffsets.h rename to src/mapi/glapi/glapioffsets.h diff --git a/src/mesa/glapi/glapitable.h b/src/mapi/glapi/glapitable.h similarity index 100% rename from src/mesa/glapi/glapitable.h rename to src/mapi/glapi/glapitable.h diff --git a/src/mesa/glapi/glapitemp.h b/src/mapi/glapi/glapitemp.h similarity index 100% rename from src/mesa/glapi/glapitemp.h rename to src/mapi/glapi/glapitemp.h diff --git a/src/mesa/glapi/glprocs.h b/src/mapi/glapi/glprocs.h similarity index 100% rename from src/mesa/glapi/glprocs.h rename to src/mapi/glapi/glprocs.h diff --git a/src/mesa/glapi/glthread.c b/src/mapi/glapi/glthread.c similarity index 100% rename from src/mesa/glapi/glthread.c rename to src/mapi/glapi/glthread.c diff --git a/src/mesa/glapi/glthread.h b/src/mapi/glapi/glthread.h similarity index 100% rename from src/mesa/glapi/glthread.h rename to 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 -- 2.30.2