aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/context.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/main/context.c')
-rw-r--r--mesalib/src/mesa/main/context.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/mesalib/src/mesa/main/context.c b/mesalib/src/mesa/main/context.c
index abce52e58..c50504d19 100644
--- a/mesalib/src/mesa/main/context.c
+++ b/mesalib/src/mesa/main/context.c
@@ -797,8 +797,8 @@ init_attrib_groups(struct gl_context *ctx)
/* Miscellaneous */
ctx->NewState = _NEW_ALL;
ctx->NewDriverState = ~0;
- ctx->ErrorValue = (GLenum) GL_NO_ERROR;
- ctx->ResetStatus = (GLenum) GL_NO_ERROR;
+ ctx->ErrorValue = GL_NO_ERROR;
+ ctx->ResetStatus = GL_NO_ERROR;
ctx->varying_vp_inputs = VERT_BIT_ALL;
return GL_TRUE;
@@ -832,8 +832,8 @@ update_default_objects(struct gl_context *ctx)
* This helps prevents a segfault when someone calls a GL function without
* first checking if the extension's supported.
*/
-static int
-generic_nop(void)
+int
+_mesa_generic_nop(void)
{
GET_CURRENT_CONTEXT(ctx);
_mesa_error(ctx, GL_INVALID_OPERATION,
@@ -865,7 +865,7 @@ _mesa_alloc_dispatch_table(int size)
_glapi_proc *entry = (_glapi_proc *) table;
GLint i;
for (i = 0; i < numEntries; i++) {
- entry[i] = (_glapi_proc) generic_nop;
+ entry[i] = (_glapi_proc) _mesa_generic_nop;
}
}
return table;
@@ -921,6 +921,10 @@ _mesa_initialize_context(struct gl_context *ctx,
ctx->WinSysDrawBuffer = NULL;
ctx->WinSysReadBuffer = NULL;
+ if (_mesa_is_desktop_gl(ctx)) {
+ _mesa_override_gl_version(ctx);
+ }
+
/* misc one-time initializations */
one_time_init(ctx);
@@ -995,7 +999,7 @@ _mesa_initialize_context(struct gl_context *ctx,
switch (ctx->API) {
case API_OPENGL:
- ctx->Save = _mesa_create_save_table();
+ ctx->Save = _mesa_create_save_table(ctx);
if (!ctx->Save) {
_mesa_reference_shared_state(ctx, &ctx->Shared, NULL);
free(ctx->Exec);
@@ -1003,6 +1007,7 @@ _mesa_initialize_context(struct gl_context *ctx,
}
_mesa_install_save_vtxfmt( ctx, &ctx->ListState.ListVtxfmt );
+ /* fall-through */
case API_OPENGL_CORE:
break;
case API_OPENGLES: