Module: Mesa Branch: master Commit: 87fbc9a14ed2bdd24d84c38431abbf7b0c275998 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=87fbc9a14ed2bdd24d84c38431abbf7b0c275998
Author: Brian Paul <[email protected]> Date: Fri May 8 12:44:38 2009 -0600 mesa: issue warning for out of bounds array indexes --- src/mesa/main/api_validate.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c index 2704948..d5c604c 100644 --- a/src/mesa/main/api_validate.c +++ b/src/mesa/main/api_validate.c @@ -184,6 +184,8 @@ _mesa_validate_DrawElements(GLcontext *ctx, ctx->Array.ElementArrayBufferObj); if (max >= ctx->Array._MaxElement) { /* the max element is out of bounds of one or more enabled arrays */ + _mesa_warning(ctx, "glDrawElements() index=%u is " + "out of bounds (max=%u)", max, ctx->Array._MaxElement); return GL_FALSE; } } _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
