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;
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;
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;