diff options
author | Jan Vesely <[email protected]> | 2016-05-17 09:25:44 -0400 |
---|---|---|
committer | Jan Vesely <[email protected]> | 2016-05-17 15:28:04 -0400 |
commit | 47b390fe45e5e6f982c60b58985892438959cd8e (patch) | |
tree | 61a26199f85287a7e918c6c52db243280b6a3cba /src/gallium/tests | |
parent | 322cd2457ccf66a0a88d92f0b0dec1cb3f93eae4 (diff) |
Treewide: Remove Elements() macro
Signed-off-by: Jan Vesely <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/tests')
-rw-r--r-- | src/gallium/tests/graw/vs-test.c | 2 | ||||
-rw-r--r-- | src/gallium/tests/trivial/compute.c | 6 | ||||
-rw-r--r-- | src/gallium/tests/unit/translate_test.c | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/gallium/tests/graw/vs-test.c b/src/gallium/tests/graw/vs-test.c index 5c7843eb11a..3a55131669b 100644 --- a/src/gallium/tests/graw/vs-test.c +++ b/src/gallium/tests/graw/vs-test.c @@ -227,7 +227,7 @@ static void draw( void ) union pipe_color_union clear_color = { {.1,.3,.5,0} }; ctx->clear(ctx, PIPE_CLEAR_COLOR, &clear_color, 0, 0); - util_draw_arrays(ctx, PIPE_PRIM_POINTS, 0, Elements(vertices)); + util_draw_arrays(ctx, PIPE_PRIM_POINTS, 0, ARRAY_SIZE(vertices)); ctx->flush(ctx, NULL, 0); graw_save_surface_to_file(ctx, surf, NULL); diff --git a/src/gallium/tests/trivial/compute.c b/src/gallium/tests/trivial/compute.c index 5d012ac3838..443451e13d2 100644 --- a/src/gallium/tests/trivial/compute.c +++ b/src/gallium/tests/trivial/compute.c @@ -155,7 +155,7 @@ static void init_prog(struct context *ctx, unsigned local_sz, char *psrc = preprocess_prog(ctx, src, defs); int ret; - ret = tgsi_text_translate(psrc, prog, Elements(prog)); + ret = tgsi_text_translate(psrc, prog, ARRAY_SIZE(prog)); assert(ret); free(psrc); @@ -1125,7 +1125,7 @@ static void test_surface_ld(struct context *ctx) init_prog(ctx, 0, 0, 0, src, NULL); - for (i = 0; i < Elements(surface_fmts); i++) { + for (i = 0; i < ARRAY_SIZE(surface_fmts); i++) { bool is_int = util_format_is_pure_integer(surface_fmts[i]); printf(" - %s\n", util_format_name(surface_fmts[i])); @@ -1243,7 +1243,7 @@ static void test_surface_st(struct context *ctx) init_prog(ctx, 0, 0, 0, src, NULL); - for (i = 0; i < Elements(surface_fmts); i++) { + for (i = 0; i < ARRAY_SIZE(surface_fmts); i++) { bool is_signed = (util_format_description(surface_fmts[i]) ->channel[0].type == UTIL_FORMAT_TYPE_SIGNED); bool is_int = util_format_is_pure_integer(surface_fmts[i]); diff --git a/src/gallium/tests/unit/translate_test.c b/src/gallium/tests/unit/translate_test.c index 7ca606750a9..cc2f83a74ad 100644 --- a/src/gallium/tests/unit/translate_test.c +++ b/src/gallium/tests/unit/translate_test.c @@ -134,7 +134,7 @@ int main(int argc, char** argv) return 2; } - for (i = 1; i < Elements(buffer); ++i) + for (i = 1; i < ARRAY_SIZE(buffer); ++i) buffer[i] = align_malloc(buffer_size, 4096); byte_buffer = align_malloc(buffer_size, 4096); @@ -294,7 +294,7 @@ int main(int argc, char** argv) if (1) { - for (i = 0; i < Elements(buffer); ++i) + for (i = 0; i < ARRAY_SIZE(buffer); ++i) { unsigned format_size = (i & 1) ? output_format_size : input_format_size; printf("%c ", (i == 2 || i == 4) ? '*' : ' '); |