mesa: Only initialize save dispatch table for OpenGL

This commit is contained in:
Kristian Høgsberg 2010-05-03 21:12:46 -04:00
parent 642839824e
commit 208fdac73a
2 changed files with 14 additions and 14 deletions

View File

@ -901,18 +901,6 @@ _mesa_initialize_context_for_api(GLcontext *ctx,
}
#endif
ctx->CurrentDispatch = ctx->Exec;
#if FEATURE_dlist
ctx->Save = _mesa_create_save_table();
if (!ctx->Save) {
_mesa_release_shared_state(ctx, ctx->Shared);
free(ctx->Exec);
return GL_FALSE;
}
_mesa_install_save_vtxfmt( ctx, &ctx->ListState.ListVtxfmt );
#endif
/* Neutral tnl module stuff */
_mesa_init_exec_vtxfmt( ctx );
ctx->TnlModule.Current = NULL;
@ -930,6 +918,16 @@ _mesa_initialize_context_for_api(GLcontext *ctx,
switch (ctx->API) {
case API_OPENGL:
#if FEATURE_dlist
ctx->Save = _mesa_create_save_table();
if (!ctx->Save) {
_mesa_release_shared_state(ctx, ctx->Shared);
free(ctx->Exec);
return GL_FALSE;
}
_mesa_install_save_vtxfmt( ctx, &ctx->ListState.ListVtxfmt );
#endif
break;
case API_OPENGLES:
/**

View File

@ -199,7 +199,8 @@ GLboolean _vbo_CreateContext( GLcontext *ctx )
*/
vbo_exec_init( ctx );
#if FEATURE_dlist
vbo_save_init( ctx );
if (ctx->API == API_OPENGL)
vbo_save_init( ctx );
#endif
_math_init_eval();
@ -233,7 +234,8 @@ void _vbo_DestroyContext( GLcontext *ctx )
vbo_exec_destroy(ctx);
#if FEATURE_dlist
vbo_save_destroy(ctx);
if (ctx->API == API_OPENGL)
vbo_save_destroy(ctx);
#endif
FREE(vbo);
ctx->swtnl_im = NULL;