mesa: remove redundant _MaxElement computation
authorBrian Paul <brianp@vmware.com>
Tue, 26 Jan 2010 17:53:34 +0000 (10:53 -0700)
committerBrian Paul <brianp@vmware.com>
Tue, 26 Jan 2010 17:53:40 +0000 (10:53 -0700)
Eric added some new code to check if offset < obj_size before computing
_MaxElement but my original code was still present afterward and it
clobbered the _MaxElement value.

Not sure if this came from a bad merge or what.

src/mesa/main/state.c

index 904ad01205282209b6d92d4b3bb6a237583005dc..5e07d1d2f15b7e0496513ac4d6785f83a7ca13b2 100644 (file)
@@ -82,12 +82,6 @@ compute_max_element(struct gl_client_array *array)
       } else {
         array->_MaxElement = 0;
       }
-      /* Compute the max element we can access in the VBO without going
-       * out of bounds.
-       */
-      array->_MaxElement = ((GLsizeiptrARB) array->BufferObj->Size
-                            - (GLsizeiptrARB) array->Ptr + array->StrideB
-                            - array->_ElementSize) / array->StrideB;
    }
    else {
       /* user-space array, no idea how big it is */