From 05ea705c7c6212d16fcc9bcf04619ffd4311bb03 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Fri, 11 May 2012 22:56:08 +0200 Subject: r600g: remove slab allocator for pipe_resource (used mainly for user buffers) --- src/gallium/drivers/r600/r600_buffer.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/gallium/drivers/r600/r600_buffer.c') diff --git a/src/gallium/drivers/r600/r600_buffer.c b/src/gallium/drivers/r600/r600_buffer.c index 2f7eb513d4e..3d7d1f04739 100644 --- a/src/gallium/drivers/r600/r600_buffer.c +++ b/src/gallium/drivers/r600/r600_buffer.c @@ -26,15 +26,15 @@ */ #include "r600_pipe.h" #include "util/u_upload_mgr.h" +#include "util/u_memory.h" static void r600_buffer_destroy(struct pipe_screen *screen, struct pipe_resource *buf) { - struct r600_screen *rscreen = (struct r600_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, @@ -207,7 +207,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); @@ -215,7 +215,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; -- cgit v1.2.3