diff options
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_test.h | 2 | ||||
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_test_blend.c | 8 | ||||
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_test_conv.c | 26 | ||||
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_test_format.c | 8 | ||||
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_test_main.c | 7 | ||||
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_test_printf.c | 8 | ||||
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_test_sincos.c | 7 |
7 files changed, 63 insertions, 3 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_test.h b/src/gallium/drivers/llvmpipe/lp_test.h index 338a04a487..90422e4258 100644 --- a/src/gallium/drivers/llvmpipe/lp_test.h +++ b/src/gallium/drivers/llvmpipe/lp_test.h @@ -66,6 +66,8 @@ write_tsv_header(FILE *fp); boolean test_some(unsigned verbose, FILE *fp, unsigned long n); +boolean +test_single(unsigned verbose, FILE *fp); boolean test_all(unsigned verbose, FILE *fp); diff --git a/src/gallium/drivers/llvmpipe/lp_test_blend.c b/src/gallium/drivers/llvmpipe/lp_test_blend.c index 557eb8e3e6..0c95555655 100644 --- a/src/gallium/drivers/llvmpipe/lp_test_blend.c +++ b/src/gallium/drivers/llvmpipe/lp_test_blend.c @@ -895,3 +895,11 @@ test_some(unsigned verbose, FILE *fp, unsigned long n) return success; } + + +boolean +test_single(unsigned verbose, FILE *fp) +{ + printf("no test_single()"); + return TRUE; +} diff --git a/src/gallium/drivers/llvmpipe/lp_test_conv.c b/src/gallium/drivers/llvmpipe/lp_test_conv.c index cb0d02ab32..9b02f436c5 100644 --- a/src/gallium/drivers/llvmpipe/lp_test_conv.c +++ b/src/gallium/drivers/llvmpipe/lp_test_conv.c @@ -260,10 +260,15 @@ test_one(unsigned verbose, success = FALSE; } - if (!success) { + if (!success || verbose >= 3) { if(verbose < 1) dump_conv_types(stderr, src_type, dst_type); - fprintf(stderr, "MISMATCH\n"); + if (success) { + fprintf(stderr, "PASS\n"); + } + else { + fprintf(stderr, "MISMATCH\n"); + } for(j = 0; j < num_srcs; ++j) { fprintf(stderr, " Src%u: ", j); @@ -429,3 +434,20 @@ test_some(unsigned verbose, FILE *fp, unsigned long n) return success; } + + +boolean +test_single(unsigned verbose, FILE *fp) +{ + /* float, fixed, sign, norm, width, len */ + struct lp_type f32x4_type = + { TRUE, FALSE, TRUE, TRUE, 32, 4 }; + struct lp_type ub8x4_type = + { FALSE, FALSE, FALSE, TRUE, 8, 16 }; + + boolean success; + + success = test_one(verbose, fp, f32x4_type, ub8x4_type); + + return success; +} diff --git a/src/gallium/drivers/llvmpipe/lp_test_format.c b/src/gallium/drivers/llvmpipe/lp_test_format.c index 7c0d7d2e65..8b6dc1c7f5 100644 --- a/src/gallium/drivers/llvmpipe/lp_test_format.c +++ b/src/gallium/drivers/llvmpipe/lp_test_format.c @@ -269,3 +269,11 @@ test_some(unsigned verbose, FILE *fp, unsigned long n) { return test_all(verbose, fp); } + + +boolean +test_single(unsigned verbose, FILE *fp) +{ + printf("no test_single()"); + return TRUE; +} diff --git a/src/gallium/drivers/llvmpipe/lp_test_main.c b/src/gallium/drivers/llvmpipe/lp_test_main.c index f9dce8b9c2..7bbbc61d4c 100644 --- a/src/gallium/drivers/llvmpipe/lp_test_main.c +++ b/src/gallium/drivers/llvmpipe/lp_test_main.c @@ -370,10 +370,13 @@ int main(int argc, char **argv) unsigned long n = 1000; unsigned i; boolean success; + boolean single = FALSE; for(i = 1; i < argc; ++i) { if(strcmp(argv[i], "-v") == 0) ++verbose; + else if(strcmp(argv[i], "-s") == 0) + single = TRUE; else if(strcmp(argv[i], "-o") == 0) fp = fopen(argv[++i], "wt"); else @@ -391,7 +394,9 @@ int main(int argc, char **argv) write_tsv_header(fp); } - if(n) + if (single) + success = test_single(verbose, fp); + else if (n) success = test_some(verbose, fp, n); else success = test_all(verbose, fp); diff --git a/src/gallium/drivers/llvmpipe/lp_test_printf.c b/src/gallium/drivers/llvmpipe/lp_test_printf.c index d99ca81638..21df83f9d8 100644 --- a/src/gallium/drivers/llvmpipe/lp_test_printf.c +++ b/src/gallium/drivers/llvmpipe/lp_test_printf.c @@ -165,3 +165,11 @@ test_some(unsigned verbose, FILE *fp, unsigned long n) { return test_all(verbose, fp); } + + +boolean +test_single(unsigned verbose, FILE *fp) +{ + printf("no test_single()"); + return TRUE; +} diff --git a/src/gallium/drivers/llvmpipe/lp_test_sincos.c b/src/gallium/drivers/llvmpipe/lp_test_sincos.c index da16fea7bd..c7a903a025 100644 --- a/src/gallium/drivers/llvmpipe/lp_test_sincos.c +++ b/src/gallium/drivers/llvmpipe/lp_test_sincos.c @@ -198,3 +198,10 @@ test_some(unsigned verbose, FILE *fp, unsigned long n) { return test_all(verbose, fp); } + +boolean +test_single(unsigned verbose, FILE *fp) +{ + printf("no test_single()"); + return TRUE; +} |