diff options
Diffstat (limited to 'src/gallium/drivers/trace/tr_buffer.c')
-rw-r--r-- | src/gallium/drivers/trace/tr_buffer.c | 6 |
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); } |