llvmpipe: added counters for color tile clear, load, store
authorBrian Paul <brianp@vmware.com>
Mon, 8 Feb 2010 20:09:18 +0000 (13:09 -0700)
committerBrian Paul <brianp@vmware.com>
Mon, 8 Feb 2010 23:57:23 +0000 (16:57 -0700)
src/gallium/drivers/llvmpipe/lp_perf.c
src/gallium/drivers/llvmpipe/lp_perf.h
src/gallium/drivers/llvmpipe/lp_rast.c

index 042218b27fc6ac3f42f30d0eccd5803f00d55925..a316597675ce89acb724d207932e95ec42276839 100644 (file)
@@ -83,8 +83,13 @@ lp_print_counters(void)
       debug_printf("llvmpipe: nr_empty_4x4:               %9u (%2.0f%% of %u)\n", lp_count.nr_empty_4, p1, total_4);
       debug_printf("llvmpipe: nr_non_empty_4x4:           %9u (%2.0f%% of %u)\n", lp_count.nr_non_empty_4, p2, total_4);
 
+      debug_printf("llvmpipe: nr_color_tile_clear:        %9u\n", lp_count.nr_color_tile_clear);
+      debug_printf("llvmpipe: nr_color_tile_load:         %9u\n", lp_count.nr_color_tile_load);
+      debug_printf("llvmpipe: nr_color_tile_store:        %9u\n", lp_count.nr_color_tile_store);
+
       debug_printf("llvmpipe: nr_llvm_compiles:           %u\n", lp_count.nr_llvm_compiles);
       debug_printf("llvmpipe: total LLVM compile time:    %.2f sec\n", lp_count.llvm_compile_time / 1000000.0);
       debug_printf("llvmpipe: average LLVM compile time:  %.2f sec\n", lp_count.llvm_compile_time / 1000000.0 / lp_count.nr_llvm_compiles);
+
    }
 }
index d982bcc989b345a020df42e39cc201401f20668d..a9629dae3c7882d4c1f1c94de7b643bf34e18a3b 100644 (file)
@@ -51,6 +51,10 @@ struct lp_counters
    unsigned nr_non_empty_4;
    unsigned nr_llvm_compiles;
    int64_t llvm_compile_time;  /**< total, in microseconds */
+
+   unsigned nr_color_tile_clear;
+   unsigned nr_color_tile_load;
+   unsigned nr_color_tile_store;
 };
 
 
index 7855e03bed1c807716179a38cdfe9e46cbac0f56..5ae323fd96cd2b0847aed2dae8f351b09831a6ba 100644 (file)
@@ -34,6 +34,7 @@
 #include "lp_scene_queue.h"
 #include "lp_debug.h"
 #include "lp_fence.h"
+#include "lp_perf.h"
 #include "lp_rast.h"
 #include "lp_rast_priv.h"
 #include "lp_tile_soa.h"
@@ -215,6 +216,8 @@ void lp_rast_clear_color( struct lp_rasterizer *rast,
          assert(c - color_tile[i] == TILE_SIZE * TILE_SIZE * 4);
       }
    }
+
+   LP_COUNT(nr_color_tile_clear);
 }
 
 
@@ -273,6 +276,8 @@ void lp_rast_load_color( struct lp_rasterizer *rast,
                       transfer->stride,
                       x, y,
                       w, h);
+
+      LP_COUNT(nr_color_tile_load);
    }
 }
 
@@ -546,6 +551,8 @@ static void lp_rast_store_color( struct lp_rasterizer *rast,
                        transfer->stride,
                        x, y,
                        w, h);
+
+      LP_COUNT(nr_color_tile_store);
    }
 }