From b07d19a8859efb930d837c3b324be94cf412d819 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Sat, 8 Aug 2009 20:38:01 +0100 Subject: [PATCH] llvmpipe: Normalize the cycles with the number of channel. So that we have a comparable number for different formats. --- src/gallium/drivers/llvmpipe/lp_test_blend.c | 4 ++-- src/gallium/drivers/llvmpipe/lp_test_conv.c | 8 +++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/gallium/drivers/llvmpipe/lp_test_blend.c b/src/gallium/drivers/llvmpipe/lp_test_blend.c index a1e4ddf8542..8dc16e3511a 100644 --- a/src/gallium/drivers/llvmpipe/lp_test_blend.c +++ b/src/gallium/drivers/llvmpipe/lp_test_blend.c @@ -51,7 +51,7 @@ write_tsv_header(FILE *fp) { fprintf(fp, "result\t" - "cycles\t" + "cycles_per_channel\t" "type\t" "sep_func\t" "sep_src_factor\t" @@ -76,7 +76,7 @@ write_tsv_row(FILE *fp, { fprintf(fp, "%s\t", success ? "pass" : "fail"); - fprintf(fp, "%.1f\t", cycles + 0.5); + fprintf(fp, "%.1f\t", cycles / type.length); fprintf(fp, "%s%u%sx%u\t", type.floating ? "f" : (type.fixed ? "h" : (type.sign ? "s" : "u")), diff --git a/src/gallium/drivers/llvmpipe/lp_test_conv.c b/src/gallium/drivers/llvmpipe/lp_test_conv.c index 042c99310a6..3dd521d77b7 100644 --- a/src/gallium/drivers/llvmpipe/lp_test_conv.c +++ b/src/gallium/drivers/llvmpipe/lp_test_conv.c @@ -47,8 +47,7 @@ write_tsv_header(FILE *fp) { fprintf(fp, "result\t" - "cycles\t" - "type\t" + "cycles_per_channel\t" "src_type\t" "dst_type\n"); @@ -65,13 +64,13 @@ write_tsv_row(FILE *fp, { fprintf(fp, "%s\t", success ? "pass" : "fail"); - fprintf(fp, "%.1f\t", cycles + 0.5); + fprintf(fp, "%.1f\t", cycles / MAX2(src_type.length, dst_type.length)); dump_type(fp, src_type); fprintf(fp, "\t"); dump_type(fp, dst_type); - fprintf(fp, "\t"); + fprintf(fp, "\n"); fflush(fp); } @@ -178,7 +177,6 @@ test_one(unsigned verbose, /* We must not loose or gain channels. Only precision */ assert(src_type.length * num_srcs == dst_type.length * num_dsts); - module = LLVMModuleCreateWithName("test"); func = add_conv_test(module, src_type, num_srcs, dst_type, num_dsts); -- 2.30.2