diff options
author | Brian Paul <[email protected]> | 2013-04-17 09:49:39 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2013-04-17 17:33:40 -0600 |
commit | 815ca0bf38de89cff533a413066a7e23a0aa5fb0 (patch) | |
tree | 46589e04f080897905809da8d014ca5e94a82eeb /src/mesa/main | |
parent | 9835d9059683e285dc925801c4c98ea9bfc2ffb8 (diff) |
mesa: generate glGetInteger/Boolean/Float/Doublev() code for all APIs
No longer pass -a flag to the get_hash_generate.py script to specify
OpenGL, ES1, ES2, etc. This updates the autoconf, scons and android
build files too (so we can bisect).
This is the last of the API-dependent conditional compilation in
core Mesa.
Reviewed-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/get_hash_generator.py | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/src/mesa/main/get_hash_generator.py b/src/mesa/main/get_hash_generator.py index 04bf9ffe6cf..96bc4958797 100644 --- a/src/mesa/main/get_hash_generator.py +++ b/src/mesa/main/get_hash_generator.py @@ -179,54 +179,34 @@ def generate_hash_tables(enum_list, enabled_apis, param_descriptors): return params, merge_tables(sorted_tables) -def opt_to_apis(feature): - _map = {"ES1": "GLES", "ES2": "GLES2", "GL": "GL"} - if feature not in _map: - return None - - apis = set([_map[feature]]) - if "GL" in apis: - apis.add("GL_CORE") - if "GLES2" in apis: - apis.add("GLES3") - - return apis def show_usage(): sys.stderr.write( """Usage: %s [OPTIONS] -f <file> specify GL API XML file - -a [GL|ES1|ES2] specify APIs to generate hash tables for """ % (program)) exit(1) if __name__ == '__main__': try: - (opts, args) = getopt.getopt(sys.argv[1:], "f:a:") + (opts, args) = getopt.getopt(sys.argv[1:], "f:") except Exception,e: show_usage() if len(args) != 0: show_usage() - enabled_apis = set([]) api_desc_file = "" for opt_name, opt_val in opts: if opt_name == "-f": api_desc_file = opt_val - if opt_name == "-a": - apis = opt_to_apis(opt_val.upper()) - if not apis: - die("invalid API %s\n" % opt_val) - - enabled_apis |= apis if not api_desc_file: die("missing descriptor file (-f)\n") - if len(enabled_apis) == 0: - die("need at least a single enabled API\n") + # generate the code for all APIs + enabled_apis = set(["GLES", "GLES2", "GLES3", "GL", "GL_CORE"]) try: api_desc = gl_XML.parse_GL_API(api_desc_file) |