From: Brian Paul Date: Fri, 8 May 2009 18:44:38 +0000 (-0600) Subject: mesa: issue warning for out of bounds array indexes X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=87fbc9a14ed2bdd24d84c38431abbf7b0c275998;p=mesa.git mesa: issue warning for out of bounds array indexes --- diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c index 27049486ee9..d5c604c56a2 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; } }