mesa: issue warning for out of bounds array indexes

This commit is contained in:
Brian Paul
2009-05-08 12:44:38 -06:00
parent e2cf522de0
commit 87fbc9a14e
+2
View File
@@ -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;
}
}