diff options
Diffstat (limited to 'src/gallium/drivers/radeon')
-rw-r--r-- | src/gallium/drivers/radeon/r600_query.c | 6 | ||||
-rw-r--r-- | src/gallium/drivers/radeon/r600_texture.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/radeon/radeon_video.c | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/src/gallium/drivers/radeon/r600_query.c b/src/gallium/drivers/radeon/r600_query.c index 9f12ccd278c..e3626144ddd 100644 --- a/src/gallium/drivers/radeon/r600_query.c +++ b/src/gallium/drivers/radeon/r600_query.c @@ -1174,11 +1174,11 @@ static struct pipe_driver_query_info r600_driver_query_list[] = { static unsigned r600_get_num_queries(struct r600_common_screen *rscreen) { if (rscreen->info.drm_major == 2 && rscreen->info.drm_minor >= 42) - return Elements(r600_driver_query_list); + return ARRAY_SIZE(r600_driver_query_list); else if (rscreen->info.drm_major == 3) - return Elements(r600_driver_query_list) - 3; + return ARRAY_SIZE(r600_driver_query_list) - 3; else - return Elements(r600_driver_query_list) - 4; + return ARRAY_SIZE(r600_driver_query_list) - 4; } static int r600_get_driver_query_info(struct pipe_screen *screen, diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c index 773d67a2f04..c89afbc6d76 100644 --- a/src/gallium/drivers/radeon/r600_texture.c +++ b/src/gallium/drivers/radeon/r600_texture.c @@ -313,7 +313,7 @@ static int r600_setup_surface(struct pipe_screen *screen, } if (offset) { - for (i = 0; i < Elements(rtex->surface.level); ++i) + for (i = 0; i < ARRAY_SIZE(rtex->surface.level); ++i) rtex->surface.level[i].offset += offset; } return 0; diff --git a/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c b/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c index dd86f661a17..74b36ece212 100644 --- a/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c +++ b/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c @@ -1341,7 +1341,7 @@ static void emit_lsb(const struct lp_build_tgsi_action * action, emit_data->output[emit_data->chan] = lp_build_intrinsic(gallivm->builder, "llvm.cttz.i32", - emit_data->dst_type, args, Elements(args), + emit_data->dst_type, args, ARRAY_SIZE(args), LLVMReadNoneAttribute); } @@ -1360,7 +1360,7 @@ static void emit_umsb(const struct lp_build_tgsi_action * action, LLVMValueRef msb = lp_build_intrinsic(builder, "llvm.ctlz.i32", - emit_data->dst_type, args, Elements(args), + emit_data->dst_type, args, ARRAY_SIZE(args), LLVMReadNoneAttribute); /* The HW returns the last bit index from MSB, but TGSI wants diff --git a/src/gallium/drivers/radeon/radeon_video.c b/src/gallium/drivers/radeon/radeon_video.c index acbf79005f4..da65ce8c67c 100644 --- a/src/gallium/drivers/radeon/radeon_video.c +++ b/src/gallium/drivers/radeon/radeon_video.c @@ -165,7 +165,7 @@ void rvid_join_surfaces(struct radeon_winsys* ws, /* adjust the texture layer offsets */ off = align(off, surfaces[i]->bo_alignment); - for (j = 0; j < Elements(surfaces[i]->level); ++j) + for (j = 0; j < ARRAY_SIZE(surfaces[i]->level); ++j) surfaces[i]->level[j].offset += off; off += surfaces[i]->bo_size; } |