diff options
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/varray.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c index a048509e515..bf1ad0165e6 100644 --- a/src/mesa/main/varray.c +++ b/src/mesa/main/varray.c @@ -76,7 +76,8 @@ update_array(GLcontext *ctx, struct gl_client_array *array, */ if (ctx->Array.ArrayBufferObj->Name) array->_MaxElement = ((GLsizeiptrARB) ctx->Array.ArrayBufferObj->Size - - (GLsizeiptrARB) array->Ptr) / array->StrideB; + - (GLsizeiptrARB) array->Ptr + array->StrideB + - elementSize) / array->StrideB; else #endif array->_MaxElement = 2 * 1000 * 1000 * 1000; /* just a big number */ |