summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/dlist.c4
-rw-r--r--src/mesa/main/varray.c4
-rw-r--r--src/mesa/vbo/vbo_context.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
index 5120e516e08..dd73a1906b8 100644
--- a/src/mesa/main/dlist.c
+++ b/src/mesa/main/dlist.c
@@ -6806,10 +6806,10 @@ _mesa_NewList(GLuint name, GLenum mode)
/* Reset acumulated list state:
*/
- for (i = 0; i < VERT_ATTRIB_MAX; i++)
+ for (i = 0; i < Elements(ctx->ListState.ActiveAttribSize); i++)
ctx->ListState.ActiveAttribSize[i] = 0;
- for (i = 0; i < MAT_ATTRIB_MAX; i++)
+ for (i = 0; i < Elements(ctx->ListState.ActiveMaterialSize); i++)
ctx->ListState.ActiveMaterialSize[i] = 0;
ctx->Driver.CurrentSavePrimitive = PRIM_UNKNOWN;
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
index 0982dc7977f..ff3128b8beb 100644
--- a/src/mesa/main/varray.c
+++ b/src/mesa/main/varray.c
@@ -1079,10 +1079,10 @@ _mesa_print_arrays(GLcontext *ctx)
print_array("Normal", -1, &arrayObj->Normal);
if (arrayObj->Color.Enabled)
print_array("Color", -1, &arrayObj->Color);
- for (i = 0; i < MAX_TEXTURE_COORD_UNITS; i++)
+ for (i = 0; i < Elements(arrayObj->TexCoord); i++)
if (arrayObj->TexCoord[i].Enabled)
print_array("TexCoord", i, &arrayObj->TexCoord[i]);
- for (i = 0; i < VERT_ATTRIB_MAX; i++)
+ for (i = 0; i < Elements(arrayObj->VertexAttrib); i++)
if (arrayObj->VertexAttrib[i].Enabled)
print_array("Attrib", i, &arrayObj->VertexAttrib[i]);
_mesa_printf(" _MaxElement = %u\n", arrayObj->_MaxElement);
diff --git a/src/mesa/vbo/vbo_context.c b/src/mesa/vbo/vbo_context.c
index f193a4bf1e0..90025f62fc9 100644
--- a/src/mesa/vbo/vbo_context.c
+++ b/src/mesa/vbo/vbo_context.c
@@ -214,7 +214,7 @@ GLboolean _vbo_CreateContext( GLcontext *ctx )
for (i = 0; i < 4; i++)
vbo->map_vp_none[28+i] = i;
- for (i = 0; i < VERT_ATTRIB_MAX; i++)
+ for (i = 0; i < Elements(vbo->map_vp_arb); i++)
vbo->map_vp_arb[i] = i;
}