diff options
author | Imre Deak <[email protected]> | 2012-09-10 08:46:13 +0300 |
---|---|---|
committer | Oliver McFadden <[email protected]> | 2012-10-10 12:43:19 +0300 |
commit | 98f880e0c47229ae6b6063527276096259d60b5a (patch) | |
tree | a2503138203f90bb53c2f1a74d1538c2ed18022c /src/mesa/SConscript | |
parent | 6678125eaee1bbf231d997971cde30f22ba4e013 (diff) |
mesa: glGet: add script to generate hash tables in build time
This will be needed by the next patch, which will switch to using
the parameter descriptor- and hash tables generated by the script.
The hash algorithm remains the same, the output parameter descriptor
table format changes slightly. There the TYPE_API_MASK entries are
removed and an invalid NULL entry is inserted at the beginning. This is
ok, as get.c:find_value() doesn't rely on TYPE_API_MASK any more to
detect an invalid enum.
Signed-off-by: Imre Deak <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Oliver McFadden <[email protected]>
Diffstat (limited to 'src/mesa/SConscript')
-rw-r--r-- | src/mesa/SConscript | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/mesa/SConscript b/src/mesa/SConscript index 7d7d5193014..b7f908a9a64 100644 --- a/src/mesa/SConscript +++ b/src/mesa/SConscript @@ -77,7 +77,6 @@ main_sources = [ 'main/format_pack.c', 'main/format_unpack.c', 'main/framebuffer.c', - 'main/get.c', 'main/getstring.c', 'main/glformats.c', 'main/hash.c', @@ -140,6 +139,10 @@ main_sources = [ 'main/vtxfmt.c', ] +glget_sources = [ + 'main/get.c', +] + math_sources = [ 'math/m_debug_clip.c', 'math/m_debug_norm.c', @@ -320,6 +323,7 @@ common_driver_sources = [ mesa_sources = ( main_sources + + glget_sources + math_sources + program_sources + vbo_sources + @@ -369,6 +373,18 @@ if env['gles']: env.Append(CPPDEFINES = ["FEATURE_%s=1" % api for api in enabled_apis]) +get_hash_gen_opts = ' '.join(["-a %s" % api for api in enabled_apis]) + +get_hash_header = env.CodeGenerate( + target = 'main/get_hash.h', + script = 'main/get_hash_generator.py', + source = GLAPI + 'gen/gl_and_es_API.xml', + command = python_cmd + ' $SCRIPT ' + get_hash_gen_opts + + ' -f $SOURCE > $TARGET' +) + +env.Depends(glget_sources, get_hash_header) + # # Assembly sources # |