softpipe: s/Elements/ARRAY_SIZE/
[mesa.git] / src / gallium / drivers / softpipe / sp_flush.c
index 59b8ad696ecc18faacad1167576df0503dc4859a..29fcf7f16281e5690fb7e3df8585131aded0206e 100644 (file)
@@ -56,7 +56,7 @@ softpipe_flush( struct pipe_context *pipe,
    if (flags & SP_FLUSH_TEXTURE_CACHE) {
       unsigned sh;
 
-      for (sh = 0; sh < Elements(softpipe->tex_cache); sh++) {
+      for (sh = 0; sh < ARRAY_SIZE(softpipe->tex_cache); sh++) {
          for (i = 0; i < softpipe->num_sampler_views[sh]; i++) {
             sp_flush_tex_tile_cache(softpipe->tex_cache[sh][i]);
          }
@@ -174,7 +174,7 @@ void softpipe_texture_barrier(struct pipe_context *pipe)
    struct softpipe_context *softpipe = softpipe_context(pipe);
    uint i, sh;
 
-   for (sh = 0; sh < Elements(softpipe->tex_cache); sh++) {
+   for (sh = 0; sh < ARRAY_SIZE(softpipe->tex_cache); sh++) {
       for (i = 0; i < softpipe->num_sampler_views[sh]; i++) {
          sp_flush_tex_tile_cache(softpipe->tex_cache[sh][i]);
       }