From 656845301d67d1726260a8b227f3e65ce3fcd0b1 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Thu, 15 Nov 2018 14:49:08 +0000 Subject: [PATCH] autotools: wire the new generator for es1 and es2 The output produced functionally identical, with the following changes: - A cosmetic: swapped ABI compatible types [ GLclampf -> GLfloat, etc ] - B cosmetic: renamed parameters [ zNear -> n, etc ] - C dropped extension entrypoints - invalid/incorrect To make things easier to validate, normalise both old/new headers run the sed patterns A, B and C to both sets. A s/\/GLfloat/g; s/\/GLfixed/g; s/\/void/g; B s/\ \* / */g; s/\/target/g; s/\/p/g; s/\/d/g; s/\/modeA/g; s/\/program/g; s/\/shaders/g; s/\/eqn/g; s/\/data/g; s/\/data/g; s/\/buffer/g; s/\/mode/g; s/\/n/g; s/\/n/g; s/\/f/g; s/\/dpfail/g; s/\/dppass/g; s/\/index/g; s/\/target/g; s/\/target/g; s/\/index/g; s/\/sfactorRGB/g; s/\/dfactorRGB/g; s/\/sfactorAlpha/g; s/\/dfactorAlpha/g; s/\/mode/g; s/\/instancecount/g; s/\/t/g; s/\/b/g; s/\/l/g; s/\/r/g; s/\/v0/g; s/\/v1/g; s/\/v2/g; s/\/v3/g; s/\/mode/g; s/\/dst/g; s/\/bindingindex/g; s/\/internalformat/g; s/\/bufsize/g; C glMultiDrawArraysEXT glMultiDrawElementsEXT glBindFragDataLocationEXT glGetTexParameterIivEXT glGetTexParameterIuivEXT glTexParameterIivEXT glTexParameterIuivEXT v2: - gl_dispatch_stub declarations are addressed with previous patch - the public_entries table is no longer generated Signed-off-by: Emil Velikov Reviewed-by: Erik Faye-Lund --- src/mapi/Makefile.am | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/src/mapi/Makefile.am b/src/mapi/Makefile.am index 5a619bf..daaf46d 100644 --- a/src/mapi/Makefile.am +++ b/src/mapi/Makefile.am @@ -63,11 +63,20 @@ include Makefile.sources MKDIR_GEN = $(AM_V_at)$(MKDIR_P) $(@D) PYTHON_GEN = $(AM_V_GEN)$(PYTHON) $(PYTHON_FLAGS) -glapi_gen_mapi_deps := \ +shared_glapi_gen_mapi_deps := \ mapi_abi.py \ $(wildcard $(top_srcdir)/src/mapi/glapi/gen/*.xml) \ $(wildcard $(top_srcdir)/src/mapi/glapi/gen/*.py) +glapi_gen_gl_xml := \ + $(srcdir)/glapi/registry/gl.xml +glapi_gen_mapi_script = $(srcdir)/new/gen_gldispatch_mapi.py +glapi_gen_mapi_deps = \ + $(glapi_gen_mapi_script) \ + $(srcdir)/new/genCommon.py \ + $(glapi_gen_gl_xml) +glapi_gen_mapi = $(AM_V_GEN)$(PYTHON) $(PYTHON_FLAGS) $(glapi_gen_mapi_script) + if HAVE_SHARED_GLAPI BUILT_SOURCES += shared-glapi/glapi_mapi_tmp.h @@ -101,7 +110,7 @@ shared_glapi_test_LDADD = \ $(top_builddir)/src/gtest/libgtest.la endif -shared-glapi/glapi_mapi_tmp.h : glapi/gen/gl_and_es_API.xml $(glapi_gen_mapi_deps) +shared-glapi/glapi_mapi_tmp.h : glapi/gen/gl_and_es_API.xml $(shared_glapi_gen_mapi_deps) $(MKDIR_GEN) $(PYTHON_GEN) $(srcdir)/mapi_abi.py --printer shared-glapi \ $(srcdir)/glapi/gen/gl_and_es_API.xml > $@ @@ -200,10 +209,9 @@ es1api_libGLESv1_CM_la_LDFLAGS = \ es1api_libGLESv1_CM_la_LIBADD += shared-glapi/libglapi.la endif -es1api/glapi_mapi_tmp.h: glapi/gen/gl_and_es_API.xml $(glapi_gen_mapi_deps) +es1api/glapi_mapi_tmp.h: $(glapi_gen_mapi_deps) $(MKDIR_GEN) - $(PYTHON_GEN) $(srcdir)/mapi_abi.py --printer es1api \ - $(srcdir)/glapi/gen/gl_and_es_API.xml > $@ + $(glapi_gen_mapi) glesv1 $(glapi_gen_gl_xml) > $@ if HAVE_OPENGL_ES2 TESTS += es2api/ABI-check @@ -245,10 +253,9 @@ es2api_libGLESv2_la_LDFLAGS = \ es2api_libGLESv2_la_LIBADD += shared-glapi/libglapi.la endif -es2api/glapi_mapi_tmp.h: glapi/gen/gl_and_es_API.xml $(glapi_gen_mapi_deps) +es2api/glapi_mapi_tmp.h: $(glapi_gen_mapi_deps) $(MKDIR_GEN) - $(PYTHON_GEN) $(srcdir)/mapi_abi.py --printer es2api \ - $(srcdir)/glapi/gen/gl_and_es_API.xml > $@ + $(glapi_gen_mapi) glesv2 $(glapi_gen_gl_xml) > $@ include $(top_srcdir)/install-lib-links.mk -- 2.7.4