summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-05-22 14:28:24 -0600
committerBrian Paul <[email protected]>2009-05-22 14:28:24 -0600
commit8091aa86337b5541e70f0a83bc9b13c55faec559 (patch)
tree9db8e97877ca800e68219665065fedd9995dc092
parent2a3d118a8e4c048e5d850a29301c02f886ba09d4 (diff)
mesa: use Elements() for loop limit
-rw-r--r--src/mesa/main/attrib.c4
1 files changed, 2 insertions, 2 deletions
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;
}