summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2012-07-25 15:13:00 -0700
committerIan Romanick <[email protected]>2012-08-24 19:13:18 -0700
commitc3e9a207d0cb650045304cac559958d275a63284 (patch)
tree6e7509a9582e6601da7db6123f6550cb086b9787 /src
parente5ef0cbe0e4e45df6ff74a2a40ddb83d8bc3a8cc (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')
-rw-r--r--src/mesa/main/APIspec.xml8
-rw-r--r--src/mesa/main/varray.c14
2 files changed, 6 insertions, 16 deletions
diff --git a/src/mesa/main/APIspec.xml b/src/mesa/main/APIspec.xml
index 48127582e5f..c08a82be4c7 100644
--- a/src/mesa/main/APIspec.xml
+++ b/src/mesa/main/APIspec.xml
@@ -1345,14 +1345,6 @@
<value name="3"/>
<value name="4"/>
</desc>
-
- <desc name="type">
- <value name="GL_BYTE"/>
- <value name="GL_SHORT"/>
- <value name="GL_FLOAT"/>
- <value name="GL_FIXED"/>
- <value name="GL_HALF_FLOAT_OES" category="OES_vertex_half_float"/>
- </desc>
</template>
<template name="VertexPointer">
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,