summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/trace/tr_buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/trace/tr_buffer.c')
-rw-r--r--src/gallium/drivers/trace/tr_buffer.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/trace/tr_buffer.c b/src/gallium/drivers/trace/tr_buffer.c
index 12c491c571d..6ffce1660ec 100644
--- a/src/gallium/drivers/trace/tr_buffer.c
+++ b/src/gallium/drivers/trace/tr_buffer.c
@@ -47,6 +47,8 @@ trace_buffer_create(struct trace_screen *tr_scr,
goto error;
memcpy(&tr_buf->base, buffer, sizeof(struct pipe_buffer));
+
+ pipe_reference_init(&tr_buf->base.reference, 1);
tr_buf->base.screen = &tr_scr->base;
tr_buf->buffer = buffer;