summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Bornecrantz <jakob@vmware.com>2009-03-16 20:32:14 +0100
committerJakob Bornecrantz <jakob@vmware.com>2009-03-16 20:33:30 +0100
commit068fd6d50b4eaa51380a7424b50db930dfce675c (patch)
tree7c4570f4488588caeb53b88a3c3d88a5ea19950b
parentf73066fbd59ce2f5ce1268502850027bf4f0699b (diff)
trace: Re-init refcounters just incase
-rw-r--r--src/gallium/drivers/trace/tr_buffer.c2
-rw-r--r--src/gallium/drivers/trace/tr_texture.c3
2 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/trace/tr_buffer.c b/src/gallium/drivers/trace/tr_buffer.c
index 12c491c571..6ffce1660e 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;
diff --git a/src/gallium/drivers/trace/tr_texture.c b/src/gallium/drivers/trace/tr_texture.c
index 42f13e633e..7b392f0728 100644
--- a/src/gallium/drivers/trace/tr_texture.c
+++ b/src/gallium/drivers/trace/tr_texture.c
@@ -48,6 +48,8 @@ trace_texture_create(struct trace_screen *tr_scr,
goto error;
memcpy(&tr_tex->base, texture, sizeof(struct pipe_texture));
+
+ pipe_reference_init(&tr_tex->base.reference, 1);
tr_tex->base.screen = &tr_scr->base;
tr_tex->texture = texture;
@@ -86,6 +88,7 @@ trace_surface_create(struct trace_texture *tr_tex,
memcpy(&tr_surf->base, surface, sizeof(struct pipe_surface));
+ pipe_reference_init(&tr_surf->base.reference, 1);
tr_surf->base.texture = NULL;
pipe_texture_reference(&tr_surf->base.texture, &tr_tex->base);
tr_surf->surface = surface;