From: Brian Paul Date: Thu, 21 May 2009 22:52:45 +0000 (-0600) Subject: mesa: use MAX_ values instead of literals X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d4fb7615b5a9c514d48fc78a01c52cb721b889c6;p=mesa.git mesa: use MAX_ values instead of literals --- diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c index 0d4cbe9a1e5..0e611840c2e 100644 --- a/src/mesa/vbo/vbo_exec_array.c +++ b/src/mesa/vbo/vbo_exec_array.c @@ -115,7 +115,7 @@ static void bind_array_obj( GLcontext *ctx ) } exec->array.legacy_array[VERT_ATTRIB_EDGEFLAG] = &arrayObj->EdgeFlag; - for (i = 0; i < 8; i++) + for (i = 0; i < MAX_TEXTURE_COORD_UNITS; i++) exec->array.legacy_array[VERT_ATTRIB_TEX0 + i] = &arrayObj->TexCoord[i]; for (i = 0; i < VERT_ATTRIB_MAX; i++) @@ -216,7 +216,7 @@ static void recalculate_input_bindings( GLcontext *ctx ) } } - for (i = 0; i < 16; i++) { + for (i = 0; i < MAX_VERTEX_ATTRIBS; i++) { if (exec->array.generic_array[i]->Enabled) inputs[VERT_ATTRIB_GENERIC0 + i] = exec->array.generic_array[i]; else {