diff options
author | Kristian Høgsberg <[email protected]> | 2010-04-22 12:40:47 -0400 |
---|---|---|
committer | Kristian Høgsberg <[email protected]> | 2010-04-22 13:43:28 -0400 |
commit | fa416106307dc193e2133aa6a29b9bcfc91f8b39 (patch) | |
tree | 6669b9d7b0c9299143341050bbd58482dd4e51e0 /src/mesa/es | |
parent | ade150d66724259119012420068fa930807311c2 (diff) |
mesa: Move struct _glapi_table allocation out of context.c
We now allocate the table from api_exec.c and dlist.c where we fill out
the table. This way, context.c doesn't need to know the actual contents
of struct _glapi_table.
Diffstat (limited to 'src/mesa/es')
-rw-r--r-- | src/mesa/es/main/es_generator.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/mesa/es/main/es_generator.py b/src/mesa/es/main/es_generator.py index f736792deca..dbb516a4c16 100644 --- a/src/mesa/es/main/es_generator.py +++ b/src/mesa/es/main/es_generator.py @@ -667,9 +667,15 @@ for funcName in keys: # end for each function -print "void" -print "_mesa_init_exec_table(struct _glapi_table *exec)" +print "struct _glapi_table *" +print "_mesa_create_exec_table(void)" print "{" +print " struct _glapi_table *exec;" +print " exec = _mesa_alloc_dispatch_table(sizeof *exec);" +print " if (exec == NULL)" +print " return NULL;" +print "" + for func in keys: prefix = "_es_" if func not in allSpecials else "_check_" for spec in apiutil.Categories(func): @@ -682,4 +688,6 @@ for func in keys: suffix = ext[0].split("_")[0] entry += suffix print " SET_%s(exec, %s%s);" % (entry, prefix, entry) +print "" +print " return exec;" print "}" |