summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe/lp_test_conv.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2010-06-04 17:00:48 -0600
committerBrian Paul <brianp@vmware.com>2010-06-04 17:01:24 -0600
commit4f067ada47bfeef792e5adbed4f3e215b704212a (patch)
tree907fadd45a5e16e5d9c6df7a2d39bf73fa5deeb8 /src/gallium/drivers/llvmpipe/lp_test_conv.c
parentf0ff214bee64a705d3ef6610e9dc25bc1a46a460 (diff)
llvmpipe: new -s option to run single test
Put specific test code in the test_single() function and pass -s to execute that code.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_test_conv.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_test_conv.c26
1 files changed, 24 insertions, 2 deletions
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;
+}