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/dlist.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/mesa/main/dlist.c') diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c index f869a585d6..168c424ea1 100644 --- a/src/mesa/main/dlist.c +++ b/src/mesa/main/dlist.c @@ -8747,9 +8747,15 @@ exec_MultiModeDrawElementsIBM(const GLenum * mode, * initialized from _mesa_init_api_defaults and from the active vtxfmt * struct. */ -void -_mesa_init_save_table(struct _glapi_table *table) +struct _glapi_table * +_mesa_create_save_table(void) { + struct _glapi_table *table; + + table = _mesa_alloc_dispatch_table(sizeof *table); + if (table == NULL) + return NULL; + _mesa_loopback_init_api_table(table); /* GL 1.0 */ @@ -9349,6 +9355,8 @@ _mesa_init_save_table(struct _glapi_table *table) (void) save_ClearBufferfv; (void) save_ClearBufferfi; #endif + + return table; } -- cgit v1.2.3