From 87fbc9a14ed2bdd24d84c38431abbf7b0c275998 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 8 May 2009 12:44:38 -0600 Subject: mesa: issue warning for out of bounds array indexes --- src/mesa/main/api_validate.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c index 27049486ee..d5c604c56a 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; } } -- cgit v1.2.3