X-Git-Url: https://git.libre-soc.org/?p=mesa.git;a=blobdiff_plain;f=src%2Fegl%2Fgenerate%2Fgen_egl_dispatch.py;h=2063e9d09930f3c2e17a1b0aaf59b66d4e3364ef;hp=eeb3f3f9a5a2051b958598c1c699455075b424df;hb=HEAD;hpb=ce562f9e3fab769d64b0e5453ec2b4f8710a31ce diff --git a/src/egl/generate/gen_egl_dispatch.py b/src/egl/generate/gen_egl_dispatch.py index eeb3f3f9a5a..2063e9d0993 100644 --- a/src/egl/generate/gen_egl_dispatch.py +++ b/src/egl/generate/gen_egl_dispatch.py @@ -34,25 +34,23 @@ additional information defined in the module eglFunctionList. import argparse import collections -import imp +import eglFunctionList import sys import textwrap +import os +NEWAPI = os.path.join(os.path.dirname(__file__), "..", "..", "mapi", "new") +sys.path.insert(0, NEWAPI) import genCommon def main(): parser = argparse.ArgumentParser() parser.add_argument("target", choices=("header", "source"), help="Whether to build the source or header file.") - parser.add_argument("func_list_file", help="The function list .py file.") parser.add_argument("xml_files", nargs="+", help="The XML files with the EGL function lists.") args = parser.parse_args() - # The function list is a Python module, but it's specified on the command - # line. - eglFunctionList = imp.load_source("eglFunctionList", args.func_list_file) - xmlFunctions = genCommon.getFunctions(args.xml_files) xmlByName = dict((f.name, f) for f in xmlFunctions) functions = [] @@ -102,6 +100,8 @@ def generateHeader(functions): #include #include + #include + #include #include "glvnd/libeglabi.h" """.lstrip("\n")) @@ -133,6 +133,7 @@ def generateSource(functions): text = "" text += '#include "egldispatchstubs.h"\n' text += '#include "g_egldispatchstubs.h"\n' + text += '#include \n' text += "\n" for (func, eglFunc) in functions: