From: Kenneth Graunke Date: Mon, 30 Aug 2010 19:27:07 +0000 (-0700) Subject: mesa: Enable GL_MAX_VERTEX_ATTRIBS in ES2. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=67da41c10ce5eda8b8e35c03fb81f606d40d3dd7;p=mesa.git mesa: Enable GL_MAX_VERTEX_ATTRIBS in ES2. Signed-off-by: Kristian Høgsberg Signed-off-by: Kenneth Graunke --- diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index a3cb5ec168f..2062134a390 100644 --- a/src/mesa/main/get.c +++ b/src/mesa/main/get.c @@ -128,6 +128,7 @@ enum value_extra { EXTRA_VERSION_30, EXTRA_VERSION_31, EXTRA_VERSION_32, + EXTRA_VERSION_ES2, EXTRA_NEW_BUFFERS, EXTRA_VALID_DRAW_BUFFER, EXTRA_VALID_TEXTURE_UNIT, @@ -326,6 +327,13 @@ static const int extra_version_30[] = { EXTRA_VERSION_30, EXTRA_END }; static const int extra_version_31[] = { EXTRA_VERSION_31, EXTRA_END }; static const int extra_version_32[] = { EXTRA_VERSION_32, EXTRA_END }; +static const int +extra_ARB_vertex_program_version_es2[] = { + EXT(ARB_vertex_program), + EXTRA_VERSION_ES2, + EXTRA_END +}; + #define API_OPENGL_BIT (1 << API_OPENGL) #define API_OPENGLES_BIT (1 << API_OPENGLES) #define API_OPENGLES2_BIT (1 << API_OPENGLES2) @@ -661,7 +669,8 @@ static const struct value_desc values[] = { { GL_STENCIL_BACK_PASS_DEPTH_PASS, CONTEXT_ENUM(Stencil.ZPassFunc[1]), NO_EXTRA }, { GL_MAX_VERTEX_ATTRIBS_ARB, - CONTEXT_INT(Const.VertexProgram.MaxAttribs), extra_ARB_vertex_program }, + CONTEXT_INT(Const.VertexProgram.MaxAttribs), + extra_ARB_vertex_program_version_es2 }, /* OES_texture_3D */ { GL_TEXTURE_BINDING_3D, LOC_CUSTOM, TYPE_INT, TEXTURE_3D_INDEX, NO_EXTRA }, @@ -1678,6 +1687,12 @@ check_extra(GLcontext *ctx, const char *func, const struct value_desc *d) enabled++; } break; + case EXTRA_VERSION_ES2: + if (ctx->API == API_OPENGLES2) { + total++; + enabled++; + } + break; case EXTRA_NEW_BUFFERS: if (ctx->NewState & _NEW_BUFFERS) _mesa_update_state(ctx);