diff options
author | Brian Paul <[email protected]> | 2015-02-28 09:01:33 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2015-03-02 08:55:30 -0700 |
commit | 2f0143ca968d739e8b9cefb213ac61402a7f6587 (patch) | |
tree | 3f4d704607ac00af026d5b4cd054ce8c0a52bb4a /src/mesa/state_tracker/st_context.c | |
parent | c7136ff64691efec1bf58b34019e5283a751f67b (diff) |
st/mesa: replace Elements() with ARRAY_SIZE()
Acked-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_context.c')
-rw-r--r-- | src/mesa/state_tracker/st_context.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index 5834ebad3be..5fe132ac245 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -117,8 +117,8 @@ st_destroy_context_priv(struct st_context *st) st_destroy_drawpix(st); st_destroy_drawtex(st); - for (shader = 0; shader < Elements(st->state.sampler_views); shader++) { - for (i = 0; i < Elements(st->state.sampler_views[0]); i++) { + for (shader = 0; shader < ARRAY_SIZE(st->state.sampler_views); shader++) { + for (i = 0; i < ARRAY_SIZE(st->state.sampler_views[0]); i++) { pipe_sampler_view_release(st->pipe, &st->state.sampler_views[shader][i]); } @@ -200,7 +200,7 @@ st_create_context_priv( struct gl_context *ctx, struct pipe_context *pipe, /* Vertex element objects used for drawing rectangles for glBitmap, * glDrawPixels, glClear, etc. */ - for (i = 0; i < Elements(st->velems_util_draw); i++) { + for (i = 0; i < ARRAY_SIZE(st->velems_util_draw); i++) { memset(&st->velems_util_draw[i], 0, sizeof(struct pipe_vertex_element)); st->velems_util_draw[i].src_offset = i * 4 * sizeof(float); st->velems_util_draw[i].instance_divisor = 0; |