mesa: return INVALID_VALUE from VertexAttribDivisor if index out of range
authorMatt Turner <mattst88@gmail.com>
Tue, 13 Nov 2012 21:05:03 +0000 (13:05 -0800)
committerMatt Turner <mattst88@gmail.com>
Thu, 15 Nov 2012 23:21:28 +0000 (15:21 -0800)
All the other range checks on index already return the proper error,
INVALID_VALUE.

Fixes gles3conform's instanced_arrays_invalid test.
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/main/varray.c

index 7a5a5c5debc791ff7eeaf8b9f3bf56676fefacfe..f770143972c7c784d63da600a92bcfad815c05e8 100644 (file)
@@ -1137,7 +1137,7 @@ _mesa_VertexAttribDivisor(GLuint index, GLuint divisor)
    }
 
    if (index >= ctx->Const.VertexProgram.MaxAttribs) {
-      _mesa_error(ctx, GL_INVALID_ENUM, "glVertexAttribDivisor(index = %u)",
+      _mesa_error(ctx, GL_INVALID_VALUE, "glVertexAttribDivisor(index = %u)",
                   index);
       return;
    }