diff options
author | Brian Paul <[email protected]> | 2015-02-28 09:05:54 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2015-03-02 08:55:31 -0700 |
commit | 6633271159f99bc86d29a86d7e3802f0b60c7a11 (patch) | |
tree | 1920df03f3519565484c02ef7a79729390d7b034 /src/mesa/drivers | |
parent | 9775dbc33505e486f9e6e11587a38bd09285a10c (diff) |
radeon: replace Elements() with ARRAY_SIZE()
Acked-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_sanity.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_sanity.c b/src/mesa/drivers/dri/radeon/radeon_sanity.c index bb2a3bf7854..ca10fc33129 100644 --- a/src/mesa/drivers/dri/radeon/radeon_sanity.c +++ b/src/mesa/drivers/dri/radeon/radeon_sanity.c @@ -331,7 +331,7 @@ struct reg { }; -static struct reg regs[Elements(reg_names)+1]; +static struct reg regs[ARRAY_SIZE(reg_names)+1]; static struct reg scalars[512+1]; static struct reg vectors[512*4+1]; @@ -342,29 +342,29 @@ static void init_regs( void ) struct reg_names *tmp; int i; - for (i = 0 ; i < Elements(regs)-1 ; i++) { + for (i = 0 ; i < ARRAY_SIZE(regs)-1 ; i++) { regs[i].idx = reg_names[i].idx; regs[i].closest = ®_names[i]; regs[i].flags = 0; } - for (i = 0, tmp = scalar_names ; i < Elements(scalars) ; i++) { + for (i = 0, tmp = scalar_names ; i < ARRAY_SIZE(scalars) ; i++) { if (tmp[1].idx == i) tmp++; scalars[i].idx = i; scalars[i].closest = tmp; scalars[i].flags = ISFLOAT; } - for (i = 0, tmp = vector_names ; i < Elements(vectors) ; i++) { + for (i = 0, tmp = vector_names ; i < ARRAY_SIZE(vectors) ; i++) { if (tmp[1].idx*4 == i) tmp++; vectors[i].idx = i; vectors[i].closest = tmp; vectors[i].flags = ISFLOAT|ISVEC; } - regs[Elements(regs)-1].idx = -1; - scalars[Elements(scalars)-1].idx = -1; - vectors[Elements(vectors)-1].idx = -1; + regs[ARRAY_SIZE(regs)-1].idx = -1; + scalars[ARRAY_SIZE(scalars)-1].idx = -1; + vectors[ARRAY_SIZE(vectors)-1].idx = -1; } static int find_or_add_value( struct reg *reg, int val ) @@ -508,13 +508,13 @@ static void dump_state( void ) { int i; - for (i = 0 ; i < Elements(regs) ; i++) + for (i = 0 ; i < ARRAY_SIZE(regs) ; i++) print_reg( ®s[i] ); - for (i = 0 ; i < Elements(scalars) ; i++) + for (i = 0 ; i < ARRAY_SIZE(scalars) ; i++) print_reg( &scalars[i] ); - for (i = 0 ; i < Elements(vectors) ; i++) + for (i = 0 ; i < ARRAY_SIZE(vectors) ; i++) print_reg( &vectors[i] ); } |