[Mesa-dev] [PATCH 9/9] dispatch: stop generating separate GLES1 API code.

Paul Berry stereotype441 at gmail.com
Tue Oct 30 10:43:02 PDT 2012


This patch removes the generated files api_exec_es1.c,
api_exec_es1_dispatch.h, and api_exec_es1_remap_helper.h (and the
source files and build rules used to generate them), since they are no
longer used.  GLES1 now uses the same dispatch table layout as all the
other APIs.
---
 src/mesa/Android.gen.mk       |   33 +-
 src/mesa/Makefile.am          |   15 -
 src/mesa/SConscript           |   18 -
 src/mesa/main/.gitignore      |    3 -
 src/mesa/main/APIspec.py      |  617 -----------
 src/mesa/main/APIspec.xml     | 2383 -----------------------------------------
 src/mesa/main/APIspecutil.py  |  272 -----
 src/mesa/main/api_exec.h      |    6 -
 src/mesa/main/es_generator.py |  765 -------------
 src/mesa/sources.mak          |    1 -
 10 files changed, 4 insertions(+), 4109 deletions(-)
 delete mode 100644 src/mesa/main/APIspec.py
 delete mode 100644 src/mesa/main/APIspec.xml
 delete mode 100644 src/mesa/main/APIspecutil.py
 delete mode 100644 src/mesa/main/es_generator.py

diff --git a/src/mesa/Android.gen.mk b/src/mesa/Android.gen.mk
index 893fa41..ffa36db 100644
--- a/src/mesa/Android.gen.mk
+++ b/src/mesa/Android.gen.mk
@@ -32,9 +32,6 @@ intermediates := $(call local-intermediates-dir)
 # This is the list of auto-generated files: sources and headers
 sources := \
 	main/enums.c \
-	main/api_exec_es1.c \
-	main/api_exec_es1_dispatch.h \
-	main/api_exec_es1_remap_helper.h \
 	program/program_parse.tab.c \
 	program/lex.yy.c \
 	main/dispatch.h \
@@ -60,13 +57,7 @@ LOCAL_GENERATED_SOURCES += $(sources)
 
 glapi := $(MESA_TOP)/src/mapi/glapi/gen
 
-es_src_deps := \
-	$(LOCAL_PATH)/main/APIspec.xml \
-	$(LOCAL_PATH)/main/es_generator.py \
-	$(LOCAL_PATH)/main/APIspecutil.py \
-	$(LOCAL_PATH)/main/APIspec.py
-
-es_hdr_deps := \
+dispatch_deps := \
 	$(wildcard $(glapi)/*.py) \
 	$(wildcard $(glapi)/*.xml)
 
@@ -88,22 +79,6 @@ define es-gen
 	$(hide) $(PRIVATE_SCRIPT) $(1) $(PRIVATE_XML) > $@
 endef
 
-$(intermediates)/main/api_exec_%.c: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(LOCAL_PATH)/main/es_generator.py
-$(intermediates)/main/api_exec_%.c: PRIVATE_XML := -S $(LOCAL_PATH)/main/APIspec.xml
-$(intermediates)/main/api_exec_%_dispatch.h: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(glapi)/gl_table.py
-$(intermediates)/main/api_exec_%_dispatch.h: PRIVATE_XML := -f $(glapi)/gl_and_es_API.xml
-$(intermediates)/main/api_exec_%_remap_helper.h: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(glapi)/remap_helper.py
-$(intermediates)/main/api_exec_%_remap_helper.h: PRIVATE_XML := -f $(glapi)/gl_and_es_API.xml
-
-$(intermediates)/main/api_exec_es1.c: $(es_src_deps)
-	$(call es-gen, -V GLES1.1)
-
-$(intermediates)/main/api_exec_%_dispatch.h: $(es_hdr_deps)
-	$(call es-gen, -c $* -m remap_table)
-
-$(intermediates)/main/api_exec_%_remap_helper.h: $(es_hdr_deps)
-	$(call es-gen, -c $*)
-
 $(intermediates)/program/program_parse.tab.c: $(LOCAL_PATH)/program/program_parse.y
 	$(mesa_local-y-to-c-and-h)
 
@@ -133,19 +108,19 @@ $(intermediates)/x86/matypes.h: $(matypes_deps)
 $(intermediates)/main/dispatch.h: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(glapi)/gl_table.py
 $(intermediates)/main/dispatch.h: PRIVATE_XML := -f $(glapi)/gl_and_es_API.xml
 
-$(intermediates)/main/dispatch.h: $(es_hdr_deps)
+$(intermediates)/main/dispatch.h: $(dispatch_deps)
 	$(call es-gen, $* -m remap_table)
 
 $(intermediates)/main/remap_helper.h: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(glapi)/remap_helper.py
 $(intermediates)/main/remap_helper.h: PRIVATE_XML := -f $(glapi)/gl_and_es_API.xml
 
-$(intermediates)/main/remap_helper.h: $(es_hdr_deps)
+$(intermediates)/main/remap_helper.h: $(dispatch_deps)
 	$(call es-gen, $*)
 
 $(intermediates)/main/enums.c: PRIVATE_SCRIPT :=$(MESA_PYTHON2) $(glapi)/gl_enums.py
 $(intermediates)/main/enums.c: PRIVATE_XML := -f $(glapi)/gl_and_es_API.xml
 
-$(intermediates)/main/enums.c: $(es_src_deps)
+$(intermediates)/main/enums.c: $(dispatch_deps)
 	$(call es-gen)
 
 GET_HASH_GEN := $(LOCAL_PATH)/main/get_hash_generator.py
diff --git a/src/mesa/Makefile.am b/src/mesa/Makefile.am
index 1dc3132..1f89725 100644
--- a/src/mesa/Makefile.am
+++ b/src/mesa/Makefile.am
@@ -53,9 +53,6 @@ include $(GLAPI)/glapi_gen.mk
 
 BUILT_SOURCES = \
 	main/git_sha1.h \
-	main/api_exec_es1_dispatch.h \
-	main/api_exec_es1_remap_helper.h \
-	main/api_exec_es1.c \
 	main/get_hash.h \
 	program/program_parse.tab.c \
 	program/program_parse.tab.h \
@@ -64,18 +61,6 @@ CLEANFILES = \
 	$(BUILT_SOURCES) \
 	git_sha1.h.tmp
 
-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_es1.c: main/APIspec.xml main/es_generator.py main/APIspecutil.py main/APIspec.py
-	$(AM_V_GEN) $(PYTHON2) $(PYTHON_FLAGS) $(srcdir)/main/es_generator.py \
-	  -S $(srcdir)/main/APIspec.xml -V GLES1.1 > $@
-
 program/program_parse.tab.c program/program_parse.tab.h: program/program_parse.y
 	$(MKDIR_P) program
 	$(AM_V_GEN) $(YACC) -p "_mesa_program_" -v -d --output=program/program_parse.tab.c $<
diff --git a/src/mesa/SConscript b/src/mesa/SConscript
index 12bb70a..53e5ee8 100644
--- a/src/mesa/SConscript
+++ b/src/mesa/SConscript
@@ -339,27 +339,9 @@ if env['gles']:
 
     # generate GLES sources
     gles_sources = ['main/es1_conversion.c',]
-    gles_sources += env.CodeGenerate(
-        target = 'main/api_exec_es1.c',
-        script = 'main/es_generator.py',
-        source = 'main/APIspec.xml',
-        command = python_cmd + ' $SCRIPT -S $SOURCE -V GLES1.1 > $TARGET'
-    )
 
     # generate GLES headers
     gles_headers = []
-    gles_headers += env.CodeGenerate(
-        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 = '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',
-    )
 
     env.Depends(gles_sources, gles_headers)
 
diff --git a/src/mesa/main/.gitignore b/src/mesa/main/.gitignore
index 29ebf8d..4115a9b 100644
--- a/src/mesa/main/.gitignore
+++ b/src/mesa/main/.gitignore
@@ -1,12 +1,9 @@
-api_exec_es1.c
 dispatch.h
 enums.c
 get_es1.c
 get_es2.c
 git_sha1.h
 git_sha1.h.tmp
-api_exec_es1_dispatch.h
-api_exec_es1_remap_helper.h
 remap_helper.h
 get_hash.h
 get_hash.h.tmp
diff --git a/src/mesa/main/APIspec.py b/src/mesa/main/APIspec.py
deleted file mode 100644
index 6947f73..0000000
diff --git a/src/mesa/main/APIspec.xml b/src/mesa/main/APIspec.xml
deleted file mode 100644
index c396952..0000000
diff --git a/src/mesa/main/APIspecutil.py b/src/mesa/main/APIspecutil.py
deleted file mode 100644
index 3c15528..0000000
diff --git a/src/mesa/main/api_exec.h b/src/mesa/main/api_exec.h
index 100e972..7d37ff7 100644
--- a/src/mesa/main/api_exec.h
+++ b/src/mesa/main/api_exec.h
@@ -36,11 +36,5 @@ _mesa_alloc_dispatch_table(int size);
 extern struct _glapi_table *
 _mesa_create_exec_table(struct gl_context *ctx);
 
-extern struct _glapi_table *
-_mesa_create_exec_table_es1(void);
-
-extern struct _glapi_table *
-_mesa_create_exec_table_es2(void);
-
 
 #endif
diff --git a/src/mesa/main/es_generator.py b/src/mesa/main/es_generator.py
deleted file mode 100644
index b074e9d..0000000
diff --git a/src/mesa/sources.mak b/src/mesa/sources.mak
index b14ec13..b4b58db 100644
--- a/src/mesa/sources.mak
+++ b/src/mesa/sources.mak
@@ -5,7 +5,6 @@
 
 # this is part of MAIN_FILES
 MAIN_ES_FILES = \
-	$(BUILDDIR)main/api_exec_es1.c \
 	$(SRCDIR)main/es1_conversion.c
 
 MAIN_FILES = \
-- 
1.7.12.4



More information about the mesa-dev mailing list