From fa416106307dc193e2133aa6a29b9bcfc91f8b39 Mon Sep 17 00:00:00 2001 From: Kristian Høgsberg Date: Thu, 22 Apr 2010 12:40:47 -0400 Subject: 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. --- src/mesa/main/api_exec.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/mesa/main/api_exec.c') diff --git a/src/mesa/main/api_exec.c b/src/mesa/main/api_exec.c index 1e1aa41611..7b3f3d9ea1 100644 --- a/src/mesa/main/api_exec.c +++ b/src/mesa/main/api_exec.c @@ -119,9 +119,15 @@ * \param ctx GL context to which \c exec belongs. * \param exec dispatch table. */ -void -_mesa_init_exec_table(struct _glapi_table *exec) +struct _glapi_table * +_mesa_create_exec_table(void) { + struct _glapi_table *exec; + + exec = _mesa_alloc_dispatch_table(sizeof *exec); + if (exec == NULL) + return NULL; + #if _HAVE_FULL_GL _mesa_loopback_init_api_table( exec ); #endif @@ -777,4 +783,6 @@ _mesa_init_exec_table(struct _glapi_table *exec) SET_ObjectUnpurgeableAPPLE(exec, _mesa_ObjectUnpurgeableAPPLE); SET_GetObjectParameterivAPPLE(exec, _mesa_GetObjectParameterivAPPLE); #endif + + return exec; } -- cgit v1.2.3