Previously, the piglit test ARB_vertex_array_bgra/api-errors failed because update_array did not check if normalized == GL_FALSE, and error if so.
Signed-off-by: Corey Richardson <co...@octayn.net> --- src/mesa/main/varray.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c index 529d933..d9a2453 100644 --- a/src/mesa/main/varray.c +++ b/src/mesa/main/varray.c @@ -206,6 +206,14 @@ update_array(struct gl_context *ctx, } else if (type != GL_UNSIGNED_BYTE) bgra_error = GL_TRUE; + /* 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 (normalized == GL_FALSE) { + bgra_error = GL_TRUE; + } + if (bgra_error) { _mesa_error(ctx, GL_INVALID_VALUE, "%s(GL_BGRA/GLubyte)", func); return; -- 1.8.3.4 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev