summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2011-08-11 16:41:09 +0800
committerChia-I Wu <[email protected]>2011-08-13 15:14:00 +0800
commit6eff33dc7f2cd6e1430bd8dcaef4a7eb9fe3f6ee (patch)
treee5050a4cb46e75b364b72cbe9af655c15831b80b /src/mesa
parent786e5a2fb47e39c67a342eb22d84c665d058ee10 (diff)
glapi: generate ES dispatch headers from core mesa
GLESv1 and GLESv2 have their own dispatch.h and remap_helper.h. These headers are only used by api_exec_es1.c and api_exec_es2.c in core mesa. Move the rules to generate them from glapi to core mesa. Reviewed-by: Brian Paul <[email protected]> [olv: updated after reviewing to fix SCons build]
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/Makefile20
-rw-r--r--src/mesa/SConscript8
-rw-r--r--src/mesa/main/es_generator.py4
3 files changed, 26 insertions, 6 deletions
diff --git a/src/mesa/Makefile b/src/mesa/Makefile
index 88f31b68695..0e15d61bd8d 100644
--- a/src/mesa/Makefile
+++ b/src/mesa/Makefile
@@ -67,6 +67,26 @@ $(DRICORE_OBJ_DIR)/%.o: %.S
# then convenience libs (.a) and finally the device drivers:
default: $(DEPENDS) asm_subdirs $(MESA_LIBS) $(DRICORE_LIBS) driver_subdirs
+# include glapi_gen.mk for generating glapi headers for GLES
+GLAPI := $(TOP)/src/mapi/glapi/gen
+include $(GLAPI)/glapi_gen.mk
+
+main/api_exec_es1_dispatch.h: $(GLAPI)/gl_and_es_API.xml $(glapi_gen_dispatch_deps)
+ $(call glapi_gen_dispatch,$<,es1)
+
+main/api_exec_es1_remap_helper.h: $(GLAPI)/gl_and_es_API.xml $(glapi_gen_remap_deps)
+ $(call glapi_gen_remap,$<,es1)
+
+main/api_exec_es1.o: main/api_exec_es1_dispatch.h main/api_exec_es1_remap_helper.h
+
+main/api_exec_es2_dispatch.h: $(GLAPI)/gl_and_es_API.xml $(glapi_gen_dispatch_deps)
+ $(call glapi_gen_dispatch,$<,es2)
+
+main/api_exec_es2_remap_helper.h: $(GLAPI)/gl_and_es_API.xml $(glapi_gen_remap_deps)
+ $(call glapi_gen_remap,$<,es2)
+
+main/api_exec_es2.o: main/api_exec_es2_dispatch.h main/api_exec_es2_remap_helper.h
+
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 > $@
diff --git a/src/mesa/SConscript b/src/mesa/SConscript
index ac85a3eeb05..05aa0e8010e 100644
--- a/src/mesa/SConscript
+++ b/src/mesa/SConscript
@@ -347,25 +347,25 @@ if env['gles']:
GLAPI = '#src/mapi/glapi/'
gles_headers = []
gles_headers += env.CodeGenerate(
- target = 'es1api/main/dispatch.h',
+ target = 'main/api_exec_es1_dispatch.h',
script = GLAPI + 'gen/gl_table.py',
source = GLAPI + 'gen/gl_and_es_API.xml',
command = python_cmd + ' $SCRIPT -c es1 -m remap_table -f $SOURCE > $TARGET',
)
gles_headers += env.CodeGenerate(
- target = 'es1api/main/remap_helper.h',
+ target = 'main/api_exec_es1_remap_helper.h',
script = GLAPI + 'gen/remap_helper.py',
source = GLAPI + 'gen/gl_and_es_API.xml',
command = python_cmd + ' $SCRIPT -c es1 -f $SOURCE > $TARGET',
)
gles_headers += env.CodeGenerate(
- target = 'es2api/main/dispatch.h',
+ target = 'main/api_exec_es2_dispatch.h',
script = GLAPI + 'gen/gl_table.py',
source = GLAPI + 'gen/gl_and_es_API.xml',
command = python_cmd + ' $SCRIPT -c es2 -m remap_table -f $SOURCE > $TARGET',
)
gles_headers += env.CodeGenerate(
- target = 'es2api/main/remap_helper.h',
+ target = 'main/api_exec_es2_remap_helper.h',
script = GLAPI + 'gen/remap_helper.py',
source = GLAPI + 'gen/gl_and_es_API.xml',
command = python_cmd + ' $SCRIPT -c es2 -f $SOURCE > $TARGET',
diff --git a/src/mesa/main/es_generator.py b/src/mesa/main/es_generator.py
index c0b0a445806..cad3deaef94 100644
--- a/src/mesa/main/es_generator.py
+++ b/src/mesa/main/es_generator.py
@@ -681,10 +681,10 @@ print """
#if FEATURE_remap_table
/* define esLocalRemapTable */
-#include "%sapi/main/dispatch.h"
+#include "main/api_exec_%s_dispatch.h"
#define need_MESA_remap_table
-#include "%sapi/main/remap_helper.h"
+#include "main/api_exec_%s_remap_helper.h"
static void
init_remap_table(void)