diff options
author | Ian Romanick <[email protected]> | 2012-07-25 14:58:36 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2012-08-24 19:13:17 -0700 |
commit | fb8218508a9b5cfe9e14830f9590df889e5b8785 (patch) | |
tree | 872a09f67143cdf8362160435893bdaae3bf4994 /src/mesa/main/varray.c | |
parent | 07ccfef8d175f6c4b408ee48f7da210975a09fb9 (diff) |
mesa/es: Validate ColorPointer size 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 | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c index e64c3c5b0ec..f3c869f6d7f 100644 --- a/src/mesa/main/varray.c +++ b/src/mesa/main/varray.c @@ -294,10 +294,11 @@ _mesa_ColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *ptr) HALF_BIT | FLOAT_BIT | DOUBLE_BIT | UNSIGNED_INT_2_10_10_10_REV_BIT | INT_2_10_10_10_REV_BIT); + const GLint sizeMin = (ctx->API == API_OPENGLES) ? 4 : 3; ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); update_array(ctx, "glColorPointer", VERT_ATTRIB_COLOR0, - legalTypes, 3, BGRA_OR_4, + legalTypes, sizeMin, BGRA_OR_4, size, type, stride, GL_TRUE, GL_FALSE, ptr); } |