summaryrefslogtreecommitdiffstats
path: root/src/mesa/vbo/vbo_exec_draw.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2015-02-28 08:57:15 -0700
committerBrian Paul <[email protected]>2015-03-02 08:55:30 -0700
commit766f5cf8f88c08a7673beb492095ad8ca878bc22 (patch)
tree4bec0be5b0bebeaefcd30bbb6a21abdbb122a59f /src/mesa/vbo/vbo_exec_draw.c
parentc2e130f8201239f836f429cab3beddb4d66a3357 (diff)
mesa/vbo: replace Elements() with ARRAY_SIZE()
Acked-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/mesa/vbo/vbo_exec_draw.c')
-rw-r--r--src/mesa/vbo/vbo_exec_draw.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/vbo/vbo_exec_draw.c b/src/mesa/vbo/vbo_exec_draw.c
index ec44fdb975d..fa5eba9212f 100644
--- a/src/mesa/vbo/vbo_exec_draw.c
+++ b/src/mesa/vbo/vbo_exec_draw.c
@@ -172,7 +172,7 @@ vbo_exec_bind_arrays( struct gl_context *ctx )
exec->vtx.inputs[attr] = &vbo->currval[VBO_ATTRIB_POS+attr];
}
for (attr = 0; attr < MAT_ATTRIB_MAX; attr++) {
- assert(VERT_ATTRIB_GENERIC(attr) < Elements(exec->vtx.inputs));
+ assert(VERT_ATTRIB_GENERIC(attr) < ARRAY_SIZE(exec->vtx.inputs));
exec->vtx.inputs[VERT_ATTRIB_GENERIC(attr)] =
&vbo->currval[VBO_ATTRIB_MAT_FRONT_AMBIENT+attr];
}
@@ -183,7 +183,7 @@ vbo_exec_bind_arrays( struct gl_context *ctx )
exec->vtx.inputs[attr] = &vbo->currval[VBO_ATTRIB_POS+attr];
}
for (attr = 0; attr < VERT_ATTRIB_GENERIC_MAX; attr++) {
- assert(VERT_ATTRIB_GENERIC(attr) < Elements(exec->vtx.inputs));
+ assert(VERT_ATTRIB_GENERIC(attr) < ARRAY_SIZE(exec->vtx.inputs));
exec->vtx.inputs[VERT_ATTRIB_GENERIC(attr)] =
&vbo->currval[VBO_ATTRIB_GENERIC0+attr];
}
@@ -213,8 +213,8 @@ vbo_exec_bind_arrays( struct gl_context *ctx )
(GLbyte *)exec->vtx.vertex;
/* override the default array set above */
- assert(attr < Elements(exec->vtx.inputs));
- assert(attr < Elements(exec->vtx.arrays)); /* arrays[] */
+ assert(attr < ARRAY_SIZE(exec->vtx.inputs));
+ assert(attr < ARRAY_SIZE(exec->vtx.arrays)); /* arrays[] */
exec->vtx.inputs[attr] = &arrays[attr];
if (_mesa_is_bufferobj(exec->vtx.bufferobj)) {