diff options
author | Marek Olšák <[email protected]> | 2012-05-11 22:56:08 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2012-05-13 14:32:57 +0200 |
commit | ed9955dc29cb948c5516c9179ccd2c8656ba9f04 (patch) | |
tree | 764cabf1a95fdd80d28064ba10f908a0e95411b3 /src/gallium/drivers/radeonsi/r600_buffer.c | |
parent | 05ea705c7c6212d16fcc9bcf04619ffd4311bb03 (diff) |
radeonsi: remove slab allocator for pipe_resource (used mainly for user buffers)
Diffstat (limited to 'src/gallium/drivers/radeonsi/r600_buffer.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/r600_buffer.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/radeonsi/r600_buffer.c b/src/gallium/drivers/radeonsi/r600_buffer.c index 8fd7e277431..15bff912e13 100644 --- a/src/gallium/drivers/radeonsi/r600_buffer.c +++ b/src/gallium/drivers/radeonsi/r600_buffer.c @@ -43,7 +43,7 @@ static void r600_buffer_destroy(struct pipe_screen *screen, struct r600_resource *rbuffer = r600_resource(buf); pb_reference(&rbuffer->buf, NULL); - util_slab_free(&rscreen->pool_buffers, rbuffer); + FREE(rbuffer); } static struct pipe_transfer *r600_get_transfer(struct pipe_context *ctx, @@ -164,7 +164,7 @@ struct pipe_resource *r600_buffer_create(struct pipe_screen *screen, /* XXX We probably want a different alignment for buffers and textures. */ unsigned alignment = 4096; - rbuffer = util_slab_alloc(&rscreen->pool_buffers); + rbuffer = MALLOC_STRUCT(r600_resource); rbuffer->b.b = *templ; pipe_reference_init(&rbuffer->b.b.reference, 1); @@ -172,7 +172,7 @@ struct pipe_resource *r600_buffer_create(struct pipe_screen *screen, rbuffer->b.vtbl = &r600_buffer_vtbl; if (!r600_init_resource(rscreen, rbuffer, templ->width0, alignment, templ->bind, templ->usage)) { - util_slab_free(&rscreen->pool_buffers, rbuffer); + FREE(rbuffer); return NULL; } return &rbuffer->b.b; |