summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe/lp_context.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2010-01-21 14:59:01 -0700
committerBrian Paul <[email protected]>2010-01-21 15:39:57 -0700
commitcd9d9e2436a0815f6ed3a61d2cdf8fad53278506 (patch)
tree4361bb4916bf5e3148031fc6afe7bebf7fe3fc44 /src/gallium/drivers/llvmpipe/lp_context.c
parent63f249bf909cab60635c2df9122db86eaab6c421 (diff)
llvmpipe: added simple perf/statistics counting facility
Currently counting number of tris, how many tiles of each size are fully covered, partially covered or empty, etc. Set LP_DEBUG=counters to enable. Results are printed upon context destruction.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_context.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_context.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_context.c b/src/gallium/drivers/llvmpipe/lp_context.c
index c5b00f8e23f..51de6f93ca7 100644
--- a/src/gallium/drivers/llvmpipe/lp_context.c
+++ b/src/gallium/drivers/llvmpipe/lp_context.c
@@ -38,6 +38,7 @@
#include "lp_clear.h"
#include "lp_context.h"
#include "lp_flush.h"
+#include "lp_perf.h"
#include "lp_state.h"
#include "lp_surface.h"
#include "lp_texture.h"
@@ -54,6 +55,8 @@ static void llvmpipe_destroy( struct pipe_context *pipe )
struct llvmpipe_context *llvmpipe = llvmpipe_context( pipe );
uint i;
+ lp_print_counters();
+
/* This will also destroy llvmpipe->setup:
*/
if (llvmpipe->draw)
@@ -195,6 +198,8 @@ llvmpipe_create( struct pipe_screen *screen )
lp_init_surface_functions(llvmpipe);
+ lp_reset_counters();
+
return &llvmpipe->pipe;
fail: