From: Brian Paul Date: Fri, 22 May 2009 20:28:24 +0000 (-0600) Subject: mesa: use Elements() for loop limit X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8091aa86337b5541e70f0a83bc9b13c55faec559;p=mesa.git mesa: use Elements() for loop limit --- diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c index 51b653fb744..476a24434cc 100644 --- a/src/mesa/main/attrib.c +++ b/src/mesa/main/attrib.c @@ -1342,9 +1342,9 @@ adjust_buffer_object_ref_counts(struct gl_array_object *arrayObj, GLint step) arrayObj->FogCoord.BufferObj->RefCount += step; arrayObj->Index.BufferObj->RefCount += step; arrayObj->EdgeFlag.BufferObj->RefCount += step; - for (i = 0; i < MAX_TEXTURE_COORD_UNITS; i++) + for (i = 0; i < Elements(arrayObj->TexCoord); i++) arrayObj->TexCoord[i].BufferObj->RefCount += step; - for (i = 0; i < VERT_ATTRIB_MAX; i++) + for (i = 0; i < Elements(arrayObj->VertexAttrib); i++) arrayObj->VertexAttrib[i].BufferObj->RefCount += step; }