Currently we have two XML sources in mesa, the khronos xml, and the mesa xml. The mesa xml is incredibly inaccurate (look at the number of commits to fix it), has to be hand rolled for each extension, and has to be tracked individually by build systems. The mesa xml is also problematic because it conflates the khronos standard with mesa implementation information.
This series is the start of pulling the two apart and using the upstream khronos xml and a separate mesa specific information, defined in a python file for easy of access. This is not complete as of now, it's in RFC/just so you know what I'm working on sort of form. The goal is to replace all of the current generators with new generators based off the khronos XML and mako. There are two things I'm using here that will likely not be in the final version, six and the attr module. They're just making initial bring up very easy. Dylan Baker (13): glapi/gen: gl_marshal_h.py: Use argparse instead of getopt glapi/gen: use main function in gl_marshal_h.py glapi/gen: Add some helpers that will be used generators gl.xml: update to git commit 58fcee1918e90cb817693c6df8c1f8d3e4f3e48e gen_mesa_data: script to convert mesa xml into mesa_data entries glapi/gen: Add a new mesa_data module mapi/glapi/gen: Add python module with abstractions from Khronos XML mapi/glapi/gen: Use new infastructure for gl_marshal_h.py begin generalizing gl_marshal_h.py for doing both. wip fixup! begin generalizing gl_marshal_h.py for doing both. fixup! wip wip: use new generator for marshal.c src/mapi/glapi/gen/Makefile.am | 15 +- src/mapi/glapi/gen/gen_mesa_data.py | 62 + src/mapi/glapi/gen/gl_marshal_h.py | 258 +- .../meson.build => mapi/glapi/gen/helpers.py} | 37 +- src/mapi/glapi/gen/khr_xml.py | 255 + src/mapi/glapi/gen/mesa_data.py | 2428 +++++++++ src/mapi/glapi/gen/meson.build | 20 +- src/mapi/glapi/gen/templates/copyright.mako | 25 + src/mapi/glapi/gen/templates/helpers.mako | 29 + src/mapi/glapi/meson.build | 2 + src/mapi/glapi/registry/gl.xml | 4332 ++++++++++++----- src/mesa/main/meson.build | 10 +- 12 files changed, 6244 insertions(+), 1229 deletions(-) create mode 100755 src/mapi/glapi/gen/gen_mesa_data.py copy src/{mesa/main/meson.build => mapi/glapi/gen/helpers.py} (52%) create mode 100644 src/mapi/glapi/gen/khr_xml.py create mode 100644 src/mapi/glapi/gen/mesa_data.py create mode 100644 src/mapi/glapi/gen/templates/copyright.mako create mode 100644 src/mapi/glapi/gen/templates/helpers.mako -- 2.19.2 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev