From: Brian Paul Date: Fri, 22 May 2009 20:16:00 +0000 (-0600) Subject: mesa: use Elements() for loop bound X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ebb991ca0d7de103dc068397ed91744bf40ee58f;p=mesa.git mesa: use Elements() for loop bound --- diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index eefc1b04fa2..90daa2e5b89 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -800,10 +800,10 @@ _mesa_DeleteBuffersARB(GLsizei n, const GLuint *ids) unbind(ctx, &arrayObj->FogCoord.BufferObj, bufObj); unbind(ctx, &arrayObj->Index.BufferObj, bufObj); unbind(ctx, &arrayObj->EdgeFlag.BufferObj, bufObj); - for (j = 0; j < MAX_TEXTURE_COORD_UNITS; j++) { + for (j = 0; j < Elements(arrayObj->TexCoord); j++) { unbind(ctx, &arrayObj->TexCoord[j].BufferObj, bufObj); } - for (j = 0; j < VERT_ATTRIB_MAX; j++) { + for (j = 0; j < Elements(arrayObj->VertexAttrib); j++) { unbind(ctx, &arrayObj->VertexAttrib[j].BufferObj, bufObj); }