mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 09:00:10 +01:00
mesa/es: Validate NormalPointer types in Mesa code rather than the ES wrapper
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
parent
fb8218508a
commit
e5ef0cbe0e
2 changed files with 6 additions and 13 deletions
|
|
@ -1329,14 +1329,6 @@
|
|||
<param name="stride" type="GLsizei"/>
|
||||
<param name="pointer" type="const GLvoid *"/>
|
||||
</proto>
|
||||
|
||||
<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="TexCoordPointer">
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue