summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r300/r300_context.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/r300/r300_context.c')
-rw-r--r--src/gallium/drivers/r300/r300_context.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gallium/drivers/r300/r300_context.c b/src/gallium/drivers/r300/r300_context.c
index deaa03e1f6..43a42490a0 100644
--- a/src/gallium/drivers/r300/r300_context.c
+++ b/src/gallium/drivers/r300/r300_context.c
@@ -41,10 +41,21 @@ static void r300_destroy_context(struct pipe_context* context)
{
struct r300_context* r300 = r300_context(context);
struct r300_query* query, * temp;
+ struct r300_atom *atom;
util_blitter_destroy(r300->blitter);
draw_destroy(r300->draw);
+ /* Print stats, if enabled. */
+ if (SCREEN_DBG_ON(r300->screen, DBG_STATS)) {
+ fprintf(stderr, "r300: Stats for context %p:\n", r300);
+ fprintf(stderr, " : Flushes: %llu\n", r300->flush_counter);
+ foreach(atom, &r300->atom_list) {
+ fprintf(stderr, " : %s: %llu emits\n",
+ atom->name, atom->counter);
+ }
+ }
+
/* Free the OQ BO. */
context->screen->resource_destroy(context->screen, r300->oqbo);