Mesa (master): mesa: remove unnecessary buffer size check

Brian Paul brianp at kemper.freedesktop.org
Wed May 6 18:39:01 UTC 2009


Module: Mesa
Branch: master
Commit: 58544a28ad561d7d9e16deb048443c2d2b5c12d8
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=58544a28ad561d7d9e16deb048443c2d2b5c12d8

Author: Brian Paul <brianp at vmware.com>
Date:   Wed May  6 12:38:11 2009 -0600

mesa: remove unnecessary buffer size check

---

 src/mesa/main/api_validate.c |    8 --------
 1 files changed, 0 insertions(+), 8 deletions(-)

diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c
index ad150ee..2704948 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");




More information about the mesa-commit mailing list