dispatch: stop using _mesa_create_exec_table_es1() for GLES1.

This patch modifies context creation code for GLES1 to use
_mesa_create_exec_table() (which is used for all other APIs) instead
of the GLES1-specific _mesa_create_exec_table_es1().

There is a slight change in functionality.  As a result of a mistake
in the code generation of _mesa_create_exec_table_es1(), it does not
include glFlushMappedBufferRangeEXT or glMapBufferRangeEXT (this is
because when support for those two functions was added in commit
762d9ac, src/mesa/main/APIspec.xml wasn't updated).  With this patch,
glFlushMappedBufferRangeEXT and glMapBufferRangeEXT are properly
included in the dispatch table.  Accordingly, dispatch_sanity.cpp is
modified to expect these two functions to be present.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>

v2: Leave GLES1.1 dispatch sanity test disabled when not building
GLES1 support.
This commit is contained in:
Paul Berry
2012-10-23 14:48:39 -07:00
parent a21116f87e
commit 8386088e3d
2 changed files with 18 additions and 29 deletions

View File

@@ -422,14 +422,7 @@ one_time_init( struct gl_context *ctx )
if (!(api_init_mask & (1 << ctx->API))) {
_mesa_init_get_hash(ctx);
/*
* This is fine as ES does not use the remap table, but it may not be
* future-proof. We cannot always initialize the remap table because
* when an app is linked to libGLES*, there are not enough dynamic
* entries.
*/
if (_mesa_is_desktop_gl(ctx) || ctx->API == API_OPENGLES2)
_mesa_init_remap_table();
_mesa_init_remap_table();
}
api_init_mask |= 1 << ctx->API;
@@ -943,23 +936,7 @@ _mesa_initialize_context(struct gl_context *ctx,
}
/* setup the API dispatch tables */
switch (ctx->API) {
#if FEATURE_GL || FEATURE_ES2
case API_OPENGL:
case API_OPENGL_CORE:
case API_OPENGLES2:
ctx->Exec = _mesa_create_exec_table(ctx);
break;
#endif
#if FEATURE_ES1
case API_OPENGLES:
ctx->Exec = _mesa_create_exec_table_es1();
break;
#endif
default:
_mesa_problem(ctx, "unknown or unsupported API");
break;
}
ctx->Exec = _mesa_create_exec_table(ctx);
if (!ctx->Exec) {
_mesa_reference_shared_state(ctx, &ctx->Shared, NULL);