mesa: remove redundant _MaxElement computation
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.
This commit is contained in:
@@ -82,12 +82,6 @@ compute_max_element(struct gl_client_array *array)
|
|||||||
} else {
|
} else {
|
||||||
array->_MaxElement = 0;
|
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 {
|
else {
|
||||||
/* user-space array, no idea how big it is */
|
/* user-space array, no idea how big it is */
|
||||||
|
Reference in New Issue
Block a user