diff options
Diffstat (limited to 'src/mesa/main/context.c')
-rw-r--r-- | src/mesa/main/context.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 0a4c9acdfe9..415e339cb80 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -455,7 +455,7 @@ _mesa_init_current(GLcontext *ctx) GLuint i; /* Init all to (0,0,0,1) */ - for (i = 0; i < VERT_ATTRIB_MAX; i++) { + for (i = 0; i < Elements(ctx->Current.Attrib); i++) { ASSIGN_4V( ctx->Current.Attrib[i], 0.0, 0.0, 0.0, 1.0 ); } @@ -592,6 +592,9 @@ _mesa_init_constants(GLcontext *ctx) /* GL_ATI_envmap_bumpmap */ ctx->Const.SupportedBumpUnits = SUPPORTED_ATI_BUMP_UNITS; + /* GL_EXT_provoking_vertex */ + ctx->Const.QuadsFollowProvokingVertexConvention = GL_TRUE; + /* sanity checks */ ASSERT(ctx->Const.MaxTextureUnits == MIN2(ctx->Const.MaxTextureImageUnits, ctx->Const.MaxTextureCoordUnits)); @@ -602,6 +605,10 @@ _mesa_init_constants(GLcontext *ctx) ASSERT(MAX_NV_VERTEX_PROGRAM_TEMPS <= MAX_PROGRAM_TEMPS); ASSERT(MAX_NV_VERTEX_PROGRAM_INPUTS <= VERT_ATTRIB_MAX); ASSERT(MAX_NV_VERTEX_PROGRAM_OUTPUTS <= VERT_RESULT_MAX); + + /* check that we don't exceed various 32-bit bitfields */ + ASSERT(VERT_RESULT_MAX <= 32); + ASSERT(FRAG_ATTRIB_MAX <= 32); } @@ -1004,6 +1011,7 @@ _mesa_free_context_data( GLcontext *ctx ) #if FEATURE_ARB_occlusion_query _mesa_free_query_data(ctx); #endif + _mesa_free_varray_data(ctx); _mesa_delete_array_object(ctx, ctx->Array.DefaultArrayObj); @@ -1017,10 +1025,6 @@ _mesa_free_context_data( GLcontext *ctx ) _mesa_reference_buffer_object(ctx, &ctx->Array.ElementArrayBufferObj, NULL); #endif -#if FEATURE_ARB_vertex_buffer_object - _mesa_delete_buffer_object(ctx, ctx->Array.NullBufferObj); -#endif - /* free dispatch tables */ _mesa_free(ctx->Exec); _mesa_free(ctx->Save); |