summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/trace/tr_buffer.c
diff options
context:
space:
mode:
authorJakob Bornecrantz <[email protected]>2009-04-17 15:55:51 +0200
committerJakob Bornecrantz <[email protected]>2009-04-17 16:03:01 +0200
commit44d0e0caf4ad3b01dc08d8432867c449dc3f2a23 (patch)
treea0d8ad22f727c44c3cca74d9cbcd48f949d30891 /src/gallium/drivers/trace/tr_buffer.c
parent1e42f68fd612b2a4c877b91393e5ff5bc34dbe0d (diff)
trace: Keep screen objects on lists
Diffstat (limited to 'src/gallium/drivers/trace/tr_buffer.c')
-rw-r--r--src/gallium/drivers/trace/tr_buffer.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/drivers/trace/tr_buffer.c b/src/gallium/drivers/trace/tr_buffer.c
index 3cdb107dc6b..4f0eff6a5a4 100644
--- a/src/gallium/drivers/trace/tr_buffer.c
+++ b/src/gallium/drivers/trace/tr_buffer.c
@@ -27,10 +27,10 @@
#include "util/u_memory.h"
+#include "util/u_simple_list.h"
#include "tr_buffer.h"
-
struct pipe_buffer *
trace_buffer_create(struct trace_screen *tr_scr,
struct pipe_buffer *buffer)
@@ -52,6 +52,8 @@ trace_buffer_create(struct trace_screen *tr_scr,
tr_buf->base.screen = &tr_scr->base;
tr_buf->buffer = buffer;
+ trace_screen_add_to_list(tr_scr, buffers, tr_buf);
+
return &tr_buf->base;
error:
@@ -66,6 +68,8 @@ trace_buffer_destroy(struct trace_screen *tr_scr,
{
struct trace_buffer *tr_buf = trace_buffer(buffer);
+ trace_screen_remove_from_list(tr_scr, buffers, tr_buf);
+
pipe_buffer_reference(&tr_buf->buffer, NULL);
FREE(tr_buf);
}