Mesa (master): mesa: return INVALID_VALUE from VertexAttribDivisor if index out of range

Matt Turner mattst88 at kemper.freedesktop.org
Thu Nov 15 23:20:33 UTC 2012


Module: Mesa
Branch: master
Commit: ae1f09babb9c127d573050f4338b6f3d55cba377
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ae1f09babb9c127d573050f4338b6f3d55cba377

Author: Matt Turner <mattst88 at gmail.com>
Date:   Tue Nov 13 13:05:03 2012 -0800

mesa: return INVALID_VALUE from VertexAttribDivisor if index out of range

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 at gmail.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/mesa/main/varray.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
index 7a5a5c5..f770143 100644
--- a/src/mesa/main/varray.c
+++ b/src/mesa/main/varray.c
@@ -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;
    }




More information about the mesa-commit mailing list