Revert "mesa: Fix unsigned comparison."
authorVinson Lee <vlee@vmware.com>
Thu, 4 Mar 2010 09:51:50 +0000 (01:51 -0800)
committerVinson Lee <vlee@vmware.com>
Thu, 4 Mar 2010 09:53:14 +0000 (01:53 -0800)
This reverts commit f9504e75f02586a8561733e0e2711c65efa2979d.

This patch is incorrect.

src/mesa/main/api_validate.c

index 80bc826..326ad6f 100644 (file)
@@ -147,7 +147,7 @@ check_index_bounds(GLcontext *ctx, GLsizei count, GLenum type,
 
    vbo_get_minmax_index(ctx, &prim, &ib, &min, &max);
 
-   if (min < basevertex ||
+   if (min + basevertex < 0 ||
        max + basevertex > ctx->Array.ArrayObj->_MaxElement) {
       /* the max element is out of bounds of one or more enabled arrays */
       _mesa_warning(ctx, "glDrawElements() index=%u is "