{
/* Do the code-generated setup of the exec table in api_exec.c. */
_mesa_initialize_exec_table(ctx);
+
+ if (ctx->Save)
+ _mesa_initialize_save_table(ctx);
}
/**
switch (ctx->API) {
case API_OPENGL_COMPAT:
ctx->BeginEnd = create_beginend_table(ctx);
- ctx->Save = _mesa_create_save_table(ctx);
+ ctx->Save = _mesa_alloc_dispatch_table();
if (!ctx->BeginEnd || !ctx->Save)
goto fail;
* initialized from _mesa_init_api_defaults and from the active vtxfmt
* struct.
*/
-struct _glapi_table *
-_mesa_create_save_table(const struct gl_context *ctx)
+void
+_mesa_initialize_save_table(const struct gl_context *ctx)
{
- struct _glapi_table *table;
-
- table = _mesa_alloc_dispatch_table();
- if (table == NULL)
- return NULL;
+ struct _glapi_table *table = ctx->Save;
_mesa_loopback_init_api_table(ctx, table);
/* GL_NV_primitive_restart */
SET_PrimitiveRestartIndex(table, _mesa_PrimitiveRestartIndex);
-
- return table;
}
extern void _mesa_save_vtxfmt_init( GLvertexformat *vfmt );
-extern struct _glapi_table *_mesa_create_save_table(const struct gl_context *);
+extern void _mesa_initialize_save_table(const struct gl_context *);
extern void _mesa_install_dlist_vtxfmt(struct _glapi_table *disp,
const GLvertexformat *vfmt);