From 4aeacdf8530d69d543cb2b997c1e65edb71ae01a Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 8 Feb 2010 13:09:18 -0700 Subject: llvmpipe: added counters for color tile clear, load, store --- src/gallium/drivers/llvmpipe/lp_perf.c | 5 +++++ src/gallium/drivers/llvmpipe/lp_perf.h | 4 ++++ src/gallium/drivers/llvmpipe/lp_rast.c | 7 +++++++ 3 files changed, 16 insertions(+) diff --git a/src/gallium/drivers/llvmpipe/lp_perf.c b/src/gallium/drivers/llvmpipe/lp_perf.c index 042218b27f..a316597675 100644 --- a/src/gallium/drivers/llvmpipe/lp_perf.c +++ b/src/gallium/drivers/llvmpipe/lp_perf.c @@ -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); + } } diff --git a/src/gallium/drivers/llvmpipe/lp_perf.h b/src/gallium/drivers/llvmpipe/lp_perf.h index d982bcc989..a9629dae3c 100644 --- a/src/gallium/drivers/llvmpipe/lp_perf.h +++ b/src/gallium/drivers/llvmpipe/lp_perf.h @@ -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; }; diff --git a/src/gallium/drivers/llvmpipe/lp_rast.c b/src/gallium/drivers/llvmpipe/lp_rast.c index 7855e03bed..5ae323fd96 100644 --- a/src/gallium/drivers/llvmpipe/lp_rast.c +++ b/src/gallium/drivers/llvmpipe/lp_rast.c @@ -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); } } -- cgit v1.2.3