mesa: Enable GL_MAX_VERTEX_ATTRIBS in ES2.
Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
+16
-1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user