summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2010-08-30 12:27:07 -0700
committerKenneth Graunke <[email protected]>2010-09-07 17:30:38 -0700
commit67da41c10ce5eda8b8e35c03fb81f606d40d3dd7 (patch)
treeab320d35f88348ad4ae1e81088b0659f4067aa1d /src/mesa
parent5a81d057dbbf9f4b8fbeee471df70603009c8d6b (diff)
mesa: Enable GL_MAX_VERTEX_ATTRIBS in ES2.
Signed-off-by: Kristian Høgsberg <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/get.c17
1 files changed, 16 insertions, 1 deletions
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);