From 44d0e0caf4ad3b01dc08d8432867c449dc3f2a23 Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Fri, 17 Apr 2009 15:55:51 +0200 Subject: trace: Keep screen objects on lists --- src/gallium/drivers/trace/tr_context.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/gallium/drivers/trace/tr_context.c') diff --git a/src/gallium/drivers/trace/tr_context.c b/src/gallium/drivers/trace/tr_context.c index 696b6a4f59b..38646f8aad3 100644 --- a/src/gallium/drivers/trace/tr_context.c +++ b/src/gallium/drivers/trace/tr_context.c @@ -26,6 +26,8 @@ **************************************************************************/ #include "util/u_memory.h" +#include "util/u_simple_list.h" + #include "pipe/p_screen.h" #include "tr_dump.h" @@ -1014,16 +1016,17 @@ trace_context_flush(struct pipe_context *_pipe, static INLINE void trace_context_destroy(struct pipe_context *_pipe) { + struct trace_screen *tr_scr = trace_screen(_pipe->screen); struct trace_context *tr_ctx = trace_context(_pipe); struct pipe_context *pipe = tr_ctx->pipe; trace_dump_call_begin("pipe_context", "destroy"); - trace_dump_arg(ptr, pipe); + trace_dump_call_end(); - pipe->destroy(pipe); + trace_screen_remove_from_list(tr_scr, contexts, tr_ctx); - trace_dump_call_end(); + pipe->destroy(pipe); FREE(tr_ctx); } @@ -1150,6 +1153,8 @@ trace_context_create(struct pipe_screen *_screen, trace_dump_ret(ptr, pipe); trace_dump_call_end(); + trace_screen_add_to_list(tr_scr, contexts, tr_ctx); + return &tr_ctx->base; error1: -- cgit v1.2.3