Fixes Piglit's ARB_vertex_attrib_bgra/api-errors test. Signed-off-by: Kenneth Graunke <kenn...@whitecape.org> --- src/mesa/main/varray.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c index 529d933..48f15bd 100644 --- a/src/mesa/main/varray.c +++ b/src/mesa/main/varray.c @@ -463,6 +463,16 @@ _mesa_VertexAttribPointer(GLuint index, GLint size, GLenum type, return; } + /* From the GL_ARB_vertex_array_bgra specification: + * "The error INVALID_VALUE is generated by VertexAttribPointer if + * size is BGRA and normalized is FALSE." + */ + if (size == GL_BGRA && !normalized) { + _mesa_error(ctx, GL_INVALID_VALUE, + "glVertexAttribPointer(BGRA and !normalized)"); + return; + } + update_array(ctx, "glVertexAttribPointer", VERT_ATTRIB_GENERIC(index), legalTypes, 1, BGRA_OR_4, size, type, stride, normalized, GL_FALSE, ptr); -- 1.8.3.2 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev