st/mesa: replace Elements() with ARRAY_SIZE()

Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
This commit is contained in:
Brian Paul
2015-02-28 09:01:33 -07:00
parent c7136ff646
commit 2f0143ca96
10 changed files with 45 additions and 45 deletions

View File

@@ -201,7 +201,7 @@ st_make_drawpix_z_stencil_program(struct st_context *st,
GLuint ic = 0;
const GLuint shaderIndex = write_depth * 2 + write_stencil;
assert(shaderIndex < Elements(st->drawpix.shaders));
assert(shaderIndex < ARRAY_SIZE(st->drawpix.shaders));
if (st->drawpix.shaders[shaderIndex]) {
/* already have the proper shader */
@@ -1684,7 +1684,7 @@ st_destroy_drawpix(struct st_context *st)
{
GLuint i;
for (i = 0; i < Elements(st->drawpix.shaders); i++) {
for (i = 0; i < ARRAY_SIZE(st->drawpix.shaders); i++) {
if (st->drawpix.shaders[i])
_mesa_reference_fragprog(st->ctx, &st->drawpix.shaders[i], NULL);
}