mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 11:20:20 +01:00
mesa/es: Validate ColorPointer size in Mesa code rather than the ES wrapper
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
parent
07ccfef8d1
commit
fb8218508a
2 changed files with 2 additions and 5 deletions
|
|
@ -1218,10 +1218,6 @@
|
|||
<param name="stride" type="GLsizei"/>
|
||||
<param name="pointer" type="const GLvoid *"/>
|
||||
</proto>
|
||||
|
||||
<desc name="size" error="GL_INVALID_VALUE">
|
||||
<value name="4"/>
|
||||
</desc>
|
||||
</template>
|
||||
|
||||
<template name="DisableClientState">
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue