summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300
diff options
context:
space:
mode:
authorJan Vesely <[email protected]>2016-05-17 09:25:44 -0400
committerJan Vesely <[email protected]>2016-05-17 15:28:04 -0400
commit47b390fe45e5e6f982c60b58985892438959cd8e (patch)
tree61a26199f85287a7e918c6c52db243280b6a3cba /src/gallium/drivers/r300
parent322cd2457ccf66a0a88d92f0b0dec1cb3f93eae4 (diff)
Treewide: Remove Elements() macro
Signed-off-by: Jan Vesely <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r300')
-rw-r--r--src/gallium/drivers/r300/r300_chipset.c2
-rw-r--r--src/gallium/drivers/r300/r300_vs_draw.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/src/gallium/drivers/r300/r300_chipset.c b/src/gallium/drivers/r300/r300_chipset.c
index c1c7ce3d0bf..505b764023a 100644
--- a/src/gallium/drivers/r300/r300_chipset.c
+++ b/src/gallium/drivers/r300/r300_chipset.c
@@ -53,7 +53,7 @@ static void r300_apply_hyperz_blacklist(struct r300_capabilities* caps)
if (!os_get_process_name(proc_name, sizeof(proc_name)))
return;
- for (i = 0; i < Elements(list); i++) {
+ for (i = 0; i < ARRAY_SIZE(list); i++) {
if (strcmp(list[i], proc_name) == 0) {
caps->zmask_ram = 0;
caps->hiz_ram = 0;
diff --git a/src/gallium/drivers/r300/r300_vs_draw.c b/src/gallium/drivers/r300/r300_vs_draw.c
index 45b7b9380d4..83bcaee08eb 100644
--- a/src/gallium/drivers/r300/r300_vs_draw.c
+++ b/src/gallium/drivers/r300/r300_vs_draw.c
@@ -112,7 +112,7 @@ static void insert_output_before(struct tgsi_transform_context *ctx,
unsigned i;
/* Make a place for the new output. */
- for (i = before->Range.First; i < Elements(vsctx->out_remap); i++) {
+ for (i = before->Range.First; i < ARRAY_SIZE(vsctx->out_remap); i++) {
++vsctx->out_remap[i];
}
@@ -131,7 +131,7 @@ static void insert_output_after(struct tgsi_transform_context *ctx,
unsigned i;
/* Make a place for the new output. */
- for (i = after->Range.First+1; i < Elements(vsctx->out_remap); i++) {
+ for (i = after->Range.First+1; i < ARRAY_SIZE(vsctx->out_remap); i++) {
++vsctx->out_remap[i];
}
@@ -234,7 +234,7 @@ static void transform_inst(struct tgsi_transform_context *ctx,
TGSI_INTERPOLATE_PERSPECTIVE, vsctx->num_outputs);
/* Find a free temp for POSITION. */
- for (i = 0; i < Elements(vsctx->temp_used); i++) {
+ for (i = 0; i < ARRAY_SIZE(vsctx->temp_used); i++) {
if (!vsctx->temp_used[i]) {
emit_temp(ctx, i);
vsctx->pos_temp = i;
@@ -325,7 +325,7 @@ void r300_draw_init_vertex_shader(struct r300_context *r300,
return;
memset(&transform, 0, sizeof(transform));
- for (i = 0; i < Elements(transform.out_remap); i++) {
+ for (i = 0; i < ARRAY_SIZE(transform.out_remap); i++) {
transform.out_remap[i] = i;
}
transform.last_generic = -1;