trace: Re-init refcounters just incase
authorJakob Bornecrantz <jakob@vmware.com>
Mon, 16 Mar 2009 19:32:14 +0000 (20:32 +0100)
committerJakob Bornecrantz <jakob@vmware.com>
Mon, 16 Mar 2009 19:33:30 +0000 (20:33 +0100)
src/gallium/drivers/trace/tr_buffer.c
src/gallium/drivers/trace/tr_texture.c

index 12c491c571d237ef5650988e5c97b3a8cbc20ea2..6ffce1660ec88e081f061157d1356f60b3992f6d 100644 (file)
@@ -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;
 
index 42f13e633ed8e1069f47a7711b3576a1c29041e3..7b392f0728692b445ba870205a96c40904c7e473 100644 (file)
@@ -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;