Mesa (master): llvmpipe: added counters for color tile clear, load, store
Brian Paul
brianp at kemper.freedesktop.org
Tue Feb 9 00:35:29 UTC 2010
Module: Mesa
Branch: master
Commit: 4aeacdf8530d69d543cb2b997c1e65edb71ae01a
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=4aeacdf8530d69d543cb2b997c1e65edb71ae01a
Author: Brian Paul <brianp at vmware.com>
Date: Mon Feb 8 13:09:18 2010 -0700
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(+), 0 deletions(-)
diff --git a/src/gallium/drivers/llvmpipe/lp_perf.c b/src/gallium/drivers/llvmpipe/lp_perf.c
index 042218b..a316597 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 d982bcc..a9629da 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 7855e03..5ae323f 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);
}
}
More information about the mesa-commit
mailing list