From: Brian Paul Date: Wed, 6 May 2009 18:38:11 +0000 (-0600) Subject: mesa: remove unnecessary buffer size check X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=58544a28ad561d7d9e16deb048443c2d2b5c12d8;p=mesa.git mesa: remove unnecessary buffer size check --- diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c index ad150eea808..27049486ee9 100644 --- a/src/mesa/main/api_validate.c +++ b/src/mesa/main/api_validate.c @@ -166,13 +166,6 @@ _mesa_validate_DrawElements(GLcontext *ctx, /* Vertex buffer object tests */ if (ctx->Array.ElementArrayBufferObj->Name) { /* use indices in the buffer object */ - - if (!ctx->Array.ElementArrayBufferObj->Size) { - _mesa_warning(ctx, - "glDrawElements called with empty array elements buffer"); - return GL_FALSE; - } - /* make sure count doesn't go outside buffer bounds */ if (index_bytes(type, count) > ctx->Array.ElementArrayBufferObj->Size) { _mesa_warning(ctx, "glDrawElements index out of buffer bounds"); @@ -244,7 +237,6 @@ _mesa_validate_DrawRangeElements(GLcontext *ctx, GLenum mode, /* Vertex buffer object tests */ if (ctx->Array.ElementArrayBufferObj->Name) { /* use indices in the buffer object */ - /* make sure count doesn't go outside buffer bounds */ if (index_bytes(type, count) > ctx->Array.ElementArrayBufferObj->Size) { _mesa_warning(ctx, "glDrawRangeElements index out of buffer bounds");