summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/varray.c
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2012-07-25 15:10:21 -0700
committerIan Romanick <[email protected]>2012-08-24 19:13:18 -0700
commite5ef0cbe0e4e45df6ff74a2a40ddb83d8bc3a8cc (patch)
tree66604a4f5041041be0f7c15be11c7074d0f59569 /src/mesa/main/varray.c
parentfb8218508a9b5cfe9e14830f9590df889e5b8785 (diff)
mesa/es: Validate NormalPointer 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.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
index f3c869f6d7f..165b957c891 100644
--- a/src/mesa/main/varray.c
+++ b/src/mesa/main/varray.c
@@ -268,12 +268,13 @@ _mesa_VertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *ptr)
void GLAPIENTRY
_mesa_NormalPointer(GLenum type, GLsizei stride, const GLvoid *ptr )
{
- const GLbitfield legalTypes = (BYTE_BIT | 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);
+ const GLbitfield legalTypes = (ctx->API == API_OPENGLES)
+ ? (BYTE_BIT | SHORT_BIT | FLOAT_BIT | FIXED_ES_BIT)
+ : (BYTE_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);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
update_array(ctx, "glNormalPointer", VERT_ATTRIB_NORMAL,