diff options
author | Ian Romanick <[email protected]> | 2012-07-25 15:13:00 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2012-08-24 19:13:18 -0700 |
commit | c3e9a207d0cb650045304cac559958d275a63284 (patch) | |
tree | 6e7509a9582e6601da7db6123f6550cb086b9787 /src/mesa/main/varray.c | |
parent | e5ef0cbe0e4e45df6ff74a2a40ddb83d8bc3a8cc (diff) |
mesa/es: Validate TexCoordPointer types in Mesa code rather than the ES wrapper
Signed-off-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/main/varray.c')
-rw-r--r-- | src/mesa/main/varray.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c index 165b957c891..aacc5c9c3f3 100644 --- a/src/mesa/main/varray.c +++ b/src/mesa/main/varray.c @@ -354,18 +354,16 @@ void GLAPIENTRY _mesa_TexCoordPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *ptr) { - GLbitfield legalTypes = (SHORT_BIT | INT_BIT | - HALF_BIT | FLOAT_BIT | DOUBLE_BIT | - FIXED_ES_BIT | - UNSIGNED_INT_2_10_10_10_REV_BIT | - INT_2_10_10_10_REV_BIT); GET_CURRENT_CONTEXT(ctx); + GLbitfield legalTypes = (ctx->API == API_OPENGLES) + ? (BYTE_BIT | SHORT_BIT | FLOAT_BIT | FIXED_ES_BIT) + : (SHORT_BIT | INT_BIT | + HALF_BIT | FLOAT_BIT | DOUBLE_BIT | + UNSIGNED_INT_2_10_10_10_REV_BIT | + INT_2_10_10_10_REV_BIT); const GLuint unit = ctx->Array.ActiveTexture; ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - if (ctx->API == API_OPENGLES) - legalTypes |= BYTE_BIT; - update_array(ctx, "glTexCoordPointer", VERT_ATTRIB_TEX(unit), legalTypes, 1, 4, size, type, stride, GL_FALSE, GL_FALSE, |