diff options
author | Brian Paul <[email protected]> | 2009-05-08 12:44:38 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-05-08 12:45:08 -0600 |
commit | 87fbc9a14ed2bdd24d84c38431abbf7b0c275998 (patch) | |
tree | bec8479d8c9878d3869cff1d8fa388a988b84717 /src/mesa/main/api_validate.c | |
parent | e2cf522de09bc4afa18ef8d98db69973ee489d58 (diff) |
mesa: issue warning for out of bounds array indexes
Diffstat (limited to 'src/mesa/main/api_validate.c')
-rw-r--r-- | 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 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; } } |