llvmpipe: Added a error counter to lp_test_conv.
authorJames Benton <jbenton@vmware.com>
Fri, 18 May 2012 15:17:26 +0000 (16:17 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Mon, 21 May 2012 19:24:53 +0000 (20:24 +0100)
Useful for keeping track of progress when fixing errors!

Signed-off-by: José Fonseca <jfonseca@vmware.com>
src/gallium/drivers/llvmpipe/lp_test_conv.c

index 307b8d999b0c1db9292d48d4405ffd30f0cf0718..0dcb5422887d36df0848f229267763009c3e5780 100644 (file)
@@ -386,6 +386,7 @@ test_all(struct gallivm_state *gallivm, unsigned verbose, FILE *fp)
    const struct lp_type *src_type;
    const struct lp_type *dst_type;
    boolean success = TRUE;
+   int error_count = 0;
 
    for(src_type = conv_types; src_type < &conv_types[num_types]; ++src_type) {
       for(dst_type = conv_types; dst_type < &conv_types[num_types]; ++dst_type) {
@@ -393,12 +394,15 @@ test_all(struct gallivm_state *gallivm, unsigned verbose, FILE *fp)
          if(src_type == dst_type)
             continue;
 
-         if(!test_one(gallivm, verbose, fp, *src_type, *dst_type))
-           success = FALSE;
-
+         if(!test_one(gallivm, verbose, fp, *src_type, *dst_type)){
+            success = FALSE;
+            ++error_count;
+         }
       }
    }
 
+   fprintf(stderr, "%d failures\n", error_count);
+
    return success;
 }